Просмотр исходного кода

添加组织仓库和组织资金账户控件

songyang 2 лет назад
Родитель
Сommit
8a5ea8ec59

+ 4 - 0
src/api/pages/common/common.js

@@ -99,6 +99,10 @@ export default {
     getMultiOrg: 'get_multi_org',
     getMultiOrg: 'get_multi_org',
     // 获取多业务员
     // 获取多业务员
     getMultiStaff: 'get_multi_staff',
     getMultiStaff: 'get_multi_staff',
+    // 获取组织仓库
+    getMultiWarehouse: 'get_multi_warehouse',
+    // 获取组织资金账户
+    getMultiMoneyAccount: 'get_multi_moneyAccount',
   },
   },
 }
 }
 
 

+ 9 - 7
src/components/business/multi-select/multi-select.vue

@@ -254,7 +254,6 @@ export default {
     orderId(n, o) {
     orderId(n, o) {
       if(n){
       if(n){
         // 如果Id改变,需要重新查询数据库
         // 如果Id改变,需要重新查询数据库
-        console.log('n',n)
         this.getDataTable();
         this.getDataTable();
       }
       }
     },
     },
@@ -501,8 +500,9 @@ export default {
       param.leafFlag = this.leafFlag
       param.leafFlag = this.leafFlag
       // 不分页
       // 不分页
       param.pageSize = null
       param.pageSize = null
-      // 如果是结算方式或仓库,需要赋值给
-      if (this.type === this.$config.MagnifierType.settlementType || this.type === this.$config.MagnifierType.warehouse) {
+      // 如果是结算方式或仓库、资金账户,需要赋值给
+      if (this.type === this.$config.MagnifierType.settlementType || this.type === this.$config.MagnifierType.warehouse
+            ||this.type === this.$config.MagnifierType.moneyAccount) {
         param['orgId'] = this.orderId;
         param['orgId'] = this.orderId;
         if (this.organizationFlag) {
         if (this.organizationFlag) {
           param.organizationFlag = true;
           param.organizationFlag = true;
@@ -532,7 +532,6 @@ export default {
             // 如果value传递的不是数组,那么需要处理成数组
             // 如果value传递的不是数组,那么需要处理成数组
 
 
             this.value.forEach(it => {
             this.value.forEach(it => {
-              console.log('va',this.value,arr,this.selectKey,it)
               filterRows = arr.filter(row => row[this.selectKey] === it[this.selectKey])
               filterRows = arr.filter(row => row[this.selectKey] === it[this.selectKey])
               if (filterRows && filterRows.length > 0) {
               if (filterRows && filterRows.length > 0) {
                 //给第一个行赋值 为了滚动定位 TODO
                 //给第一个行赋值 为了滚动定位 TODO
@@ -955,7 +954,7 @@ export default {
       // 仓库
       // 仓库
       else if (self.type === self.$config.MagnifierType.warehouse) {
       else if (self.type === self.$config.MagnifierType.warehouse) {
         self.service = this.$service.commonService
         self.service = this.$service.commonService
-        self.methodsNameDetail = 'getWarehouse' //详细函数名称,目前对应后台的查询接口名称
+        self.methodsNameDetail = 'getMultiWarehouse' //详细函数名称,目前对应后台的查询接口名称
         self.searchContent = [
         self.searchContent = [
           {itemCode: 'whName'},                       //查询条件
           {itemCode: 'whName'},                       //查询条件
           {itemCode: 'whCode'},
           {itemCode: 'whCode'},
@@ -976,7 +975,7 @@ export default {
       //资金账号
       //资金账号
       else if (self.type === self.$config.MagnifierType.moneyAccount) {
       else if (self.type === self.$config.MagnifierType.moneyAccount) {
         self.service = this.$service.commonService
         self.service = this.$service.commonService
-        self.methodsNameDetail = 'getMoneyAccount'
+        self.methodsNameDetail = 'getMultiMoneyAccount'
         self.searchContent = [
         self.searchContent = [
           {itemCode: 'macCode'},
           {itemCode: 'macCode'},
           {itemCode: 'macName'},
           {itemCode: 'macName'},
@@ -1004,7 +1003,10 @@ export default {
     this.setDefaultValue();
     this.setDefaultValue();
   },
   },
   mounted() {
   mounted() {
-    // this.getDataTable()
+    // 如果orderId有值,查询数据
+    if(this.orderId){
+      this.getDataTable()
+    }
   }
   }
 }
 }
 </script>
 </script>

+ 6 - 4
src/view/mst/org/index.vue

@@ -115,6 +115,12 @@ export default {
         remarks: null,
         remarks: null,
         warehouseList: [],//存放组织仓库
         warehouseList: [],//存放组织仓库
         macList:[],//存放资金账号
         macList:[],//存放资金账号
+        whId:null,
+        whCode:null,
+        whName:null,
+        macId:null,
+        macCode:null,
+        macName:null,
       },
       },
       // 获取topId值
       // 获取topId值
       topId: null,
       topId: null,
@@ -186,14 +192,12 @@ export default {
             this.formData.whId = i.whId
             this.formData.whId = i.whId
             this.formData.whCode = i.whCode
             this.formData.whCode = i.whCode
             this.formData.whName = i.whName
             this.formData.whName = i.whName
-            this.formData.allocationRatio = i.allocationRatio
           }
           }
           //存放从业务员id和分配比
           //存放从业务员id和分配比
           this.formData.warehouseList.push({
           this.formData.warehouseList.push({
             whId: i.whId,
             whId: i.whId,
             whCode: i.whCode,
             whCode: i.whCode,
             whName: i.whName,
             whName: i.whName,
-            allocationRatio: i.allocationRatio,
             ownerFlag: i.ownerFlag
             ownerFlag: i.ownerFlag
           })
           })
         }
         }
@@ -214,14 +218,12 @@ export default {
             this.formData.macId = i.macId
             this.formData.macId = i.macId
             this.formData.macCode = i.macCode
             this.formData.macCode = i.macCode
             this.formData.macName = i.macName
             this.formData.macName = i.macName
-            this.formData.allocationRatio = i.allocationRatio
           }
           }
           //存放从业务员id和分配比
           //存放从业务员id和分配比
           this.formData.macList.push({
           this.formData.macList.push({
             macId: i.macId,
             macId: i.macId,
             macCode: i.macCode,
             macCode: i.macCode,
             macName: i.macName,
             macName: i.macName,
-            allocationRatio: i.allocationRatio,
             ownerFlag: i.ownerFlag
             ownerFlag: i.ownerFlag
           })
           })
         }
         }