From e07e19106cc7154337f552161b0050204d3564a3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 15 Feb 2024 09:16:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=9A=84=20receiptPrice=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?=E6=94=B6=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/sale/order/index.vue | 2 +- src/views/erp/sale/out/SaleOutForm.vue | 30 ++++-------- src/views/erp/sale/out/index.vue | 44 +++++++---------- src/views/erp/sale/return/SaleReturnForm.vue | 31 ++++-------- src/views/erp/sale/return/index.vue | 51 ++++++++++++-------- 5 files changed, 67 insertions(+), 91 deletions(-) diff --git a/src/views/erp/sale/order/index.vue b/src/views/erp/sale/order/index.vue index e260896f..a8a85ef6 100644 --- a/src/views/erp/sale/order/index.vue +++ b/src/views/erp/sale/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/sale/out/SaleOutForm.vue b/src/views/erp/sale/out/SaleOutForm.vue index f07e71f0..7d47713a 100644 --- a/src/views/erp/sale/out/SaleOutForm.vue +++ b/src/views/erp/sale/out/SaleOutForm.vue @@ -121,7 +121,11 @@ - + @@ -155,15 +159,8 @@ - - + + @@ -211,15 +208,13 @@ const formData = ref({ discountPrice: 0, totalPrice: 0, otherPrice: 0, - payPrice: undefined, orderNo: undefined, items: [], no: undefined // 出库单号,后端返回 }) const formRules = reactive({ customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }], - outTime: [{ required: true, message: '出库时间不能为空', trigger: 'blur' }], - payPrice: [{ required: true, message: '本次收款不能为空', trigger: 'blur' }] + outTime: [{ required: true, message: '出库时间不能为空', trigger: 'blur' }] }) const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref @@ -242,14 +237,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 芋艿:payPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来 - // const payPrice = totalPrice - discountPrice + val.otherPrice - // 赋值 formData.value.discountPrice = discountPrice - formData.value.totalPrice = totalPrice - discountPrice - // val.payPrice = payPrice - // formData.value.payPrice = payPrice + formData.value.totalPrice = totalPrice - discountPrice + val.otherPrice }, { deep: true } ) @@ -347,7 +336,6 @@ const resetForm = () => { discountPrice: 0, totalPrice: 0, otherPrice: 0, - payPrice: undefined, items: [] } formRef.value?.resetFields() diff --git a/src/views/erp/sale/out/index.vue b/src/views/erp/sale/out/index.vue index af8f8a3a..9e1ff3cf 100644 --- a/src/views/erp/sale/out/index.vue +++ b/src/views/erp/sale/out/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,18 +117,19 @@ /> - + - - + + + - + - - - - - + - + @@ -337,7 +329,7 @@ const queryParams = reactive({ warehouseId: undefined, outTime: [], orderNo: undefined, - debtStatus: undefined, + receiptStatus: undefined, accountId: undefined, status: undefined, remark: undefined, diff --git a/src/views/erp/sale/return/SaleReturnForm.vue b/src/views/erp/sale/return/SaleReturnForm.vue index 2d298a84..b10403b8 100644 --- a/src/views/erp/sale/return/SaleReturnForm.vue +++ b/src/views/erp/sale/return/SaleReturnForm.vue @@ -121,7 +121,11 @@ - + @@ -155,15 +159,8 @@ - - + + @@ -211,15 +208,13 @@ const formData = ref({ discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, orderNo: undefined, items: [], no: undefined // 退货单号,后端返回 }) const formRules = reactive({ customerId: [{ 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 @@ -242,14 +237,7 @@ 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 } ) @@ -346,7 +334,6 @@ const resetForm = () => { discountPrice: 0, totalPrice: 0, otherPrice: 0, - refundPrice: undefined, items: [] } formRef.value?.resetFields() diff --git a/src/views/erp/sale/return/index.vue b/src/views/erp/sale/return/index.vue index 2b3ca3e9..6b3b1b37 100644 --- a/src/views/erp/sale/return/index.vue +++ b/src/views/erp/sale/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 @@ /> - - + + + + + + + + + - - - - - + - + @@ -329,7 +337,8 @@ const queryParams = reactive({ accountId: undefined, status: undefined, remark: undefined, - creator: undefined + creator: undefined, + refundStatus: undefined }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中