12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>首页-商户创建-创业帮</title>
- <meta name="keywords" content="首页-商户创建-创业帮">
- <meta name="description" content="首页-商户创建-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="首页-商户创建-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/crop.css">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="pt0" style="padding-top:0;">
- <div class="merchant_sign" id="app" ref="container" v-cloak>
- <van-nav-bar left-arrow title="商户创建" @click-left="gostorage" right-text="暂存" @click-right="rightclick" v-if="toptitleisshow">
- <template #left>
- <van-icon name="arrow-left"> </van-icon>
- </template>
- </van-nav-bar>
- <div class="merchant-creat">
- <div class="establishpanel bgcfff">
- <div class="step">
- <van-steps :active="active" active-color="#333">
- <van-step>
- <template #active-icon>
- <div class="activeicon"></div>
- </template>
- <template #finish-icon>
- <div class="activeicon"></div>
- </template>
- <template #inactive-icon>
- <div class="unactiveicon"></div>
- </template><span class="steptext l f12">商户创建</span>
- </van-step>
- <van-step>
- <template #active-icon>
- <div class="activeicon"></div>
- </template>
- <template #inactive-icon>
- <div class="unactiveicon"></div>
- </template>
- <template #finish-icon>
- <div class="activeicon"></div>
- </template><span class="steptext f12">门店信息完善 </span>
- </van-step>
- <van-step>
- <template #active-icon>
- <div class="activeicon"></div>
- </template>
- <template #inactive-icon>
- <div class="unactiveicon"></div>
- </template>
- <template #finish-icon>
- <div class="activeicon"></div>
- </template><span class="steptext f12">身份信息完善 </span>
- </van-step>
- <van-step>
- <template #active-icon>
- <div class="activeicon"></div>
- </template>
- <template #inactive-icon>
- <div class="unactiveicon"></div>
- </template>
- <template #finish-icon>
- <div class="activeicon"></div>
- </template><span class="steptext r f12">结算卡绑定 </span>
- </van-step>
- </van-steps>
- </div>
- </div>
- <div v-if="active === -1" v-cloak>
- <div class="tc f14 c333 tips">上传商户个人或企业营业执照</div>
- <div class="firimg" @click="getBusinessLicense(1)"><img :src="reg.LicenseCopy === '' ? './static/images/sign-photo1.png' : showHost + reg.LicenseCopy" alt=""></div>
- <div class="tc f12 c999 btips">图片大小限制为2M</div>
- <div class="changebtn bgcfff bc333">
- <van-button type="primary" block round :disabled="reg.LicenseCopy === ''" color="#FFD500" @click="firNextBtn">下一步</van-button>
- </div>
- </div>
- <div v-if="active === 0" v-cloak>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 商户名称</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.CertMerchantName" placeholder="请输入营业执照商户名称"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 商户信用代码</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.LicenseNumber" placeholder="请输入营业执照商户信用代码"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 主体类型</span></div>
- <div class="field">
- <van-field class="mb12" v-model="SubjectType" readonly placeholder="请选择" @click="typeisshow(1)" right-icon="arrow-down"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 商户名称简写</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.MerchantShortname" placeholder="请输入"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 商户电话</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.ServicePhone" type="number" placeholder="请输入客服号码"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6 mr12"> 结算规则信息</span><span class="c999 f12">费率 0.6%,入账周期 T+1</span></div>
- <div class="field">
- <van-field class="mb12" v-model="QualificationType" readonly placeholder="请选择" @click="typeisshow(2)" right-icon="arrow-down"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="c333 mb6"> 特殊资质</span></div>
- <div class="field">
- <div class="c999 f12">注:特殊行业需要提供特殊行业资质证明(如:餐饮需提供食品经营许可证、服务许可证 )</div>
- <van-uploader class="mt16" readonly v-model="Qualifications" :max-count="3" v-if="isspqual === 1 ? true:false" @click-upload="uploadimg(5)"></van-uploader>
- </div>
- </div>
- <div class="fieldbtn df bc333">
- <van-button class="mr12 onbtn" type="primary" block round @click="firOnBtn">上一步</van-button>
- <van-button type="primary" block round color="#FFD500" @click="firNextBtn">下一步</van-button>
- </div>
- </div>
- <div v-if="active === 1" v-cloak>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 门店名称</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.BizStoreName" placeholder="请输入门店名称"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 门店所属区域</span></div>
- <div class="field df">
- <van-field v-model="reg.BizAddressCode" clickable name="area" readonly placeholder="请选择" right-icon="arrow-down" @click="showArea = true"></van-field>
- <van-popup v-model="showArea" position="bottom">
- <van-area :area-list="areaList" @confirm="areaonConfirm" @cancel="showArea = false"></van-area>
- </van-popup>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle df dfb">
- <div><span class="spcolor">*</span><span class="c333 mb6"> 门店地址</span></div>
- </div>
- <div class="field df">
- <van-field v-model="reg.BizStoreAddress" type="textarea" placeholder="请输入详细地址"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 门头照片</span><span class="f12 c999">(上传1张图片大小限制为2M)</span></div>
- <div class="field df">
- <van-uploader class="mt16" readonly v-model="StoreEntrancePic" :max-count="1" @click-upload="uploadimg(6)"></van-uploader>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 环境照片</span><span class="f12 c999">(上传1张图片大小限制为2M)</span></div>
- <div class="field df">
- <van-uploader class="mt16" readonly v-model="IndoorPic" :max-count="1" @click-upload="uploadimg(7)"></van-uploader>
- </div>
- </div>
- <div class="fieldbtn df bc333">
- <van-button class="mr12 onbtn" type="primary" block round @click="firOnBtn">上一步</van-button>
- <van-button type="primary" block round color="#FFD500" @click="firNextBtn">下一步</van-button>
- </div>
- </div>
- <div v-if="active === 2" v-cloak>
- <div class="tc f14 c333 tips">请上传身份证人像面</div>
- <div class="firimg" @click="getBusinessLicense(3)"><img :src="reg.IdCardCopy === '' ? './static/images/sign-photo2.png' : showHost + reg.IdCardCopy" alt=""></div>
- <div class="tc f14 c333 tips">请上传身份证国徽面</div>
- <div class="firimg" @click="getBusinessLicense(4)"><img :src="reg.IdCardNational === '' ? './static/images/sign-photo3.png' : showHost + reg.IdCardNational" alt=""></div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 真实姓名</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.CertLegalPerson" placeholder="请输入真实姓名"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 身份证号码</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.IdCardNumber" type="number" placeholder="请输入身份证号码"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 身份证有效期</span></div>
- <div class="field df cm">
- <van-field v-model="begindate" placeholder="请选择" @click="openDatePage('start')" readonly right-icon="./static/images/sign-calendar.png"></van-field>
- <div class="pr6 pl6">—</div>
- <van-field v-model="enddate" placeholder="请选择" @click="openDatePage('end')" readonly right-icon="./static/images/sign-calendar.png"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 手机号码</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.MobilePhone" type="number" placeholder="请输入手机号码"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 电子邮箱</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.ContactEmail" placeholder="若无邮箱账号,请填写“手机号码@126.com”"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 支付宝账号</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.AlipayAccount" placeholder="请输入正确支付宝账号"></van-field>
- </div>
- </div>
- <div class="fieldbtn df bc333">
- <van-button class="mr12 onbtn" type="primary" block round @click="firOnBtn">上一步</van-button>
- <van-button type="primary" block round color="#FFD500" @click="firNextBtn">下一步</van-button>
- </div>
- </div>
- <div v-if="active === 3" v-cloak>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6 mr12"> 开户名称</span><span class="c999 f12">(个人填写法人名称、企业填写对公账户名称)</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.AccountName" placeholder="请输入开户名称"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 账户类型</span></div>
- <div class="field">
- <van-field class="mb12" v-model="BankAccountType" placeholder="请选择" readonly @click="typeisshow(4)" right-icon="arrow-down"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 银行卡号</span></div>
- <div class="field">
- <van-field class="mb12" v-model="reg.AccountNumber" type="number" placeholder="请输入您的银行卡号"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 开户行</span></div>
- <div class="field">
- <van-field class="mb12" v-model="BankType" placeholder="请选择" readonly @click="typeisshow(5)" right-icon="arrow-down"></van-field>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 开户地区</span></div>
- <div class="field df">
- <van-field v-model="reg.BankAddressCode" clickable name="area" readonly placeholder="请选择" right-icon="arrow-down" @click="AccountshowArea = true"></van-field>
- <van-popup v-model="AccountshowArea" position="bottom">
- <van-area :area-list="areaList" @confirm="AccountareaonConfirm" @cancel="AccountshowArea = false"></van-area>
- </van-popup>
- </div>
- </div>
- <div class="fielditem">
- <div class="f14 fieldtitle"><span class="spcolor">*</span><span class="c333 mb6"> 开户行全称</span></div>
- <div class="field">
- <van-field class="mb12" v-model="Bankdetailname" placeholder="模糊搜索"></van-field>
- <van-field class="mb12" v-model="reg.BankName" placeholder="请选择银行卡开户行全称" readonly right-icon="arrow-down" @click="BankNameflagfn"></van-field>
- <van-popup v-model="BankNameflag" position="bottom">
- <van-picker title="开户行全称" show-toolbar :columns="BankNamelist" @confirm="banknamefn" @cancel="BankNameflag = false"></van-picker>
- </van-popup>
- </div>
- </div>
- <div class="fieldbtn df bc333">
- <van-button class="mr12 onbtn" type="primary" block round @click="firOnBtn">上一步</van-button>
- <van-button type="primary" block round color="#FFD500" @click="submit">提交进件</van-button>
- </div>
- </div>
- </div>
- <input type="file" accept="image/*" id="upload" style="display:none;">
- <input type="file" accept="image/*" id="upload2" style="display:none;">
- <input type="file" accept="image/*" id="upload3" style="display:none;">
- <van-dialog style="border-radius:16px;" close-on-click-overlay width="300" v-model="storageisshow" title="是否保存此次操作为暂存?" message="可在暂存箱重新编辑操作" confirm-button-text="确认暂存" cancel-button-text="退出" show-cancel-button @confirm="surestorage" @cancel="goback"> </van-dialog>
- <van-calendar v-model="calendarshow" type="range" :show-confirm="false" @confirm="calendarconfirm"></van-calendar>
- <van-calendar v-model="IdCardcalendarshow" type="range" :min-date="mindate" :max-date="maxdate" :show-confirm="false" @confirm="IdCardcalendarconfirm"></van-calendar>
- <van-popup v-model="pickerisshow" position="bottom">
- <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" :min-date="mindate" @confirm="dateConfirm" :formatter="formatter" @cancel="pickerisshow = false" :max-date="maxdate"></van-datetime-picker>
- </van-popup>
- <van-popup v-model="choseType" position="bottom">
- <van-picker :title="choseTypetitle" show-toolbar :columns="typecolumns" @confirm="choseTypeonConfirm" @cancel="choseType = false"></van-picker>
- </van-popup>
- </div>
- <script src="./static/js/clipboard.min.js"></script>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script src="./static/js/exif.js"></script>
- <script src="./static/js/transformation-matrix.js"></script>
- <script src="./static/js/prefix-umd.js"></script>
- <script src="./static/js/index.js"></script>
- <script src="./static/js/arealist.js"></script>
- <script>
- //上回后回调方法,用于调用缩放、裁切、旋转功能
- function AppUpload(imgpath) {
- setTimeout(function () {
- if((app.imgtype === 3) || (app.imgtype === 4) ){
- PublicLib.WapCropForApp(600, 380, 'upload', imgpath, 1);
- } else if(app.imgtype === 1){
- PublicLib.WapCropForApp(900, 1300, 'upload2', imgpath, 1);
- // 添加本地上传图片方法
- } else {
- PublicLib.WapCropForApp(500, 500, 'upload3', imgpath, 1);
- }
- }, 300);
- };
- //裁切结束后回调方法
- function ShowPhoto(url) {
- //获取最终的图片地址
- app.uploadheadhpotofn(url);
- };
- //初始化crop
- //- if (isWeb) {
- //- PublicLib.WapCrop(500, 500, 'upload', 1);
- //- PublicLib.WapCrop(500, 253, 'upload2', 1);
- //- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- //- 银行卡列表
- BankNamelist:[],
- BankNameflag:false,
- datetype:'',
- pickerisshow:false,
- begindate:'',
- enddate:'',
- currentDate:new Date(),
- mindate:new Date(1949,10,01),
- maxdate:new Date(2050,10,01),
- width:1000,
- height:506,
- //- 开户行地区
- AccountshowArea:false,
- //- 地区选择器
- showArea:false,
- //- 时间选择器
- calendarshow:false,
- //- 身份证有效期选择器
- IdCardcalendarshow:false,
- //- 类型选择器
- choseType:false,
- //- 类型选择器标题
- choseTypetitle:'',
- //- 暂存弹窗
- storageisshow:false,
- //- 顶部是否显示
- toptitleisshow:false,
- //- 营业期限是否为长期
- calendarchecked:true,
- active:-1,
- reg:{
- //- 支付宝账号
- AlipayAccount:'',
- //- 营业执照
- LicenseCopy:'',
- //- 商户名称
- CertMerchantName:'',
- //- 商户信用代码
- LicenseNumber:'',
- //- 商户营业期限
- BusinessTerm:'',
- //- 主体类型
- SubjectType:'',
- //- 用户名称简写
- MerchantShortname:'',
- //- 商户电话
- ServicePhone: '',
- //- 所属行业
- QualificationType:'',
- //- 特殊资质
- SpecialQualification:'',
- //- 商户授权函
- MerchantAuthorizationLetter:'',
- //- 门店名称
- BizStoreName:'',
- //- 门店区域
- BizAddressCode:'',
- //- 门店地址
- BizStoreAddress:'',
- //- 身份证正面
- IdCardCopy:'',
- //- 身份证反面
- IdCardNational:'',
- //- 真实姓名
- CertLegalPerson:'',
- //- 身份证号码
- IdCardNumber:'',
- //- 身份证有效期开始
- CardPeriodBegin:'',
- //- 身份证有效期结束
- CardPeriodEnd:'',
- //- 手机号码
- MobilePhone:'',
- //- 电子邮箱
- ContactEmail:'',
- //- 开户名称
- AccountName:'',
- //- 账户类型
- BankAccountType:'',
- //- 银行卡号
- AccountNumber:'',
- //- 开户行
- AccountBank:'',
- //- 开户行全称
- BankName:'',
- //- 开户地区
- BankAddressCode:'',
- StoreEntrancePic:'',
- IndoorPic:'',
- },
- SubjectType:'',
- QualificationType:'',
- //- SpecialQualification:'',
- BankAccountType:'',
- //- 时间区间
- IdCardvalidity:'',
- //- 银行类型
- BankType:'',
- //- 银行详细名字
- Bankdetailname:'',
- //- 选择器选择项(动态生成)
- typecolumns: [
- ],
- typeidentification:0,
- imgtype:0,
- storageId:'',
- areaList,
- isspqual:1,
- //- 特殊资质照片组
- Qualifications:[],
- //- 门头照片组
- StoreEntrancePic:[],
- //-环境照片组
- IndoorPic:[],
- SettlementId:'',
- flag:true,
- };
- },
- created(){
- this.toptitleisshow = toptitleisshow;
- const storageId = PublicLib.getCookieInfo('storageId');
- if(storageId === undefined){
- storageId = '';
- };
- //- 获取暂存箱中的数据
- if(storageId !== ''){
- this.getstoragedata(storageId);
- };
- //- 清除暂存ID
- PublicLib.putCookieInfo('storageId', '');
- },
- methods: {
- async BankNameflagfn(){
- this.BankNameflag = true;
- //- 发起请求
- res = await getRequest('api/v1/openbanktable/list?t='+Math.random(6),JSON.stringify({PageSize:50,PageNum:1,SearchKey:this.Bankdetailname}));
- if(res.status !== '1') return tips(user.info);
- //- console.log(res)
- let arr = [];
- res.data.forEach(item=>{
- arr.push(item.BankName);
- })
- this.BankNamelist = arr;
-
- },
- banknamefn(data){
- this.BankNameflag = false;
- this.reg.BankName = data;
- },
- //- 打开时间选择器
- openDatePage(type){
- this.datetype = type;
- this.pickerisshow = true;
- },
- //- 时间区间选择器确认按钮
- dateConfirm(a){
- if(this.datetype === 'start') {
- this.begindate = this.formatter('year',new Date(a).getFullYear()) + this.formatter('month',new Date(a).getMonth() + 1) + this.formatter('day',new Date(a).getDate())
- this.reg.CardPeriodBegin = this.formatpagedate(a);
- }else {
- this.enddate = this.formatter('year',new Date(a).getFullYear()) + this.formatter('month',new Date(a).getMonth() + 1) + this.formatter('day',new Date(a).getDate())
- this.reg.CardPeriodEnd = this.formatpagedate(a);
- }
- this.pickerisshow = false;
- },
- async getstoragedata(Id){
- this.storageId = Id;
- const res = await postRequest('api/v1/merchantaddinfo/detail?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips('获取进件商户失败,请重试!');
- this.reg = res.data;
- this.BankType = res.data.AccountBank;
- this.reg.CertLegalPerson = res.data.ContactName;
- this.reg.IdCardNumber = res.data.ContactIdNumber;
- this.SubjectType = res.data.SubjectTypeName;
- this.QualificationType = res.data.QualificationTypeName;
- this.BankAccountType = res.data.BankAccountTypeName;
- if(res.data.StoreEntrancePic !== ''){
- this.StoreEntrancePic.push({url:showHost + res.data.StoreEntrancePic});
- };
- if(res.data.IndoorPic !== ''){
- this.IndoorPic.push({url:showHost + res.data.IndoorPic});
- };
- if(res.data.Qualifications !== ''){
- res.data.Qualifications.split(',').forEach(item=>{
- this.Qualifications.push({url:item});
- });
- this.isspqual = 1;
- }else{
- this.isspqual = 0;
- }
- if(!Boolean(res.data.CardPeriodBegin)) {
- this.begindate = this.formatter('year',new Date().getFullYear()) + this.formatter('month',new Date().getMonth() + 1) + this.formatter('day',new Date().getDate())
- }else{
- this.reg.CardPeriodBegin = this.formatpagedate(new Date(this.changedata(res.data.CardPeriodBegin)));
- this.begindate = this.formatter('year',new Date(this.changedata(res.data.CardPeriodBegin)).getFullYear()) + this.formatter('month',new Date(this.changedata(res.data.CardPeriodBegin)).getMonth() + 1) + this.formatter('day',new Date(this.changedata(res.data.CardPeriodBegin)).getDate())
- };
- if(!Boolean(res.data.CardPeriodEnd)) {
- this.enddate = this.formatter('year',new Date().getFullYear()) + this.formatter('month',new Date().getMonth() + 1) + this.formatter('day',new Date().getDate())
- }else{
- this.reg.CardPeriodEnd = this.formatpagedate(new Date(this.changedata(res.data.CardPeriodEnd)));
- this.enddate = this.formatter('year',new Date(this.changedata(res.data.CardPeriodEnd)).getFullYear()) + this.formatter('month',new Date(this.changedata(res.data.CardPeriodEnd)).getMonth() + 1) + this.formatter('day',new Date(this.changedata(res.data.CardPeriodEnd)).getDate())
- };
- this.reg.QualificationType = res.data.QualificationType;
- this.QualificationType = res.data.QualificationType;
- this.SettlementId = res.data.SettlementId;
- },
- //- 转换格式
- changedata(str){
- let arr = str.split('');
- arr.forEach((item,index)=>{
- if(item === '-'){
- arr[index] = '/'
- };
- })
- return arr.join('');
- },
- //- 表单校验函数
- formcheck(value){
- for(const item in value){
- if(value[item] === '') {
- return item;
- };
- }
- },
- //- 正则匹配函数
- //- regcheck(str){
- //- const reg = /^.\//
- //- const regend = /png$/
- //- return reg.test(str) && regend.test(str)
- //- },
- submit(){
- console.log(this.formcheck(this.reg));
- switch(this.formcheck(this.reg)){
- case 'ContactName':
- break;
- case 'ContactIdNumber':
- break;
- case 'IdCardName':
- break;
- case 'Qualifications':
- break;
- case 'SettlementId':
- break;
- case 'LicenseCopy':
- this.active = -1;
- return tips('请上传营业执照');
- case 'CertMerchantName':
- this.active = 0;
- return tips('请输入商户名称');
- case 'LicenseNumber':
- this.active = 0;
- return tips('请输入商户信用代码');
- //- case 'BusinessTerm':
- //- this.active = 0;
- //- return tips('请输入商户营业期限');
- case 'SubjectType':
- this.active = 0;
- return tips('请输入主体类型');
- case 'MerchantShortname':
- this.active = 0;
- return tips('请输入用户名称简写');
- case 'ServicePhone':
- this.active = 0;
- return tips('请输入商户电话');
- case 'QualificationType':
- this.active = 0;
- return tips('请输入结算规则信息');
- case 'BizStoreName':
- this.active = 1;
- return tips('请输入门店名称');
- case 'BizAddressCode':
- this.active = 1;
- return tips('请输入门店区域');
- case 'BizStoreAddress':
- this.active = 1;
- return tips('请输入门店地址');
- case 'IdCardCopy':
- this.active = 2;
- return tips('请上传身份证正面');
- case 'IdCardNational':
- this.active = 2;
- return tips('请上传身份证反面');
- case 'CertLegalPerson':
- this.active = 2;
- return tips('请输入真实姓名');
- case 'IdCardNumber':
- this.active = 2;
- return tips('请输入身份证号码');
- case 'IdCardvalidity':
- this.active = 2;
- return tips('请输入身份证有效期');
- case 'MobilePhone':
- this.active = 2;
- return tips('请输入手机号码');
- case 'ContactEmail':
- this.active = 2;
- return tips('请输入电子邮箱');
- case 'AlipayAccount':
- this.active = 2;
- return tips('请输入正确的支付宝账号');
- case 'AccountName':
- this.active = 3;
- return tips('请输入开户名称');
- case 'BankAccountType':
- this.active = 3;
- return tips('请输入账户类型');
- case 'AccountNumber':
- this.active = 3;
- return tips('请输入银行卡号');
- case 'AccountBank':
- this.active = 3;
- return tips('请输入开户行');
- case 'BankAddressCode':
- this.active = 3;
- return tips('请输入开户地区');
- }
- if(!verificationCreditCode(this.reg.LicenseNumber)){
- this.active = 0;
- return tips('社会统一信用代码格式错误')
- };
- if(!verificationphonenumber(this.reg.ServicePhone)){
- this.active = 0;
- return tips('商户电话格式错误')
- };
- if(this.StoreEntrancePic.length < 1){
- this.active = 1;
- return tips('请上传门头照片')
- };
- if(this.IndoorPic.length < 1){
- this.active = 1;
- return tips('请上传环境照片')
- };
- if(!verificationphonenumber(this.reg.MobilePhone)){
- this.active = 2;
- return tips('手机号码格式错误')
- };
- if(!verificationemail(this.reg.ContactEmail)){
- this.active = 2;
- return tips('电子邮箱格式错误')
- };
- if(!verificationName(this.reg.CertLegalPerson)){
- this.active = 2;
- return tips('姓名格式错误')
- };
- if(!verificationIdCardNumber(this.reg.IdCardNumber)){
- this.active = 2;
- return tips('身份证号码格式错误')
- };
- this.submitrequest();
- },
- //- 提交服务器
- async submitrequest(){
- //- PublicLib.ShowLoading({Message:'提交资料中'});
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await postRequest('api/v1/merchantaddinfo/add?t='+Math.random(6),JSON.stringify({
- ...this.reg,
- //- StoreEntrancePic:this.StoreEntrancePic.length !== 0 ? this.StoreEntrancePic[0].url : '',
- //- IndoorPic:this.IndoorPic.length !== 0 ? this.IndoorPic[0].url : '',
- ContactName:this.reg.CertLegalPerson,
- ContactIdNumber:this.reg.IdCardNumber,
- IdCardName:this.reg.CertLegalPerson,
- Qualifications:this.sppicformt(this.Qualifications),
- Finish:1,
- UserId,
- Id:this.storageId,
- SettlementId:this.SettlementId
- }));
- if(res){
- //- PublicLib.HideLoading();
- if(res.status !== '1') return tips(res.info);
- tips('资料提交成功!');
- this.reg = {
- //- 营业执照
- LicenseCopy:'',
- //- 商户名称
- CertMerchantName:'',
- //- 商户信用代码
- LicenseNumber:'',
- //- 商户营业期限
- BusinessTerm:'',
- //- 主体类型
- SubjectType:'',
- //- 用户名称简写
- MerchantShortname:'',
- //- 商户电话
- ServicePhone: '',
- //- 所属行业
- QualificationType:'',
- //- 特殊资质
- SpecialQualification:'',
- //- 商户授权函
- MerchantAuthorizationLetter:'',
- //- 门店名称
- BizStoreName:'',
- //- 门店区域
- BizAddressCode:'',
- //- 门店地址
- BizStoreAddress:'',
- //- 身份证正面
- IdCardCopy:'',
- //- 身份证反面
- IdCardNational:'',
- //- 真实姓名
- CertLegalPerson:'',
- //- 身份证号码
- IdCardNumber:'',
- //- 身份证有效期开始
- CardPeriodBegin:'',
- //- 身份证有效期结束
- CardPeriodEnd:'',
- //- 手机号码
- MobilePhone:'',
- //- 电子邮箱
- ContactEmail:'',
- //- 开户名称
- AccountName:'',
- //- 账户类型
- BankAccountType:'',
- //- 银行卡号
- AccountNumber:'',
- //- 开户行
- AccountBank:'',
- //- 开户行全称
- BankName:'',
- //- 开户地区
- BankAddressCode:'',
- };
- this.active = -1;
- }
- },
- //- 特殊图片分隔
- sppicformt(arr){
- let str = '';
- arr.forEach(item=>{
- str += item.url + ','
- })
- return str.substring(0, str.length - 1);
- },
- //- 选择器选择
- choseTypeonConfirm(date){
- //- console.log(date)
- switch(this.typeidentification){
- case 1:
- this.reg.SubjectType = date.value;
- this.SubjectType = date.text;
- break;
- case 2:
- for(let i =0;i<this.typecolumns.length;i++){
- if(this.typecolumns[i].text === date[0]){
- const arr = this.typecolumns[i];
- for(let j =0;j<arr.children.length;j++){
- if(arr.children[j].text === date[1]){
- const checkitem = arr.children[j];
- this.reg.QualificationType = arr.text + ',' +checkitem.text;
- this.QualificationType = arr.text + ',' + checkitem.text;
- this.isspqual = checkitem.special;
- this.SettlementId = checkitem.value;
- break;
- }
- }
- break;
- }
- }
- break;
- //- case 3:
- //- this.reg.SpecialQualification = date.value;
- //- this.SpecialQualification = date.text
- //- break;
- case 4:
- this.reg.BankAccountType = date.value;
- this.BankAccountType = date.text
- break;
- case 5:
- this.reg.AccountBank = date.value;
- this.BankType = date.text
- break;
- }
- //- 关闭选择器
- this.choseType = false;
- },
- //- 区域选择
- areaonConfirm(area){
- this.reg.BizAddressCode = area[1].name + ',' + area[2].name
- this.showArea = false;
- },
- //- 开户地区选择
- AccountareaonConfirm(area){
- //- this.reg.BankAddressCode = area[0].name + ',' + area[1].name + ',' + area[2].name
- this.reg.BankAddressCode = area[1].name + ',' + area[2].name
- this.AccountshowArea = false;
- },
- //- 选择器选择逻辑
- async typeisshow(type){
- this.choseType = true;
- let res = [];
- switch(type){
- case 1:
- //- 主体类型列表请求
- this.choseTypetitle = '主体类型';
- res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:1}));
- if(res.status !== '1') return tips('主体类型请求错误,请关闭重试!');
- this.typecolumns = res.data;
- break;
- case 2:
- //- 主体类型列表请求
- this.choseTypetitle = '结算规则信息'; // 个体户:2 企业:21
- if(this.SubjectType === '企业'){
- res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:21}));
- if(res.status !== '1') return tips('结算规则信息请求错误,请关闭重试!');
- if(this.typecolumns.length !== 0 && this.typeidentification === type){
- return;
- };
- this.typecolumns = res.data;
- }else{
- res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:2}));
- if(res.status !== '1') return tips('结算规则信息请求错误,请关闭重试!');
- if(this.typecolumns.length !== 0 && this.typeidentification === type){
- return;
- };
- this.typecolumns = res.data;
- }
- break;
- //- case 3:
- //- //- 主体类型列表请求
- //- this.choseTypetitle = '特殊资质'
- //- // 发起请求拿到特殊资质列表
- //- break;
- case 4:
- //- 主体类型列表请求
- this.choseTypetitle = '账户类型';
- res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:3}));
- if(res.status !== '1') return tips('账户类型请求错误,请关闭重试!');
- this.typecolumns = res.data;
- break;
- case 5:
- //- 主体类型列表请求
- this.choseTypetitle = '开户行';
- res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:4}));
- if(res.status !== '1') return tips('开户行列表请求错误,请关闭重试!');
- this.typecolumns = res.data;
- break;
- }
- this.typeidentification = type;
- },
- //- 复选框状态改变
- calendarcheckedchange(){
- if(this.calendarchecked === true){
- this.reg.BusinessTerm ='';
- }
- },
- //- 时间选择完成
- calendarconfirm(data){
- this.reg.BusinessTerm = this.formatpagedate(data[0]) + '-' + this.formatpagedate(data[1]);
- //- console.log(this.reg.BusinessTerm);
- this.calendarshow = false;
- this.calendarchecked = false;
- },
- //- 身份证有效期函数
- IdCardcalendarconfirm(data){
- this.IdCardvalidity = this.formatpagedate(data[0]) + '---' + this.formatpagedate(data[1]);
- //- 时间需要转格式
- this.reg.CardPeriodBegin = this.formatpagedate(data[0]);
- this.reg.CardPeriodEnd = this.formatpagedate(data[1]);
- this.IdCardcalendarshow = false;
- },
- //- 年月日时间过滤(当前页面方法)
- formatpagedate(date) {
- const year = date.getFullYear();
- const month = date.getMonth() + 1;
- const day = date.getDate();
- return formatwechtDate(year,month,day)
- },
- getBusinessLicense(type){
- if(isWeb){
- this.imgsize(type);
- };
- this.imgtype = type;
- PublicLib.UploadPhoto({
- Quality:1,
- PhotoCount:1,
- Width:300,
- Height:300,
- });
- },
- imgsize(type){
- if((type === 3) || (type === 4) ){
- PublicLib.WapCrop(600, 380, 'upload', 1);
- } else if(type === 1){
- PublicLib.WapCrop( 900, 1500, 'upload2', 1);
- } else {
- PublicLib.WapCrop(500, 500, 'upload3', 1);
- }
- },
- uploadimg(type){
- this.getBusinessLicense(type);
- },
- //- 退出创建
- gostorage(){
- if(this.active === -1 && this.reg.LicenseCopy === '') {
- this.goback();
- }else{
- this.storageisshow = true;
- };
- },
- //- 退出
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 确认暂存
- async surestorage(flag){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await postRequest('api/v1/merchantaddinfo/add?t='+Math.random(6),JSON.stringify({
- ...this.reg,
- //- StoreEntrancePic:this.StoreEntrancePic.length !== 0 ? this.StoreEntrancePic[0].url : '',
- //- IndoorPic:this.IndoorPic.length !== 0 ? this.IndoorPic[0].url : '',
- ContactName:this.reg.CertLegalPerson,
- ContactIdNumber:this.reg.IdCardNumber,
- IdCardName:this.reg.CertLegalPerson,
- Qualifications:this.sppicformt(this.Qualifications),
- Finish:0,
- UserId,
- Id:this.storageId,
- SettlementId:this.SettlementId
- }));
- if(res.status !== '1') return tips('暂存失败!')
- if(flag === 'stay'){
- tips('暂存成功')
- }else{
- this.goback();
- };
- },
- rightclick(){
- //- 暂存流程
- if(this.reg.LicenseCopy !== ''){
- if(this.flag){
- this.flag = false;
- this.surestorage('stay');
- }else{
- tips('已暂存,请勿重复暂存!');
- };
- }else{
- tips('暂无可暂存信息!')
- }
- //- PublicLib.Goto({Url:'merchant-temporary-storage'});
- },
- firNextBtn(){
- this.active++;
- this.flag = true;
- },
- firOnBtn(){
- this.active--;
- },
- //- 上传图片回调,拿到线上URL
- async uploadheadhpotofn(HeadPhoto){
- switch(this.imgtype){
- case 1:
- this.reg.LicenseCopy = HeadPhoto;
- break;
- case 2:
- this.reg.MerchantAuthorizationLetter = HeadPhoto;
- break;
- case 3:
- this.reg.IdCardCopy = HeadPhoto;
- break;
- case 4:
- this.reg.IdCardNational = HeadPhoto;
- break;
- case 5:
- this.Qualifications.push({url:showHost + HeadPhoto});
- break;
- case 6:
- this.StoreEntrancePic.push({url:showHost + HeadPhoto});
- this.reg.StoreEntrancePic = HeadPhoto;
- break;
- case 7:
- this.IndoorPic.push({url:showHost + HeadPhoto});
- this.reg.IndoorPic = HeadPhoto;
- break;
- }
- },
- formatter(type, val) {
- if (type === 'year') {
- return val + '年';
- }
- if (type === 'month') {
- return val + '月';
- }
- if (type === 'day') {
- return val + '日';
- }
- return val;
- },
- }
- });
- </script>
- </body>
- </html>
|