retail_detail.vue 25 KB

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