Browse Source

服务商入驻+微信支付

missMyLove 4 years ago
parent
commit
21b5a5ea6e

+ 3 - 0
package.json

@@ -20,11 +20,13 @@
     "cropperjs": "^1.2.2",
     "dayjs": "^1.7.7",
     "echarts": "^4.8.0",
+    "element-china-area-data": "^5.0.2",
     "html2canvas": "^1.0.0-alpha.12",
     "iview": "^3.2.2",
     "iview-area": "^1.6.0",
     "jquery": "^3.4.1",
     "js-cookie": "^2.2.0",
+    "qrcodejs2": "0.0.2",
     "quill": "^1.3.7",
     "quill-image-drop-module": "^1.0.3",
     "simplemde": "^1.11.2",
@@ -36,6 +38,7 @@
     "vue-amap": "^0.5.10",
     "vue-i18n": "^7.8.0",
     "vue-pdf": "^4.0.7",
+    "vue-qr": "^2.3.0",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.0.1",
     "vue2-editor": "^2.10.2",

+ 50 - 40
src/components/eloamUpload.vue

@@ -98,7 +98,7 @@
 </style>
 <template>
   <div>
-    <Upload v-if="logoList.length === 0"
+    <Upload v-if="!baseUploadInfo.url"
             :action="action"
             :show-upload-list="true"
             :on-success="handleLogoSuccess"
@@ -115,27 +115,24 @@
         <Icon type="ios-camera" size="20"></Icon>
       </div>
     </Upload>
-    <div v-else class="demo-upload-list" v-for="(item,index) in logoList" :key="index">
-      <template v-if="item.status === 'finished'">
-        {{item.percentage}}
+    <!-- 只支持上传一张图片操作-->
+    <div v-else class="demo-upload-list">
+      <template>
         <template>
-          <img :src="item.url"/>
+          <img :src="baseUploadInfo.url"/>
         </template>
         <div class="demo-upload-list-cover">
           <template>
-            <Icon type="ios-eye-outline" @click.native="handlePreview(item.url)"></Icon>
+            <Icon type="ios-eye-outline" @click.native="handlePreview(baseUploadInfo.url)"></Icon>
           </template>
-          <Icon type="ios-trash-outline" @click.native="handleLogoRemove(item)"></Icon>
+          <Icon type="ios-trash-outline" v-if="removeBol" @click.native="handleLogoRemove()"></Icon>
         </div>
       </template>
-      <template v-else>
-        <Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
-      </template>
       <Modal v-model="visible" :footer-hide="true">
-        <img :src="imgUrl" v-if="visible" style="width: 100%"/>
+        <img :src="imgUrl" style="width: 100%"/>
       </Modal>
     </div>
-    <template>
+    <template v-if="showFormBol">
       <span class="tips">{{fadTipsMsg}}</span>
     </template>
     <div class="sndRow">
@@ -148,10 +145,13 @@
 
 <script>
 export default {
-  name: 'EloamUpload',
+  name: 'myEloamUpload',
   data () {
     return {
-      logoList: [],
+      baseUploadInfo: {
+        id: '',
+        url: ''
+      },
       uploadErrorInfo: '',
       fileName: '',
       fileName1: '',
@@ -179,6 +179,14 @@ export default {
         return ['jpg', 'jpeg', 'png']
       }
     },
+    removeBol: {
+      type: Boolean,
+      default: true
+    },
+    showFormBol: {
+      type: Boolean,
+      default: true
+    },
     maxSize: {
       type: Number,
       default: 4096
@@ -197,9 +205,12 @@ export default {
       default: false
     }
   },
+  created () {
+    // this.fadTipsMsg = `(支持${this.format.join('、')}等格式文件,文件大小限制为${this.maxSize / 1024}M,尺寸:${this.imageWidth}*${this.imageHeight})`
+    this.handleFadTipMsg()
+  },
   methods: {
     uploadDestroyed () { // 清理数据
-      this.logoList = []
       this.uploadErrorInfo = ''
       this.fileName = ''
       this.fileName1 = ''
@@ -207,22 +218,24 @@ export default {
       this.imgUrl = ''
       this.fadTipsMsg = ''
     },
-    /* checkUploadEmpty () {
-      if (this.logoList.length === 0) { this.uploadErrorInfo = '请上传文件' }
-    }, */
     uploadStart (url, id) {
+      // 如果有初始的图片,需要调用该接口
       if (!this.tipsMsg) {
         // 这里需要处理数据
         // (支持jpg、jpeg、png等格式文件,文件大小限制为4M,尺寸:800*1280)
-        this.fadTipsMsg = `(支持${this.format.join('、')}等格式文件,文件大小限制为${this.maxSize / 1024}M,尺寸:${this.imageWidth}*${this.imageHeight})`
+        // this.fadTipsMsg = `(支持${this.format.join('、')}等格式文件,文件大小限制为${this.maxSize / 1024}M,尺寸:${this.imageWidth}*${this.imageHeight})`
+        this.handleFadTipMsg()
       } else this.fadTipsMsg = this.tipsMsg
       if (url) {
-        this.$set(this.logoList, 0, {
-          id: id || null,
-          url: url,
-          showProgress: false,
-          status: 'finished'
-        })
+        this.baseUploadInfo.url = url
+        this.baseUploadInfo.id = id
+      }
+    },
+    handleFadTipMsg () {
+      if (this.limitSize) {
+        this.fadTipsMsg = `(支持${this.format.join('、')}等格式文件,文件大小限制为${this.maxSize / 1024}M,尺寸:${this.imageWidth}*${this.imageHeight})`
+      } else {
+        this.fadTipsMsg = `(支持${this.format.join('、')}等格式文件,文件大小限制为${this.maxSize / 1024}M)`
       }
     },
     // 预览图片
@@ -232,13 +245,13 @@ export default {
     },
     // 删除图片
     handleLogoRemove (file) {
-      const fileList = this.logoList
-      let oneList = fileList[0]
+      let orgData = this.baseUploadInfo
       let data = {
-        id: oneList.id,
-        url: oneList.url
+        id: orgData.id,
+        url: orgData.url
       }
-      fileList.splice(fileList.indexOf(file), 1)
+      orgData.url = ''
+      orgData.id = ''
       this.fileName = ''
       this.$emit('on-remove-item', data)
     },
@@ -247,16 +260,13 @@ export default {
       // 图片上传成功即将之前的错误信息清除
       this.uploadErrorInfo = ''
       if (res.code === 0) {
-        const data = res.data
-        file.url = data.baseUrl
-        this.$set(this.logoList, 0, {
-          id: data.id,
-          url: data.baseUrl,
-          showProgress: false,
-          status: 'finished'
-        })
+        let data = res.data
+        this.baseUploadInfo.url = data.url
+        this.baseUploadInfo.id = data.id
+        // 将baseUrl 转成 url 20201019
+        let assign = Object.assign({ url: data.url }, data)
         this.fileName = this.fileName1
-        this.$emit('on-success-upload', { id: data.id, url: data.baseUrl })
+        this.$emit('on-success-upload', assign)
       }
     },
     handleLogoMaxSize () {
@@ -266,7 +276,7 @@ export default {
       }, 5000)
     },
     handleLogoBeforeUpload (file) {
-      if (this.logoList.length > 0) {
+      if (this.baseUploadInfo.url) {
         this.uploadErrorInfo = '最多支持上传1份文件'
         setTimeout(() => {
           this.uploadErrorInfo = ''

+ 5 - 1
src/locale/lang/zh-CN.js

@@ -34,7 +34,11 @@ export default {
   operation_list_log: '操作日志',
   DATA_MANAGE: '资料管理',
   WX_FACE_ORDER: '微信支付',
-  FACE_ORDER: '订单列表',
+  FACE_ORDER: '订单管理',
+  WX_REGISTER_ADD: '商户入驻',
+  WX_REGISTER_DETAILS: '入驻编辑',
+  WX_REGISTER_EDIT: '入驻编辑',
+  WX_REGISTER_LIST: '商户管理',
   修改密码: '修改密码',
   动态数据: '动态数据',
   全屏: '全屏',

+ 39 - 2
src/router/routers.js

@@ -53,6 +53,7 @@ export default [
           icon: 'ios-home'
         },
         component: () => import('@/view/single-page/home')
+        // component: () => import('@/view/crops/merchant_register_list')
       }
     ]
   },
@@ -128,7 +129,7 @@ export default [
     name: 'WX_FACE_ORDER',
     component: Main,
     meta: {
-      icon: 'md-build', // <ion-icon name="logo-wechat"></ion-icon>
+      icon: 'md-paper', // <ion-icon name="logo-wechat"></ion-icon>
       title: '微信支付'
     },
     children: [
@@ -137,9 +138,45 @@ export default [
         name: 'FACE_ORDER',
         meta: {
           notCache: true,
-          title: '订单列表'
+          title: '订单管理'
         },
         component: () => import('@/view/crops/wechat-pay-order')
+      },
+      {
+        path: 'WX_REGISTER_LIST',
+        name: 'WX_REGISTER_LIST',
+        meta: {
+          notCache: true,
+          title: '商户管理'
+        },
+        component: () => import('@/view/crops/merchant_register_list')
+      },
+      {
+        path: 'WX_REGISTER_ADD',
+        name: 'WX_REGISTER_ADD',
+        meta: {
+          title: '新增入驻',
+          hideInMenu: true
+        },
+        component: () => import('@/view/crops/fad_merchant_register.vue')
+      },
+      {
+        path: 'WX_REGISTER_EDIT',
+        name: 'WX_REGISTER_EDIT',
+        meta: {
+          title: '编辑入驻',
+          hideInMenu: true
+        },
+        component: () => import('@/view/crops/fad_merchant_register.vue')
+      },
+      {
+        path: 'WX_REGISTER_DETAILS',
+        name: 'WX_REGISTER_DETAILS',
+        meta: {
+          title: '入驻详情',
+          hideInMenu: true
+        },
+        component: () => import('@/view/crops/fad_merchant_register.vue')
       }
     ]
   },

+ 908 - 0
src/view/crops/fad_merchant_register.vue

@@ -0,0 +1,908 @@
+<style>
+  .com-form-tip {
+    color: #344047;
+    padding-bottom: 8px;
+    margin-bottom: 15px;
+    border-bottom: 1px solid #eee;
+    position: relative;
+  }
+  .formRow {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    margin-bottom: 24px;
+  }
+
+  .formRow label {
+    min-width: 180px;
+    padding-right: 12px;
+    font-size: 12px;
+    color: #495060;
+    text-align: right;
+  }
+  .must label:before {
+    content: "*";
+    display: inline-block;
+    margin-right: 4px;
+    line-height: 1;
+    font-family: SimSun;
+    font-size: 12px;
+    color: #ed3f14;
+  }
+</style>
+<template>
+  <Card dis-hover>
+    <p slot="title">
+      {{mode==='add' ? '新增入驻': (mode === 'edit'? '编辑入驻':'入驻详情')}}
+    </p>
+    <Row>
+      <Col :md="24" :lg="{span:12,offset:6}">
+        <!-- 规则后面再设计-->
+        <Form ref="merchantDetail" :model="merchantDetail" :rules="merchantDetailsRuleValidate" :label-width="160">
+          <!--
+          SUBJECT_TYPE_INDIVIDUAL(个体户):营业执照上的主体类型一般为个体户、个体工商户、个体经营;
+          SUBJECT_TYPE_ENTERPRISE(企业):营业执照上的主体类型一般为有限公司、有限责任公司;
+          SUBJECT_TYPE_INSTITUTIONS(党政、机关及事业单位):包括国内各级、各类政府机构、事业单位等(如:公安、党团、司法、交通、旅游、工商税务、市政、医疗、教育、学校等机构);
+          SUBJECT_TYPE_OTHERS(其他组织):不属于企业、政府/事业单位的组织机构(如社会团体、民办非企业、基金会),要求机构已办理组织机构代码证。
+          前期仅支持:个人与企业
+          后期再考虑:事业单位与其他组织
+          -->
+
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">主体资料</p>
+          </div>
+            <FormItem label="商户主体类型" prop="subjectType">
+            <!--<Select @on-change="subjectChange" v-model="merchantDetail.subjectType" placeholder="请选择商户主体类型" v-if="mode === 'add'">
+              <Option value='SUBJECT_TYPE_ENTERPRISE' >企业</Option>
+              <Option value='SUBJECT_TYPE_INDIVIDUAL' >个人</Option>
+            </Select>-->
+            <RadioGroup @on-change="subjectChange" v-if="mode === 'add'" v-model="merchantDetail.subjectType">
+              <Radio label="SUBJECT_TYPE_ENTERPRISE">企业</Radio>
+              <Radio label="SUBJECT_TYPE_INDIVIDUAL">个体工商户</Radio>
+            </RadioGroup>
+            <Input
+              :value="merchantDetail.subjectType  === 'SUBJECT_TYPE_ENTERPRISE' ? '企业' : '个体工商户'"
+              v-else readonly></Input>
+          </FormItem>
+          <FormItem label="商户名称" prop="merchantName">
+            <Input :maxlength="32" v-model="merchantDetail.merchantName" placeholder="请输入营业执照上的主体名称"
+                   :readonly="mode !== 'add'"></Input>
+          </FormItem>
+          <!--
+            1、请输入2-30个字符,支持中文/字母/数字/特殊符号
+            2、在支付完成页向买家展示,需与微信经营类目相关;
+            3、简称要求
+              (1)不支持单纯以人名来命名,若为个体户经营,可用“个体户+经营者名称”或“经营者名 称+业务”命名,如“个体户张三”或“张三餐饮店”;
+              (2)不支持无实际意义的文案,如“XX特约商户”、“800”、“XX客服电话XXX”;
+          -->
+          <FormItem label="商户简称" prop="merchantAlias">
+            <div style="display: flex;">
+              <Input :maxlength="16" v-model="merchantDetail.merchantAlias" placeholder="请输入商户主体简称"
+                     :readonly="isReadOnly">
+              </Input>
+              <Tooltip transfer placement="top" offset="4" max-width="800px" theme="light">
+                <Icon :size="iconSize" color="#AAAAAA"  type="md-alert"></Icon>
+                <div slot="content">
+                  <p>1、在支付完成页向买家展示,需与微信经营类目相关。</p>
+                  <p>2、简称要求:</p>
+                  <p> ① 不支持单纯以人名来命名,若为个体户经营,可用“个体户+经营者名称”或“经营者名称+业务”命名,如“个体户张三”或“张三餐饮店”;</p>
+                  <p> ② 不支持无实际意义的文案,如“XX特约商户”、“800”、“XX客服电话XXX”;</p>
+                </div>
+              </Tooltip>
+            </div>
+          </FormItem>
+          <FormItem label="商户详细地址" prop="merchantAbbr">
+            <Input :maxlength="64" v-model="merchantDetail.merchantAbbr" :readonly="isReadOnly"></Input>
+          </FormItem>
+          <FormItem label="营业执照照片" prop="subjectLicenseUrl">
+            <div style="display: flex;">
+              <EloamUpload :removeBol="removeBol" :showFormBol="showFormBol" ref="eloamLicenseId" :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                           @on-success-upload="subjectLicenseSuccess" @on-remove-item="subjectLicenseCancel">
+              </EloamUpload>
+              <Tooltip transfer placement="top" offset="3" max-width="600px" theme="light">
+                <Icon :size="iconSize" color="#AAAAAA" type="md-alert"></Icon>
+                <div slot="content">
+                  <p>请上传彩色照片 or 彩色扫描件 or 加盖公章鲜章的复印件,可添加“微信支付”相关水印(如微信支付认证)</p>
+                </div>
+              </Tooltip>
+            </div>
+          </FormItem>
+          <FormItem label="注册号/统一社会信用代码" prop="licenseNumber">
+            <Input :maxlength="18" v-model="merchantDetail.licenseNumber" placeholder="请填写营业执照注册号" :readonly="isReadOnly"></Input>
+          </FormItem>
+          <!-- 个体户需要上传个人身份证信息-->
+          <FormItem label="客服电话" prop="servicePhone">
+            <div style="display: flex;">
+              <Input v-model="merchantDetail.servicePhone" :maxlength="16" placeholder="请输入客服电话" :readonly="isReadOnly"></Input>
+              <Tooltip transfer placement="top" offset="4" max-width="800px" theme="light">
+                <Icon :size="iconSize" color="#AAAAAA"  type="md-alert"></Icon>
+                <div slot="content">
+                  <p>1、请填写真实有效的客服电话,将在交易记录中向买家展示,提供咨询服务</p>
+                  <p>2、请确保电话畅通,以便入驻后平台回拨确认。</p>
+                </div>
+              </Tooltip>
+            </div>
+          </FormItem>
+          <!--个体户经营者-->
+          <!-- 个体户经营者/法人姓名 legal_person-->
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">{{isBusiness?'法人基本信息':'个体户经营者基本信息'}}</p>
+          </div>
+          <FormItem :label="isBusiness?'法人姓名':'个体户经营者'" prop="legalPerson">
+            <Input v-model="merchantDetail.legalPerson" :placeholder="isBusiness?'请输入法人姓名':'请输入个体户经营者'"
+                   :maxlength="20" :disabled="isReadOnly || mode === 'edit'"/>
+          </FormItem>
+          <!--  <FormItem :label="isBusiness ? '法人代表姓名' : '负责人姓名' " prop="contactName">
+              <Input v-model="merchantDetail.contactName" :placeholder="isBusiness ? '注:请填写企业法人代表姓名' : '请填写经营者本人姓名' " />
+            </FormItem>-->
+          <FormItem :label="isBusiness  ? '法人代表手机号' : '个体户经营者手机号'" prop="legalPersonPhone">
+            <Input v-model="merchantDetail.legalPersonPhone" :maxlength='11' :disabled="isReadOnly || mode === 'edit'"
+                   :placeholder="isBusiness ? '注:法人代表手机号一经填写将无法修改,请务必填写准确' : '注:个体户经营者手机号一经填写将无法修改,请务必填写准确'"/>
+          </FormItem>
+          <FormItem :label="isBusiness ? '法人代表身份证号' : '个体户经营者身份证号'" prop="lpIdCardNumber">
+            <Input v-model="merchantDetail.lpIdCardNumber" :placeholder="isBusiness ? '请输入法人代表身份证号' : '请输入个体户经营者身份证号'"
+                   :disabled="isReadOnly || mode === 'edit'"
+                   :maxlength='18'/>
+          </FormItem>
+          <FormItem label="身份证人像面照片" prop="idCardCopyUrl">
+            <EloamUpload :removeBol="removeBol" :showFormBol="showFormBol" ref="eloamIdCardCopyId" :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                         @on-success-upload="idCardCopySuccess" @on-remove-item="idCardCopyCancel"/>
+          </FormItem>
+          <FormItem label="身份证国徽面照片" prop="idCardNationalUrl">
+            <div style="display: flex;">
+              <EloamUpload :removeBol="removeBol" :showFormBol="showFormBol" ref="eloamIdCardNationalId" :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                           @on-success-upload="idCardNationalSuccess" @on-remove-item="idCardNationalCancel"/>
+              <Tooltip transfer placement="top" offset="3" max-width="600px" theme="light">
+                <Icon :size="iconSize" color="#AAAAAA" type="md-alert"></Icon>
+                <div slot="content">
+                  <p>请上传彩色照片 or 彩色扫描件 or 加盖公章鲜章的复印件,可添加“微信支付”相关水印(如微信支付认证)</p>
+                </div>
+              </Tooltip>
+            </div>
+          </FormItem>
+          <FormItem label="证件有效期类型" prop="cardPeriodType">
+            <RadioGroup v-model="merchantDetail.cardPeriodType">
+              <!--myMiss-->
+              <Radio :disabled="isReadOnly" label="定期"></Radio>
+              <Radio :disabled="isReadOnly" label="长期"></Radio>
+            </RadioGroup>
+          </FormItem>
+          <FormItem label="证件生效日期" prop="cardPeriodBegin">
+            <template>
+              <DatePicker :disabled="isReadOnly" v-model="merchantDetail.cardPeriodBegin" format="yyyy-MM-dd" type="date"
+                          placeholder="请选择证件生效日期" style="width: 100%"></DatePicker>
+            </template>
+          </FormItem>
+          <FormItem label="证件失效日期" prop="cardPeriodEnd" v-if="merchantDetail.cardPeriodType === '定期'">
+            <template>
+              <DatePicker :disabled="isReadOnly" v-model="merchantDetail.cardPeriodEnd" format="yyyy-MM-dd" type="date" style="width: 100%"
+                          placeholder="请选择证件失效日期"></DatePicker>
+            </template>
+          </FormItem>
+          <FormItem label="联系邮箱" prop="lpEmail">
+            <Input v-model="merchantDetail.lpEmail" :maxlength="64" type="email" placeholder="请输入联系邮箱" :readonly="isReadOnly"></Input>
+          </FormItem>
+          <!--公众号-->
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">公众号</p>
+          </div>
+          <FormItem label="是否有公众号" prop="pubAccType">
+            <RadioGroup v-model="merchantDetail.pubAccType">
+              <Radio :disabled="isReadOnly" label="1">自有公众号</Radio>
+              <Radio :disabled="isReadOnly" label="0">无公众号</Radio>
+            </RadioGroup>
+          </FormItem>
+          <FormItem label="商户公众号APPID" prop="pubAccAppId" v-if="merchantDetail.pubAccType == '1' ">
+            <Input v-model="merchantDetail.pubAccAppId" :readonly="isReadOnly" :maxlength="32"/>
+            <p>可选择服务商商户号已绑定的APPID,需为已认证的服务号、政府或媒体类型的订阅号。<a href="https://kf.qq.com/faq/181105JJNbmm181105eUZfee.html">AppID查看指引</a></p>
+          </FormItem>
+          <!-- <FormItem label="经营场景类型">
+             <CheckboxGroup v-model="merchantDetail.salesScenesType">
+               <Checkbox label="SALES_SCENES_STORE">线下门店</Checkbox>
+               <Checkbox label="SALES_SCENES_MP">公众号</Checkbox>
+               <Checkbox label="SALES_SCENES_MINI_PROGRAM">小程序</Checkbox>
+               <Checkbox label="SALES_SCENES_WEB">互联网</Checkbox>
+               <Checkbox label="SALES_SCENES_APP">APP</Checkbox>
+               <Checkbox label="SALES_SCENES_WEWORK">企业微信</Checkbox>
+             </CheckboxGroup>
+           </FormItem>-->
+          <!--<FormItem label="结算规则" prop="settlementId" v-if="mode !== 'add' ">
+            <Select v-model="merchantDetail.settlementId" placeholder="请选择合作状态">
+              <Option v-for="item in settlementList" :value="item.id" :key="item.id">{{item.value}}</Option>
+            </Select>
+          </FormItem>-->
+          <!--<FormItem label="所属行业名称" prop="qualificationType">
+            <Input v-model="merchantDetail.qualificationType" placeholder="所属行业名称" :disabled="mode === 'detail'"></Input>
+          </FormItem>-->
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">结算账户</p>
+          </div>
+           <FormItem label="银行卡号" prop="accountNumber">
+             <Input v-model="merchantDetail.accountNumber" :readonly="isReadOnly" :maxlength="32" placeholder="请输入银行卡号" />
+           </FormItem>
+           <FormItem label="账户类型" prop="bankAccountType">
+             <RadioGroup v-model="merchantDetail.bankAccountType">
+               <Radio :disabled="isReadOnly" label="BANK_ACCOUNT_TYPE_CORPORATE">对公银行账户</Radio>
+               <Radio label="BANK_ACCOUNT_TYPE_PERSONAL" :disabled="merchantDetail.subjectType === 'SUBJECT_TYPE_ENTERPRISE' || isReadOnly">经营者个人银行卡</Radio>
+             </RadioGroup>
+             <!--<Input v-model="merchantDetail.bankAccountType" placeholder="银行卡类型" :disabled="mode === 'detail'"></Input>-->
+           </FormItem>
+           <!--<FormItem label="开户名称" prop="accountName">
+             <Input v-model="merchantDetail.accountName" placeholder="开户名称" :disabled="mode === 'detail'"></Input>
+           </FormItem>-->
+          <!--这个查询银行的地区-->
+          <FormItem label="开户地区" prop="bankArea">
+            <!--<Cascader :disabled="isReadOnly" :data="areaOptions" placeholder="请选择开户地区" v-model="merchantDetail.bankArea" filterable></Cascader>-->
+            <al-cascader :disabled="isReadOnly" v-model="merchantDetail.bankArea" level='2' placeholder="请选择开户地区" style="width: 100%" />
+          </FormItem>
+           <FormItem label="开户银行" prop="accountBank">
+             <Select :disabled="isReadOnly" v-model="merchantDetail.accountBank" placeholder="请选择开户银行" clearable filterable>
+               <Option v-for="item in accountBankList" :key="item" :value="item">{{item}}</Option>
+             </Select>
+           </FormItem>
+          <FormItem label="开户银行联行号" prop="bankBranchId">
+            <Input v-model="merchantDetail.bankBranchId" :readonly="isReadOnly" placeholder="请输入开户银行联行号" :maxlength="12" style="width: 300px;margin-right: 20px" />
+            <a href="https://www.icvio.cn" target="blank">联行号查询</a>
+          </FormItem>
+          <!-- 超级管理员信息-->
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">超级管理员</p>
+          </div>
+          <FormItem label="超级管理员" prop="adminType">
+            <RadioGroup v-model="merchantDetail.adminType">
+              <Radio :disabled="isReadOnly" label="0">{{isBusiness?'法人代表':'个体户经营者'}}</Radio>
+              <Radio :disabled="isReadOnly" label="1" >其他超级管理员</Radio>
+            </RadioGroup>
+            <!--<Input v-model="merchantDetail.bankAccountType" placeholder="银行卡类型" :disabled="mode === 'detail'"></Input>-->
+          </FormItem>
+          <div v-if="merchantDetail.adminType == '1'">
+            <div style="display: flex;margin: 8px" class="com-form-tip">
+              <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">超级管理员信息</p>
+            </div>
+            <FormItem label="姓名" prop="contactName">
+              <Input v-model="merchantDetail.contactName" :maxlength="16" :readonly="isReadOnly" placeholder="请输入超级管理员姓名" ></Input>
+            </FormItem>
+            <FormItem label="证件号码" prop="contactIdNumber" >
+              <div style="display: flex;">
+                <Input :maxlength="18" v-model="merchantDetail.contactIdNumber" :readonly="isReadOnly" placeholder="请输入超级管理员证件号码"></Input>
+                <Tooltip transfer placement="top" offset="3" max-width="600px" theme="light">
+                  <Icon size="20" color="#AAAAAA" type="md-alert"></Icon>
+                  <div slot="content">
+                    <p>注:超级管理员签约时,校验微信号绑定的银行卡实名信息,是否与该证件号码一致</p>
+                  </div>
+                </Tooltip>
+              </div>
+            </FormItem>
+            <FormItem label="手机号" prop="contactPhone">
+              <div style="display: flex;">
+                <Input :maxlength="11" v-model="merchantDetail.contactPhone" :readonly="isReadOnly" placeholder="请输入超级管理员联系手机"></Input>
+                <Tooltip transfer placement="top" offset="3" max-width="600px" theme="light">
+                  <Icon :size="iconSize" color="#AAAAAA" type="md-alert"></Icon>
+                  <div slot="content">
+                    <p>用于接收微信支付的重要管理信息及日常操作验证码</p>
+                  </div>
+                </Tooltip>
+              </div>
+            </FormItem>
+            <FormItem label="邮箱" prop="contactEmail">
+              <div style="display: flex;">
+                <Input v-model="merchantDetail.contactEmail" :maxlength="64" :readonly="isReadOnly" type="email" placeholder="请输入超级管理联系邮箱" ></Input>
+                <Tooltip transfer placement="top" offset="3" max-width="600px" theme="light">
+                  <Icon :size="iconSize" color="#AAAAAA" type="md-alert"></Icon>
+                  <div slot="content">
+                    <p>用于接收微信支付的开户邮件及日常业务通知。</p>
+                  </div>
+                </Tooltip>
+              </div>
+            </FormItem>
+          </div>
+          <div style="display: flex;margin: 8px" class="com-form-tip">
+            <div style="width: 2px;height: 20px;background-color: #FC570E;"/><p style=" padding-left: 20px;">其他配置</p>
+          </div>
+          <FormItem label="支付成功回调地址" prop="notifyUrl">
+            <Input v-model="merchantDetail.notifyUrl" :readonly="isReadOnly" placeholder="平台对接需要输入该地址时,需输入该地址"></Input>
+            <!--<p>平台对接需要输入该地址</p>-->
+          </FormItem>
+          <FormItem style="display: flex;justify-content: flex-end;">
+            <div v-if="mode !== 'details'">
+              <Button type="default" @click="cancel('merchantDetail')" style="margin-right: 30px">取消</Button>
+              <Button type="primary" @click="handleSubmit('merchantDetail')">提交</Button>
+            </div>
+            <div v-else>
+              <Button type="primary" @click="confirm('merchantDetail')" icon="md-close">关闭</Button>
+            </div>
+          </FormItem>
+        </Form>
+      </Col>
+    </Row>
+    <!-- loading START -->
+    <Spin fix v-if="queryMerchantDetailsLoading && mode !== 'add' "></Spin>
+    <!-- loading END -->
+  </Card>
+</template>
+<script>
+import { mapActions, mapMutations } from 'vuex'
+import EloamUpload from '_c/eloamUpload.vue'
+// 根据code 获取中文名称 CodeToText[arr[0]],
+// import { regionData } from 'element-china-area-data'
+// import regionData from '@/assets/js/countryData.js'
+export default {
+  components: {
+    EloamUpload
+  },
+  data () {
+    // 校验身份证号
+    const idCardNoValidaotr = (rule, value, callback) => {
+      const firstReg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+      const sndReg = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/
+      if (!value) {
+        callback()
+      } else if (firstReg.test(value) || sndReg.test(value)) {
+        callback()
+      } else {
+        callback(new Error('请输入合法的身份证号'))
+      }
+    }
+    const cardPeriodBeginValidaotr = (rule, v, callback) => {
+      if (!v) {
+        callback(new Error('请填写证件生效日期'))
+      } else if (new Date().getTime() < v.getTime()) {
+        callback(new Error('生效日期需早于今天'))
+      } else {
+        callback()
+      }
+    }
+    const cardPeriodEndValidaotr = (rule, v, callback) => {
+      if (this.merchantDetail.cardPeriodType === '定期') {
+        if (!v) {
+          callback(new Error('请填写证件失效日期'))
+        } else if (new Date().getTime() > v.getTime()) {
+          callback(new Error('失效时间必须大于生效时间'))
+        } else {
+          callback()
+        }
+      } else {
+        callback()
+      }
+    }
+    // 请输入银联卡号
+    const accountNumberValidaotr = (rule, v, callback) => {
+      const regExp = /^([1-9]{1})(\d{15}|\d{18})$/
+      if (!v) {
+        callback(new Error('请输入银联卡号'))
+      } else if (!regExp.test(v)) {
+        callback(new Error('请输入 16~19位银行卡号'))
+      } else {
+        callback()
+      }
+    }
+    // 请输入银联卡号
+    const bankBranchIdValidaotr = (rule, v, callback) => {
+      if (!v) {
+        callback(new Error('请输入开户银行联行号'))
+      } else if (v.trim().length !== 12) {
+        callback(new Error('请输入12位的开户银行联行号'))
+      } else {
+        callback()
+      }
+    }
+    // 校验管理员手机号
+    const telValidator = (rule, value, callback) => {
+      const telReg = /\d{11}$/
+      if (!value) {
+        callback(new Error('请输入手机号'))
+      } else if (!telReg.test(value)) {
+        callback(new Error('请输入合法的手机号'))
+      } else {
+        // this.isTelExist(value, callback)
+        callback()
+      }
+    }
+    /**
+     * var regExp = /^([1-9]{1})(\d{15}|\d{18})$/;
+     * @param rule
+     * @param value
+     * @param callback
+     */
+    // 校验注册号
+    const licenseValidator = (rule, value, callback) => {
+      const lv2 = /^[A-Z0-9]{15}$|^[A-Z0-9]{18}$/
+      if (!value) {
+        callback(new Error('请输入注册号'))
+      } else if (!lv2.test(value)) {
+        callback(new Error('15位数字或18位数字|大写字母'))
+      } else {
+        callback()
+      }
+    }
+    const urlValidator = (rule, value, callback) => {
+      const match2 = /^((http|https):\/\/)?(([A-Za-z0-9]+-[A-Za-z0-9]+|[A-Za-z0-9]+)\.)+([A-Za-z]+)[/\?\:]?.*$/
+      if (!value) {
+        callback()
+      } else if (!match2.test(value)) {
+        callback(new Error('请输入正确的回调地址'))
+      } else {
+        callback()
+      }
+    }
+    const publicAppidValidator = (rule, v, callback) => {
+      if (this.merchantDetail.pubAccType === '01') {
+        if (!v) {
+          callback(new Error('商家公众号APPID 不能为空'))
+        } else {
+          callback()
+        }
+      } else {
+        callback()
+      }
+    }
+
+    return {
+      removeBol: true,
+      showFormBol: true,
+      // regionData: regionData,
+      isBusiness: true, // 是否是企业,如果是企业,说明
+      iconSize: 20,
+      accountBankList: [
+        '工商银行',
+        '交通银行',
+        '招商银行',
+        '民生银行',
+        '中信银行',
+        '浦发银行',
+        '兴业银行',
+        '光大银行',
+        '广发银行',
+        '平安银行',
+        '北京银行',
+        '华夏银行',
+        '农业银行',
+        '建设银行',
+        '邮政储蓄银行',
+        '中国银行',
+        '宁波银行',
+        '其他银行'
+      ],
+      merchantDetail: {
+        subjectType: 'SUBJECT_TYPE_ENTERPRISE', // 商户主体类型
+        id: '',
+        merchantName: '', // 商户名称
+        merchantAbbr: '', // 商户简称
+        merchantAlias: '', // 商户简称
+        bankArea: [], // 地区
+        licenseNumber: '', // 注册号
+        legalPerson: '', // 个体户经营者/法人姓名
+        legalPersonPhone: '', // 法人手机号码
+        lpIdCardNumber: '', // 法人身份证号码
+        lpEmail: '', // 法人邮箱地址
+        subjectLicenseMediaId: '', // 营业执照
+        subjectLicenseUrl: '', // 营业执照url
+        idCardCopyMediaId: '', // 身份证人像面照片
+        idCardCopyUrl: '', // 身份证人像面照片
+        idCardNationalMediaId: '', // 身份证国徽面照片
+        idCardNationalUrl: '', // 身份证国徽面照片
+        cardPeriodBegin: '', // 身份证有效期开始时间 示例值:2026-06-06
+        cardPeriodEnd: '', // 身份证有效期结束时间 示例值:2026-06-06
+        cardPeriodType: '定期',
+        servicePhone: '', // 客服电话
+        accountNumber: '', // 银行卡号
+        bankAccountType: 'BANK_ACCOUNT_TYPE_CORPORATE', // 账户类型
+        accountBank: '', // 开户银行
+        bankBranchId: '', // 开户银行联行号
+        notifyUrl: '', // 支付回调地址
+        contactName: '', // 管理员
+        contactIdNumber: '', // 超级管理员身份证
+        contactPhone: '', // 超级管理员手机号
+        contactEmail: '', // 超级管理员邮箱
+        pubAccType: '0', // 推荐用户关注的公众号类型
+        pubAccAppId: '', // 推荐用户关注的公众号APPID
+        adminType: '0', // 管理员id
+        status: ''
+      },
+      merchantUserList: [],
+      merchantStatus: [
+        {
+          label: '合作中',
+          value: 1
+        },
+        {
+          label: '合作已结束',
+          value: 0
+        }
+      ],
+      cityList: [], // 城市列表
+      countyList: [], // 区县列表
+      // agreementTypeOptions: agreementTypeOptions,
+      serverOptions: [],
+      merchantDetailsRuleValidate: {
+        merchantName: [
+          { required: true, message: '请输入商户名称', trigger: 'blur' }
+        ],
+        // 请填写营业执照注册号
+        merchantArea: [
+          { required: true, type: 'array', message: '请选择商户区域', trigger: 'change' }
+        ],
+        merchantAlias: [
+          { required: true, message: '请输入商户主体简称', trigger: 'blur' }
+        ],
+        subjectType: [
+          { required: false }
+        ],
+        merchantAbbr: [
+          { required: true, message: '商户详细地址不能为空', trigger: 'blur' }
+        ],
+        subjectLicenseUrl: [
+          { required: true, message: '营业执照不能为空', trigger: 'change' }
+        ],
+        bankArea: [
+          { required: true, message: '请选择开户银行地区' }
+        ],
+        licenseNumber: [
+          /* \\d{15}(\\d{3})? */
+          { required: true, validator: licenseValidator, trigger: 'blur' }
+        ],
+        legalPerson: [
+          { required: true, message: '请输入个体户经营者/法人姓名', trigger: 'blur' }
+        ],
+        legalPersonPhone: [
+          { required: true, validator: telValidator, trigger: 'blur' }
+        ],
+        lpIdCardNumber: [
+          { required: true, validator: idCardNoValidaotr, trigger: 'blur' }
+        ],
+        lpEmail: [
+          { required: true, type: 'email', message: '请输入合法的联系邮箱', trigger: 'blur' }
+        ],
+        servicePhone: [
+          { required: true, message: '请输入服务电话', trigger: 'blur' }
+        ],
+        pubAccType: [
+          { required: true, trigger: 'change' }
+        ],
+        pubAccAppId: [
+          { required: true, validator: publicAppidValidator, trigger: 'blur' }
+        ],
+        /* 下面是超管数据 */
+        contactName: [
+          { required: true, message: '请输入超级管理员姓名', trigger: 'blur' }
+        ],
+        contactIdNumber: [
+          { required: true, validator: idCardNoValidaotr, trigger: 'blur' }
+        ],
+        contactPhone: [
+          { required: true, validator: telValidator, trigger: 'blur' }
+        ],
+        contactEmail: [
+          { required: true, type: 'email', message: '请输入合法的联系邮箱', trigger: 'blur' }
+        ],
+        idCardNumber: [
+          { required: true, validator: idCardNoValidaotr, trigger: 'blur' }
+        ],
+        idCardCopyUrl: [
+          { required: true, message: '身份证人像面照片不能为空', trigger: 'change' }
+        ],
+        idCardNationalUrl: [
+          { required: true, message: '身份证国徽面照片不能为空', trigger: 'change' }
+        ],
+        accountNumber: [
+          { required: true, validator: accountNumberValidaotr, trigger: 'blur' }
+        ],
+        bankAccountType: [
+          { required: true, trigger: 'change' }
+        ],
+        accountBank: [
+          { required: true, trigger: 'change' }
+        ],
+        bankBranchId: [
+          { required: true, validator: bankBranchIdValidaotr, trigger: 'blur' }
+        ],
+        cardPeriodBegin: [
+          { required: true, validator: cardPeriodBeginValidaotr, trigger: 'change' }
+        ],
+        cardPeriodEnd: [
+          { required: true, validator: cardPeriodEndValidaotr, trigger: 'change' }
+        ],
+        cardPeriodType: [
+          { required: true, trigger: 'blur' }
+        ],
+        adminType: [
+          { required: true, trigger: 'change' }
+        ],
+        notifyUrl: [
+          { required: false, validator: urlValidator }
+        ]
+      },
+      individualSettlementList: [
+        { id: '719', value: '费率0.6%,入账周期T+1;适用于餐饮、零售批发、交通出行、生活娱乐服务、培训教育机构、民营医疗机构、代理缴纳话费等业务' },
+        { id: '720', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于话费代理充值业务' },
+        { id: '746', value: '费率1%,入账周期T+7,单笔限额3K;适用于游戏、网络广告及推广、软件开发' },
+        { id: '721', value: '费率0.3%,入账周期T+1;适用于加油业务' }
+      ],
+      businessSettlementList: [
+        { id: '716', value: '费率0.6%,入账周期T+1;适用于餐饮、零售批发、网上综合商城、交通出行、生活娱乐服务、培训教育机构、民营医疗机构、缴费等业务' },
+        { id: '715', value: '费率0.6%,入账周期T+1;适用于保险公司、保险代理公司' },
+        { id: '714', value: '费率0.6%,入账周期T+3;适用于众筹业务' },
+        { id: '713', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于财经资讯/荐股业务' },
+        { id: '728', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于婚介平台、就业信息平台、话费代理充值等业务' },
+        { id: '711', value: '费率1%,入账周期T+7,单笔限额3K;适用于在线图书/视频/音乐、游戏、网络直播、门户论坛、网络广告及推广、软件开发业务' },
+        { id: '717', value: '费率0.3%,入账周期T+1;适用于加油、物流快递、民办中小学、幼儿园业务' },
+        { id: '730', value: '费率0.2%,入账周期T+1;适用于水电煤暖气民生缴费' },
+        { id: '718', value: '费率0.2%,入账周期T+1;禁信用卡;适用于信用还款业务(不涉及理财)' },
+        { id: '739', value: '费率0%,入账周期T+1;适用于民办大学及院校' }
+      ],
+      settlementList: this.businessSettlementList,
+      queryMerchantDetailsLoading: false,
+      updateMerchantModel: false,
+      wxUploadAction: `${window.host}/merchant/upload`,
+      isReadOnly: false,
+      editLegalPerson: true
+    }
+  },
+  created () {
+    this.isReadOnly = false
+    if (this.mode !== 'add') {
+      // 不是新增需要获取商户详情
+      this.queryMerchantDetail()
+      // DETAILS  details
+      if (this.mode === 'details') {
+        this.isReadOnly = true
+        this.removeBol = false
+        this.showFormBol = false
+        this.editLegalPerson = false
+      } else this.editLegalPerson = true
+    } else {
+      this.removeBol = true
+      this.showFormBol = true
+    }
+  },
+  methods: {
+    ...mapActions([
+      'requestMethod'
+    ]),
+    ...mapMutations([
+      'closeTag'
+    ]),
+    subjectLicenseSuccess ({ id, url, mediaId }) {
+      this.merchantDetail.subjectLicenseMediaId = mediaId
+      this.merchantDetail.subjectLicenseUrl = url
+    },
+    subjectLicenseCancel () {
+      this.merchantDetail.subjectLicenseMediaId = ''
+      this.merchantDetail.subjectLicenseUrl = ''
+    },
+    idCardCopySuccess ({ id, url, mediaId }) {
+      this.merchantDetail.idCardCopyMediaId = mediaId
+      this.merchantDetail.idCardCopyUrl = url
+    },
+    idCardCopyCancel () {
+      this.merchantDetail.idCardCopyMediaId = ''
+      this.merchantDetail.idCardCopyUrl = ''
+    },
+    idCardNationalSuccess ({ id, url, mediaId }) {
+      this.merchantDetail.idCardNationalMediaId = mediaId
+      this.merchantDetail.idCardNationalUrl = url
+    },
+    idCardNationalCancel () {
+      this.merchantDetail.idCardNationalMediaId = ''
+      this.merchantDetail.idCardNationalUrl = ''
+    },
+    // 返回两个值,已经格式化后的日期,比如 2016-01-01,和当前的日期类型,比如 date
+    subjectChange (value) {
+      if (value) {
+        if (value === 'SUBJECT_TYPE_ENTERPRISE') {
+          // 企业
+          this.isBusiness = true
+          // this.settlementList = this.businessSettlementList
+          this.merchantDetail.bankAccountType = 'BANK_ACCOUNT_TYPE_CORPORATE'
+        } else {
+          this.isBusiness = false
+          // this.settlementList = this.individualSettlementList
+        }
+      } else {
+        // this.settlementList = []
+        this.isBusiness = true
+      }
+    },
+    // 管理员下拉框清空事件
+    clearSeller () {
+      this.merchantDetail.adminPhoneNo = ''
+    },
+    // 表单提交
+    handleSubmit (name) {
+      this.$refs.merchantDetail.validate((valid) => {
+        if (valid) {
+          this.addOrUpdate(name)
+        }
+      })
+    },
+    // 新增、更新具体操作
+    addOrUpdate (name) {
+      if (this.updateMerchantModel) {
+        return
+      }
+      this.updateMerchantModel = true
+      const formValidate = this.merchantDetail
+      let actionText = '更新成功'
+      let URI = 'pcWechat/wxRegisterFromPc'
+      if (this.mode === 'add') {
+        actionText = '新增成功'
+      }
+      // 入参
+      const data = {
+        id: formValidate.id, // 商户id
+        subjectType: formValidate.subjectType, // 商户类型
+        bankArea: formValidate.bankArea ? formValidate.bankArea.map(item => item.code).join('-') : '', // 所在区域
+        merchantName: formValidate.merchantName, // 商户名称
+        merchantAbbr: formValidate.merchantAbbr, // 商户主体简称
+        merchantAlias: formValidate.merchantAlias, // 微信号
+        licenseNumber: formValidate.licenseNumber, // 邮箱
+        legalPerson: formValidate.legalPerson, // 协议名称
+        legalPersonPhone: formValidate.legalPersonPhone, // 协议编号
+        lpIdCardNumber: formValidate.lpIdCardNumber, // 合作状态
+        lpEmail: formValidate.lpEmail, // 管理员姓名
+        subjectLicenseMediaId: formValidate.subjectLicenseMediaId, // 管理员手机号
+        subjectLicenseUrl: formValidate.subjectLicenseUrl, // 管理员身份证
+        idCardCopyMediaId: formValidate.idCardCopyMediaId,
+        idCardCopyUrl: formValidate.idCardCopyUrl,
+        idCardNationalMediaId: formValidate.idCardNationalMediaId,
+        idCardNationalUrl: formValidate.idCardNationalUrl,
+        cardPeriodBegin: formValidate.cardPeriodBegin ? formValidate.cardPeriodBegin.getTime() : '',
+        cardPeriodEnd: formValidate.cardPeriodEnd ? formValidate.cardPeriodEnd.getTime() : '',
+        cardPeriodType: formValidate.cardPeriodType,
+        servicePhone: formValidate.servicePhone,
+        accountNumber: formValidate.accountNumber,
+        bankAccountType: formValidate.bankAccountType,
+        accountBank: formValidate.accountBank,
+        bankBranchId: formValidate.bankBranchId,
+        notifyUrl: formValidate.notifyUrl,
+        contactName: formValidate.contactName,
+        contactIdNumber: formValidate.contactIdNumber,
+        contactPhone: formValidate.contactPhone,
+        contactEmail: formValidate.contactEmail,
+        pubAccType: parseInt(formValidate.pubAccType),
+        pubAccAppId: formValidate.pubAccAppId,
+        adminType: parseInt(formValidate.adminType)
+      }
+      // 请求成功后的回调
+      const successCallback = res => {
+        if (res.code === 0) {
+          this.$Message.success({
+            content: actionText,
+            duration: 1
+          })
+          // 返回
+          this.toMerchantList()
+          this.$refs[name].resetFields()
+        } else {
+          this.$Message.error(res.msg)
+        }
+        this.updateMerchantModel = false
+      }
+      this.requestMethod({ method: 'post', URI, data }).then(successCallback).catch(res => {
+        this.updateMerchantModel = false
+      })
+    },
+    // 查看商户详情
+    queryMerchantDetail () {
+      if (this.queryMerchantDetailsLoading) return false
+      this.queryMerchantDetailsLoading = true
+      if (!this.merchantId) return
+      let URI = `/pcWechat/findRegisterBaseInfo/${this.merchantId}`
+      const successCallback = res => {
+        if (res.code === 0) {
+          const receivedData = res.data
+          const formValidate = this.merchantDetail
+          formValidate.id = this.merchantId
+          formValidate.merchantAlias = receivedData.merchantAlias// 商户简称
+          formValidate.merchantAbbr = receivedData.merchantAbbr
+          formValidate.merchantName = receivedData.merchantName// 商户主体名称
+          formValidate.merchantType = receivedData.merchantType// 商户类型
+          formValidate.bankArea = receivedData.bankArea ? receivedData.bankArea.split('-') : ['', '', '']// 所在区域
+          formValidate.registerStatus = receivedData.registerStatus// 商户状态
+          formValidate.licenseNumber = receivedData.licenseNumber
+          formValidate.legalPerson = receivedData.legalPerson
+          formValidate.legalPersonPhone = receivedData.legalPersonPhone
+          formValidate.lpIdCardNumber = receivedData.lpIdCardNumber
+          formValidate.lpEmail = receivedData.lpEmail
+          formValidate.subjectLicenseMediaId = receivedData.subjectLicenseMediaId
+          formValidate.subjectLicenseUrl = receivedData.subjectLicenseUrl
+          // todo 这里还要初始化图片
+          this.$refs.eloamLicenseId.uploadStart(receivedData.subjectLicenseUrl)
+          formValidate.idCardCopyMediaId = receivedData.idCardCopyMediaId
+          formValidate.idCardCopyUrl = receivedData.idCardCopyUrl
+          this.$refs.eloamIdCardCopyId.uploadStart(receivedData.idCardCopyUrl)
+
+          formValidate.idCardNationalMediaId = receivedData.idCardNationalMediaId
+          formValidate.idCardNationalUrl = receivedData.idCardNationalUrl
+          this.$refs.eloamIdCardNationalId.uploadStart(receivedData.idCardNationalUrl)
+
+          formValidate.cardPeriodBegin = new Date(receivedData.cardPeriodBegin)
+          formValidate.cardPeriodType = receivedData.cardPeriodType
+          if (receivedData.cardPeriodType === '定期') {
+            formValidate.cardPeriodEnd = new Date(receivedData.cardPeriodEnd)
+          }
+          formValidate.servicePhone = receivedData.servicePhone
+          formValidate.accountNumber = receivedData.accountNumber
+          formValidate.bankAccountType = receivedData.bankAccountType
+          formValidate.accountBank = receivedData.accountBank
+          formValidate.bankBranchId = receivedData.bankBranchId
+          formValidate.notifyUrl = receivedData.notifyUrl
+          formValidate.contactName = receivedData.contactName
+          formValidate.contactIdNumber = receivedData.contactIdNumber
+          formValidate.contactPhone = receivedData.contactPhone
+          formValidate.contactEmail = receivedData.contactEmail
+          formValidate.pubAccType = receivedData.pubAccType ? '1' : '0'
+          formValidate.adminType = receivedData.adminType ? '1' : '0'
+        } else {
+          this.$Message.error(res.msg)
+        }
+        this.queryMerchantDetailsLoading = false
+      }
+      this.requestMethod({ method: 'get', URI }).then(successCallback).catch(() => {
+        this.queryMerchantDetailsLoading = false
+      })
+    },
+    confirm (name) { // 取消方法
+      this.$refs[name].resetFields()
+      if (this.mode !== 'detail') {
+        this.$Message.info('已取消')
+      }
+      this.toMerchantList()// 跳转页面
+    },
+    // 取消之后跳转的页面
+    toMerchantList () {
+      let name = 'WX_REGISTER_' + this.mode.toLocaleUpperCase()
+      let merchantId = this.merchantId
+      if (merchantId) {
+        this.closeTag({
+          'name': name,
+          query: {
+            id: merchantId
+          }
+        })
+      } else {
+        this.closeTag({
+          'name': name
+        })
+      }
+    },
+    // 取消表单填写
+    cancel (name) {
+      this.$Message.info('已取消')
+      this.$refs[name].resetFields()
+      this.toMerchantList()
+    },
+    // 校验手机号是否存在
+    isTelExist (tel, callback) {
+      const URI = '/user/pass/checkPhoneExist'
+      const params = {
+        phone: tel
+      }
+      const successCallback = res => {
+        if (res.code === 0) {
+          callback()
+        } else {
+          callback(new Error(res.msg))
+        }
+      }
+      this.requestMethod({ method: 'get', URI, params }).then(successCallback)
+    }
+  },
+  computed: {
+    // 当前模式(add:新增,edit:编辑,detail:详情)
+    mode: function () {
+      const pathArr = this.$route.path.split('_')
+      let name = pathArr[pathArr.length - 1]
+      /* if (name.indexOf('add') >= 0) return 'add'
+          else if (name.indexOf('edit') >= 0) return 'edit'
+          return 'detail' */
+      // return name
+      return name.toLocaleLowerCase()
+    },
+    // 当前用户ID
+    merchantId: function () {
+      return this.$route.query.id || ''
+    }
+  }
+}
+</script>

+ 568 - 0
src/view/crops/merchant_register.vue

@@ -0,0 +1,568 @@
+<style>
+  .com-form-tip {
+    color: #344047;
+    padding-left: 20px;
+    padding-bottom: 8px;
+    margin-bottom: 15px;
+    border-bottom: 1px solid #eee;
+    position: relative;
+  }
+</style>
+<template>
+  <Card dis-hover>
+    <p slot="title">
+      {{mode==='add' ? '商户入驻': '入驻编辑'}}
+    </p>
+    <Row>
+      <Col :md="24" :lg="{span:12,offset:6}">
+        <Form ref="merchantDetail" :model="merchantDetail" :rules="merchantDetailsRuleValidate" :label-width="120">
+          <p class="com-form-tip"> 商户主体类型</p>
+          <FormItem label="商户主体类型" prop="subjectType">
+            <Select @on-change="subjectChange" v-model="merchantDetail.subjectType" placeholder="请选择商户主体类型" v-if="mode === 'add'">
+              <!-- 商户主体类型暂定为企业 -->
+              <Option :value='SUBJECT_TYPE_ENTERPRISE' :key='1'>企业</Option>
+              <Option :value='SUBJECT_TYPE_INDIVIDUAL' :key='2'>个人</Option>
+            </Select>
+            <Input
+              :value="merchantDetail.subjectType  === 'SUBJECT_TYPE_ENTERPRISE' ? '企业' : '个人'"
+              v-else readonly></Input>
+          </FormItem>
+          <!--    <FormItem label="所在区域" prop="region">
+                <al-cascader  v-model="merchantDetail.region" level='2' style="width: 100%" :disabled="mode === 'detail'"/>
+              </FormItem>-->
+          <FormItem label="商户主体名称" prop="merchantName">
+            <Input :maxlength="32" v-model="merchantDetail.merchantName" placeholder="请输入营业执照上的主体名称"
+                   :readonly="mode !== 'add'"></Input>
+          </FormItem>
+          <FormItem label="商户主体简称" prop="merchantAbbr">
+            <Input :maxlength="32" v-model="merchantDetail.merchantAbbr" placeholder="请输入商户主体简称"
+                   :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="注册号/统一社会信用代码" prop="licenseNumber">
+            <Input :maxlength="32" v-model="merchantDetail.licenseNumber" placeholder="请输入注册号/统一社会信用代码"
+                   :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="个体户经营者/法人姓名" prop="legalPerson">
+            <Input :maxlength="32" v-model="merchantDetail.legalPerson" placeholder="请输入个体户经营者/法人姓名"
+                   :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="营业执照" prop="subjectLicenseUrl">
+            <EloamUpload :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                         @on-success-upload="subjectLicenseSuccess" @on-remove-item="subjectLicenseCancel"/>
+          </FormItem>
+          <FormItem label="身份证人像面照片" prop="idCardCopyUrl">
+            <EloamUpload :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                         @on-success-upload="idCardCopySuccess" @on-remove-item="idCardCopyCancel"/>
+          </FormItem>
+          <FormItem label="身份证国徽面照片" prop="idCardNationalUrl">
+            <EloamUpload :action="wxUploadAction" :format="['jpg','png','bmp']" :maxSize="2048"
+                         @on-success-upload="idCardNationalSuccess" @on-remove-item="idCardNationalCancel"/>
+          </FormItem>
+
+          <FormItem label="身份证姓名" prop="idCardName">
+            <Input v-model="merchantDetail.idCardName" placeholder="请输入身份证姓名" :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="身份证有效期开始时间" prop="cardPeriodBegin">
+            <Input v-model="merchantDetail.cardPeriodBegin" placeholder="示例值:2026-06-06"
+                   :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="身份证有效期结束时间" prop="cardPeriodEnd">
+            <Input v-model="merchantDetail.cardPeriodBegin" placeholder="示例值:2026-06-06"
+                   :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="客服电话" prop="servicePhone">
+            <Input v-model="merchantDetail.servicePhone" :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="经营场景类型">
+            <CheckboxGroup v-model="merchantDetail.salesScenesType">
+              <Checkbox label="SALES_SCENES_STORE">线下门店</Checkbox>
+              <Checkbox label="SALES_SCENES_MP">公众号</Checkbox>
+              <Checkbox label="SALES_SCENES_MINI_PROGRAM">小程序</Checkbox>
+              <Checkbox label="SALES_SCENES_WEB">互联网</Checkbox>
+              <Checkbox label="SALES_SCENES_APP">APP</Checkbox>
+              <Checkbox label="SALES_SCENES_WEWORK">企业微信</Checkbox>
+            </CheckboxGroup>
+          </FormItem>
+          <FormItem label="结算规则" prop="settlementId" v-if="mode !== 'add' ">
+            <Select v-model="merchantDetail.settlementId" placeholder="请选择合作状态">
+              <Option v-for="item in settlementList" :value="item.id" :key="item.id">{{item.value}}</Option>
+            </Select>
+          </FormItem>
+          <FormItem label="所属行业名称" prop="qualificationType">
+            <Input v-model="merchantDetail.qualificationType" placeholder="所属行业名称" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="银行卡类型" prop="bankAccountType">
+            <Input v-model="merchantDetail.bankAccountType" placeholder="银行卡类型" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="开户名称" prop="accountName">
+            <Input v-model="merchantDetail.accountName" placeholder="开户名称" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="开户银行" prop="accountBank">
+            <Input v-model="merchantDetail.accountBank" placeholder="开户银行" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="省市区编号" prop="bankAddressCode">
+            <Input v-model="merchantDetail.bankAddressCode" placeholder="省市区编号" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="开户银行联行号" prop="bankBranchId">
+            <Input v-model="merchantDetail.bankBranchId" placeholder="开户银行联行号" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="开户银行全称(含支行)" prop="bankName">
+            <Input v-model="merchantDetail.bankName" placeholder="开户银行全称(含支行)" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="银行卡号" prop="accountNumber">
+            <Input v-model="merchantDetail.accountNumber" placeholder="银行卡号" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="支付回调地址" prop="notifyUrl">
+            <Input v-model="merchantDetail.notifyUrl" placeholder="支付回调地址" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="微信账号" prop="weChatAccount">
+            <Input v-model="merchantDetail.weChatAccount" placeholder="请输入微信账号" :disabled="mode === 'detail'"></Input>
+          </FormItem>
+          <p class="com-form-tip">管理员信息</p>
+          <FormItem label="超级管理员姓名" prop="contactName" v-if="mode !== 'edit' ">
+            <Input :maxlength="10" v-model="merchantDetail.contactName" :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="超级管理员身份证" prop="contactIdNumber" v-if="mode !== 'edit' ">
+            <Input :maxlength="18" v-model="merchantDetail.contactIdNumber" :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="超级管理员手机号" prop="contactPhone" v-if="mode !== 'edit' ">
+            <Input :maxlength="11" v-model="merchantDetail.contactPhone" :readonly="mode === 'detail'"></Input>
+          </FormItem>
+          <FormItem label="超级管理员邮箱" prop="contactEmail">
+            <Input v-model="merchantDetail.contactEmail" type="email"  :disabled="mode !== 'add'"
+                   :maxlength="11"></Input>
+          </FormItem>
+          <FormItem style="display: flex;justify-content: flex-end;">
+            <div v-if="mode !== 'detail'">
+              <Button type="default" @click="cancel('merchantDetail')" style="margin-right: 30px">取消</Button>
+              <Button type="primary" @click="handleSubmit('merchantDetail')">提交</Button>
+            </div>
+            <div v-else>
+              <Button type="primary" @click="confirm('merchantDetail')" icon="md-close">关闭</Button>
+            </div>
+          </FormItem>
+        </Form>
+      </Col>
+    </Row>
+    <!-- loading START -->
+    <Spin fix v-if="queryMerchantDetailsLoading && mode !== 'add' "></Spin>
+    <!-- loading END -->
+  </Card>
+</template>
+<script>
+import { mapActions, mapMutations } from 'vuex'
+import EloamUpload from '_c/eloamUpload.vue'
+// import regionData from '@/assets/js/countryData.js'
+export default {
+  components: [
+    EloamUpload
+  ],
+  data () {
+    // 校验身份证号
+    const idCardNoValidaotr = (rule, value, callback) => {
+      const firstReg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+      const sndReg = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/
+      if (!value) {
+        callback()
+      } else if (firstReg.test(value) || sndReg.test(value)) {
+        callback()
+      } else {
+        callback(new Error('请输入合法的身份证号'))
+      }
+    }
+    // 校验管理员手机号
+    const telValidator = (rule, value, callback) => {
+      if (this.mode === 'add') {
+        const telReg = /\d{11}$/
+        if (value.trim() === '') {
+          callback(new Error('请输入手机号'))
+        } else if (!telReg.test(value)) {
+          callback(new Error('请输入合法的手机号'))
+        } else {
+          this.isTelExist(value, callback)
+        }
+      } else {
+        callback()
+      }
+    }
+
+    return {
+      // regionData: regionData,
+      merchantDetail: {
+        subjectType: 'SUBJECT_TYPE_ENTERPRISE', // 商户主体类型
+        id: '',
+        merchantType: 1,
+        region: [], // 所在区域
+        merchantName: '', // 商户名称
+        merchantAbbr: '', // 商户简称
+        licenseNumber: '', // 注册号
+        legalPerson: '', // 个体户经营者/法人姓名
+        subjectLicenseMediaID: '', // 营业执照
+        subjectLicenseUrl: '', // 营业执照url
+        idCardCopyMediaID: '', // 身份证人像面照片
+        idCardCopyUrl: '', // 身份证人像面照片
+        idCardNationalMediaID: '', // 身份证国徽面照片
+        idCardNationalUrl: '', // 身份证国徽面照片
+        idCardName: '', // 身份证信息
+        cardPeriodBegin: '', // 身份证有效期开始时间 示例值:2026-06-06
+        cardPeriodEnd: '', // 身份证有效期结束时间 示例值:2026-06-06
+        servicePhone: '', // 客服电话
+        salesScenesType: [],
+        settlementId: '', // 结算规则id
+        qualificationType: '', // 所属行业名称
+        bankAccountType: '', // 所属行业名称
+        accountName: '', // 开户名称不能为空
+        accountBank: '', // 开户银行
+        bankAddressCode: '', // 省市区编号
+        bankBranchId: '', // 开户银行联行号
+        bankName: '', // 开户银行全称(含支行)
+        accountNumber: '', // 银行卡号
+        notifyUrl: '', // 支付回调地址
+        weChatAccount: '', // 微信号
+        email: '', // 邮箱
+        protocolName: '', // 协议名称,
+        protocolAccount: '', // 协议编号
+        contactName: '', // 管理员
+        contactIdNumber: '', // 超级管理员身份证
+        adminIdCard: '', // 管理员身份证号
+        contactPhone: '', // 超级管理员手机号
+        contactEmail: '', // 超级管理员邮箱
+        userId: ''// 管理员id
+      },
+      merchantUserList: [],
+      merchantStatus: [
+        {
+          label: '合作中',
+          value: 1
+        },
+        {
+          label: '合作已结束',
+          value: 0
+        }
+      ],
+      cityList: [], // 城市列表
+      countyList: [], // 区县列表
+      // agreementTypeOptions: agreementTypeOptions,
+      serverOptions: [],
+      merchantDetailsRuleValidate: {
+        merchantName: [
+          { required: true, message: '请输入商户主体名称', trigger: 'blur' }
+        ],
+        region: [
+          { required: true, type: 'array', message: '请选择所在区域', trigger: 'change' }
+        ],
+        merchantAlias: [
+          { required: true, message: '请输入商户主体简称', trigger: 'blur' }
+        ],
+        merchantType: [
+          { type: 'number', required: true, message: '请选择商户主体类型', trigger: 'change' }
+        ],
+        email: [
+          { required: false, type: 'email', message: '请输入合法的邮箱账号', trigger: 'blur' }
+        ],
+        userId: [
+          { required: true, type: 'number', trigger: 'change' }
+        ],
+        adminName: [
+          { required: true, message: '请输入管理员姓名', trigger: 'blur' }
+        ],
+        // 新增商户时管理员手机号
+        adminPhoneNo: [
+          { required: true, validator: telValidator, trigger: 'blur' }
+        ],
+        adminIdCard: [
+          { required: false, validator: idCardNoValidaotr, trigger: 'blur' }
+          // { required: false, message: '请输入合法的身份证号', trigger: 'blur' }
+        ]
+      },
+      individualSettlementList: [
+        { id: '719', value: '费率0.6%,入账周期T+1;适用于餐饮、零售批发、交通出行、生活娱乐服务、培训教育机构、民营医疗机构、代理缴纳话费等业务' },
+        { id: '720', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于话费代理充值业务' },
+        { id: '746', value: '费率1%,入账周期T+7,单笔限额3K;适用于游戏、网络广告及推广、软件开发' },
+        { id: '721', value: '费率0.3%,入账周期T+1;适用于加油业务' }
+      ],
+      businessSettlementList: [
+        { id: '716', value: '费率0.6%,入账周期T+1;适用于餐饮、零售批发、网上综合商城、交通出行、生活娱乐服务、培训教育机构、民营医疗机构、缴费等业务' },
+        { id: '715', value: '费率0.6%,入账周期T+1;适用于保险公司、保险代理公司' },
+        { id: '714', value: '费率0.6%,入账周期T+3;适用于众筹业务' },
+        { id: '713', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于财经资讯/荐股业务' },
+        { id: '728', value: '费率0.6%,入账周期T+7,单笔限额3K;适用于婚介平台、就业信息平台、话费代理充值等业务' },
+        { id: '711', value: '费率1%,入账周期T+7,单笔限额3K;适用于在线图书/视频/音乐、游戏、网络直播、门户论坛、网络广告及推广、软件开发业务' },
+        { id: '717', value: '费率0.3%,入账周期T+1;适用于加油、物流快递、民办中小学、幼儿园业务' },
+        { id: '730', value: '费率0.2%,入账周期T+1;适用于水电煤暖气民生缴费' },
+        { id: '718', value: '费率0.2%,入账周期T+1;禁信用卡;适用于信用还款业务(不涉及理财)' },
+        { id: '739', value: '费率0%,入账周期T+1;适用于民办大学及院校' }
+      ],
+      settlementList: this.businessSettlementList,
+      queryMerchantDetailsLoading: false,
+      updateMerchantModel: false,
+      wxUploadAction: `${window.host}/merchant/upload`
+    }
+  },
+  created () {
+    if (this.mode !== 'add') {
+      // 不是详情
+      if (this.mode !== 'detail') {
+        this.fetchMerchantUserList()
+      }
+      // 不是新增需要获取商户详情
+      this.queryMerchantDetail()
+    }
+  },
+  methods: {
+    ...mapActions([
+      'requestMethod'
+    ]),
+    ...mapMutations([
+      'closeTag'
+    ]),
+    subjectLicenseSuccess ({ id, url, mediaId }) {
+      this.merchantDetail.subjectLicenseMediaID = mediaId
+      this.merchantDetail.subjectLicenseUrl = url
+    },
+    subjectLicenseCancel () {
+      this.merchantDetail.subjectLicenseMediaID = ''
+      this.merchantDetail.subjectLicenseUrl = ''
+    },
+    idCardCopySuccess ({ id, url, mediaId }) {
+      this.merchantDetail.idCardCopyMediaID = mediaId
+      this.merchantDetail.idCardCopyUrl = url
+    },
+    idCardCopyCancel () {
+      this.merchantDetail.idCardCopyMediaID = ''
+      this.merchantDetail.idCardCopyUrl = ''
+    },
+    idCardNationalSuccess ({ id, url, mediaId }) {
+      this.merchantDetail.idCardNationalMediaID = mediaId
+      this.merchantDetail.idCardNationalUrl = url
+    },
+    idCardNationalCancel () {
+      this.merchantDetail.idCardNationalMediaID = ''
+      this.merchantDetail.idCardNationalUrl = ''
+    },
+    subjectChange (value) {
+      console.log(value)
+      if (value) {
+        if (value === 'SUBJECT_TYPE_ENTERPRISE') {
+          this.settlementList = this.businessSettlementList
+        } else {
+          this.settlementList = this.individualSettlementList
+        }
+      } else {
+        this.settlementList = []
+      }
+    },
+    findLanguageName (key) {
+      return this.$t(key)
+    },
+    // 改变管理员下拉框的选择事件
+    changeSeller (id) {
+      if (id) {
+        this.$nextTick(() => {
+          for (let i = 0, len = this.merchantUserList.length; i < len; i++) {
+            let dt = this.merchantUserList[i]
+            if (dt.id === id) {
+              this.merchantDetail.adminPhoneNo = dt.phoneNo
+              this.merchantDetail.adminName = dt.name
+              this.merchantDetail.adminIdCard = dt.idCard
+            }
+          }
+        })
+      }
+    },
+    // 管理员下拉框清空事件
+    clearSeller () {
+      this.merchantDetail.adminPhoneNo = ''
+    },
+    // 表单提交
+    handleSubmit (name) {
+      this.$refs.merchantDetail.validate((valid) => {
+        if (valid) {
+          this.addOrUpdate(name)
+        }
+      })
+    },
+    // 查询商户下的用户 为了选择管理员时使用
+    fetchMerchantUserList () {
+      let merchantId = this.merchantId
+      if (merchantId) {
+        const URI = `/common/findUserListByMerchant/${merchantId}`
+        // 请求成功后的回调
+        const queryMerchantUserListSuccess = res => {
+          if (res.code === 0) {
+            this.merchantUserList = res.data
+          } else {
+            this.$Message.error(res.msg)
+          }
+        }
+        this.requestMethod({ method: 'get', URI }).then(queryMerchantUserListSuccess)
+      }
+    },
+    // 新增、更新具体操作
+    addOrUpdate (name) {
+      if (this.updateMerchantModel) {
+        return
+      }
+      this.updateMerchantModel = true
+      const formValidate = this.merchantDetail
+      let actionText = '更新成功'
+      let URI = 'merchant/updateMerchant'
+      if (this.mode === 'add') {
+        actionText = '新增成功'
+        URI = 'merchant/saveMerchant'
+      }
+      // 入参
+      const data = {
+        id: formValidate.id, // 商户id
+        merchantType: formValidate.merchantType, // 商户类型
+        region: formValidate.region ? formValidate.region.map(item => item.name).join('-') : '', // 所在区域
+        merchantName: formValidate.merchantName, // 商户名称
+        merchantAbbr: formValidate.merchantAlias, // 商户主体简称
+        wxAccount: formValidate.weChatAccount, // 微信号
+        email: formValidate.email, // 邮箱
+        protocolName: formValidate.protocolName, // 协议名称
+        protocolNum: formValidate.protocolAccount, // 协议编号
+        merchantStatus: formValidate.merchantStatus, // 合作状态
+        adminName: formValidate.adminName, // 管理员姓名
+        adminPhone: formValidate.adminPhoneNo, // 管理员手机号
+        adminIdCard: formValidate.adminIdCard, // 管理员身份证
+        merchantAdmin: formValidate.userId// 管理员id
+      }
+      // 请求成功后的回调
+      const successCallback = res => {
+        if (res.code === 0) {
+          this.$Message.success({
+            content: actionText,
+            duration: 1
+          })
+          this.toMerchantList()
+          this.$store.commit('setUserMerchantList', '')
+          this.$refs[name].resetFields()
+        } else {
+          this.$Message.error(res.msg)
+        }
+        // if (res.code === 0) {
+        //   this.$Message.success({
+        //     content: `${actionText}成功`,
+        //     duration: 1
+        //   })
+        //   this.toMerchantList()
+        //   if (this.mode === 'add') {
+        //     this.$store.commit('setUserMerchantList', '')
+        //     this.$refs[name].resetFields()
+        //   }
+        //   this.$refs[name].resetFields()
+        // } else {
+        //   this.$Message.error(res.msg)
+        // }
+        this.updateMerchantModel = false
+      }
+      this.requestMethod({ method: 'post', URI, data }).then(successCallback).catch(res => {
+        this.updateMerchantModel = false
+      })
+    },
+    // 查看商户详情
+    queryMerchantDetail () {
+      if (this.queryMerchantDetailsLoading) return false
+      this.queryMerchantDetailsLoading = true
+      let URI = `/merchant/findMerchantDetails/${this.merchantId}`
+      const successCallback = res => {
+        if (res.code === 0) {
+          const receivedData = res.data
+          const formValidate = this.merchantDetail
+          formValidate.id = this.merchantId
+          formValidate.merchantAlias = receivedData.merchantAbbr// 商户简称
+          formValidate.merchantName = receivedData.merchantName// 商户主体名称
+          formValidate.merchantType = receivedData.merchantType// 商户类型
+          formValidate.region = receivedData.region ? receivedData.region.split('-') : ['', '', '']// 所在区域
+          formValidate.protocolName = receivedData.protocolName// 协议名称
+          formValidate.protocolAccount = receivedData.protocolNum// 协议编号
+          formValidate.merchantStatus = receivedData.merchantStatus// 商户状态
+          formValidate.email = receivedData.email// 邮箱
+          formValidate.weChatAccount = receivedData.wxAccount// 微信号
+          // 这里还要区分 是 详情还是 编辑
+          // todo
+          formValidate.userId = receivedData.merchantAdmin// 管理员id
+          if (this.mode === 'detail') {
+            this.merchantDetail.adminPhoneNo = receivedData.adminPhone
+            this.merchantDetail.adminName = receivedData.adminName
+            this.merchantDetail.adminIdCard = receivedData.adminIdCard
+          } else {
+            this.changeSeller(formValidate.userId)
+          }
+        } else {
+          this.$Message.error(res.msg)
+        }
+        this.queryMerchantDetailsLoading = false
+      }
+      this.requestMethod({ method: 'get', URI }).then(successCallback).catch(() => {
+        this.queryMerchantDetailsLoading = false
+      })
+    },
+    confirm (name) { // 取消方法
+      this.$refs[name].resetFields()
+      if (this.mode !== 'detail') {
+        this.$Message.info('已取消')
+      }
+      this.toMerchantList()// 跳转页面
+    },
+    // 取消之后跳转的页面
+    toMerchantList () {
+      let name = 'merchant_' + this.mode
+      let merchantId = this.merchantId
+      if (merchantId) {
+        this.closeTag({
+          'name': name,
+          query: {
+            id: merchantId
+          }
+        })
+      } else {
+        this.closeTag({
+          'name': name
+        })
+        /* this.$store.commit('removeTag', name);
+          this.$router.replace({
+            name: 'seller_management'
+          }) */
+      }
+    },
+    // 取消表单填写
+    cancel (name) {
+      this.$Message.info('已取消')
+      this.$refs[name].resetFields()
+      this.toMerchantList()
+    },
+    // 校验手机号是否存在
+    isTelExist (tel, callback) {
+      const URI = '/user/pass/checkPhoneExist'
+      const params = {
+        phone: tel
+      }
+      const successCallback = res => {
+        if (res.code === 0) {
+          callback()
+        } else {
+          callback(new Error(res.msg))
+        }
+      }
+      this.requestMethod({ method: 'get', URI, params }).then(successCallback)
+    }
+  },
+  computed: {
+    // 当前模式(add:新增,edit:编辑,detail:详情)
+    mode: function () {
+      const pathArr = this.$route.path.split('_')
+      let name = pathArr[pathArr.length - 1]
+      /* if (name.indexOf('add') >= 0) return 'add'
+        else if (name.indexOf('edit') >= 0) return 'edit'
+        return 'detail' */
+      return name
+    },
+    // 当前用户ID
+    merchantId: function () {
+      return this.$route.query.id || ''
+    }
+  }
+}
+</script>

+ 619 - 0
src/view/crops/merchant_register_list.vue

@@ -0,0 +1,619 @@
+<style>
+  .ivu-table-border th, .ivu-table-border td {
+    text-align: center;
+  }
+</style>
+<template>
+  <Card dis-hover>
+    <p slot="title">
+      商户管理
+    </p>
+    <Row>
+      <Col :md="12" :lg="8">
+        <label>商户简称:</label>
+        <Input v-model="searchData.merchantAlias" style="width: 50%" :maxlength="30" placeholder="请输入商户简称"
+               clearable></Input>
+      </Col>
+      <Col :md="12" :lg="8">
+        <label>入驻状态:</label>
+        <Select style="width: 50%" v-model="searchData.registerStatus" clearable>
+          <Option v-for="item in statusOptions" :value="item.value" :key="item.value">{{item.label}}</Option>
+        </Select>
+      </Col>
+      <Col :md="12" :lg="{span:1,offset:2}">
+        <Button @click="queryMerchantList" type="primary" icon="ios-search">查询</Button>
+      </Col>
+      <Col :md="12" :lg="{span:1,offset:3}" :xl="{span:2,offset:2}" :xll="{span:1,offset:1}">
+        <Button @click="handleReset" type="default" icon="ios-refresh-circle-outline">重置</Button>
+      </Col>
+    </Row>
+    <Row>
+      <Modal :title="merchantVerifyFrom.merchantName+'商户审核'" v-model="merchantVerifyModel" :mask-closable="false"
+             @on-ok="merchantVerifyOk()" @on-cancel="merchantVerifyCancel()" :closable="false">
+        <Form :model="merchantVerifyFrom" :label-width="100">
+          <FormItem label="审核结果:">
+            <RadioGroup v-model="merchantVerifyFrom.status">
+              <Radio label="-1">
+                <Icon type="md-checkmark"></Icon>
+                <span>同意</span>
+              </Radio>
+              <Radio label="-2">
+                <Icon type="md-close"></Icon>
+                <span>拒绝</span>
+              </Radio>
+            </RadioGroup>
+          </FormItem>
+        </Form>
+      </Modal>
+      <Modal title="商户入驻查询结果" v-model="registerFindModal" :mask-closable="false"
+             :closable="false">
+        <div style="margin: 20px" v-if="registerInfo.success">
+          <p>恭喜您~~入驻成功哟</p>
+        </div>
+        <div v-else>
+          <div style="margin: 20px" v-if="registerInfo.list.length > 0">
+            <ul v-for="(item,index) in registerInfo.list">
+              <li style="margin-bottom: 20px" :key="index">{{item}}</li>
+            </ul>
+          </div>
+          <div style="margin: 20px" v-if="registerInfo.image">
+            <img style="width: 50%;height: 50%" :src="registerInfo.image"/>
+          </div>
+        </div>
+        <div slot="footer">
+          <Button type="primary" icon="md-close" @click="closeDetailsModal">关闭</Button>
+        </div>
+      </Modal>
+    </Row>
+    <Row style="padding-top: 20px">
+      <Col :md="12" :lg="2">
+        <Button type="primary" icon="md-add" v-has="'WX_REGISTER_ADD'" @click="addMerchantHandle()">商户入驻</Button>
+      </Col>
+    </Row>
+    <Row style="padding-top: 20px">
+      <Table :row-class-name="cellStyle" :loading="queryLoading" :columns="columns" :data="merchantDataList"
+             border></Table>
+    </Row>
+    <Row style="padding-top: 20px;text-align: center">
+      <Page :total="totalCount" :page-size="pageSize" :current="pageNum" @on-change="changePage"
+            @on-page-size-change="changePageSize" show-total show-sizer show-elevator>
+      </Page>
+    </Row>
+  </Card>
+</template>
+<script type="text/javascript">
+import { dateFormatMethod } from '../../common/date'
+import { mapActions } from 'vuex'
+import EloamUpload from '_c/eloamUpload.vue'
+export default {
+  components: {
+    EloamUpload
+  },
+  data () {
+    // 合作状态
+    const merchantStatusList = [
+      {
+        label: '入驻成功',
+        value: 1
+      },
+      {
+        label: '审核中',
+        value: 0
+      },
+      {
+        label: '入驻失败',
+        value: -1
+      }
+    ]
+    // 校验身份证号
+    const stopMerchantRules = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error('请输入要结束合作的商户简称'))
+      } else if (value === this.stopMerchantAliasName) {
+        callback()
+      } else {
+        callback(new Error('与结束合作的商户简称不一致,请重新输入商户简称'))
+      }
+    }
+    return {
+      columns: [
+        {
+          title: '商户简称',
+          key: 'merchantAlias',
+          minWidth: 140,
+          fixed: 'left'
+        },
+        {
+          title: '商户类型',
+          key: 'subjectType',
+          minWidth: 100,
+          render: (h, params) => {
+            let data = params.row
+            return h('span', data.subjectType === 'SUBJECT_TYPE_ENTERPRISE' ? '企业' : '个人')
+          }
+        },
+        {
+          title: '子商户号',
+          key: 'subMchId',
+          minWidth: 120
+        },
+        {
+          title: '入驻状态',
+          key: 'registerStatus',
+          minWidth: 100,
+          render: (h, params) => {
+            let status = params.row.registerStatus
+            let msg = '待管理员审核'
+            if (status !== '') {
+              for (let i = 0; i < merchantStatusList.length; i++) {
+                let _tmpData = merchantStatusList[i]
+                if (_tmpData.value === status) {
+                  msg = _tmpData.label
+                  break
+                }
+              }
+            }
+            return h('span', msg)
+          }
+        },
+        {
+          title: '申请编号',
+          key: 'businessCode',
+          minWidth: 200
+        },
+        {
+          title: '提交时间',
+          key: 'createTime',
+          minWidth: 150,
+          render: (h, params) => {
+            let data = params.row
+            return h('span', dateFormatMethod(data.createTime, '--'))
+          }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          minWidth: 260,
+          fixed: 'right',
+          align: 'center',
+          render: (h, params) => {
+            const data = params.row
+            const status = data.status
+            let registerStatus = data.registerStatus
+            return h('div', [
+              h(
+                'Tooltip', {
+                  props: {
+                    transfer: true,
+                    placement: 'top',
+                    content: '详情'
+                  }
+                },
+                [
+                  h('Button', {
+                    props: {
+                      type: 'default',
+                      size: 'small',
+                      icon: 'ios-eye'
+                    },
+                    on: {
+                      click: () => {
+                        this.getMerchantDetail(data.id)
+                      }
+                    }
+                  })
+                ]
+              ),
+              h(
+                'Tooltip', {
+                  props: {
+                    transfer: true,
+                    placement: 'top',
+                    content: '编辑'
+                  }
+                },
+                [
+                  h('Button', {
+                    props: {
+                      type: 'default',
+                      size: 'small',
+                      icon: 'md-create',
+                      disabled: registerStatus !== -1
+                    },
+                    style: {
+                      marginLeft: '15px'
+                    },
+                    directives: [{
+                      name: 'has',
+                      value: 'WX_REGISTER_EDIT'
+                    }],
+                    on: {
+                      click: () => {
+                        this.editMerchantDetails(data.id)// 编辑商户
+                      }
+                    }
+                  })
+                ]
+              ),
+              h(
+                'Tooltip', {
+                  props: {
+                    transfer: true,
+                    placement: 'top',
+                    content: '审核资料'
+                  }
+                },
+                [
+                  h('Button', {
+                    props: {
+                      type: 'default',
+                      size: 'small',
+                      icon: 'md-navigate',
+                      disabled: status === 1
+                    },
+                    style: {
+                      marginLeft: '15px'
+                    },
+                    directives: [{
+                      name: 'has',
+                      value: 'REGISTER_TO_WX'
+                    }],
+                    on: {
+                      click: () => {
+                        // this.configMerchantInfo(data.id)// 自定义平台信息
+                        this.doWxSubMerchantOrder(data.id)
+                      }
+                    }
+                  })
+                ]
+              ),
+              h(
+                'Tooltip', {
+                  props: {
+                    transfer: true,
+                    placement: 'top',
+                    content: '查询微信入驻结果'
+                  }
+                },
+                [
+                  h('Button', {
+                    props: {
+                      type: 'default',
+                      size: 'small',
+                      icon: 'md-search',
+                      disabled: status === 0
+                    },
+                    /* directives: [{
+                        name: 'has',
+                        value: 'MERCHANT_STATUS'
+                      }], */
+                    style: {
+                      marginLeft: '15px'
+                    },
+                    on: {
+                      click: () => {
+                        this.doFindWxRegisterResult(data.businessCode)
+                      }
+                    }
+                  })
+                ]
+              )
+            ])
+          }
+        }
+      ],
+      stopMerchantModel: false,
+      stopMerchantModelLoad: true,
+      stopMerchantForm: {
+        stopMerchantAlias: ''
+      },
+      stopMerchantAliasName: '',
+      stopMerchantId: '',
+      merchantDataList: [], // 表格数据
+      merchantListOptions: [],
+      statusOptions: merchantStatusList,
+      merchantVerifyModel: false,
+      merchantVerifyFrom: {
+        merchantName: '',
+        status: '',
+        id: ''
+      },
+      // 分页相关
+      pageSize: 10, // 页容量
+      pageNum: 1, // 当前页码
+      totalCount: 0, // 总页码
+      searchData: {
+        merchantAlias: '', // 商户
+        registerStatus: '' // 注册状态
+      },
+      merchantLogoTitle: {
+        title: [
+          { required: true, type: 'string', message: '请输入title', trigger: 'blur' }
+        ],
+        logo: [
+          { required: true, message: '请上传logo', trigger: 'change' }
+        ]
+      },
+      merchantStopRules: {
+        stopMerchantAlias: [
+          { required: true, validator: stopMerchantRules, trigger: 'blur' }
+        ]
+      },
+      queryLoading: false,
+      configModal: false,
+      configModalLoading: true,
+      configForm: {
+        title: '',
+        logo: '',
+        id: ''
+      },
+      detailLoading: false,
+      configMerchantId: '',
+      registerInfo: {
+        showImage: '',
+        success: '',
+        image: '',
+        list: []
+      },
+      registerFindModal: false
+    }
+  },
+  created () {
+    this.handleSearch()
+    // this.findMerchantSelect()// 获取商户简称
+  },
+  mounted () {
+  },
+  methods: {
+    ...mapActions([
+      'requestMethod'
+    ]),
+    closeDetailsModal () {
+      this.registerFindModal = false
+    },
+    cellStyle (row, index) {
+      return 'demo-table-info-row'
+      /*  if (row.merchantStatus === 1) {
+            return 'demo-table-info-row'
+          } else {
+            return 'demo-table-error-row'
+          } */
+    },
+    successUpload ({ id, url }) {
+      this.configForm.logo = url
+    },
+    merchantVerifyCancel () {
+      this.$Message.info('已取消')
+    },
+    merchantVerifyOk () {
+      this.doStopMerchantStatus(this.merchantVerifyFrom.id, this.merchantVerifyFrom.status)
+    },
+    initStopModelLoad () {
+      this.stopMerchantModelLoad = false
+      this.$nextTick(() => {
+        this.stopMerchantModelLoad = true
+      })
+    },
+    stopMerchantOk (name) {
+      this.$refs[name].validate((valid) => {
+        if (valid) {
+          // this._submitConfig(name)// 确认提交
+          this.doStopMerchantStatus(this.stopMerchantId, 0)
+          this.$refs[name].resetFields()
+          this.initStopParam()
+          this.stopMerchantModel = false
+        } else {
+          this.initStopModelLoad()
+        }
+      })
+    },
+    initStopParam () {
+      this.stopMerchantId = ''
+      this.stopMerchantAliasName = ''
+    },
+    stopMerchantCancel (name) {
+      this.$Message.info('已取消')
+      this.$refs[name].resetFields()
+      this.initStopParam()
+    },
+    doFindWxRegisterResult (code) {
+      if (code) {
+        this.requestMethod({ method: 'get', URI: `/pcWechat/findRegisterResultByBusinessCode/${code}` }).then(res => {
+          if (res.code === 0) {
+            this.registerInfo = res.data
+            this.registerFindModal = true
+          } else {
+            this.$Message.error(res.msg)
+          }
+        })
+      }
+    },
+    doWxSubMerchantOrder (id) {
+      this.requestMethod({ method: 'post', URI: `/pcWechat/register/${id}` }).then(res => {
+        if (res.code === 0) {
+          this.$Message.success('提交成功')
+          this.handleSearch()
+        } else {
+          this.$Message.error(res.msg)
+        }
+      })
+    },
+    // 自定义平台信息
+    configMerchantInfo (id) {
+      this.configMerchantId = id
+      this.configModal = true
+      this.$refs.uploadMethod.uploadStart()
+      this.findMerchantLogoTitle(id)// 获取自定义平台详情数据
+    },
+    // 获取自定义平台详情数据
+    findMerchantLogoTitle (id) { // 查询商户的logo 与title
+      this.detailLoading = true
+      let URI = `merchant/findMerchantTitleLogo/${id}`
+      this.requestMethod({ method: 'get', URI }).then(res => {
+        if (res.code === 0) {
+          let data = res.data
+          this.configForm.title = data.title
+          this.configForm.id = id
+          this.$refs.uploadMethod.uploadStart(data.logo)
+        } else {
+          this.$Message.error(res.msg)
+        }
+        this.detailLoading = false
+      }).catch(() => {
+        this.detailLoading = false
+      })
+    },
+    // 自定义平台提交
+    submitConfig (name) {
+      this.$refs[name].validate((valid) => {
+        // this.validUploadErrorInfo()// 验证商户logo
+        if (valid) {
+          this._submitConfig(name)// 确认提交
+        } else {
+          this.changeCustomLoading()
+        }
+      })
+    },
+    // 确认提交
+    _submitConfig (name) {
+      const URI = `/merchant/updateMerchantLogoTitle`
+      // 入参
+      const data = {
+        id: this.configMerchantId,
+        title: this.configForm.title,
+        logo: this.configForm.logo
+      }
+      // 请求成功后的回调
+      const successCallback = res => {
+        if (res.code === 0) {
+          this.$Message.success('更新成功')
+          this.$refs.uploadMethod.uploadDestroyed()
+        } else {
+          this.$Message.error(res.msg)
+        }
+        this.configModal = false
+        this.$refs[name].resetFields()
+      }
+      this.requestMethod({ method: 'post', URI, data }).then(successCallback).catch(() => {
+        this.configModal = false
+      })
+    },
+    cancelConfig (name) { // 自定义平台取消
+      this.$Message.info('已取消')
+      this.$refs[name].resetFields()
+    },
+    changeCustomLoading () {
+      this.configModalLoading = false
+      this.$nextTick(() => {
+        this.configModalLoading = true
+      })
+    },
+    // 点击查询按钮查询(将页码置1)
+    queryMerchantList () {
+      this.pageNum = 1
+      this.handleSearch()
+    },
+    // 查询商户列表
+    handleSearch () {
+      if (!this.queryLoading) {
+        this.queryLoading = true
+        const URI = '/pcWechat/findMerchantRegisterPage'
+        // 入参
+        const data = {
+          merchantAlias: this.searchData.merchantAlias,
+          status: this.searchData.registerStatus, // 商户状态
+          pageNum: this.pageNum,
+          pageSize: this.pageSize
+        }
+        // 请求成功后的回调
+        const successCallback = res => {
+          if (res.code === 0) {
+            const data = res.data
+            this.merchantDataList = data.list ? data.list : []
+            this.totalCount = data.totalRow
+          }
+          this.queryLoading = false
+        }
+        this.requestMethod({
+          method: 'post',
+          URI,
+          data
+        }).then(successCallback).catch(() => (this.queryLoading = false))
+      }
+    },
+    // 重置查询条件
+    handleReset () {
+      this.searchData = {}
+    },
+    // 新增商户
+    addMerchantHandle () {
+      this.$router.push({
+        name: 'WX_REGISTER_ADD'
+      })
+    },
+    doStopMerchantStatus (id, handleCode) {
+      handleCode = handleCode || 0
+      const URI = `/merchant/enableMerchant/${id}/${handleCode}`
+      // 成功回调
+      const successCallback = res => {
+        if (res.code === 0) {
+          if (handleCode === 0) {
+            this.$Message.success('已结束合作')
+          } else {
+            this.$Message.success('审核成功')
+          }
+          // 重新加载列表
+          this.handleSearch()
+          this.$store.commit('setUserMerchantList', '')
+        } else {
+          this.$Message.error('无法完成此项操作,原因:' + res.msg)
+        }
+      }
+      this.requestMethod({ method: 'post', URI }).then(successCallback)
+    },
+    // 停止合作
+    stopMerchantStatus (id, name, status) {
+      if (status === -1) {
+        this.merchantVerifyFrom.id = id
+        this.merchantVerifyFrom.merchantName = name
+        this.merchantVerifyModel = true
+      } else {
+        this.stopMerchantAliasName = name
+        this.stopMerchantModel = true
+        this.stopMerchantId = id
+      }
+    },
+    // 编辑商户
+    editMerchantDetails (id) {
+      this.$router.push({
+        name: 'WX_REGISTER_EDIT',
+        query: {
+          id
+        }
+      })
+    },
+    // 查看商户详情
+    getMerchantDetail (id) {
+      this.$router.push({
+        name: 'WX_REGISTER_DETAILS',
+        query: {
+          id
+        }
+      })
+    },
+
+    // 更改页码
+    changePage (pageNum) {
+      this.pageNum = pageNum
+      this.handleSearch()
+    },
+    // 更改页容量
+    changePageSize (pageSize) {
+      this.pageSize = pageSize
+      this.pageNum = 1
+      this.handleSearch()
+    }
+
+  }
+}
+</script>

File diff suppressed because it is too large
+ 1289 - 0
src/view/crops/seller-settlement.vue


+ 5 - 2
src/view/crops/sn_data_record.vue

@@ -308,8 +308,11 @@ export default {
       addModalLoading: true,
       fileUrl: '',
       action: `${window.host}/upload/uploadResources?type=100&save=1`,
-      eloamFormatImage: ['png', 'jpg', 'jpeg', 'ico', 'gif'],
-      eloamAllFormat: ['png', 'jpg', 'jpeg', 'ico', 'gif', 'mkv', 'flv', 'avi', 'mp4', 'docx', 'doc', 'txt', 'js', 'css']
+      eloamFormatImage: ['jpeg', 'ico', 'bmp', 'jpg', 'png', 'tif', 'gif', 'pcx', 'tga', 'exif', 'fpx', 'svg', 'psd', 'cdr', 'pcd', 'dxf', 'ufo', 'eps', 'ai', 'raw', 'WMF', 'webp'],
+      eloamAllFormat: ['bmp', 'jpg', 'png', 'tif', 'gif', 'pcx', 'tga', 'exif', 'fpx', 'svg', 'psd', 'cdr', 'pcd', 'dxf', 'ufo', 'eps', 'ai', 'raw', 'WMF', 'webp',
+        'jpeg', 'ico', 'mkv', 'flv', 'avi', 'mp4',
+        'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pot', 'pps', 'vsd', 'rtf', 'wps', 'et', 'dps', 'pdf', 'txt', 'xmind', 'vsdx', 'zip', 'rar'
+      ]
     }
   },
   created () {

+ 3 - 1
src/view/crops/wechat-pay-order.vue

@@ -42,7 +42,9 @@
       </Col>
     </Row>
     <Row style="padding-top: 20px">
-      <Button type="primary" icon="ios-download-outline" @click="exportVis">导出数据</Button>
+      <Col offset="19">
+        <Button type="primary" icon="ios-download-outline" @click="exportVis">导出数据</Button>
+      </Col>
     </Row>
     <Row style="padding-top: 20px">
       <Table :loading="loading" :columns="columns" :data="tableData"></Table>