retail_detail.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. <template>
  2. <div class="detail-container">
  3. <div v-show="!isShowCheckOrder">
  4. <el-page-header @back="goBack" content="详情"></el-page-header>
  5. <div class="main-title">
  6. <div class="title">提货进度</div>
  7. </div>
  8. <div class="progress-container">
  9. <el-progress :text-inside="true" :stroke-width="26" :percentage="detailData.thjd ? (detailData.thjd * 1000 / 10) : 0"></el-progress>
  10. </div>
  11. <div class="main-title">
  12. <div class="title">订单信息</div>
  13. </div>
  14. <div class="diy-table-1">
  15. <el-row>
  16. <el-col :span="8" class="item">
  17. <div class="label">订单号</div>
  18. <div class="value">{{detailData.id}}</div>
  19. </el-col>
  20. <el-col :span="8" class="item">
  21. <div class="label">订单日期</div>
  22. <div class="value">{{detailData.theTime | dateToDayFilter}}</div>
  23. </el-col>
  24. <el-col :span="8" class="item">
  25. <div class="label">单据状态</div>
  26. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  27. </el-col>
  28. <el-col :span="16" class="item">
  29. <div class="label">备注</div>
  30. <div class="value">{{detailData.remark}}</div>
  31. </el-col>
  32. <el-col :span="8" class="item">
  33. <div class="label">业务员</div>
  34. <div class="value">{{detailData.serviceName}}</div>
  35. </el-col>
  36. <el-col :span="8" class="item">
  37. <div class="label">制单人</div>
  38. <div class="value">{{detailData.createName}}</div>
  39. </el-col>
  40. <el-col :span="8" class="item">
  41. <div class="label">制单日期</div>
  42. <div class="value">{{detailData.createTime}}</div>
  43. </el-col>
  44. <el-col :span="8" class="item">
  45. <div class="label">审核人</div>
  46. <div class="value">{{detailData.examineName}}</div>
  47. </el-col>
  48. <el-col :span="8" class="item">
  49. <div class="label">审核日期</div>
  50. <div class="value">{{detailData.examineTime}}</div>
  51. </el-col>
  52. <el-col :span="8" class="item">
  53. <div class="label">关闭人</div>
  54. <div class="value">{{detailData.closeName}}</div>
  55. </el-col>
  56. <el-col :span="8" class="item">
  57. <div class="label">关闭日期</div>
  58. <div class="value">{{detailData.closeTime}}</div>
  59. </el-col>
  60. </el-row>
  61. </div>
  62. <div class="main-title">
  63. <div class="title">货品信息</div>
  64. </div>
  65. <div class="table" style="margin-top: 20px">
  66. <el-table
  67. :data="detailData.retailOrderItemList"
  68. element-loading-text="Loading"
  69. border
  70. fit
  71. highlight-current-row
  72. stripe
  73. max-height="400"
  74. show-summary
  75. :summary-method="$getSummaries">
  76. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  77. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  78. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  79. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  80. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  81. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  82. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  83. <template slot-scope="scope">
  84. {{ scope.row.price | numToFixed }}
  85. </template>
  86. </el-table-column>
  87. <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  88. <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
  89. <template slot-scope="scope">
  90. {{ scope.row.totalAmount | numToFixed }}
  91. </template>
  92. </el-table-column>
  93. <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="140" show-overflow-tooltip></el-table-column>
  94. <el-table-column align="right" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
  95. <template slot-scope="scope">
  96. {{ scope.row.payRebateAmount | numToFixed }}
  97. </template>
  98. </el-table-column>
  99. <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
  100. <template slot-scope="scope">
  101. {{ scope.row.totalDiscAmount | numToFixed }}
  102. </template>
  103. </el-table-column>
  104. <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="140" show-overflow-tooltip></el-table-column>
  105. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
  106. <template slot-scope="scope">
  107. {{ scope.row.payAmount | numToFixed }}
  108. </template>
  109. </el-table-column>
  110. <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  111. <template slot-scope="scope">
  112. {{scope.row.isDirectTransfer ? '是':'否'}}
  113. </template>
  114. </el-table-column>
  115. <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
  116. <el-table-column align="right" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
  117. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  118. <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  119. </el-table>
  120. </div>
  121. <div>
  122. <div class="main-title">
  123. <div class="title">审批记录</div>
  124. </div>
  125. <div class="diy-table-1">
  126. <el-row :gutter="0">
  127. <el-col :span="12" class="item">
  128. <div class="label">审批人</div>
  129. <div class="value">{{detailData.examineName}}</div>
  130. </el-col>
  131. <el-col :span="12" class="item">
  132. <div class="label">审批结果</div>
  133. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  134. </el-col>
  135. <el-col :span="24" class="item">
  136. <div class="label">审批说明</div>
  137. <div class="value">{{detailData.examineRemark}}</div>
  138. </el-col>
  139. </el-row>
  140. </div>
  141. </div>
  142. <div class="page-footer">
  143. <div class="footer">
  144. <el-button type="success" @click="toCheckOrder">联查单据</el-button>
  145. <el-button type="primary" @click="openDirectDialog" :disabled="detailData.examineStatus !== 'OK'">提前开票</el-button>
  146. <el-button type="primary" @click="openDeliverDialog" :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus === true">直调发货</el-button>
  147. <el-button type="primary" @click="handleFinish" :disabled="detailData.examineStatus !== 'OK'" v-if="isDealer">直调完成</el-button>
  148. <el-button @click="goBack">关 闭</el-button>
  149. </div>
  150. </div>
  151. </div>
  152. <el-dialog title="直调发货" :visible.sync="isShowDeliverDialog" width="80%">
  153. <el-form ref="deliverForm" :model="deliverForm" :rules="deliverFormRules" label-width="80px" size="small" label-position="left">
  154. <el-row :gutter="20">
  155. <el-col :xs="8" :sm="8" :lg="8" style="height: 51px;">
  156. <el-form-item label="发货日期" prop="date">
  157. <el-date-picker
  158. v-model="deliverForm.date"
  159. type="date"
  160. value-format="yyyy-MM-dd"
  161. style="width: 100%;"
  162. placeholder="选择日期">
  163. </el-date-picker>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :xs="8" :sm="8" :lg="8">
  167. <el-form-item label="选择仓位" prop="position">
  168. <el-select v-model="deliverForm.position" placeholder="请选择仓位" style="width: 100%" filterable>
  169. <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  170. </el-select>
  171. </el-form-item>
  172. </el-col>
  173. </el-row>
  174. </el-form>
  175. <div class="table" style="margin-top: 20px">
  176. <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  177. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  178. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  179. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  180. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  181. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  182. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  183. <el-table-column align="right" label="订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  184. <el-table-column align="right" label="发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
  185. <el-table-column align="right" label="直调数量" prop="adjustNum" min-width="100" show-overflow-tooltip>
  186. <template slot-scope="scope">
  187. <el-input v-model="scope.row.adjustNum" size="small" type="number" :disabled="!scope.row.isDirectTransfer"></el-input>
  188. </template>
  189. </el-table-column>
  190. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  191. <template slot-scope="scope">
  192. {{ scope.row.price | numToFixed }}
  193. </template>
  194. </el-table-column>
  195. <el-table-column align="right" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
  196. <template slot-scope="scope">
  197. {{ scope.row.totalAmount | numToFixed }}
  198. </template>
  199. </el-table-column>
  200. <el-table-column align="right" label="返利" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
  201. <template slot-scope="scope">
  202. {{ scope.row.payRebateAmount | numToFixed }}
  203. </template>
  204. </el-table-column>
  205. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
  206. <template slot-scope="scope">
  207. {{ scope.row.payAmount | numToFixed }}
  208. </template>
  209. </el-table-column>
  210. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  211. </el-table>
  212. </div>
  213. <span slot="footer" class="dialog-footer">
  214. <el-button @click="closeDeliverDialog">取 消</el-button>
  215. <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
  216. </span>
  217. </el-dialog>
  218. <el-dialog title="直接调拨单(提前开票)" :visible.sync="isShowDirectDialog" width="80%">
  219. <el-form ref="directForm" :model="directForm" :rules="directFormRules" label-width="80px" size="small" label-position="left">
  220. <el-row :gutter="20">
  221. <el-col :xs="12" :sm="6" :lg="6">
  222. <el-form-item label="调出仓库" prop="warehouse1">
  223. <el-select v-model="directForm.warehouse1" placeholder="请选择调出仓库" style="width: 100%" filterable @change="changeWarehouse1">
  224. <el-option v-for="item in warehouseList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
  225. </el-select>
  226. </el-form-item>
  227. </el-col>
  228. <el-col :xs="12" :sm="6" :lg="6">
  229. <el-form-item label="调出仓位" prop="position1">
  230. <el-select v-model="directForm.position1" placeholder="请调出仓位" style="width: 100%" filterable @change="changePosition1">
  231. <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
  232. </el-select>
  233. </el-form-item>
  234. </el-col>
  235. <el-col :xs="12" :sm="6" :lg="6">
  236. <el-form-item label="调入仓库" prop="warehouse2">
  237. <el-select v-model="directForm.warehouse2" placeholder="请选择调入仓库" style="width: 100%" filterable @change="changeWarehouse2">
  238. <el-option v-for="item in warehouseList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
  239. </el-select>
  240. </el-form-item>
  241. </el-col>
  242. <el-col :xs="12" :sm="6" :lg="6">
  243. <el-form-item label="调入仓位" prop="position2">
  244. <el-select v-model="directForm.position2" placeholder="请调入仓位" style="width: 100%" filterable @change="changePosition2">
  245. <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
  246. </el-select>
  247. </el-form-item>
  248. </el-col>
  249. </el-row>
  250. </el-form>
  251. <div class="table" style="margin-top: 20px">
  252. <el-table :data="directGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  253. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  254. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  255. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  256. <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
  257. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  258. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  259. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  260. <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
  261. <el-table-column align="center" label="调出仓库" prop="warehouse1" min-width="100" show-overflow-tooltip></el-table-column>
  262. <el-table-column align="center" label="调出仓位" prop="position1" min-width="100" show-overflow-tooltip></el-table-column>
  263. <el-table-column align="center" label="调入仓库" prop="warehouse2" min-width="100" show-overflow-tooltip></el-table-column>
  264. <el-table-column align="center" label="调入仓位" prop="position2" min-width="100" show-overflow-tooltip></el-table-column>
  265. <el-table-column align="center" label="调出库存状态" prop="status1" min-width="110" show-overflow-tooltip></el-table-column>
  266. <el-table-column align="center" label="调入库存状态" prop="status2" min-width="110" show-overflow-tooltip></el-table-column>
  267. <el-table-column align="center" label="调出货主" min-width="100" show-overflow-tooltip>
  268. <template slot-scope="">弘格</template>
  269. </el-table-column>
  270. <el-table-column align="center" label="调入货主" min-width="100" show-overflow-tooltip>
  271. <template slot-="scope">弘格</template>
  272. </el-table-column>
  273. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  274. </el-table>
  275. </div>
  276. <span slot="footer" class="dialog-footer">
  277. <el-button @click="closeDirectDialog">取 消</el-button>
  278. <el-button type="primary" @click="submitDirectForm">确 定</el-button>
  279. </span>
  280. </el-dialog>
  281. <CheckOrder :checkOrderId="checkOrderId" v-if="isShowCheckOrder" @backDetail="backDetail" />
  282. </div>
  283. </template>
  284. <script>
  285. import { getDetail, getWarehouseList, adjustDeliver, finishData, directOrder, getPositionList } from "@/api/supply/retail";
  286. import CheckOrder from "@/components/Common/check-order";
  287. export default {
  288. name: 'RetailDetail',
  289. componentName: 'RetailDetail',
  290. components: {
  291. CheckOrder,
  292. },
  293. props: ['listItem'],
  294. filters: {
  295. statusFilter(val) {
  296. const statusList = [
  297. { label: '已保存', value: 'SAVE' },
  298. { label: '待审核', value: 'WAIT' },
  299. { label: '审核通过', value: 'OK' },
  300. { label: '审核驳回', value: 'FAIL' },
  301. ];
  302. let obj = statusList.find(o => o.value == val);
  303. return obj ? obj.label : ''
  304. }
  305. },
  306. data() {
  307. return {
  308. detailData: {},
  309. isShowDeliverDialog: false,
  310. deliverForm: {
  311. date: '',
  312. position: '',
  313. },
  314. deliverFormRules: {
  315. date: [
  316. { required: true, message: '请选择发货日期', trigger: 'change' }
  317. ],
  318. position: [
  319. { required: true, message: '请选择虚拟仓位', trigger: 'change' }
  320. ],
  321. },
  322. positionList: [],
  323. goodsList: [],
  324. isShowDirectDialog: false,
  325. directForm: {
  326. warehouse1: '',
  327. position1: '',
  328. warehouse2: '',
  329. position2: '',
  330. },
  331. directFormRules: {
  332. warehouse1: [
  333. { required: true, message: '请选择调出仓库', trigger: 'change' }
  334. ],
  335. position1: [
  336. { required: true, message: '请选择调出仓位', trigger: 'change' }
  337. ],
  338. warehouse2: [
  339. { required: true, message: '请选择调入仓库', trigger: 'change' }
  340. ],
  341. position2: [
  342. { required: true, message: '请选择调入仓位', trigger: 'change' }
  343. ],
  344. },
  345. warehouseList1: [],
  346. warehouseList2: [],
  347. positionList1: [],
  348. positionList2: [],
  349. directGoodsList: [],
  350. checkOrderId: {},
  351. isShowCheckOrder: false,
  352. }
  353. },
  354. computed: {
  355. isExamine() {
  356. return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
  357. },
  358. isDealer() {
  359. return JSON.parse(localStorage.getItem("supply_user")).isCustomer
  360. },
  361. },
  362. created() {
  363. this.getDetail();
  364. },
  365. methods: {
  366. // 返回列表
  367. goBack() {
  368. this.$emit('backListFormDetail');
  369. },
  370. // 获取详情
  371. getDetail() {
  372. getDetail({id: this.listItem.id}).then(res => {
  373. if(res.data.retailOrderItemList) {
  374. res.data.retailOrderItemList.forEach(item => {
  375. item.sums1 = ['directTransferQty', 'qty', 'refundableQty', 'oldQty'];
  376. item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount', 'totalDiscAmount'];
  377. })
  378. }
  379. this.detailData = res.data;
  380. })
  381. },
  382. // 获取仓库列表
  383. getWarehouseList() {
  384. getWarehouseList({
  385. pageNum: 1,
  386. pageSize: -1,
  387. }).then(res => {
  388. this.warehouseList1 = res.data.records;
  389. this.warehouseList2 = res.data.records;
  390. })
  391. },
  392. // 获取虚拟仓位列表
  393. getPositionList() {
  394. getPositionList({
  395. pageNum: 1,
  396. pageSize: -1,
  397. stockType: 1
  398. }).then(res => {
  399. this.positionList = res.data.records;
  400. })
  401. },
  402. // 打开 直调发货
  403. openDeliverDialog() {
  404. this.isShowDeliverDialog = true;
  405. this.goodsList = this.detailData.retailOrderItemList;
  406. this.getPositionList();
  407. },
  408. // 关闭 直调发货
  409. closeDeliverDialog() {
  410. this.isShowDeliverDialog = false;
  411. },
  412. // 提交 直调发货
  413. submitDeliverForm() {
  414. this.$refs.deliverForm.validate((valid) => {
  415. if (valid) {
  416. for(let i=0; i<this.goodsList.length; i++) {
  417. if(!this.goodsList[i].adjustNum && this.goodsList[i].isDirectTransfer) {
  418. this.$errorMsg('请输入直调数量');
  419. return;
  420. }
  421. }
  422. let goodsList = this.goodsList.map((item) => {
  423. return {
  424. itemId: item.id,
  425. qty: item.adjustNum || 0,
  426. }
  427. });
  428. let params = {
  429. orderNo: this.listItem.id,
  430. orderDate: this.deliverForm.date + ' 00:00:00',
  431. stockId: this.deliverForm.position,
  432. directItems: goodsList
  433. }
  434. adjustDeliver(params).then(res => {
  435. this.$successMsg();
  436. this.isShowDeliverDialog = false;
  437. this.getDetail();
  438. })
  439. }
  440. })
  441. },
  442. // 直调完成
  443. handleFinish() {
  444. this.$confirm('此操作将直调完成, 是否继续?', '提示', {
  445. confirmButtonText: '确定',
  446. cancelButtonText: '取消',
  447. type: 'warning'
  448. }).then(() => {
  449. finishData({
  450. id: this.listItem.id
  451. }).then(res => {
  452. this.$successMsg();
  453. this.getDetail();
  454. })
  455. }).catch(() => {});
  456. },
  457. // 更改调出仓库
  458. changeWarehouse1() {
  459. this.directForm.position1 = '';
  460. let obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1);
  461. this.positionList1 = obj.kingDeeStocks;
  462. this.directGoodsList.forEach(item => {
  463. item.warehouse1 = obj.name;
  464. });
  465. },
  466. // 更改调入仓库
  467. changeWarehouse2() {
  468. this.directForm.position2 = '';
  469. let obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2);
  470. this.positionList2 = obj.kingDeeStocks;
  471. this.directGoodsList.forEach(item => {
  472. item.warehouse2 = obj.name;
  473. });
  474. },
  475. // 更改调出仓位
  476. changePosition1() {
  477. let obj = this.positionList1.find(o => o.id == this.directForm.position1);
  478. this.directGoodsList.forEach(item => {
  479. item.position1 = obj.name;
  480. item.status1 = obj.defStockStatusName;
  481. });
  482. },
  483. // 更改调入仓位
  484. changePosition2() {
  485. let obj = this.positionList2.find(o => o.id == this.directForm.position2);
  486. this.directGoodsList.forEach(item => {
  487. item.position2 = obj.name;
  488. item.status2 = obj.defStockStatusName;
  489. });
  490. },
  491. // 打开 提前开票
  492. openDirectDialog() {
  493. this.isShowDirectDialog = true;
  494. this.directGoodsList = this.detailData.retailOrderItemList;
  495. this.getWarehouseList();
  496. },
  497. // 关闭 提前开票
  498. closeDirectDialog() {
  499. this.isShowDirectDialog = false;
  500. },
  501. // 提交 提前开票
  502. submitDirectForm() {
  503. this.$refs.directForm.validate((valid) => {
  504. if (valid) {
  505. let warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1);
  506. let positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1);
  507. let warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2);
  508. let positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2);
  509. let params = {
  510. orderNo: this.detailData.id,
  511. orderType: 'RETAIL', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
  512. correspondId: this.directForm.warehouse1,
  513. correspondName: warehouseItem1.name,
  514. stockId: this.directForm.position1,
  515. stockName: positionItem1.name,
  516. inCorrespondId: this.directForm.warehouse2,
  517. inCorrespondName: warehouseItem2.name,
  518. inStockId: this.directForm.position2,
  519. inStockName: positionItem2.name,
  520. }
  521. directOrder(params).then(res => {
  522. this.$successMsg();
  523. this.isShowDirectDialog = false;
  524. this.getDetail();
  525. })
  526. }
  527. })
  528. },
  529. // 联查单据
  530. toCheckOrder() {
  531. this.checkOrderId = this.detailData.id;
  532. this.isShowCheckOrder = true;
  533. },
  534. backDetail() {
  535. this.isShowCheckOrder = false;
  536. },
  537. }
  538. }
  539. </script>
  540. <style scoped lang="scss">
  541. .detail-container {
  542. width: 100%;
  543. height: 100%;
  544. }
  545. .main-title {
  546. display: flex;
  547. justify-content: space-between;
  548. align-items: center;
  549. margin-top: 20px;
  550. height: 60px;
  551. border-bottom: 1px solid #DCDFE6;
  552. margin-bottom: 20px;
  553. .title {
  554. font-size: 16px;
  555. font-weight: 600;
  556. padding-left: 10px;
  557. }
  558. }
  559. .progress-container {
  560. display: flex;
  561. .el-progress {
  562. width: 500px;
  563. }
  564. }
  565. </style>