From 58972e0b98c3402d3f5f81f10de3197baf1ecff5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 13 Feb 2024 14:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=9A=84=20paymentPrice=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E4=B8=BA=E6=8E=A5=E5=85=A5=E8=B4=A2=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=95=E5=81=9A=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/erp/purchase/in/PurchaseInForm.vue | 30 ++++------- src/views/erp/purchase/in/index.vue | 51 +++++++++---------- src/views/erp/purchase/order/index.vue | 2 +- .../purchase/return/PurchaseReturnForm.vue | 30 ++++------- src/views/erp/purchase/return/index.vue | 49 ++++++++++-------- 5 files changed, 72 insertions(+), 90 deletions(-) diff --git a/src/views/erp/purchase/in/PurchaseInForm.vue b/src/views/erp/purchase/in/PurchaseInForm.vue index 29f38813..c59d7dff 100644 --- a/src/views/erp/purchase/in/PurchaseInForm.vue +++ b/src/views/erp/purchase/in/PurchaseInForm.vue @@ -103,7 +103,11 @@ - + @@ -137,15 +141,8 @@ - - + + @@ -195,15 +192,13 @@ const formData = ref({ discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, orderNo: undefined, items: [], no: undefined // 入库单号,后端返回 }) const formRules = reactive({ supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }], - inTime: [{ required: true, message: '入库时间不能为空', trigger: 'blur' }], - refundPrice: [{ required: true, message: '本次付款不能为空', trigger: 'blur' }] + inTime: [{ required: true, message: '入库时间不能为空', trigger: 'blur' }] }) const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref @@ -226,14 +221,8 @@ watch( const totalPrice = val.items.reduce((prev, curr) => prev + curr.totalPrice, 0) const discountPrice = val.discountPercent != null ? erpPriceMultiply(totalPrice, val.discountPercent / 100.0) : 0 - // debugger - // TODO 芋艿:refundPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来 - // const refundPrice = totalPrice - discountPrice + val.otherPrice - // 赋值 formData.value.discountPrice = discountPrice - formData.value.totalPrice = totalPrice - discountPrice - // val.refundPrice = refundPrice - // formData.value.refundPrice = refundPrice + formData.value.totalPrice = totalPrice - discountPrice + val.otherPrice }, { deep: true } ) @@ -329,7 +318,6 @@ const resetForm = () => { discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, items: [] } formRef.value?.resetFields() diff --git a/src/views/erp/purchase/in/index.vue b/src/views/erp/purchase/in/index.vue index 6f8072eb..615ce743 100644 --- a/src/views/erp/purchase/in/index.vue +++ b/src/views/erp/purchase/in/index.vue @@ -41,7 +41,7 @@ start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="!w-240px" + class="!w-220px" /> @@ -117,19 +117,25 @@ /> - + - - + + + - - + + - - - - - + - + @@ -337,7 +334,7 @@ const queryParams = reactive({ warehouseId: undefined, inTime: [], orderNo: undefined, - debtStatus: undefined, + paymentStatus: undefined, accountId: undefined, status: undefined, remark: undefined, diff --git a/src/views/erp/purchase/order/index.vue b/src/views/erp/purchase/order/index.vue index bc6e70cc..e1d8c469 100644 --- a/src/views/erp/purchase/order/index.vue +++ b/src/views/erp/purchase/order/index.vue @@ -41,7 +41,7 @@ start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="!w-240px" + class="!w-220px" /> diff --git a/src/views/erp/purchase/return/PurchaseReturnForm.vue b/src/views/erp/purchase/return/PurchaseReturnForm.vue index bfc4de98..e37fa09c 100644 --- a/src/views/erp/purchase/return/PurchaseReturnForm.vue +++ b/src/views/erp/purchase/return/PurchaseReturnForm.vue @@ -107,7 +107,11 @@ - + @@ -141,15 +145,8 @@ - - + + @@ -199,15 +196,13 @@ const formData = ref({ discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, orderNo: undefined, items: [], no: undefined // 退货单号,后端返回 }) const formRules = reactive({ supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }], - returnTime: [{ required: true, message: '退货时间不能为空', trigger: 'blur' }], - refundPrice: [{ required: true, message: '本次退款不能为空', trigger: 'blur' }] + returnTime: [{ required: true, message: '退货时间不能为空', trigger: 'blur' }] }) const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref @@ -230,14 +225,8 @@ watch( const totalPrice = val.items.reduce((prev, curr) => prev + curr.totalPrice, 0) const discountPrice = val.discountPercent != null ? erpPriceMultiply(totalPrice, val.discountPercent / 100.0) : 0 - // debugger - // TODO 芋艿:refundPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来 - // const refundPrice = totalPrice - discountPrice + val.otherPrice - // 赋值 formData.value.discountPrice = discountPrice - formData.value.totalPrice = totalPrice - discountPrice - // val.refundPrice = refundPrice - // formData.value.refundPrice = refundPrice + formData.value.totalPrice = totalPrice - discountPrice + val.otherPrice }, { deep: true } ) @@ -332,7 +321,6 @@ const resetForm = () => { discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, items: [] } formRef.value?.resetFields() diff --git a/src/views/erp/purchase/return/index.vue b/src/views/erp/purchase/return/index.vue index edb51e43..34e0a40e 100644 --- a/src/views/erp/purchase/return/index.vue +++ b/src/views/erp/purchase/return/index.vue @@ -41,7 +41,7 @@ start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="!w-240px" + class="!w-220px" /> @@ -117,8 +117,25 @@ /> - - + + + + + + + + + - - - - - + - + @@ -328,6 +336,7 @@ const queryParams = reactive({ orderNo: undefined, accountId: undefined, status: undefined, + refundStatus: undefined, remark: undefined, creator: undefined })