Sfoglia il codice sorgente

检验项目增加收费性质,锅炉的添加检验项目增加过滤

xzc 1 giorno fa
parent
commit
24747566d1

+ 19 - 0
yudao-ui-admin-vue3/src/views/pressure2/boilerconnectrecordreport/BoilerConnectRecordReportForm.vue

@@ -92,6 +92,12 @@
           <el-option label="否" value="0"/>
         </el-select>
       </el-form-item>
+      <el-form-item label="收费性质" prop="chargeNature">
+        <el-checkbox-group v-model="formData.chargeNature">
+          <el-checkbox label="法定收费" value="1"/>
+          <el-checkbox label="服务收费" value="2"/>
+        </el-checkbox-group>
+      </el-form-item>
       <el-form-item label="费用计算类型" prop="feeCalcType" v-if="formData.isFee === '1'">
         <el-radio-group v-model="formData.feeCalcType">
           <el-radio value="1">固定费用</el-radio>
@@ -184,6 +190,7 @@ const formData = ref({
   operationInstruction: undefined,
   approvalCode: undefined,
   isSign: undefined, // 是否需要签名
+  chargeNature: [], // 收费性质(1=法定收费, 2=服务收费,多个用逗号分隔)
 })
 const formRules = reactive({
   projectName: [
@@ -239,6 +246,14 @@ const formRules = reactive({
       trigger: 'change'
     },
   ],
+  chargeNature: [
+    {
+      required: true,
+      type: 'array',
+      message: '收费性质不能为空',
+      trigger: 'change'
+    },
+  ],
 })
 
 const formRef = ref() // 表单 Ref
@@ -276,6 +291,7 @@ const open = async (type: string, id?: string) => {
         ...formData.value,
         ...data,
         feeTypes: data.feeTypes ? data.feeTypes.split(',') : [],
+        chargeNature: data.chargeNature ? data.chargeNature.split(',') : [],
       }
       await nextTick()
       isLoadingData = false
@@ -296,6 +312,7 @@ const submitForm = async () => {
     const data = {
       ...formData.value,
       feeTypes: Array.isArray(formData.value.feeTypes) ? formData.value.feeTypes.join(',') : formData.value.feeTypes,
+      chargeNature: Array.isArray(formData.value.chargeNature) ? formData.value.chargeNature.join(',') : formData.value.chargeNature,
     } as unknown as BoilerConnectRecordReportVO
     if (formType.value === 'create') {
       await BoilerConnectRecordReportApi.createBoilerConnectRecordReport(data)
@@ -341,6 +358,7 @@ const resetForm = () => {
     operationInstruction: undefined,
     approvalCode: undefined,
     isSign: undefined,
+    chargeNature: [],
   }
   formRef.value?.resetFields()
 }
@@ -432,6 +450,7 @@ const handleEditFeeFile = async () => {
     const data = {
       ...formData.value,
       feeTypes: Array.isArray(formData.value.feeTypes) ? formData.value.feeTypes.join(',') : formData.value.feeTypes,
+      chargeNature: Array.isArray(formData.value.chargeNature) ? formData.value.chargeNature.join(',') : formData.value.chargeNature,
     } as unknown as BoilerConnectRecordReportVO
     if (formType.value === 'create') {
       await BoilerConnectRecordReportApi.createBoilerConnectRecordReport(data)

+ 16 - 0
yudao-ui-admin-vue3/src/views/pressure2/boilerconnectrecordreport/index.vue

@@ -94,6 +94,22 @@
             </el-tag>
           </template>
         </el-table-column>
+        <el-table-column label="收费性质" align="center" prop="chargeNature" width="180">
+          <template #default="scope">
+            <template v-if="scope.row.chargeNature">
+              <el-tag
+                v-for="nature in scope.row.chargeNature.split(',')"
+                :key="nature"
+                :type="nature === '1' ? 'danger' : 'success'"
+                class="mr-5px"
+                effect="plain"
+              >
+                {{ nature === '1' ? '法定收费' : nature === '2' ? '服务收费' : nature }}
+              </el-tag>
+            </template>
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
         <el-table-column label="状态" align="center" prop="status" width="100">
           <template #default="scope">
             <el-tag :type="scope.row.status == '1' ? 'success' : 'info'">

+ 7 - 2
yudao-ui-admin-vue3/src/views/pressure2/boilertaskorder/components/AddOrEditCheckItemForEquipment.vue

@@ -403,12 +403,17 @@ const handleQueryCheckItemList = async (checkType) => {
   }
   const queryResult = await queryCheckItemList(params)
   //console.log(queryResult)
+  // 按收费性质过滤:chargeNature '1'=法定, '2'=服务;为空时兼容旧数据默认进两个分组
+  const filterByChargeNature = (item: any, groupType: string) => {
+    if (!item.chargeNature) return true
+    return item.chargeNature.split(',').map((n: string) => n.trim()).includes(groupType)
+  }
   checkItemList.value.push({
     inspectionNatureName: filterPressureBoilerCheckTypeMap.value[checkType] + " 法定收费项目",
     inspectionNature: checkType,
     type: '1',
     isExpanded: true, // 默认展开
-    itemList: (queryResult || []).map((item) => ({
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '1')).map((item) => ({
       ...item,
       isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
       inspectionNature: checkType,
@@ -423,7 +428,7 @@ const handleQueryCheckItemList = async (checkType) => {
     inspectionNature: checkType,
     type: '2',
     isExpanded: false, // 默认收起
-    itemList: (queryResult || []).map((item) => ({
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '2')).map((item) => ({
       ...item,
       isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
       inspectionNature: checkType,

+ 7 - 2
yudao-ui-admin-vue3/src/views/pressure2/boilertaskorder/components/AddOrEditCheckItemForPart.vue

@@ -308,12 +308,17 @@ const handleQueryCheckItemList = async (checkType) => {
   }
   const queryResult = await queryCheckItemList(params)
   //console.log(queryResult)
+  // 按收费性质过滤:chargeNature '1'=法定, '2'=服务;为空时兼容旧数据默认进两个分组
+  const filterByChargeNature = (item: any, groupType: string) => {
+    if (!item.chargeNature) return true
+    return item.chargeNature.split(',').map((n: string) => n.trim()).includes(groupType)
+  }
   checkItemList.value.push({
     inspectionNatureName: filterPressureBoilerCheckTypeMap.value[checkType] + " 法定收费项目",
     inspectionNature: checkType,
     type: '1',
     isExpanded: true, // 默认展开
-    itemList: (queryResult || []).map((item) => ({
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '1')).map((item) => ({
       ...item,
       isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
       inspectionNature: checkType,
@@ -328,7 +333,7 @@ const handleQueryCheckItemList = async (checkType) => {
     inspectionNature: checkType,
     type: '2',
     isExpanded: false, // 默认收起
-    itemList: (queryResult || []).map((item) => ({
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '2')).map((item) => ({
       ...item,
       isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
       inspectionNature: checkType,

+ 7 - 2
yudao-ui-admin-vue3/src/views/pressure2/equipboilerscheduling/components/BoilerPlanScheduleDialog.vue

@@ -880,12 +880,17 @@ const handleQueryCheckItemList = async (checkType?: string) => {
   })
   const inType = inspectionNatureType.list[0].type
   const newItems: any[] = []
+  // 按收费性质过滤:chargeNature '1'=法定, '2'=服务;为空时兼容旧数据默认进两个分组
+  const filterByChargeNature = (item: any, groupType: string) => {
+    if (!item.chargeNature) return true
+    return item.chargeNature.split(',').map((n: string) => n.trim()).includes(groupType)
+  }
   newItems.push({
     inspectionNatureName: PressureBoilerCheckTypeMap[type] + " 法定收费项目",
     inspectionNature: type,
     type: '1',
     isExpanded: inType == 1,
-    itemList: (queryResult || []).map((item) => (
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '1')).map((item) => (
       {
         ...item,
         isAutoAmount: '0',
@@ -900,7 +905,7 @@ const handleQueryCheckItemList = async (checkType?: string) => {
     inspectionNature: type,
     type: '2',
     isExpanded: inType == 2,
-    itemList: (queryResult || []).map((item) => (
+    itemList: (queryResult || []).filter((item) => filterByChargeNature(item, '2')).map((item) => (
       {
         ...item,
         isAutoAmount: '0',