Quellcode durchsuchen

中期支付项修改

duy vor 1 Jahr
Ursprung
Commit
abf3f26e28
2 geänderte Dateien mit 44 neuen und 15 gelöschten Zeilen
  1. 8 0
      src/api/measure/template.js
  2. 36 15
      src/views/measure/interimPay.vue

+ 8 - 0
src/api/measure/template.js

@@ -101,4 +101,12 @@ export const sortNode = (row) => {
       method: 'post',
       params: row
   })
+}
+//系统树节点新增获取工程类型名称
+export const getEngineeringTypeName = (params) => {
+  return request({
+      url: '/api/blade-meter/tree/system/getEngineeringTypeName',
+      method: 'get',
+      params
+  })
 }

+ 36 - 15
src/views/measure/interimPay.vue

@@ -116,7 +116,7 @@
               </tr>
               <tr>
                   <td class="tit" width="20%">支付项类型:</td>
-                  <td id="itemType">{{ curRow.payType||'' }}</td>
+                  <td id="itemType">{{ curRow.payTypeName||"" }}</td>
                   <td class="tit" width="20%">是否为扣款项:</td>
                   <td id="negative">{{ curRow.isDeduct===1?'是':'否'||'' }}</td>
               </tr>
@@ -188,6 +188,7 @@
   
   <script >
   import { getList,update,remove,add,getDetail,addPay,removePay,getAllList } from "@/api/measure/interimPay.js";
+  import { getDictionary } from "@/api/system/dict";
   export default {
   data () {
     return {
@@ -233,7 +234,7 @@
             label: '支付项类型',
             prop: 'payType',
             type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=table_template_type",
+            dicUrl: "/api/blade-system/dict/dictionary?code=meter_pay_type",
               props: {
                 label: "dictValue",
                 value: "dictKey"
@@ -366,16 +367,13 @@
             label: '支付适用类型',
             prop: 'payApplicableType',
             type: "select",
-            dicData: [
-                {
-                  label: "承包商",
-                  value: 0
-                },
-                {
-                  label: "监理",
-                  value: 1
-                }
-              ],
+            dicUrl: "/api/blade-system/dict/dictionary?code=meter_pay_applicable_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+            dataType: "number",
+          
           },
           { span: 24,
             hide: true, 
@@ -471,7 +469,7 @@
               label:'支付项类型',
               prop:'payType',
               type: "select",
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=table_template_type",
+              dicUrl: "/api/blade-system/dict/dictionary?code=meter_pay_type",
                 props: {
                   label: "dictValue",
                   value: "dictKey"
@@ -573,7 +571,7 @@
               label:'支付项类型',
               prop:'payType',
               type: "select",
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=table_template_type",
+              dicUrl: "/api/blade-system/dict/dictionary?code=meter_pay_type",
                 props: {
                   label: "dictValue",
                   value: "dictKey"
@@ -613,6 +611,7 @@
           ],
       },
       selectList:[],
+      payList:[],
     }
   },
   methods: {
@@ -683,6 +682,7 @@
     rowClick1(row){
       getDetail(row.id).then((res) => {
           this.curRow = Object.assign({}, res.data.data);
+          this.getPayType( this.curRow.payType)
           this.totaldata=this.curRow.summaryItemList
      })
     },
@@ -788,7 +788,28 @@
         });
         this.tatoldialogVisible=false
     },
-}
+    getPayList(){
+      getDictionary({
+        code: 'meter_pay_type'
+      }).then((res) => {
+        this.payList = res.data.data;
+        this.payList.forEach((ele)=>{
+          ele.dictKey=Number(ele.dictKey)
+        })
+      })
+    },
+    //获取支付项类型名称
+    getPayType(type){
+      this.payList.forEach((ele)=>{
+        if(ele.dictKey==type){
+          this.curRow.payTypeName=ele.dictValue
+        }
+      })
+    }
+  },
+  mounted(){
+    this.getPayList()
+  }
 }
   </script>
   <style lang='scss' scoped>