diff --git a/oms_web/oms_vue/src/api/finance/payment.js b/oms_web/oms_vue/src/api/finance/payment.js index 992e2103..e7a2da46 100644 --- a/oms_web/oms_vue/src/api/finance/payment.js +++ b/oms_web/oms_vue/src/api/finance/payment.js @@ -197,3 +197,13 @@ export function manualWriteOff(data) { data: data }) } + +// 新增付款单 +export function updatePaymentBill(data) { + return request({ + url: '/finance/payment/updatePaymentBill', + method: 'post', + data: data, + needLoading: true + }) +} diff --git a/oms_web/oms_vue/src/views/finance/payment/components/AddForm.vue b/oms_web/oms_vue/src/views/finance/payment/components/AddForm.vue index 10a9a242..065052d8 100644 --- a/oms_web/oms_vue/src/views/finance/payment/components/AddForm.vue +++ b/oms_web/oms_vue/src/views/finance/payment/components/AddForm.vue @@ -48,7 +48,7 @@ - + @@ -56,7 +56,7 @@ - @@ -518,6 +518,7 @@ export default { vendorName: null, remark: null, totalPriceWithTax: 0, + fileId: null, }; this.payableList = []; this.orderList = []; @@ -527,6 +528,7 @@ export default { pageSize: 10 }; this.total = 0; + this.fileList = []; } } }; diff --git a/oms_web/oms_vue/src/views/finance/payment/components/DetailDrawer.vue b/oms_web/oms_vue/src/views/finance/payment/components/DetailDrawer.vue index 6bb899d4..f1036f57 100644 --- a/oms_web/oms_vue/src/views/finance/payment/components/DetailDrawer.vue +++ b/oms_web/oms_vue/src/views/finance/payment/components/DetailDrawer.vue @@ -99,6 +99,16 @@ + + +
+ 附件补充: + + 保存 +
+
+
@@ -142,6 +152,27 @@ export default { default: () => {}, }, }, + data() { + return { + fileList: [], + fileId: null, + }; + }, + watch: { + visible(newVal) { + if (newVal) { + this.fileList = []; + this.fileId = null; + } + }, + detail: { + handler() { + this.fileList = []; + this.fileId = null; + }, + deep: true + } + }, dicts:['payment_bill_type','approve_status','payment_status','payment_method'], methods: { downloadFile(attachment){ @@ -158,6 +189,23 @@ export default { handleClose() { this.$emit("update:visible", false); }, + handleFileListChanged(fileList) { + this.fileList = fileList; + this.fileId = this.fileList.map(f => f.id).filter(id => !!id).join(',') + }, + handleSaveAttachment() { + if (this.fileList.length === 0) { + this.$modal.msgWarning('请先上传附件'); + return; + } + const oldFileId = this.detail.fileId; + this.fileId = oldFileId === null || oldFileId === '' ? this.fileId : oldFileId + ',' + this.fileId; + const saveData = { + id: this.detail.id, + fileId: this.fileId, + }; + this.$emit('submit', saveData); + }, }, }; diff --git a/oms_web/oms_vue/src/views/finance/payment/index.vue b/oms_web/oms_vue/src/views/finance/payment/index.vue index 10181eff..e6be874c 100644 --- a/oms_web/oms_vue/src/views/finance/payment/index.vue +++ b/oms_web/oms_vue/src/views/finance/payment/index.vue @@ -197,7 +197,7 @@ - +