lilei 2 lat temu
rodzic
commit
c19ee22a62

+ 2 - 2
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -198,8 +198,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '10%' },
-        { title: '所属区域', dataIndex: 'subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属分区', dataIndex: 'subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账费用', dataIndex: 'expense', align: 'center', width: '10%', customRender: function (text) { return (text == 0 || text) ? _this.toThousands(text) : '--' } },

+ 2 - 2
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -151,8 +151,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '14%' },
-        { title: '所属区域', dataIndex: 'subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属分区', dataIndex: 'subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账费用', dataIndex: 'expense', align: 'right', width: '10%', customRender: function (text) { return (text||text==0)?_this.toThousands(text):'--' } },

+ 24 - 13
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -48,13 +48,15 @@
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-                <a-form-model-item label="所属区域" prop="subareaSn">
+                <a-form-model-item label="所属区域">
                   <subarea
                     id="epenseDetailModal-subarea"
                     ref="subareaBox"
+                    defValKey="name"
                     @change="subareaChange"
+                    v-model="subareaList"
                     placeholder="请选择所属区域"
-                    v-model="form.subareaSnList"></subarea>
+                  ></subarea>
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -146,13 +148,15 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
+      subareaList: [],
       form: {
         id: undefined,
         accountType: undefined, // 记帐类型
         accountNameSn: undefined, //  记账名称
-        subareaSn: undefined, //  所属区域
-        subareaName: undefined,
-        subareaAreaSn: undefined, // 分区
+        subareaArea:{
+          subareaName: undefined, //  所属区域
+          subareaAreaName: undefined, // 分区
+        },
         provinceSn: undefined, // 省份
         provinceName: '',
         citySn: undefined, // 市
@@ -189,7 +193,8 @@ export default {
           this.form.citySn = row.citySn
           this.form.provinceName = row.provinceName
           this.form.cityName = row.cityName
-          this.form.subareaSn = row.subareaSn
+          this.form.subareaArea.subareaName = row.subareaName
+          this.form.subareaArea.subareaAreaName = row.subareaAreaName
           this.form.subareaAreaSn = row.subareaAreaSn
         } else {
           this.form.accountNameSn = ''
@@ -197,9 +202,10 @@ export default {
           this.form.citySn = ''
           this.form.provinceName = ''
           this.form.cityName = ''
-          this.form.subareaSn = ''
-          this.form.subareaAreaSn = ''
+          this.form.subareaArea.subareaName = ''
+          this.form.subareaArea.subareaAreaName = ''
           this.$refs.subareaBox.clearData()
+          this.subareaList = []
         }
       }
       this.$nextTick(() => {
@@ -208,8 +214,8 @@ export default {
     },
     // 分区
     subareaChange(val, row){
-      this.form.subareaSn = val[0] ? val[0] : undefined
-      this.form.subareaAreaSn = val[1] ? val[1] : undefined
+      this.form.subareaArea.subareaName = val[0] ? val[0] : ''
+      this.form.subareaArea.subareaAreaName = val[1] ? val[1] : ''
     },
     // 省
     provinceChange (v, row) {
@@ -238,6 +244,9 @@ export default {
             if (res.data.accountType == 'CUSTOMER') {
               this.$refs.custList.setDufaultVal(res.data.accountName)
             }
+            this.form.subareaArea.subareaName = res.data.subareaNames||''
+            this.form.subareaArea.subareaAreaName = res.data.subareaAreaName||''
+            this.subareaList = res.data.subareaNames ?  [res.data.subareaNames,res.data.subareaAreaName] : undefined
           }, 200)
           this.spinning = false
         })
@@ -312,9 +321,10 @@ export default {
         id: undefined,
         accountType: undefined, // 记帐类型
         accountNameSn: undefined, //  记账名称
-        subareaName: undefined,
-        subareaSn: undefined, //  区域
-        subareaAreaSn: undefined, // 分区
+        subareaArea:{
+          subareaName: undefined, //  所属区域
+          subareaAreaName: undefined, // 分区
+        },
         provinceSn: undefined, // 省份
         provinceName: '',
         citySn: undefined, // 市
@@ -332,6 +342,7 @@ export default {
       this.form.cityName = ''
       this.form.expenseAccountSn = this.expenseAccountSn
       this.form.expenseAccountNo = this.expenseAccountNo
+      this.subareaList = []
     }
   },
   watch: {

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8660/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {