Procházet zdrojové kódy

佣金订单/佣金合同-计算公式调整/增加权限

jingbb před 2 měsíci
rodič
revize
2de8606199

+ 3 - 3
src/views/platformBusiness/commissionContract/commissionContract.vue

@@ -69,9 +69,9 @@
         <a-button type="primary"  preIcon="ant-design:export-outlined" @click="onExportXls" v-auth="'platCode:plat_commission_contract:exportXls'">
           导出(export)</a-button
         >
-        <a-button type="primary" @click="submit"> 提交(submit)</a-button>
-        <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
-        <a-button type="primary" @click="handleClose"> 关闭(Close)</a-button>
+        <a-button type="primary" @click="submit" v-auth="'platCode:plat_commission_contract:submit'"> 提交(submit)</a-button>
+        <a-button type="primary" @click="cancelSubmit" v-auth="'platCode:plat_commission_contract:returnSubmit'"> 取消提交(cancelSubmit)</a-button>
+        <a-button type="primary" @click="handleClose" v-auth="'platCode:plat_commission_contract:close'"> 关闭(Close)</a-button>
         <a-dropdown v-if="selectedRowKeys.length > 0">
           <template #overlay>
             <a-menu>

+ 3 - 3
src/views/platformBusiness/commissionOrder/commissionOrder.vue

@@ -82,9 +82,9 @@
         <a-button type="primary"  preIcon="ant-design:export-outlined" @click="onExportXls" v-auth="'platCode:plat_commission_order:exportXls'">
           导出(export)</a-button
         >
-        <a-button type="primary" @click="submit"> 提交(submit)</a-button>
-        <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
-        <a-button type="primary" @click="handleClose"> 关闭(handleClose)</a-button>
+        <a-button type="primary" @click="submit" v-auth="'platCode:plat_commission_order:submit'"> 提交(submit)</a-button>
+        <a-button type="primary" @click="cancelSubmit" v-auth="'platCode:plat_commission_order:returnSubmit'"> 取消提交(cancelSubmit)</a-button>
+        <a-button type="primary" @click="handleClose" v-auth="'platCode:plat_commission_order:close'"> 关闭(handleClose)</a-button>
         <a-dropdown v-if="selectedRowKeys.length > 0">
           <template #overlay>
             <a-menu>

+ 19 - 4
src/views/platformBusiness/commissionOrder/components/SelectCommissionContractModal.vue

@@ -70,7 +70,7 @@
             </a-alert>
             <a-table
                 :columns="columns"
-                :row-key="record => record.childId"
+                :row-key="record => record.id"
                 :data-source="dataSource"
                 bordered
                 size="small"
@@ -145,6 +145,11 @@
         inquirySuppiler:'',
         salesmanName:'',
         saleDepartmenName:'',
+        submit : "1" ,
+        close:"0",
+        isUsed:0,
+        billDate_begin:'',
+        billDate_end:''
     });
     let pagination = ref({
       current: 1,
@@ -202,6 +207,11 @@
             inquirySuppiler:'',
             salesmanName:'',
             saleDepartmenName:'',
+            submit : "1" ,
+            close:"0",
+            isUsed:0,
+            billDate_begin:'',
+            billDate_end:''
         }
         pagination.value.current =1;
         pagination.value.pageSize = 10; 
@@ -215,7 +225,7 @@
     function onSelectChange(selectedRowKeys1, selectionRows1) {
         var arr = []
         selectionRows.value.map(item=>{
-            arr.push(item.childId)
+            arr.push(item.id)
         })
         selectedRowKeys.value =  arr
     }
@@ -225,7 +235,7 @@
             console.log( selectionRows.value);
         }else{
             const delIndex = selectionRows.value.findIndex((val) => {
-            return val.childId === record.childId
+            return val.id === record.id
             })
             selectionRows.value.splice(delIndex, 1)
         }
@@ -239,7 +249,7 @@
             const delIndex = []
             selectionRows2.forEach((item, index) => {
             changeRows.forEach((val, itemIndex) => {
-                if (item.childId === val.childId) {
+                if (item.id === val.id) {
                 delIndex.push(index)
                 }
             })
@@ -270,6 +280,11 @@
             inquirySuppiler:'',
             salesmanName:'',
             saleDepartmenName:'',
+            submit : "1" ,
+            close:"0",
+            isUsed:0,
+            billDate_begin:'',
+            billDate_end:''
         }
       selectedRowKeys.value = []
       selectionRows.value=[]

+ 4 - 1
src/views/platformBusiness/commissionOrder/components/commissionOrderFormForm.vue

@@ -391,11 +391,14 @@
       function getMainCommission(){
         var xTable = commissionOrderFormProductTableRef.value!.getXTable()
         var newArray = [...xTable.data]
-        var allCommission = 0
+        var allCommission = 0,
+        allMoney = 0
         newArray.map(item=>{
           allCommission += item.commission&&item.commission!==''?Number(item.commission):0
+          allMoney+=item.taxMoney&&item.taxMoney!==''?Number(item.taxMoney):0
         })
         formData.commission = allCommission
+        formData.commissionRate = (Number(allCommission)/Number(allMoney)*100).toFixed(2)
       }
       async function handleSupplierChange(prop){
         if (prop) {