retail_detail.vue 25 KB

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