From 234f58bfad420280fd9846443070d29ae5fbaed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sun, 18 Dec 2022 22:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=8D=95=E6=8D=AE=E7=9A=84=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=92=8C=E7=BC=96=E8=BE=91=E6=94=B9=E4=B8=BA=E4=BB=8E?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8D=95=E7=8B=AC=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/dialog/BillDetail.vue | 72 ++++++++++--------- .../src/views/bill/mixins/BillListMixin.js | 10 ++- .../financial/dialog/FinancialDetail.vue | 35 +++++---- .../financial/mixins/FinancialListMixin.js | 11 ++- 4 files changed, 77 insertions(+), 51 deletions(-) diff --git a/jshERP-web/src/views/bill/dialog/BillDetail.vue b/jshERP-web/src/views/bill/dialog/BillDetail.vue index ae84aefd..50827a77 100644 --- a/jshERP-web/src/views/bill/dialog/BillDetail.vue +++ b/jshERP-web/src/views/bill/dialog/BillDetail.vue @@ -1454,39 +1454,45 @@ }) }, show(record, type) { - this.billType = type - //附件下载 - this.fileList = record.fileName - this.visible = true - this.modalStyle = 'top:20px;height: 95%;' - this.model = Object.assign({}, record) - if(this.model.backAmount) { - this.model.getAmount = (this.model.changeAmount + this.model.backAmount).toFixed(2) - } else { - this.model.getAmount = this.model.changeAmount - } - this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - (this.model.deposit + this.model.changeAmount)).toFixed(2) - this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model,'id')) - }); - let showType = 'basic' - if(record.status === '3') { - showType = 'basic' - } else if(record.purchaseStatus === '3') { - showType = 'purchase' - } - let params = { - headerId: this.model.id, - mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性 - linkType: showType, - isReadOnly: '1' - } - let url = this.readOnly ? this.url.detailList : this.url.detailList; - this.requestSubTableData(record, type, url, params); - this.initPlatform() - this.getSystemConfig() - this.getBillListByLinkNumber(this.model.number) - this.getFinancialBillNoByBillId(this.model.id) + //查询单条单据信息 + findBillDetailByNumber({ number: record.number }).then((res) => { + if (res && res.code === 200) { + let item = res.data + this.billType = type + //附件下载 + this.fileList = item.fileName + this.visible = true + this.modalStyle = 'top:20px;height: 95%;' + this.model = Object.assign({}, item) + if (this.model.backAmount) { + this.model.getAmount = (this.model.changeAmount + this.model.backAmount).toFixed(2) + } else { + this.model.getAmount = this.model.changeAmount + } + this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - (this.model.deposit + this.model.changeAmount)).toFixed(2) + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model, 'id')) + }); + let showType = 'basic' + if (item.status === '3') { + showType = 'basic' + } else if (item.purchaseStatus === '3') { + showType = 'purchase' + } + let params = { + headerId: this.model.id, + mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性 + linkType: showType, + isReadOnly: '1' + } + let url = this.readOnly ? this.url.detailList : this.url.detailList; + this.requestSubTableData(item, type, url, params); + this.initPlatform() + this.getSystemConfig() + this.getBillListByLinkNumber(this.model.number) + this.getFinancialBillNoByBillId(this.model.id) + } + }) }, requestSubTableData(record, type, url, params, success) { this.loading = true diff --git a/jshERP-web/src/views/bill/mixins/BillListMixin.js b/jshERP-web/src/views/bill/mixins/BillListMixin.js index b8be9062..e9f17662 100644 --- a/jshERP-web/src/views/bill/mixins/BillListMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillListMixin.js @@ -1,7 +1,7 @@ import Vue from 'vue' import {getAction } from '@/api/manage' import { FormTypes } from '@/utils/JEditableTableUtil' -import {findBySelectSup, findBySelectCus, findBySelectRetail, getUserList, getAccount} from '@/api/api' +import {findBillDetailByNumber, findBySelectSup, findBySelectCus, findBySelectRetail, getUserList, getAccount} from '@/api/api' export const BillListMixin = { data () { @@ -59,7 +59,13 @@ export const BillListMixin = { if(this.btnEnableList.indexOf(2)===-1) { this.$refs.modalForm.isCanCheck = false } - this.handleEdit(record); + //查询单条单据信息 + findBillDetailByNumber({ number: record.number }).then((res) => { + if (res && res.code === 200) { + let item = res.data + this.handleEdit(item) + } + }) } else { this.$message.warning("抱歉,只有未审核的单据才能编辑!") } diff --git a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue index 26cebbc0..4f4ddbaf 100644 --- a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue +++ b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue @@ -399,6 +399,7 @@