|
@@ -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>
|