july 4 anni fa
parent
commit
74e43c9be1

+ 10 - 0
src/api/ldt_shop/shop.js

@@ -85,3 +85,13 @@ export const getMerchantInfo = (shopId) => {
     }
   })
 }
+
+export const getWechatConfigQuery = (merchantNo) => {
+  return request({
+    url: '/api/ldt_shop/shop/getWechatConfigQuery',
+    method: 'get',
+    params: {
+      merchantNo
+    }
+  })
+}

+ 14 - 1
src/router/views/index.js

@@ -123,7 +123,20 @@ export default [{
         i18n: 'work'
       },
       component: () =>
-        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/comps/shop-info')
+        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/shop-info')
+    }]
+  },
+  {
+    path: '/work/process/shopInfo/handleWechatConfig',
+    component: Layout,
+    children: [{
+      path: 'handle/:no',
+      name: '公众号配置',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/comps/shop-wechat-config')
     }]
   },
   {

+ 119 - 0
src/views/ldt_shop/comps/shop-wechat-config.vue

@@ -0,0 +1,119 @@
+<template>
+  <div>
+    <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">
+
+          </avue-form>
+        </el-dialog>
+        <el-col style="padding: 10px 0 10px 0;">
+          <el-button type="primary" size="small" plain icon="el-icon-setting" @click="openDialog()">配置
+          </el-button>
+        </el-col>
+        <template>
+          <el-table :data="parentData" style="width: 100%">
+            <el-table-column type="expand">
+              <template slot-scope="props">
+                <el-col span="12">
+                  <el-table :data="props.row.appIdList" style="width: 100%" stripe size="small">
+                    <el-table-column label="appId列表" header-align="center">
+                      <el-table-column label="支付appId" prop="appId"></el-table-column>
+                      <el-table-column label="appId类型" prop="appIdType"></el-table-column>
+                      <el-table-column label="推荐关注appId" prop="subscribeAppId"></el-table-column>
+                      <el-table-column label="配置状态" prop="status"></el-table-column>
+                      <el-table-column label="失败原因" prop="failReason"></el-table-column>
+                    </el-table-column>
+                  </el-table>
+                </el-col>
+                <el-col span="12">
+                  <el-table :data="props.row.tradeAuthDirList" style="width: 100%" stripe size="small">
+                    <el-table-column label="支付授权目录列表" header-align="center">
+                      <el-table-column label="支付授权目录" prop="tradeAuthDir"></el-table-column>
+                      <el-table-column label="配置状态" prop="status"></el-table-column>
+                      <el-table-column label="失败原因" prop="failReason"></el-table-column>
+                    </el-table-column>
+                  </el-table>
+                </el-col>
+              </template>
+            </el-table-column>
+            <el-table-column label="报备商户号" prop="reportMerchantNo"></el-table-column>
+          </el-table>
+        </template>
+      </basic-container>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex";
+import {getWechatConfigQuery} from "@/api/ldt_shop/shop";
+
+export default {
+  props: {
+    merchantNo: String
+  },
+  data() {
+    return {
+      dialogShow: false,
+      parentData: [],
+      configForm: {},
+      configOption: {
+        mockBtn: true,
+        submitText: '完成',
+        printBtn: true,
+        column: [
+          {
+            label: "支付授权目录",
+            span: 24,
+            prop: "url",
+            prepend: 'https://',
+            mock: {
+              type: 'url',
+              header: false,
+            },
+            append: 'com',
+            row: true,
+          }]
+      },
+    }
+  },
+  mounted() {
+    this.init();
+  },
+  computed: {
+    ...mapGetters(["userInfo"]),
+  },
+  methods: {
+    init() {
+      this.merchantNo = this.$route.params.no;
+      getWechatConfigQuery(this.merchantNo).then(res => {
+        this.parentData = res.data.data;
+      });
+    },
+    openDialog() {
+      this.dialogShow = true
+      if (this.canReset) {
+        this.refreshChange()
+      }
+      this.canReset = true
+    },
+    refreshChange() {
+      this.init();
+    },
+  }
+}
+;
+</script>
+
+<style>
+.name {
+  font-family: inherit;
+  font-size: inherit;
+  border-color: #E4E7ED;
+  color: #606266;
+  margin-left: 15px;
+  text-align: center;
+}
+</style>

+ 18 - 7
src/views/ldt_shop/comps/shop-info.vue → src/views/ldt_shop/shop-info.vue

@@ -20,9 +20,12 @@
                      v-if="userInfo.role_name === 'administrator'"
                      :disabled="$isEmpty(this.merchantNo)">产品费率
           </el-button>
-          <el-button size="small" plain icon="el-icon-chat-dot-round" :disabled="$isEmpty(this.merchantNo)">公众号配置
+          <el-button size="small" plain icon="el-icon-chat-dot-round"
+                     @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)">易宝商户授权
           </el-button>
-          <el-button size="small" plain icon="el-icon-s-check" :disabled="$isEmpty(this.merchantNo)">易宝商户授权</el-button>
         </el-col>
         <el-col :span="12">
           <avue-form :option="merchant.accountInfo.option" v-model="merchant.accountInfo.mallData">
@@ -79,14 +82,16 @@
 <script>
 import {mapGetters} from "vuex";
 import {getDetail, getMerchantInfo} from "@/api/ldt_shop/shop";
-import shopBills from "./shop-bills.vue"
-import shopJoinrecord from "./shop-joinrecord.vue"
-import shopWithdrawrec from "./shop-withdrawrec.vue"
-import shopProductFee from "./shop-product-fee"
-import shopMember from "./shop-member";
+import shopBills from "./comps/shop-bills.vue"
+import shopJoinrecord from "./comps/shop-joinrecord.vue"
+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";
 
 export default {
   components: {
+    ShopWechatConfig,
     shopMember, shopBills, shopJoinrecord, shopWithdrawrec, shopProductFee
   },
   data() {
@@ -399,6 +404,9 @@ export default {
       }
       this.canReset = true
     },
+    handleWechatConfig() {
+      this.$router.push(`/work/process/shopInfo/handleWechatConfig/handle/${this.merchantNo}`);
+    },
     getAccountInfo() {
       getMerchantInfo(this.businessId).then(res => {
         this.merchant.accountInfo.yeePayData = res.data.data.yeePayInfo;
@@ -411,6 +419,9 @@ export default {
         this.shopFrom = res.data.data;
       });
     },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
     changeAccountType(res) {
       switch (res) {
         case 'SETTLE_ACCOUNT':

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

@@ -191,7 +191,7 @@ import shopBills from "./comps/shop-bills.vue"
 import shopJoinrecord from "./comps/shop-joinrecord.vue"
 import shopWithdrawrec from "./comps/shop-withdrawrec.vue"
 import shopProductFee from "./comps/shop-product-fee"
-import ShopInfo from "./comps/shop-info";
+import ShopInfo from "./shop-info";
 
 export default {
   components: {