Explorar el Código

feat(processSubmitDialog): 完善表单验证和表格操作功能

liujt hace 1 mes
padre
commit
c9d4540646

+ 13 - 3
src/BIZComponents/processSubmitDialog/components/useQualificationComponent.vue

@@ -9,11 +9,17 @@
                 prop="useQualificationType"
                 align="center"
                 label="资质类型">
+                <template slot="header" slot-scope="scope">
+                    <div><span class="required">*</span>资质类型</div>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="useQualificationName"
                 align="center"
                 label="使用资质名称">
+                <template slot="header" slot-scope="scope">
+                    <div><span class="required">*</span>使用资质名称</div>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="useQualificationRemark"
@@ -23,7 +29,7 @@
             <el-table-column
                 label="操作"
                 align="center"
-                width="100"
+                width="90"
                  v-if="!view">
                 <template slot-scope="scope">
                     <el-button @click="editRow(scope.row, scope.$index)" type="text" size="mini">编辑</el-button>
@@ -45,6 +51,7 @@
             append-to-body
             width="70%"
             :maxable="true"
+            destroy-on-close
         >
             <el-card shadow="never">
                 <el-form ref="form" :model="form">
@@ -261,7 +268,7 @@ export default {
         deleteRow(index) {
             this.tableData.splice(index, 1);
             this.updateRowInfo();
-            this.calculateTotalPrice();
+            // this.calculateTotalPrice();
         },
         async calculateTotalPrice() {
             let data = await this.generateForm.getData(false);
@@ -288,7 +295,7 @@ export default {
                 }
                 console.log('this.tableData', this.tableData);
                 this.updateRowInfo()
-                this.calculateTotalPrice()
+                // this.calculateTotalPrice()
                 this.handleClose(); // 保存后关闭弹窗
                 // 重置form
                 this.form = {};
@@ -322,4 +329,7 @@ export default {
     padding-left: 10px;
     padding-right: 10px;
 }
+.required {
+    color: red;
+}
 </style>

+ 15 - 2
src/BIZComponents/processSubmitDialog/components/useSealComponent.vue

@@ -9,24 +9,33 @@
                 prop="useSealType"
                 align="center"
                 label="印章使用类型">
+                <template slot="header" slot-scope="scope">
+                    <div><span class="required">*</span>印章使用类型</div>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="useSealRemark"
                 align="center"
                 label="印章使用事由">
+                <template slot="header" slot-scope="scope">
+                    <div><span class="required">*</span>印章使用事由</div>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="useSealName"
                 align="center"
                 label="印章名称">
+                <template slot="header" slot-scope="scope">
+                    <div><span class="required">*</span>印章名称</div>
+                </template>
             </el-table-column>
             <el-table-column
                 label="操作"
                 align="center"
-                width="100"
+                width="90"
                  v-if="!view">
                 <template slot-scope="scope">
-                    <!-- <el-button @click="editRow(scope.row, scope.$index)" type="text" size="mini">编辑</el-button> -->
+                    <el-button @click="editRow(scope.row, scope.$index)" type="text" size="mini">编辑</el-button>
                     <el-button @click="deleteRow(scope.$index)" type="text" size="mini">删除</el-button>
                 </template>
                 </el-table-column>
@@ -45,6 +54,7 @@
             append-to-body
             width="70%"
             :maxable="true"
+            destroy-on-close
         >
             <el-card shadow="never">
                 <el-form ref="form" :model="form">
@@ -314,4 +324,7 @@ export default {
     padding-left: 10px;
     padding-right: 10px;
 }
+.required {
+    color: red;
+}
 </style>

+ 2 - 2
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -950,8 +950,8 @@ this.postOptions.push(...response.data);
 
           // 如果有未填写的组件,显示提示信息
           if (emptyComponents.length > 0) {
-            // this.$message.warning(`请填写完整信息:${emptyComponents.map(comp => this.getComponentName(comp)).join('、')}`);
-            this.$message.warning(`请填写完整信息`);
+            this.$message.warning(`请填写完整信息:${emptyComponents.map(comp => this.getComponentName(comp)).join('、')}`);
+            // this.$message.warning(`请填写完整信息`);
             return false;
           }