xzc 1 неделя назад
Родитель
Сommit
e92206b56b

+ 6 - 0
yudao-ui-admin-vue3/src/views/pressure2/equipboilerscheduling/components/BoilerPlanScheduleDialog.vue

@@ -1401,6 +1401,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.IN)[1].itemList.filter(i => i.use).map(
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.IN)[1].itemList.filter(i => i.use).map(
@@ -1411,6 +1412,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ),]
             ),]
@@ -1448,6 +1450,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.OUT)[1].itemList.filter(i => i.use).map(
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.OUT)[1].itemList.filter(i => i.use).map(
@@ -1458,6 +1461,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ),]
             ),]
@@ -1496,6 +1500,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.PRESSURE)[1].itemList.filter(i => i.use).map(
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressureBoilerCheckType.PRESSURE)[1].itemList.filter(i => i.use).map(
@@ -1506,6 +1511,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ),]
             ),]

+ 19 - 5
yudao-ui-admin-vue3/src/views/pressure2/inspectionNature/index.vue

@@ -183,10 +183,21 @@
           </div>
           </div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="是否默认" prop="isDefault"  width="100">
+      <el-table-column label="是否默认" prop="isDefault" width="200">
         <template #default="scope">
         <template #default="scope">
-          <el-switch v-model="scope.row.isDefault" active-value="1" inactive-value="0"
-                     style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"/>
+          <div style="display: flex; align-items: center; gap: 6px;">
+            <el-switch v-model="scope.row.isDefault" active-value="1" inactive-value="0"
+                       style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"/>
+            <el-input-number
+              v-if="scope.row.isDefault === '1' && scope.row.projectType !== 'MAIN'"
+              v-model="scope.row.defaultCount"
+              :min="1"
+              :max="999"
+              size="small"
+              controls-position="right"
+              style="width: 70px;"
+            />
+          </div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <!-- 电站锅炉内检时显示部件选择 -->
       <!-- 电站锅炉内检时显示部件选择 -->
@@ -392,7 +403,8 @@ const loadDetailInfo = async (id: string) => {
         ...item,
         ...item,
         name: item.templateName,
         name: item.templateName,
         // 将后端返回的 part 字符串转换为数组
         // 将后端返回的 part 字符串转换为数组
-        part: item.part ? (typeof item.part === 'string' ? item.part.split('/').filter(p => p) : (item.part || [])) : []
+        part: item.part ? (typeof item.part === 'string' ? item.part.split('/').filter(p => p) : (item.part || [])) : [],
+        defaultCount: item.defaultCount || 1
       }))
       }))
     }
     }
   } catch (error) {
   } catch (error) {
@@ -479,6 +491,7 @@ const handleInspectionNatureSubmit = async () => {
         id: item.id,
         id: item.id,
         templateId: item.templateId,
         templateId: item.templateId,
         isDefault: item.isDefault,
         isDefault: item.isDefault,
+        defaultCount: item.defaultCount,
         inspectionNatureId: has(item, 'inspectionNatureId') ? item.inspectionNatureId : (editType.value === 'edit' ? editInspectionNatureId.value : undefined),
         inspectionNatureId: has(item, 'inspectionNatureId') ? item.inspectionNatureId : (editType.value === 'edit' ? editInspectionNatureId.value : undefined),
         // 如果是电站锅炉内检,将 part 数组转换为字符串
         // 如果是电站锅炉内检,将 part 数组转换为字符串
         part: isPowerStationBoiler ? (item.part || []).join('/') : ""
         part: isPowerStationBoiler ? (item.part || []).join('/') : ""
@@ -537,7 +550,8 @@ const handleReportItemSelect = (item: any, checked: boolean) => {
       inspectionNatureForm.value.templateSaveReqVOList.push({
       inspectionNatureForm.value.templateSaveReqVOList.push({
         templateId: item.id,
         templateId: item.id,
         name: item.projectName,
         name: item.projectName,
-        isDefault: item.isDefault,
+        isDefault: item.isDefault || '0',
+        defaultCount: 1,
         part: []
         part: []
       })
       })
     }
     }

+ 4 - 0
yudao-ui-admin-vue3/src/views/pressure2/pipescheduling/components/PipePlanScheduleDialog.vue

@@ -1068,6 +1068,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressurePipeCheckType.REGULAR)[1].itemList.filter(i => i.use).map(
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressurePipeCheckType.REGULAR)[1].itemList.filter(i => i.use).map(
@@ -1078,6 +1079,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             )]
             )]
@@ -1114,6 +1116,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressurePipeCheckType.ANNUAL)[1].itemList.filter(i => i.use).map(
             ), ...checkItemList.value.filter(i => i.inspectionNature == PressurePipeCheckType.ANNUAL)[1].itemList.filter(i => i.use).map(
@@ -1124,6 +1127,7 @@ const handleConfirm = async () => {
                   newAmount: i.fee,
                   newAmount: i.fee,
                   type: i.type,
                   type: i.type,
                   feeCalculateJson: i.feeCalculateJson || '',
                   feeCalculateJson: i.feeCalculateJson || '',
+                  defaultCount: i.defaultCount || 1,
                 }
                 }
               }
               }
             )]
             )]