Эх сурвалжийг харах

添加组织机构的仓库和资金账户

songyang 2 жил өмнө
parent
commit
5db7e288a4

+ 14 - 22
src/components/business/multi-select/multi-select.vue

@@ -955,7 +955,7 @@ export default {
       // 仓库
       else if (self.type === self.$config.MagnifierType.warehouse) {
         self.service = this.$service.commonService
-        self.methodsNameDetail = 'getWarehouseByPage' //详细函数名称,目前对应后台的查询接口名称
+        self.methodsNameDetail = 'getWarehouse' //详细函数名称,目前对应后台的查询接口名称
         self.searchContent = [
           {itemCode: 'whName'},                       //查询条件
           {itemCode: 'whCode'},
@@ -967,38 +967,30 @@ export default {
         self.columns = [
           {field: 'whName', width: '100'},          //查询出来的字段以及宽度
           {field: 'whCode', width: '100'},
-          {field: 'mmCode', width: '100'},
-          {field: 'directorName', width: '100'},
-          {field: 'contactsName', width: '100'},
-          {field: 'contactNo', width: '100'},
-          {field: 'cpName', width: '100'},
+          {field: 'contactPhone', width: '100'},
+          {field: 'supervisor', width: '100'},
           {field: 'remarks', width: '100'},
-          {field: 'flgDefault', title: "flgDefaultWh", width: '100', type: 'switch', disabled: false},
+          {field: 'ownerFlag', width: '40', type: 'switch', disabled: false},
         ]
       }
       //资金账号
-      else if (self.type === self.$config.MagnifierType.capitalAccount) {
+      else if (self.type === self.$config.MagnifierType.moneyAccount) {
         self.service = this.$service.commonService
-        self.methodsName = 'getCapitalAccount'
-        self.methodsNameDetail = 'getCapitalAccountByPage'
+        self.methodsNameDetail = 'getMoneyAccount'
         self.searchContent = [
-          {itemCode: 'capitalName'},
-          {itemCode: 'capitalType'},
+          {itemCode: 'macCode'},
+          {itemCode: 'macName'},
         ]
-        self.selectKey = 'capitalId'
-        self.selectLabel = 'capitalName'
+        self.selectKey = 'macId'
+        self.selectLabel = 'macName'
         self.modalWidth = 700
         self.colCount = 2
         self.columns = [
-          {field: 'capitalName', width: '100'},
-          {field: 'mmCode', width: '100'},
-          {field: 'capitalType', width: '100'},
-          {field: 'cpName', width: '100'},
-          {field: 'openingCompany', width: '100'},
-          {field: 'openingBank', width: '100'},
-          {field: 'bankAccount', width: '100'},
+          {field: 'macCode', width: '100'},
+          {field: 'macName', width: '100'},
+          {field: 'macType', width: '100'},
           {field: 'remarks', width: '100'},
-          {field: 'flgDefault', title: 'flgDefaultCa', width: '100', type: 'switch', disabled: false},
+          {field: 'ownerFlag', width: '40', type: 'switch', disabled: false},
         ]
       }
     }

+ 2 - 0
src/config/index.js

@@ -544,6 +544,8 @@ export default {
     supplier: 'supplier',
     // 品牌
     brand:'brand',
+    // 资金账户 宋扬
+    moneyAccount:'moneyAccount',
     //供应商与对象
     supplierAndCustomer: 'supplierAndCustomer',
     //组织机构

+ 3 - 2
src/locale/lang/zh-CN.js

@@ -351,8 +351,8 @@ export const columns = {
   returnWareHouse:'退货仓库',
   priceStandard:'标价',
   skuSpec:'商品规格',
-  macCode:'账编码',
-  macName:'账名称',
+  macCode:'账编码',
+  macName:'账名称',
   macTypeName:'账号类别',
   macType:'账号类别',
   balance:'期初金额',
@@ -432,6 +432,7 @@ export const columns = {
   amtRec:'收款金额',
   ownerFlag:'主业务标识',
   receiptResidue:'客户可用余额',
+  macId:'资金账户',
 }
 
 /**

+ 80 - 3
src/view/mst/org/index.vue

@@ -68,6 +68,26 @@
                      :multiple="false" :tree-flag="true" :tree-strict="false"
                      :disabled="formData.levelNo == 1"/>
         </DkFormItem>
+        <!--仓库-->
+        <DkFormItem prop="whId" :required="true">
+          <MultiSelect v-model="formData.warehouseList"
+                       main-field="ownerFlag"
+                       rate-field="allocationRatio"
+                       :order-id="formData.orgId"
+                       :default-value="formData.whName"
+                       @ok="warehousOk($event)"
+                       :type="this.$config.MagnifierType.warehouse"/>
+        </DkFormItem>
+        <!--资金账号-->
+        <DkFormItem prop="macId" :required="true">
+          <MultiSelect v-model="formData.macList"
+                       main-field="ownerFlag"
+                       rate-field="allocationRatio"
+                       :order-id="formData.orgId"
+                       :default-value="formData.macName"
+                       @ok="moneyAccountOk($event)"
+                       :type="this.$config.MagnifierType.moneyAccount"/>
+        </DkFormItem>
         <!--备注-->
         <DkFormItem prop="remarks">
           <InputPop v-model="formData.remarks" textareaFlag/>
@@ -92,7 +112,9 @@ export default {
         parentId: null,
         levelLeaf: null,
         displayNo: null,
-        remarks: null
+        remarks: null,
+        warehouseList: [],//存放组织仓库
+        macList:[],//存放资金账号
       },
       // 获取topId值
       topId: null,
@@ -151,6 +173,62 @@ export default {
     },
 
     /**
+     * @desc   : 仓库赋值
+     * @author : 宋扬
+     * @date   : 2024/3/22 10:19
+     */
+    warehousOk(rows) {
+      if (rows && rows.length > 0) {
+        this.formData.warehouseList = []
+        for (let i of rows) {
+          //找到主业务员
+          if (i.ownerFlag) {
+            this.formData.whId = i.whId
+            this.formData.whCode = i.whCode
+            this.formData.whName = i.whName
+            this.formData.allocationRatio = i.allocationRatio
+          }
+          //存放从业务员id和分配比
+          this.formData.warehouseList.push({
+            whId: i.whId,
+            whCode: i.whCode,
+            whName: i.whName,
+            allocationRatio: i.allocationRatio,
+            ownerFlag: i.ownerFlag
+          })
+        }
+      }
+    },
+
+    /**
+     * @desc   : 资金账户
+     * @author : 宋扬
+     * @date   : 2024/3/22 10:21
+     */
+    moneyAccountOk(rows) {
+      if (rows && rows.length > 0) {
+        this.formData.macList = []
+        for (let i of rows) {
+          //找到主业务员
+          if (i.ownerFlag) {
+            this.formData.macId = i.macId
+            this.formData.macCode = i.macCode
+            this.formData.macName = i.macName
+            this.formData.allocationRatio = i.allocationRatio
+          }
+          //存放从业务员id和分配比
+          this.formData.macList.push({
+            macId: i.macId,
+            macCode: i.macCode,
+            macName: i.macName,
+            allocationRatio: i.allocationRatio,
+            ownerFlag: i.ownerFlag
+          })
+        }
+      }
+    },
+
+    /**
      * @desc   : 切换实际赋值
      * @author : 宋扬
      * @date   : 2024/3/11 17:17
@@ -161,8 +239,7 @@ export default {
         // 判断是否是底层数据
         this.flgValid = row.levelLeaf;
       }
-    }
-    ,
+    },
 
   },
   created() {