Kaynağa Gözat

Merge branch 'master' of http://192.168.1.218:3000/lianghanqiang/ldt-manger-web

lianghanqiang 4 yıl önce
ebeveyn
işleme
d72a76e308

+ 8 - 0
src/api/ldt_mall/mall.js

@@ -73,6 +73,14 @@ export const queryProductFee = (params) => {
   })
 }
 
+export const productFeeTip = (params) => {
+  return request({
+    url: '/api/mall/yeepay/product/fee/productFeeTip',
+    method: 'get',
+    params: params
+  })
+}
+
 export const modifyProductFee = (params) => {
   return request({
     url: '/api/mall/yeepay/product/fee/modify',

+ 50 - 0
src/api/ldt_product_fee/productfee.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_product_fee/productfee/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_product_fee/productfee/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_product_fee/productfee/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_product_fee/productfee/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_product_fee/productfee/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 46 - 2
src/api/ldt_shop/shop.js

@@ -68,6 +68,14 @@ export const queryProductFee = (params) => {
   })
 }
 
+export const productFeeTip = (params) => {
+  return request({
+    url: '/api/shop/yeepay/product/fee/productFeeTip',
+    method: 'get',
+    params: params
+  })
+}
+
 export const modifyProductFee = (params) => {
   return request({
     url: '/api/shop/yeepay/product/fee/modify',
@@ -86,12 +94,48 @@ export const getMerchantInfo = (shopId) => {
   })
 }
 
-export const getWechatConfigQuery = (merchantNo) => {
+export const getWechatConfigQuery = (businessId) => {
   return request({
     url: '/api/ldt_shop/shop/getWechatConfigQuery',
     method: 'get',
     params: {
-      merchantNo
+      businessId
     }
   })
 }
+
+export const wechatConfigAdd = (params) => {
+  return request({
+    url: '/api/ldt_shop/shop/wechatConfigAdd',
+    method: 'post',
+    data: params
+  })
+}
+
+export const getAuthStateQuery = (businessId) => {
+  return request({
+    url: '/api/ldt_shop/shop/getAuthStateQuery',
+    method: 'get',
+    params: {
+      businessId
+    }
+  })
+}
+
+export const getAuthAuditInfo = (businessId) => {
+  return request({
+    url: '/api/ldt_shop/shop/getAuthAuditInfo',
+    method: 'get',
+    params: {
+      businessId
+    }
+  })
+}
+
+export const wechatApply = (row) => {
+  return request({
+    url: '/api/ldt_shop/shop/wechatApply',
+    method: 'post',
+    data: row
+  })
+}

+ 28 - 2
src/router/views/index.js

@@ -100,6 +100,19 @@ export default [{
         import( /* webpackChunkName: "views" */ '@/views/ldt_shop/handleShopAudit')
     }]
   },
+  {
+    path: '/ldt_product_fee/productfee',
+    component: Layout,
+    children: [{
+      path: 'handle/:type/:id',
+      name: '费率变更历史',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_product_fee/productfee')
+    }]
+  },
   {
     path: '/work/process/shop/miniCRO',
     component: Layout,
@@ -117,7 +130,7 @@ export default [{
     path: '/work/process/shopInfo',
     component: Layout,
     children: [{
-      path: 'handle/:businessId/:no',
+      path: 'handle/:businessId',
       name: '商店信息',
       meta: {
         i18n: 'work'
@@ -130,7 +143,7 @@ export default [{
     path: '/work/process/shopInfo/handleWechatConfig',
     component: Layout,
     children: [{
-      path: 'handle/:no',
+      path: 'handle/:businessId',
       name: '公众号配置',
       meta: {
         i18n: 'work'
@@ -139,6 +152,19 @@ export default [{
         import( /* webpackChunkName: "views" */ '@/views/ldt_shop/comps/shop-wechat-config')
     }]
   },
+  {
+    path: '/work/process/shopInfo/handleWechatAuthApply',
+    component: Layout,
+    children: [{
+      path: 'handle/:businessId',
+      name: '微信实名认证申请',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/handleWechatAuthApply')
+    }]
+  },
   {
     path: '/work/process/activity',
     component: Layout,

+ 2 - 2
src/views/ldt_bills/bills.vue

@@ -93,13 +93,13 @@
                 trigger: "blur"
               }]
             },
-            {
+            /*{
               prop: "dataInfo",
               slot: true,
               width: 250,
               display: false,
               label: "数据统计"
-            },
+            },*/
             {
               label: "付款方",
               prop: "payerName",

+ 280 - 61
src/views/ldt_mall/comps/mall-product-fee.vue

@@ -1,41 +1,89 @@
 <template>
-  <basic-container>
-    <el-select v-model="productCodeSelect.value" placeholder="请选择商户" size="small" style="width:100%" @change="selectChange">
-      <el-option
-        v-for="opt in productCodeSelect.option"
-        :key="opt.productCode"
-        :label="opt.productName"
-        :value="opt.productCode">
-        <span style="float: left">{{ opt.productName }}</span>
-        <span style="float: right; color: #8492a6; font-size: 13px">{{ opt.productCode }}</span>
-      </el-option>
-    </el-select>
-    <el-divider/>
-    <avue-form ref="form" v-model="form" :option="option" @submit="submit"></avue-form>
-  </basic-container>
+  <div>
+    <avue-crud :data="data" v-model="form" :option="option" @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="menuLeft">
+        <el-popover
+          placement="top-start"
+          title="提示"
+          width="200"
+          trigger="hover"
+          content="如果有未处理的变更记录,则按钮右上角对应的未处理的数量">
+          <el-badge :value="productFeeCount" class="item" style="margin-top:10px" slot="reference">
+            <el-button icon="el-icon-view" :size="size" :type="type" @click="viewUpdateHistory">查看更改历史</el-button>
+          </el-badge>
+        </el-popover>
+      </template>
+      <template slot-scope="{type,size}" slot="menuRight">
+        <el-button icon="el-icon-edit" :size="size" :type="type" @click="updateProductFee" style="margin-top:10px">修改产品费率</el-button>
+      </template>
+    </avue-crud>
+    <el-dialog
+      title="修改产品费率"
+      :visible.sync="dialog.state"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      :modal-append-to-body="false"
+      width="50%">
+      <el-divider/>
+      <div v-for="(fee,index) in dialog.data" :key="index">
+        <h4 style="padding-left: 50px">{{fee.productName}}</h4>
+        <avue-form :option="dialog.option[index]" v-model="dialog.data[index]"></avue-form>
+        <el-divider/>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" icon="el-icon-check" size="small" @click="submit" :loading="dialog.loading">确认修改</el-button>
+        <el-button @click="dialog.state = false" size="small">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
 import {
   queryProductFee,
-  modifyProductFee
+  modifyProductFee,
+  productFeeTip
 } from "@/api/ldt_mall/mall";
 
 export default {
   props: {
-    operateId: String
+    operateId: String,
+    merchantNo: String,
   },
   data() {
     return {
-      form: {},
-      productCodeSelect:{
-        value:"",
-        option:[]
+      dialog: {
+        loading: false,
+        state: false,
+        data: [],
+        option: []
       },
+      productFeeCount: 0,
+      form: {},
+      data: [],
       option: {
-        submitText: '保存',
         labelWidth: 150,
+        delBtn: false,
         entryBtn: false,
+        addBtn: false,
+        refreshBtn: false,
+        menuBtn: false,
+        columnBtn: false,
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        viewBtn: false,
+        searchShow: true,
+        searchSpan: 4,
+        searchMenuSpan: 6,
+        searchLabelWidth: 120,
+        border: true,
+        index: true,
+        card: true,
+        selection: true,
+        editBtn: false,
+        menu: false,
+        dialogClickModal: false,
         column: [
           {
             label: '产品码',
@@ -53,14 +101,14 @@ export default {
             label: '计费策略',
             prop: 'rateType',
             type: 'select',
-            change:(value)=>{
-              const percentRate = this.option.column.find(ele=>{
-                return ele.prop==='percentRate';
+            change: (value) => {
+              const percentRate = this.option.column.find(ele => {
+                return ele.prop === 'percentRate';
               });
-              const fixedRate = this.option.column.find(ele=>{
-                return ele.prop==='fixedRate';
+              const fixedRate = this.option.column.find(ele => {
+                return ele.prop === 'fixedRate';
               });
-              switch (value.value){
+              switch (value.value) {
                 case "SINGLE_PERCENT":
                   percentRate.disabled = false;
                   percentRate.rules[0].required = true;
@@ -86,20 +134,20 @@ export default {
             },
             dicData: [
               {
-                label:'单笔百分比',
-                value:'SINGLE_PERCENT',
+                label: '单笔百分比',
+                value: 'SINGLE_PERCENT',
               },
               {
-                label:'单笔固定值',
-                value:'SINGLE_FIXED',
+                label: '单笔固定值',
+                value: 'SINGLE_FIXED',
               },
               {
-                label:'单笔固定值+单笔百分比',
-                value:'FIXED_MIX_PERCENT',
+                label: '单笔固定值+单笔百分比',
+                value: 'FIXED_MIX_PERCENT',
               },
               {
-                label:'单笔百分比+封顶值',
-                value:'PERCENT_MIX_CAP',
+                label: '单笔百分比+封顶值',
+                value: 'PERCENT_MIX_CAP',
               }
             ],
             rules: [
@@ -196,43 +244,214 @@ export default {
       }
     }
   },
-  mounted() {
-    this.init();
+  created() {
+    this.getProductFeeTip();
   },
   methods: {
-    init() {
+    onLoad() {
       queryProductFee({
+        id: this.operateId
+      }).then(res => {
+        this.data = res.data.data;
+      });
+    },
+    getProductFeeTip(){
+      productFeeTip({
         id:this.operateId
       }).then(res=>{
-        this.productCodeSelect.option = res.data.data;
-        this.productCodeSelect.value = res.data.data[0].productCode;
-        this.selectChange(res.data.data[0].productCode);
+        this.productFeeCount = res.data.data;
       });
     },
-    /**
-     * 选择下拉框值
-     * @param value
-     */
-    selectChange(value){
-      const tab = this.productCodeSelect.option.find(ele=>{
-        return ele.productCode===value;
-      });
-      this.form = tab;
+    viewUpdateHistory() {
+      this.$router.push({path: `/ldt_product_fee/productfee/handle/mall/${this.operateId}`})
     },
-    submit(data, done) {
-      const content = this.productCodeSelect.option.find(col=>{
-        return col.productCode===data.productCode;
-      });
+    updateProductFee() {
+      Object.assign(this.dialog.data, this.data);
+      this.dialog.option = [];
+      for(let i=0;i<this.dialog.data.length;i++){
+        const productFeeOption = {
+          labelWidth: 150,
+          emptyBtn: false,
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          submitBtn: false,
+          border: true,
+          card: true,
+          column: [
+            {
+              label: '产品码',
+              prop: 'productCode',
+              disabled: true,
+              rules: [
+                {
+                  required: true,
+                  message: '请输入产品码',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '计费策略',
+              prop: 'rateType',
+              type: 'select',
+              change: (value) => {
+                const percentRate = this.dialog.option[i].column.find(ele => {
+                  return ele.prop === 'percentRate';
+                });
+                const fixedRate = this.dialog.option[i].column.find(ele => {
+                  return ele.prop === 'fixedRate';
+                });
+                switch (value.value) {
+                  case "SINGLE_PERCENT":
+                    percentRate.disabled = false;
+                    percentRate.rules[0].required = true;
+                    fixedRate.disabled = true;
+                    fixedRate.rules[0].required = false;
+                    break;
+                  case "SINGLE_FIXED":
+                    percentRate.disabled = true;
+                    percentRate.rules[0].required = false;
+                    fixedRate.disabled = false;
+                    fixedRate.rules[0].required = true;
+                    break;
+                  case "FIXED_MIX_PERCENT":
+                  case "PERCENT_MIX_CAP":
+                    percentRate.disabled = false;
+                    percentRate.rules[0].required = true;
+                    fixedRate.disabled = false;
+                    fixedRate.rules[0].required = true;
+                    break;
+                  default:
+                    break;
+                }
+              },
+              dicData: [
+                {
+                  label: '单笔百分比',
+                  value: 'SINGLE_PERCENT',
+                },
+                {
+                  label: '单笔固定值',
+                  value: 'SINGLE_FIXED',
+                },
+                {
+                  label: '单笔固定值+单笔百分比',
+                  value: 'FIXED_MIX_PERCENT',
+                },
+                {
+                  label: '单笔百分比+封顶值',
+                  value: 'PERCENT_MIX_CAP',
+                }
+              ],
+              rules: [
+                {
+                  required: true,
+                  message: '请输入积分策略',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '单笔百分比',
+              prop: 'percentRate',
+              rules: [
+                {
+                  required: false,
+                  message: '请输入单笔百分比',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '单笔固定值',
+              prop: 'fixedRate',
+              rules: [
+                {
+                  required: false,
+                  message: '请输入单笔固定值',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '手续费承担方',
+              prop: 'undertaker',
+              type: 'select',
+              dicData: [
+                {
+                  label: '入驻商户',
+                  value: 'SETTLED_MERCHANT'
+                },
+                {
+                  label: '用户',
+                  value: 'USER'
+                },
+                {
+                  label: '标准商户',
+                  value: 'ORDINARY_MERCHANT'
+                },
+                {
+                  label: '平台商',
+                  value: 'PLATFORM_MERCHANT'
+                },
+                {
+                  label: '服务商',
+                  value: 'SAAS_SERVICE_PROVIDER'
+                }
+              ],
+              rules: [
+                {
+                  required: false,
+                  message: '请输入手续费承担方',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '手续费收取方式',
+              prop: 'paymentMethod',
+              type: 'select',
+              dicData: [
+                {
+                  label: '实收',
+                  value: 'REAL_TIME'
+                },
+                {
+                  label: '预付实扣',
+                  value: 'PREPAID_REAL'
+                },
+                {
+                  label: '后收',
+                  value: 'UN_REAL_TIME'
+                }
+              ],
+              rules: [
+                {
+                  required: false,
+                  message: '请输入手续费收取方式',
+                  trigger: 'blur'
+                }
+              ]
+            }
+          ]
+        };
+        this.dialog.option.push(productFeeOption);
+      }
+      this.dialog.state = true;
+    },
+    submit() {
+      this.dialog.loading = true;
       //拷贝对象值
-      Object.assign(content,data);
       modifyProductFee({
-        id:this.operateId,
-        modifyProductInfo:JSON.stringify(this.productCodeSelect.option)
-      }).then(res=>{
+        id: this.operateId,
+        modifyProductInfo: JSON.stringify(this.dialog.data)
+      }).then(() => {
         this.$message.success("修改成功");
-        done();
-      },error => done());
-      done();
+        this.onLoad();
+        this.dialog.state = false;
+        this.dialog.loading = false;
+      }).catch(() => this.dialog.loading=false);
     }
   }
 };

+ 208 - 0
src/views/ldt_product_fee/comps/product-fee.vue

@@ -0,0 +1,208 @@
+<template>
+  <div>
+    <avue-crud :data="data" v-model="form" :option="option">
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+
+export default {
+  props: {
+    productInfo: String,
+  },
+  data() {
+    return {
+      form:{},
+      data: [],
+      option: {
+        labelWidth: 150,
+        delBtn: false,
+        entryBtn: false,
+        addBtn: false,
+        refreshBtn: false,
+        menuBtn: false,
+        columnBtn: false,
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        viewBtn: false,
+        searchShow: true,
+        searchSpan: 4,
+        searchMenuSpan: 6,
+        searchLabelWidth: 120,
+        border: true,
+        index: true,
+        card: true,
+        selection: true,
+        editBtn: false,
+        menu: false,
+        dialogClickModal: false,
+        column: [
+          {
+            label: '产品码',
+            prop: 'productCode',
+            disabled: true,
+            rules: [
+              {
+                required: true,
+                message: '请输入产品码',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '计费策略',
+            prop: 'rateType',
+            type: 'select',
+            change: (value) => {
+              const percentRate = this.option.column.find(ele => {
+                return ele.prop === 'percentRate';
+              });
+              const fixedRate = this.option.column.find(ele => {
+                return ele.prop === 'fixedRate';
+              });
+              switch (value.value) {
+                case "SINGLE_PERCENT":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = true;
+                  fixedRate.rules[0].required = false;
+                  break;
+                case "SINGLE_FIXED":
+                  percentRate.disabled = true;
+                  percentRate.rules[0].required = false;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                case "FIXED_MIX_PERCENT":
+                case "PERCENT_MIX_CAP":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                default:
+                  break;
+              }
+            },
+            dicData: [
+              {
+                label: '单笔百分比',
+                value: 'SINGLE_PERCENT',
+              },
+              {
+                label: '单笔固定值',
+                value: 'SINGLE_FIXED',
+              },
+              {
+                label: '单笔固定值+单笔百分比',
+                value: 'FIXED_MIX_PERCENT',
+              },
+              {
+                label: '单笔百分比+封顶值',
+                value: 'PERCENT_MIX_CAP',
+              }
+            ],
+            rules: [
+              {
+                required: true,
+                message: '请输入积分策略',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔百分比',
+            prop: 'percentRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔百分比',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔固定值',
+            prop: 'fixedRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔固定值',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费承担方',
+            prop: 'undertaker',
+            type: 'select',
+            dicData: [
+              {
+                label: '入驻商户',
+                value: 'SETTLED_MERCHANT'
+              },
+              {
+                label: '用户',
+                value: 'USER'
+              },
+              {
+                label: '标准商户',
+                value: 'ORDINARY_MERCHANT'
+              },
+              {
+                label: '平台商',
+                value: 'PLATFORM_MERCHANT'
+              },
+              {
+                label: '服务商',
+                value: 'SAAS_SERVICE_PROVIDER'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费承担方',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费收取方式',
+            prop: 'paymentMethod',
+            type: 'select',
+            dicData: [
+              {
+                label: '实收',
+                value: 'REAL_TIME'
+              },
+              {
+                label: '预付实扣',
+                value: 'PREPAID_REAL'
+              },
+              {
+                label: '后收',
+                value: 'UN_REAL_TIME'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费收取方式',
+                trigger: 'blur'
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  created() {
+    this.data = JSON.parse(this.productInfo);
+  }
+};
+</script>
+
+<style>
+</style>

+ 365 - 0
src/views/ldt_product_fee/productfee.vue

@@ -0,0 +1,365 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot-scope="scope" slot="productInfo">
+        <el-popover
+          placement="top-start"
+          title="全部内容"
+          width="400"
+          trigger="hover"
+          :content="scope.row.productInfo">
+          <el-input
+            type="textarea"
+            :autosize="{ minRows: 1, maxRows: 10}"
+            ref="generateMenuJson"
+            readonly
+            v-model="scope.row.productInfo">
+          </el-input>
+          <p slot="reference" style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap">{{scope.row.productInfo}}</p>
+        </el-popover>
+      </template>
+      <template slot="operate" slot-scope="scope">
+        <a v-if="scope.row.applicationStatus===AGREEMENT_SIGNING" target="_blank">{{scope.row.agreementSignUrl}}</a>
+        <p v-if="scope.row.applicationStatus===REVIEW_BACK || scope.row.applicationStatus===COMPLETED">{{scope.row.agreementSignUrl}}</p>
+        <p v-if="scope.row.applicationStatus===AUTHENTICITY_VERIFYING" v-text="progressDescriptionSwitch(scope.row.progressDescription)"></p>
+      </template>
+      <template slot-scope="scope"  slot="menu">
+        <el-button icon="el-icon-view" :type="scope.type" :size="scope.size" @click="()=>{
+          dialog.state = true;
+          dialog.data = scope.row.productInfo;
+        }">产品费率</el-button>
+      </template>
+    </avue-crud>
+    <el-dialog
+      title="修改产品费率"
+      :visible.sync="dialog.state"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      :modal-append-to-body="false"
+      width="50%">
+      <product-fee v-bind:product-info="dialog.data"></product-fee>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_product_fee/productfee";
+  import {mapGetters} from "vuex";
+  import ProductFee from "./comps/product-fee"
+
+  export default {
+    components:{ProductFee},
+    data() {
+      return {
+        dialog:{
+          state: false,
+          data: {}
+        },
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          border: true,
+          index: true,
+          column: [
+            {
+              label: "请求号",
+              prop: "requestNo",
+              rules: [{
+                required: true,
+                message: "请输入请求号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "商户编号",
+              prop: "merchantNo",
+              rules: [{
+                required: true,
+                message: "请输入商户编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "变更的产品信息",
+              prop: "productInfo",
+              rules: [{
+                required: true,
+                message: "请输入变更的产品信息",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入网申请编号",
+              prop: "applicationNo",
+              rules: [{
+                required: true,
+                message: "请输入入网申请编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "申请状态",
+              prop: "applicationStatus",
+              dicData:[
+                {
+                  label:"申请审核中",
+                  value:"REVIEWING"
+                },
+                {
+                  label:"申请已驳回",
+                  value:"REVIEW_BACK"
+                },
+                {
+                  label:"真实性验证中",
+                  value:"AUTHENTICITY_VERIFYING"
+                },
+                {
+                  label:"协议待签署",
+                  value:"AGREEMENT_SIGNING"
+                },
+                {
+                  label:"业务开通中",
+                  value:"BUSINESS_OPENING"
+                },
+                {
+                  label:"申请已完成",
+                  value:"COMPLETED"
+                },
+              ],
+              rules: [{
+                required: true,
+                message: "请输入申请状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "操作说明",
+              prop: "operate",
+              rules: [{
+                required: true,
+                message: "请输入操作说明",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "协议签署地址",
+            //   prop: "agreementSignUrl",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入协议签署地址",
+            //     trigger: "blur"
+            //   }]
+            // },
+            // {
+            //   label: "审核意见",
+            //   prop: "auditOpinion",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入审核意见",
+            //     trigger: "blur"
+            //   }]
+            // },
+            // {
+            //   label: "入网进度说明",
+            //   prop: "progressDescription",
+            //   dicData: [
+            //     {
+            //       label: "待邮箱验证",
+            //       value: "EMAIL_VERIFY"
+            //     },
+            //     {
+            //       label: "待短信验证",
+            //       value: "MOBILE_VERIFY"
+            //     },
+            //     {
+            //       label: "待打款验资",
+            //       value: "REMIT_AUTH"
+            //     }
+            //   ],
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入入网进度说明",
+            //     trigger: "blur"
+            //   }]
+            // },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.productfee_add, false),
+          viewBtn: this.vaildData(this.permission.productfee_view, false),
+          delBtn: this.vaildData(this.permission.productfee_delete, false),
+          editBtn: this.vaildData(this.permission.productfee_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      progressDescriptionSwitch(value){
+        switch (value){
+          case "EMAIL_VERIFY":
+            return "待邮箱验证";
+          case "MOBILE_VERIFY":
+            return "待短信验证";
+          case "REMIT_AUTH":
+            return "待打款验资";
+          default:
+            return "";
+        }
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        if(this.$route.params.type==="mall"){
+          params.mallId = this.$route.params.id;
+        }else{
+          params.shopId = this.$route.params.id;
+        }
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 95 - 0
src/views/ldt_shop/comps/shop-auth-state.vue

@@ -0,0 +1,95 @@
+<template>
+  <div>
+    <el-row>
+      <basic-container>
+        <template>
+          <el-table :data="parentData" style="width: 100%">
+            <el-table-column label="报备商户号" prop="reportMerchantNo"></el-table-column>
+            <el-table-column label="报备类型" prop="feeType">
+              <template slot-scope="scope">
+                <span v-text="feeType(scope.row.feeType)"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="授权状态" prop="authorizeState">
+              <template slot-scope="scope">
+                <span v-text="authorizeState(scope.row.authorizeState)"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" prop="authorizeState">
+              <template slot-scope="scope">
+                <el-button size="small" plain icon="el-icon-s-opportunity"
+                           @click.stop="handleWechatAuthApply"
+                           :disabled="scope.row.authorizeState!=='AUTHORIZE_STATE_UNAUTHORIZED'">人工授权
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+      </basic-container>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import {getAuthStateQuery} from "@/api/ldt_shop/shop";
+
+export default {
+  props: {
+    operateId: String
+  },
+  data() {
+    return {
+      parentData: [],
+    }
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      getAuthStateQuery(this.operateId).then(res => {
+        this.parentData = JSON.parse(res.data.data);
+      });
+    },
+    handleWechatAuthApply() {
+      this.$router.push(`/work/process/shopInfo/handleWechatAuthApply/handle/${this.operateId}`);
+    },
+    feeType(res) {
+      switch (res) {
+        case "GONGYI":
+          return "微信公益";
+        case "GONGJIAO":
+          return "微信公缴";
+        case "XIANXIA":
+          return "微信线下";
+        case "BAOXIAN":
+          return "微信保险";
+        case  "XIANSHANG":
+          return "微信线上";
+        case  "OLDLVZHOU":
+          return "微信老绿洲";
+        case  "LVZHOU":
+          return "微信绿洲";
+        case  "XIAOYUAN":
+          return "微信校园";
+        default:
+          return "";
+      }
+    },
+    authorizeState(res) {
+      switch (res) {
+        case 'AUTHORIZE_STATE_UNAUTHORIZED':
+          return "未授权";
+        case 'AUTHORIZE_STATE_AUTHORIZED':
+          return "已授权";
+        default:
+          return "";
+      }
+    },
+  }
+}
+;
+</script>
+
+<style>
+</style>

+ 280 - 61
src/views/ldt_shop/comps/shop-product-fee.vue

@@ -1,41 +1,89 @@
 <template>
-  <basic-container>
-    <el-select v-model="productCodeSelect.value" placeholder="请选择商户" size="small" style="width:100%" @change="selectChange">
-      <el-option
-        v-for="opt in productCodeSelect.option"
-        :key="opt.productCode"
-        :label="opt.productName"
-        :value="opt.productCode">
-        <span style="float: left">{{ opt.productName }}</span>
-        <span style="float: right; color: #8492a6; font-size: 13px">{{ opt.productCode }}</span>
-      </el-option>
-    </el-select>
-    <el-divider/>
-    <avue-form ref="form" v-model="form" :option="option" @submit="submit"></avue-form>
-  </basic-container>
+  <div>
+    <avue-crud :data="data" v-model="form" :option="option" @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="menuLeft">
+        <el-popover
+          placement="top-start"
+          title="提示"
+          width="200"
+          trigger="hover"
+          content="如果有未处理的变更记录,则按钮右上角对应的未处理的数量">
+          <el-badge :value="productFeeCount" class="item" style="margin-top:10px" slot="reference">
+            <el-button icon="el-icon-view" :size="size" :type="type" @click="viewUpdateHistory">查看更改历史</el-button>
+          </el-badge>
+        </el-popover>
+      </template>
+      <template slot-scope="{type,size}" slot="menuRight">
+        <el-button icon="el-icon-edit" :size="size" :type="type" @click="updateProductFee" style="margin-top:10px">修改产品费率</el-button>
+      </template>
+    </avue-crud>
+    <el-dialog
+      title="修改产品费率"
+      :visible.sync="dialog.state"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      :modal-append-to-body="false"
+      width="50%">
+      <el-divider/>
+      <div v-for="(fee,index) in dialog.data" :key="index">
+        <h4 style="padding-left: 50px">{{fee.productName}}</h4>
+        <avue-form :option="dialog.option[index]" v-model="dialog.data[index]"></avue-form>
+        <el-divider/>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" icon="el-icon-check" size="small" @click="submit" :loading="dialog.loading">确认修改</el-button>
+        <el-button @click="dialog.state = false" size="small">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
 import {
   queryProductFee,
-  modifyProductFee
+  modifyProductFee,
+  productFeeTip
 } from "@/api/ldt_shop/shop";
 
 export default {
   props: {
-    operateId: String
+    operateId: String,
+    merchantNo: String,
   },
   data() {
     return {
-      form: {},
-      productCodeSelect:{
-        value:"",
-        option:[]
+      dialog: {
+        loading: false,
+        state: false,
+        data: [],
+        option: []
       },
+      productFeeCount: 0,
+      form: {},
+      data: [],
       option: {
-        submitText: '保存',
         labelWidth: 150,
+        delBtn: false,
         entryBtn: false,
+        addBtn: false,
+        refreshBtn: false,
+        menuBtn: false,
+        columnBtn: false,
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        viewBtn: false,
+        searchShow: true,
+        searchSpan: 4,
+        searchMenuSpan: 6,
+        searchLabelWidth: 120,
+        border: true,
+        index: true,
+        card: true,
+        selection: true,
+        editBtn: false,
+        menu: false,
+        dialogClickModal: false,
         column: [
           {
             label: '产品码',
@@ -53,14 +101,14 @@ export default {
             label: '计费策略',
             prop: 'rateType',
             type: 'select',
-            change:(value)=>{
-              const percentRate = this.option.column.find(ele=>{
-                return ele.prop==='percentRate';
+            change: (value) => {
+              const percentRate = this.option.column.find(ele => {
+                return ele.prop === 'percentRate';
               });
-              const fixedRate = this.option.column.find(ele=>{
-                return ele.prop==='fixedRate';
+              const fixedRate = this.option.column.find(ele => {
+                return ele.prop === 'fixedRate';
               });
-              switch (value.value){
+              switch (value.value) {
                 case "SINGLE_PERCENT":
                   percentRate.disabled = false;
                   percentRate.rules[0].required = true;
@@ -86,20 +134,20 @@ export default {
             },
             dicData: [
               {
-                label:'单笔百分比',
-                value:'SINGLE_PERCENT',
+                label: '单笔百分比',
+                value: 'SINGLE_PERCENT',
               },
               {
-                label:'单笔固定值',
-                value:'SINGLE_FIXED',
+                label: '单笔固定值',
+                value: 'SINGLE_FIXED',
               },
               {
-                label:'单笔固定值+单笔百分比',
-                value:'FIXED_MIX_PERCENT',
+                label: '单笔固定值+单笔百分比',
+                value: 'FIXED_MIX_PERCENT',
               },
               {
-                label:'单笔百分比+封顶值',
-                value:'PERCENT_MIX_CAP',
+                label: '单笔百分比+封顶值',
+                value: 'PERCENT_MIX_CAP',
               }
             ],
             rules: [
@@ -196,43 +244,214 @@ export default {
       }
     }
   },
-  mounted() {
-    this.init();
+  created() {
+    this.getProductFeeTip();
   },
   methods: {
-    init() {
+    onLoad() {
       queryProductFee({
+        id: this.operateId
+      }).then(res => {
+        this.data = res.data.data;
+      });
+    },
+    getProductFeeTip(){
+      productFeeTip({
         id:this.operateId
       }).then(res=>{
-        this.productCodeSelect.option = res.data.data;
-        this.productCodeSelect.value = res.data.data[0].productCode;
-        this.selectChange(res.data.data[0].productCode);
+        this.productFeeCount = res.data.data;
       });
     },
-    /**
-     * 选择下拉框值
-     * @param value
-     */
-    selectChange(value){
-      const tab = this.productCodeSelect.option.find(ele=>{
-        return ele.productCode===value;
-      });
-      this.form = tab;
+    viewUpdateHistory() {
+      this.$router.push({path: `/ldt_product_fee/productfee/handle/shop/${this.operateId}`})
     },
-    submit(data, done) {
-      const content = this.productCodeSelect.option.find(col=>{
-        return col.productCode===data.productCode;
-      });
+    updateProductFee() {
+      Object.assign(this.dialog.data, this.data);
+      this.dialog.option = [];
+      for(let i=0;i<this.dialog.data.length;i++){
+        const productFeeOption = {
+          labelWidth: 150,
+          emptyBtn: false,
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          submitBtn: false,
+          border: true,
+          card: true,
+          column: [
+            {
+              label: '产品码',
+              prop: 'productCode',
+              disabled: true,
+              rules: [
+                {
+                  required: true,
+                  message: '请输入产品码',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '计费策略',
+              prop: 'rateType',
+              type: 'select',
+              change: (value) => {
+                const percentRate = this.dialog.option[i].column.find(ele => {
+                  return ele.prop === 'percentRate';
+                });
+                const fixedRate = this.dialog.option[i].column.find(ele => {
+                  return ele.prop === 'fixedRate';
+                });
+                switch (value.value) {
+                  case "SINGLE_PERCENT":
+                    percentRate.disabled = false;
+                    percentRate.rules[0].required = true;
+                    fixedRate.disabled = true;
+                    fixedRate.rules[0].required = false;
+                    break;
+                  case "SINGLE_FIXED":
+                    percentRate.disabled = true;
+                    percentRate.rules[0].required = false;
+                    fixedRate.disabled = false;
+                    fixedRate.rules[0].required = true;
+                    break;
+                  case "FIXED_MIX_PERCENT":
+                  case "PERCENT_MIX_CAP":
+                    percentRate.disabled = false;
+                    percentRate.rules[0].required = true;
+                    fixedRate.disabled = false;
+                    fixedRate.rules[0].required = true;
+                    break;
+                  default:
+                    break;
+                }
+              },
+              dicData: [
+                {
+                  label: '单笔百分比',
+                  value: 'SINGLE_PERCENT',
+                },
+                {
+                  label: '单笔固定值',
+                  value: 'SINGLE_FIXED',
+                },
+                {
+                  label: '单笔固定值+单笔百分比',
+                  value: 'FIXED_MIX_PERCENT',
+                },
+                {
+                  label: '单笔百分比+封顶值',
+                  value: 'PERCENT_MIX_CAP',
+                }
+              ],
+              rules: [
+                {
+                  required: true,
+                  message: '请输入积分策略',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '单笔百分比',
+              prop: 'percentRate',
+              rules: [
+                {
+                  required: false,
+                  message: '请输入单笔百分比',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '单笔固定值',
+              prop: 'fixedRate',
+              rules: [
+                {
+                  required: false,
+                  message: '请输入单笔固定值',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '手续费承担方',
+              prop: 'undertaker',
+              type: 'select',
+              dicData: [
+                {
+                  label: '入驻商户',
+                  value: 'SETTLED_MERCHANT'
+                },
+                {
+                  label: '用户',
+                  value: 'USER'
+                },
+                {
+                  label: '标准商户',
+                  value: 'ORDINARY_MERCHANT'
+                },
+                {
+                  label: '平台商',
+                  value: 'PLATFORM_MERCHANT'
+                },
+                {
+                  label: '服务商',
+                  value: 'SAAS_SERVICE_PROVIDER'
+                }
+              ],
+              rules: [
+                {
+                  required: false,
+                  message: '请输入手续费承担方',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '手续费收取方式',
+              prop: 'paymentMethod',
+              type: 'select',
+              dicData: [
+                {
+                  label: '实收',
+                  value: 'REAL_TIME'
+                },
+                {
+                  label: '预付实扣',
+                  value: 'PREPAID_REAL'
+                },
+                {
+                  label: '后收',
+                  value: 'UN_REAL_TIME'
+                }
+              ],
+              rules: [
+                {
+                  required: false,
+                  message: '请输入手续费收取方式',
+                  trigger: 'blur'
+                }
+              ]
+            }
+          ]
+        };
+        this.dialog.option.push(productFeeOption);
+      }
+      this.dialog.state = true;
+    },
+    submit() {
+      this.dialog.loading = true;
       //拷贝对象值
-      Object.assign(content,data);
       modifyProductFee({
-        id:this.operateId,
-        modifyProductInfo:JSON.stringify(this.productCodeSelect.option)
-      }).then(res=>{
+        id: this.operateId,
+        modifyProductInfo: JSON.stringify(this.dialog.data)
+      }).then(() => {
         this.$message.success("修改成功");
-        done();
-      },error => done());
-      done();
+        this.onLoad();
+        this.dialog.state = false;
+        this.dialog.loading = false;
+      }).catch(() => this.dialog.loading=false);
     }
   }
 };

+ 96 - 19
src/views/ldt_shop/comps/shop-wechat-config.vue

@@ -3,9 +3,20 @@
     <el-row>
       <basic-container>
         <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
-                   :destroy-on-close="true" title="公众号配置" width="80%">
-          <avue-form v-model="configForm" :option="configOption" @reset-change="refreshChange" @submit="submit">
-
+                   :destroy-on-close="true" title="公众号配置" width="70%">
+          <avue-form v-model="configForm" :option="configOption" @reset-change="refreshChange" @submit="(data,done)=>{submit(data,done)}">
+            <template slot="appIdList">
+              <el-button type="primary" round icon="el-icon-plus" @click="addAppIdList"></el-button>
+              <el-divider/>
+              <div class="el-card box-card" v-for="(appIdListOption,index) in configOptionByAppIdList" :key="index" style="margin-bottom: 10px">
+                <div slot="header" class="clearfix" style="padding: 5px">
+                  <el-tag>支付appId配置</el-tag>
+                  <el-button type="danger" style="float: right;" round icon="el-icon-minus" @click="removeAppIdList(index)"></el-button>
+                </div>
+                <el-divider/>
+                <avue-form ref="form" v-model="configForm.appIdList[index]" :option="appIdListOption"></avue-form>
+              </div>
+            </template>
           </avue-form>
         </el-dialog>
         <el-col style="padding: 10px 0 10px 0;">
@@ -48,35 +59,42 @@
 
 <script>
 import {mapGetters} from "vuex";
-import {getWechatConfigQuery} from "@/api/ldt_shop/shop";
+import {getWechatConfigQuery,wechatConfigAdd} from "@/api/ldt_shop/shop";
 
 export default {
   props: {
-    merchantNo: String
+    businessId: String
   },
   data() {
     return {
       dialogShow: false,
       parentData: [],
-      configForm: {},
+      configForm: {
+        tradeAuthDirList :[],
+        appIdList:[]
+      },
       configOption: {
-        mockBtn: true,
         submitText: '完成',
-        printBtn: true,
+        emptyBtn: false,
+        labelWidth: 150,
+        size: "mini",
         column: [
           {
             label: "支付授权目录",
             span: 24,
-            prop: "url",
-            prepend: 'https://',
-            mock: {
-              type: 'url',
-              header: false,
-            },
-            append: 'com',
-            row: true,
-          }]
+            prop: "tradeAuthDirList",
+            type: "array",
+          },
+          {
+            label: "支付appId目录列表",
+            span: 24,
+            prop: "appIdList",
+            type: "array",
+            shot: true,
+          },
+        ]
       },
+      configOptionByAppIdList:[]
     }
   },
   mounted() {
@@ -87,8 +105,8 @@ export default {
   },
   methods: {
     init() {
-      this.merchantNo = this.$route.params.no;
-      getWechatConfigQuery(this.merchantNo).then(res => {
+      this.businessId = this.$route.params.businessId;
+      getWechatConfigQuery(this.businessId).then(res => {
         this.parentData = res.data.data;
       });
     },
@@ -99,9 +117,65 @@ export default {
       }
       this.canReset = true
     },
+    submit(data,done){
+      data.businessId = this.businessId;
+      wechatConfigAdd(data).then(res=>{
+        this.configForm = {
+          tradeAuthDirList:[],
+          appIdList:[]
+        };
+        this.$message.success("提交成功");
+        done();
+      },error => done());
+    },
     refreshChange() {
       this.init();
     },
+    addAppIdList(){
+      const column = {
+        labelWidth: 120,
+        size:"mini",
+        menuBtn:false,
+        column: [
+          {
+            label: "appId",
+            span: 24,
+            prop: "appId",
+          },
+          {
+            label: "appSecret",
+            span: 24,
+            prop: "appSecret",
+          },
+          {
+            label: "appIdType",
+            span: 24,
+            prop: "appIdType",
+            type: "select",
+            dicData:[
+              {
+                label:"公众号",
+                value:"OFFICIAL_ACCOUNT"
+              },
+              {
+                label:"小程序",
+                value:"MINI_PROGRAM"
+              },
+            ]
+          },
+          {
+            label: "subscribeAppId",
+            span: 24,
+            prop: "subscribeAppId",
+          },
+        ]
+      }
+      this.configOptionByAppIdList.push(column);
+    },
+    removeAppIdList(index){
+      this.configOptionByAppIdList.splice(index,1);
+      this.configForm.appIdList.splice(index,1);
+    }
   }
 }
 ;
@@ -116,4 +190,7 @@ export default {
   margin-left: 15px;
   text-align: center;
 }
+.el-card .el-divider--horizontal{
+  margin: 0 0 5px 0 !important;
+}
 </style>

+ 11 - 4
src/views/ldt_shop/handleMiniCROShopAudit.vue

@@ -9,8 +9,8 @@
         </el-row>
         <el-row type="flex" class="row-bg" justify="end">
           <el-form-item>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree">同意</el-button>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree">驳回
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree" :loading="loading">同意</el-button>
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree" :loading="loading">驳回
             </el-button>
             <el-button @click="handleCancel">关闭</el-button>
           </el-form-item>
@@ -59,6 +59,7 @@ export default {
       businessId: null,
       form: {},
       task: {},
+      loading: false,
       option: {
         emptyBtn: false,
         submitBtn: false,
@@ -268,6 +269,7 @@ export default {
         variables,
         comment: this.form.comment,
       };
+      this.loading = true;
       completeTask(params).then(res => {
         const data = res.data;
         if (data.success) {
@@ -277,7 +279,9 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      })
+      }).finally(()=>{
+        this.loading = false;
+      });
     },
     handleDisagree() {
       if (!this.form.comment) {
@@ -292,6 +296,7 @@ export default {
         processInstanceId: this.processInstanceId,
         comment: this.form.comment,
       };
+      this.loading = true;
       completeTask(params).then(res => {
         const data = res.data;
         if (data.success) {
@@ -301,7 +306,9 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      })
+      }).finally(()=>{
+        this.loading = false;
+      });
     },
     handleChange(name) {
       this.activeNames = name;

+ 326 - 0
src/views/ldt_shop/handleWechatAuthApply.vue

@@ -0,0 +1,326 @@
+<template>
+  <basic-container>
+    <avue-form ref="form" v-model="form" :option="option" @submit="(data,done)=>{submit(data,done)}">
+    </avue-form>
+  </basic-container>
+</template>
+
+<script>
+import {getAuthAuditInfo, wechatApply} from "../../api/ldt_shop/shop";
+
+export default {
+  data() {
+    return {
+      businessId: null,
+      form: {},
+      option: {
+        emptyBtn: false,
+        labelPosition: "left",
+        column: [
+          {
+            label: "申请人姓名",
+            labelWidth: 100,
+            prop: "applicantName",
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入申请人姓名",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "申请人手机号",
+            labelWidth: 110,
+            prop: "applicantPhone",
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入申请人手机号",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "身份证号码",
+            labelWidth: 110,
+            prop: "applicantIdCard",
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入身份证号码",
+              trigger: "blur"
+            }]
+          },
+          /*{
+            label: "身份有效期",
+            labelTip: "非小微商户必填",
+            labelWidth: 120,
+            prop: "identificationValidDate",
+            type: "date",
+            rules: [{
+              required: true,
+              message: "请输入身份有效期",
+              trigger: "blur"
+            }]
+          },*/
+          /*{
+            label: "证书有效期",
+            labelWidth: 110,
+            labelTip: "非小微商户必填",
+            prop: "licenceValidDate",
+            type: "date",
+            rules: [{
+              required: false,
+              message: "请输入证书有效期",
+              trigger: "blur"
+            }]
+          },*/
+          {
+            label: "注册地址",
+            labelWidth: 110,
+            span: 12,
+            prop: "companyAddress",
+            labelTip: "小微商户:填门店地址.",
+            rules: [{
+              required: true,
+              message: "请输入注册地址",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "证件类型",
+            span: 12,
+            prop: "identificationType",
+            type: "select",
+            dicData: [
+              {label: "身份证(限中国大陆居民)", value: "IDENTIFICATION_TYPE_IDCARD"},
+              {label: "护照(限境外人士)", value: "IDENTIFICATION_TYPE_OVERSEA_PASSPORT"},
+              {label: "中国香港居民-来往内地通行证", value: "IDENTIFICATION_TYPE_HONGKONG_PASSPORT "},
+              {label: "中国澳门居民-来往内地通行证", value: "IDENTIFICATION_TYPE_MACAO_PASSPORT"},
+              {label: "中国台湾居民-来往大陆通行证", value: "IDENTIFICATION_TYPE_TAIWAN_PASSPORT"}
+            ],
+            rules: [{
+              required: true,
+              message: "请选择证件类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "法人证件正面照片",
+            labelWidth: 140,
+            prop: "identificationFrontCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: true,
+              message: "请上传法人证件正面照片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "法人证件反面照片",
+            labelWidth: 160,
+            labelTip: "法人证件反面照片\n" +
+              "1、若法人证件类型为身份证,请上传国徽面照片。\n" +
+              "2、若证件类型为护照或通行证,无需上传反面照片。",
+            prop: "identificationBackCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: true,
+              message: "请上传法人证件反面照片",
+              trigger: "blur"
+            }]
+          },
+          /*{
+            label: "证书照片",
+            labelTip: '主体类型为企业或个体:上传统一信用代码证照片;\n' +
+              '主体类型为事业单位或其他组织:上传登记证书照片',
+            prop: "certCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            canvasOption: {
+              text: 'avue',
+              ratio: 0.1
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: false,
+              message: "请上传证书照片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "单位证明函照片",
+            labelTip: "主体类型为事业单位时必填",
+            prop: "companyProveCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            canvasOption: {
+              text: 'avue',
+              ratio: 0.1
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: false,
+              message: "请上传单位证明函照片",
+              trigger: "blur"
+            }]
+          },*/
+          {
+            label: "报备类型",
+            prop: "reportFee",
+            type: "select",
+            dicData: [
+              {label: "微信公益", value: "GONGYI"},
+              {label: "微信公缴", value: "GONGJIAO"},
+              {label: "微信线下", value: "XIANXIA"},
+              {label: "微信保险", value: "BAOXIAN"},
+              {label: "微信线上", value: "XIANSHANG"},
+              {label: "微信老绿洲", value: "OLDLVZHOU"},
+              {label: "微信绿洲", value: "LVZHOU"},
+              {label: "微信校园", value: "XIAOYUAN"},
+            ],
+            rules: [{
+              required: true,
+              message: "请选择报备类型",
+              trigger: "blur"
+            }]
+          },
+          /*{
+            label: "渠道编号",
+            labelTip: "渠道编号和报备类型二选一必填",
+            prop: "channelId",
+          },*/
+          {
+            label: "小微经营类型",
+            labelWidth: 110,
+            prop: "microBizType",
+            type: "select",
+            dicData: [
+              {label: "门店场所", value: "MICRO_TYPE_STORE"},
+              {label: "流动经营/便民服务", value: "MICRO_TYPE_MOBILE"},
+              {label: "线上商品/服务交易", value: "MICRO_TYPE_ONLINE"}
+            ],
+            rules: [{
+              required: true,
+              message: "请选择小微经营类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "门店名称",
+            prop: "storeName",
+            rules: [{
+              required: true,
+              message: "请输入门店名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "门店省市编码",
+            labelWidth: 110,
+            prop: "storeAddressCode",
+            rules: [{
+              required: true,
+              message: "请输入门店省市编码",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "门店门头照片",
+            labelWidth: 110,
+            prop: "storeHeaderCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: true,
+              message: "请上传门店门头照片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "店内环境照片",
+            labelWidth: 110,
+            prop: "storeIndoorCopy",
+            type: 'upload',
+            dataType: "string",
+            listType: 'picture-img',
+            span: 12,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            rules: [{
+              required: true,
+              message: "请上传店内环境照片",
+              trigger: "blur"
+            }]
+          }
+        ]
+      },
+    }
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      this.businessId = this.$route.params.businessId;
+      getAuthAuditInfo(this.businessId).then(res => {
+        this.form = res.data.data;
+      })
+    },
+    submit(data, done) {
+      wechatApply(data).then(res => {
+        console.log(res);
+        this.$message.success("提交成功");
+        done();
+      }, error => done())
+    }
+  }
+};
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 3
src/views/ldt_shop/shop-info.vue

@@ -3,13 +3,14 @@
     <el-row>
       <basic-container>
         <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
-                   :destroy-on-close="true"
+                   :destroy-on-close="false"
                    :title="dialogTitle" width="80%">
           <shop-member v-if="dialogTitle==='店铺会员'" ref="refName" :operateId="businessId"></shop-member>
           <shop-bills v-if="dialogTitle==='账单流水'" ref="refName" :operateId="businessId"></shop-bills>
           <shop-joinrecord v-if="dialogTitle==='参加的活动'" ref="refName" :operateId="businessId"></shop-joinrecord>
           <shop-withdrawrec v-if="dialogTitle==='提现记录'" ref="refName" :operateId="businessId"></shop-withdrawrec>
           <shop-product-fee v-if="dialogTitle==='产品费率'" ref="refName" :operateId="businessId"></shop-product-fee>
+          <shop-auth-state v-if="dialogTitle==='易宝商户授权'" ref="refName" :operateId="businessId"></shop-auth-state>
         </el-dialog>
         <el-col style="padding: 10px 0 10px 0;">
           <el-button size="small" plain icon="el-icon-s-custom" @click.stop="openDialog('店铺会员')">店铺会员</el-button>
@@ -21,7 +22,7 @@
                      :disabled="$isEmpty(this.merchantNo)">产品费率
           </el-button>
           <el-button size="small" plain icon="el-icon-chat-dot-round"
-                     @click.stop="handleWechatConfig('公众号配置')" :disabled="$isEmpty(this.merchantNo)">公众号配置
+                     @click.stop="handleWechatConfig" :disabled="$isEmpty(this.merchantNo)">公众号配置
           </el-button>
           <el-button size="small" plain icon="el-icon-s-check"
                      @click.stop="openDialog('易宝商户授权')" :disabled="$isEmpty(this.merchantNo)">易宝商户授权
@@ -88,9 +89,11 @@ import shopWithdrawrec from "./comps/shop-withdrawrec.vue"
 import shopProductFee from "./comps/shop-product-fee.vue"
 import shopMember from "./comps/shop-member.vue";
 import ShopWechatConfig from "./comps/shop-wechat-config.vue";
+import ShopAuthState from "./comps/shop-auth-state";
 
 export default {
   components: {
+    ShopAuthState,
     ShopWechatConfig,
     shopMember, shopBills, shopJoinrecord, shopWithdrawrec, shopProductFee
   },
@@ -405,7 +408,7 @@ export default {
       this.canReset = true
     },
     handleWechatConfig() {
-      this.$router.push(`/work/process/shopInfo/handleWechatConfig/handle/${this.merchantNo}`);
+      this.$router.push(`/work/process/shopInfo/handleWechatConfig/handle/${this.businessId}`);
     },
     getAccountInfo() {
       getMerchantInfo(this.businessId).then(res => {
@@ -417,6 +420,7 @@ export default {
     getDetail() {
       getDetail(this.businessId).then(res => {
         this.shopFrom = res.data.data;
+        this.merchantNo = res.data.data.merchantNo;
       });
     },
     refreshChange() {

+ 1 - 1
src/views/ldt_shop/shop.vue

@@ -740,7 +740,7 @@ export default {
   },
   methods: {
     handleShopInfo(row) {
-      this.$router.push(`/work/process/shopInfo/handle/${row.id}/${row.merchantNo}`);
+      this.$router.push(`/work/process/shopInfo/handle/${row.id}`);
     },
     openDialog(id, name) {
       this.dialogTitle = name