From 7e003d0231050db0f5d9f966827f98bde8d7fca3 Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Sun, 7 Apr 2024 11:32:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8?=
=?UTF-8?q?=E7=94=B3=E8=AF=B7--=E6=96=B0=E5=A2=9E--=E8=AE=A1=E7=AE=97?=
=?UTF-8?q?=E5=B7=AE=E9=A2=9D=EF=BC=8C=E7=A8=8E=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/BasicForm/src/BasicForm.vue | 31 ++++++++++++++-----
src/components/TableForm/src/TableForm.vue | 3 ++
.../supplierinvoiceRequestMain/index.vue | 29 ++++++++++++++---
.../supplierinvoiceRequestMain.data.ts | 2 ++
4 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 17ebdb7ae..37c569f8b 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -89,7 +89,11 @@
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
- />
+ >
+
+
+
+
{
- if(props.sumFormData){
+const sumFormDataByTable = () => {
+ if(props.sumFormDataField){
const sumObject = {}
- props.sumFormData.forEach(sumItem=>{
- sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.valueField],0)
+ props.sumFormDataField.forEach(sumItem=>{
+ sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.tableField],0)
})
nextTick(()=>{
formRef.value.setValues(sumObject)
@@ -407,7 +416,13 @@ const changeSumFormData = () => {
}
}
watch(()=>props.tableData,() => {
- changeSumFormData()
+ sumFormDataByTable()
+
+},{
+ deep:true
+})
+watch(()=>unref(formRef)?.formModel,() => {
+ props?.sumFormDataByForm(formRef,unref(formRef)?.formModel)
},{
deep:true
})
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index ee1a8b6c2..c70baed07 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -69,6 +69,9 @@
/>
+
+
+
+ @submitForm="submitForm"
+ >
+
+
+
+
{
nextTick(() => {
@@ -566,3 +576,12 @@ const importSuccess = () => {
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
+
+
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
index 9feb3aa58..6952d3c09 100644
--- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
+++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
@@ -187,6 +187,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive(
componentProps: {
min: 0,
precision: 6,
+ disabled: true,
}
},
tableForm: {
@@ -734,6 +735,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive