snow 2 years ago
parent
commit
e0fe6ba6d7

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 16 - 12
src/views/serviceParam/paymentChannelGrossProfit/addEditRate.vue

@@ -26,18 +26,18 @@
             class="demo-ruleForm"
             :disabled="isDetail"
           >
-            <el-form-item label="支付渠道编码" prop="channel_id">
+            <el-form-item label="支付渠道" prop="channel_id">
               <el-input
-                v-model="ruleForm['channel_id']"
+                v-model="ruleForm['channel_name']"
                 disabled
                 placeholder="名称"
                 maxlength="20"
               />
             </el-form-item>
 
-            <el-form-item label="一类分类ID" prop="cat_id">
+            <el-form-item label="一级分类" prop="cat_id">
               <el-input
-                v-model="ruleForm['cat_id']"
+                v-model="ruleForm['cat_name']"
                 disabled
                 placeholder="一类分类ID"
                 maxlength="20"
@@ -55,6 +55,7 @@
                 :precision="2"
                 :size="'mini'"
                 :controls="false"
+                append="%"
                 @reschange="number_change($event, 'rate')"
               />
             </el-form-item>
@@ -87,7 +88,7 @@ import { actionTypes } from '@/utils/actionType'
 export default {
   name: 'Sort',
   mixins: [resToken, companyHelper],
-  props: ['showModel', 'id', 'sitem', 'actionType', 'paymentChannelId'],
+  props: ['showModel', 'id', 'sitem', 'actionType', 'paymentChannel'],
   data() {
     return {
       actionTypes,
@@ -96,13 +97,15 @@ export default {
       pid_name: '',
       ruleForm: {
         cat_id: '',
+        cat_name: '',
+        channel_name: '',
         channel_id: ''
       },
       rulesThis: this.rules,
       rules: {
-        cat_id: [{ required: true, trigger: 'blur' }],
-        channel_id: [{ required: true, trigger: 'blur' }],
-        支付渠道毛利率: [{ required: true, trigger: 'blur' }]
+        cat_id: [{ required: true, trigger: 'blur', message: '一级分离不能为空' }],
+        channel_id: [{ required: true, trigger: 'blur', message: '支付渠道不能为空' }],
+        rate: [{ required: true, trigger: 'blur', message: '支付渠道毛利率不能为空' }]
       }
     }
   },
@@ -143,14 +146,15 @@ export default {
 
           const {
             cat_id,
+            cat_name,
             rate
           } = this.sitem
 
-          console.log(this.sitem)
-
           this.ruleForm = {
             cat_id: cat_id || '',
-            channel_id: this.paymentChannelId || '',
+            cat_name: cat_name || '',
+            channel_id: this.paymentChannel.id || '',
+            channel_name: this.paymentChannel.channel_name || '',
             rate: rate || ''
           }
         }
@@ -162,7 +166,7 @@ export default {
       this.$refs.ruleForm.validateField(key)
     },
     async submitForm() {
-      if (!this.isHasCurrentCompany()) return
+      // if (!this.isHasCurrentCompany()) return
       await this.$refs.ruleForm.validate(async(valid) => {
         if (valid) {
           if (!this.loading) {

+ 7 - 9
src/views/serviceParam/paymentChannelGrossProfit/columns.js

@@ -2,36 +2,34 @@ export const paymentChannelColumns = [
   {
     _slot_: 'selection',
     label: '选择',
-    align: 'center'
+    align: 'center',
+    'width': '60px'
   },
   {
     prop: 'channel_name',
-    label: '支付渠道名称',
-    'min-width': '130px'
+    label: '支付渠道名称'
   },
   {
     prop: 'companyName',
-    label: '业务公司',
-    'min-width': '130px'
+    label: '业务公司'
   }
 ]
 
 export const categoryColumns = [
   {
     prop: 'cat_name',
-    label: '一级分类名称',
-    'min-width': '130px'
+    label: '一级分类名称'
   },
   {
     prop: 'rate',
     label: '支付渠道毛利率',
-    'min-width': '130px'
+    _slot_: 'rate'
   },
   {
     prop: '',
     label: '操作',
     fixed: 'right',
-    width: '140px',
+    width: '60px',
     _noset_: true,
     _slot_: 'operation'
   }

+ 45 - 23
src/views/serviceParam/paymentChannelGrossProfit/index.vue

@@ -17,12 +17,12 @@
               </el-button>
             </el-col> -->
 
-  <div class="sort pagePadding">
+  <div class="sort pagePadding" style="padding-right: 20px;">
      <div class="table__wrapper" v-if="powers.some((i) => i == '001')">
       <ex-table
         ref="paymentChannelRef"
         class="fl"
-        style="width:35%"
+        style="width:48%"
         v-loading="loadings.paymentChannel"
         :table="table"
         :data="datas.paymentChannel"
@@ -60,6 +60,10 @@
                   @change="pageInfo.paymentChannel.curr = 1;parmValue.paymentChannel.page = 1;onSearchPaymentChannelGrossProfit()" 
                 />
               </div>
+              
+              <div class="fr">
+                <el-button size="mini" type="primary" @click="onSearchPaymentChannelGrossProfit">刷新</el-button>
+              </div>
             </div>
           </template>
       </ex-table>
@@ -67,13 +71,14 @@
       <ex-table
        class="fr"
         v-loading="loadings.category"
-        style="width:65%"
+        style="width:49%"
         v-if="powers.some((i) => i == '001')"
         :table="table"
         :data="datas.category"
         :columns="categoryColumns"
         :page="pageInfo.category"
         :size="size"
+        :noPagination="true"
         @page-curr-change="value => handlePageChange(value,true)"
         @page-size-change="value => handleSizeChange(value,true)"
         @screen-reset="
@@ -88,7 +93,8 @@
         "
       >
         <template #table-header="{}">
-            <div style="display:inline-flex;align-items: center;">
+            <div style="width:100%">
+              <div style="display:inline-flex;align-items: center;">
                 <p style="text-align:right;margin-right: 10px;width:160px">一级分类名称:</p>
                 <el-input size="mini" 
                    v-model="parmValue.category['cat_name']"
@@ -100,18 +106,27 @@
                     onSearchcategorylist()" 
                  />
               </div>
+
+              <div class="fr">
+                <el-button size="mini" @click="parmValue.category.cat_name = '';onSearchcategorylist()">重置</el-button>
+                <el-button size="mini" type="primary" @click="onSearchcategorylist">刷新</el-button>
+              </div>
+            </div>
+        </template>
+
+        <template #rate="{scope}">
+          {{Number(scope.row.rate).toFixed(2)}}%
         </template>
 
         <template #operation="{ scope }">
-          <el-tooltip
+          <!-- <el-tooltip
             v-if="powers.some((i) => i == '007')"
             effect="dark"
             content="查看"
             placement="top"
           >
             <i class="el-icon-view tb-icon" @click="setRate(scope.row, actionTypes.PREVIEW)"></i>
-          </el-tooltip>
-
+          </el-tooltip> -->
           <el-tooltip
             v-if="powers.some((i) => i == '005')"
             effect="dark"
@@ -133,7 +148,7 @@
       :sitem="sitemCategory"
       @refresh="onSearchcategorylist"
       @cancel="showRateModel = false"
-      :paymentChannelId="selectedRow.id || ''"
+      :paymentChannel="selectedRow || {}"
       :actionType="actionType"
     />
   </div>
@@ -144,7 +159,6 @@ import asyncRequest from "@/apis/service/serviceParam/paymentChannelGrossProfit"
 import { statusList } from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
-import companyHelper from "@/mixins/companyHelper";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import privateField from "@/mixins/privateField";
@@ -153,7 +167,7 @@ import { actionTypes } from "@/utils/actionType";
 import { paymentChannelColumns,categoryColumns } from "./columns"
 export default {
   name: "othsearchSort",
-  mixins: [mixinPage, resToken, companyHelper, privateField],
+  mixins: [mixinPage, resToken, privateField],
   components: {
     addEditRate,
   },
@@ -261,7 +275,7 @@ export default {
           prop: "",
           label: "操作",
           fixed: "right",
-          width: "140px",
+          width: "60px",
           _noset_: true,
           _slot_: "operation",
         },
@@ -387,16 +401,17 @@ export default {
     async onSearchPaymentChannelGrossProfit(){
       if (this.loadings.paymentChannel) return;
 
-      if (!this.currentCompany) {
-        this.$message.warning("请选择公司!");
-        this.datas.paymentChannel = []
-        return;
-      }       
+      // if (!this.currentCompany) {
+      //   this.$message.warning("请选择公司!");
+      //   this.datas.paymentChannel = []
+      //   return;
+      // }       
+      // companyNo:this.currentCompany
+
 
       this.loadings.paymentChannel = true;
       const { code, data } = await asyncRequest.paymentChannelList({
         ...this.parmValue.paymentChannel,
-        companyNo:this.currentCompany
       });
 
 
@@ -404,8 +419,15 @@ export default {
        const { list, count } = data ?? {};
        this.datas.paymentChannel = list ?? [];
        this.datas.category = []
-       this.selectedRow = {}
        this.pageInfo.paymentChannel.total = count ?? 0;
+       
+       if(list.length > 0){
+        this.selectedRow = list[0]
+       }else{
+        this.selectedRow = {}
+      }
+
+
       }else if (code >= 100 && code <= 104) {
        await this.logout();
       }else {
@@ -418,10 +440,10 @@ export default {
     async onSearchcategorylist(){
       if (this.loading) return;
 
-      if (!this.currentCompany) {
-        this.$message.warning("请选择公司!");
-        return;
-      }       
+      // if (!this.currentCompany) {
+      //   this.$message.warning("请选择公司!");
+      //   return;
+      // }       
 
       this.parmValue.companyNo = this.currentCompany;
       this.loadings.category = true;
@@ -457,7 +479,7 @@ export default {
   display: flex;
   width: 100%;
   overflow:hidden;
-  gap: 60px;
+  gap: 20px;
 }
 
 .sort {

+ 10 - 3
src/views/serviceParam/paymentChannelManage/index.vue

@@ -178,7 +178,7 @@ import asyncRequest from "@/apis/service/serviceParam/paymentChannelManage";
 import { statusList } from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
-import companyHelper from "@/mixins/companyHelper";
+// import companyHelper from "@/mixins/companyHelper";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import privateField from "@/mixins/privateField";
@@ -186,7 +186,7 @@ import { actionTypes } from "@/utils/actionType";
 
 export default {
   name: "othsearchSort",
-  mixins: [mixinPage, resToken, companyHelper, privateField],
+  mixins: [mixinPage, resToken, privateField],
   components: {
     addEditRate,
   },
@@ -309,6 +309,13 @@ export default {
     //设置毛利率
     setRate(row, actionType) {
       this.actionType = actionType
+
+      if(this.actionTypes.UPDATE === actionType && row.status !== "0"){
+        this.$message.warning('必须在禁用后才能修改!')
+        return
+      }
+
+
       this.modelRateId = row.id;
       this.sitemRate = row;
       this.showRateModel = true;
@@ -376,7 +383,7 @@ export default {
       //   return;
       // }
 
-      this.parmValue.companyNo = this.currentCompany;
+      // this.parmValue.companyNo = this.currentCompany;
       this.loading = true;
       const { code, data } = await asyncRequest.list(this.parmValue);
 

+ 1 - 1
src/views/serviceParam/terrace/addEdit.vue

@@ -99,7 +99,7 @@
                   <el-table size="mini" border :data="ruleForm.pay_list">
                     <el-table-column label="渠道名称" prop="channel_name" />
                     <el-table-column label="业务公司" prop="companyName" />
-                    <el-table-column v-if="id === '005' || id === '003'" label="操作" width="80px">
+                    <el-table-column v-if="id === '003'" label="操作" width="80px">
                       <template slot="header">
                         <span>操作</span>
                         <el-tooltip

+ 1 - 3
src/views/serviceParam/terrace/searchCompanyModal.vue

@@ -39,9 +39,7 @@
                 placeholder="支付渠道名称"
                 clearable
                 size="mini"
-                @change=" pageInfo.curr = 1;
-                          parmValue.page = 1;
-                          searchList();"
+                @change=" pageInfo.curr = 1; parmValue.page = 1; searchList();"
               />
             </el-col>
           </el-row>

Some files were not shown because too many files changed in this diff