shop-info.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  1. <template>
  2. <view>
  3. <u-navbar title="店铺资料" :border-bottom="false"></u-navbar>
  4. <view v-show="!loading">
  5. <view class="title u-flex u-row-between u-col-center">
  6. <text v-if="step==1">请选择商家类型</text>
  7. <text v-else>完善商家资料</text>
  8. <text v-show="stepShow" @click="prevStep" class="u-font-24" style="color: #999">上一步</text>
  9. </view>
  10. <view class="card">
  11. <view class="margin-bottom-30" v-if="$isNotEmpty(failReason)">
  12. <u-alert-tips @close="failReason=null" type="error" :close-able="true" :show-icon="true"
  13. title="审核意见" :description="failReason"></u-alert-tips>
  14. </view>
  15. <u-form :model="form" :label-width="labelWidth" ref="uForm" :label-style="labelStyle">
  16. <view v-if="step==1" class="steps1" style="padding-bottom: 40rpx;">
  17. <view @click="clickType(1)" class="item u-border-bottom">
  18. <view class="flex">
  19. <view class="center">
  20. <image class="icon" src="../../static/icon/shop2.png" mode=""></image>
  21. </view>
  22. <view class="item-content">
  23. <text>小微商户</text>
  24. <text>小微商户,需提供店铺门头照及实景照,店主身份证件及银行账户</text>
  25. </view>
  26. </view>
  27. <view class="center">
  28. <image v-if="typeIndex==1" style="width: 40rpx;height: 40rpx;"
  29. src="../../static/icon/check.png" mode=""></image>
  30. <image v-else style="width: 40rpx;height: 40rpx;" src="../../static/icon/uncheck.png"
  31. mode=""></image>
  32. </view>
  33. </view>
  34. <view @click="clickType(0)" class="item ">
  35. <view class="flex">
  36. <view class="center">
  37. <image class="icon" src="../../static/icon/shop1.png" mode=""></image>
  38. </view>
  39. <view class="item-content">
  40. <text>企业商户/个体工商户</text>
  41. <text>企业商户,需提供营业执照,企业法人证件,企业对公结算银行账户,特殊行业还需提供生产经营许可证(例如:食品、化妆品、药品等)</text>
  42. </view>
  43. </view>
  44. <view class="center">
  45. <image v-if="typeIndex==0" style="width: 40rpx;height: 40rpx;"
  46. src="../../static/icon/check.png" mode=""></image>
  47. <image v-else style="width: 40rpx;height: 40rpx;" src="../../static/icon/uncheck.png"
  48. mode=""></image>
  49. </view>
  50. </view>
  51. </view>
  52. <view v-show="step==2">
  53. <view class="border">
  54. <u-form-item v-if="typeIndex==1" label="店铺全称" prop="name" label-position="top">
  55. <u-input :border="false" placeholder="比如:哈尔滨杨国福麻辣烫餐饮服务有限公司"
  56. v-model="auditForm.signName">
  57. </u-input>
  58. </u-form-item>
  59. </view>
  60. <view class="border">
  61. <u-form-item label="商户简称" prop="name">
  62. <u-input :border="false" placeholder="比如:杨国福麻辣烫(时尚天河2店)" v-model="form.name"></u-input>
  63. </u-form-item>
  64. </view>
  65. <view class="border">
  66. <u-form-item label="商户联系人手机号" prop="personTel" label-width="250">
  67. <u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number">
  68. </u-input>
  69. </u-form-item>
  70. </view>
  71. <view class="border">
  72. <u-form-item label="所在商场" prop="phone">
  73. <u-input @click="mallShow=true" :select-open="mallShow" :border="false"
  74. placeholder="请选择所在商场(非必填项)" v-model="mallLabel" type="select"></u-input>
  75. <u-icon class="clear" color="#999" v-if="mallLabel" name="close-circle-fill"
  76. @click.stop="clear('mallLabel')"></u-icon>
  77. </u-form-item>
  78. </view>
  79. <view class="border">
  80. <u-form-item label="商户联系人邮箱" prop="email" label-width="240">
  81. <u-input :border="false" placeholder="请输入商户联系人邮箱" v-model="form.email"></u-input>
  82. </u-form-item>
  83. </view>
  84. <view class="border" v-if="form.mallId&&!$isEmpty(mallAreaList)">
  85. <u-form-item label="所在区域" prop="phone">
  86. <u-input @click="mallAreaShow=true" :border="false" placeholder="请选择所在区域"
  87. v-model="mallAreaLabel" type="select"></u-input>
  88. <u-icon class="clear" color="#999" v-if="mallAreaLabel" name="close-circle-fill"
  89. @click.stop="clear('mallAreaLabel')"></u-icon>
  90. </u-form-item>
  91. </view>
  92. <view class="border">
  93. <u-form-item label="店铺标语" prop="name">
  94. <u-input :border="false" placeholder="请输入店铺标语(非必填项)" v-model="form.slogan"></u-input>
  95. </u-form-item>
  96. </view>
  97. <view class="border">
  98. <u-form-item label-width="200" label="公司种类" left-icon="grid">
  99. <view class="flex justify-between " @click="chooseLabel">
  100. <view class="u-flex u-flex-wrap">
  101. <text v-if="form.labelKey" class="text-cut-1">{{form.labelKey}}</text>
  102. <text v-else style="color: #c0c4cc;">请选择</text>
  103. </view>
  104. <view>
  105. <u-icon name="arrow-right" color="#737373"></u-icon>
  106. </view>
  107. </view>
  108. </u-form-item>
  109. </view>
  110. <view class="border">
  111. <u-form-item label="所在地区" prop="address">
  112. <u-input :disabled="true" :border="false" placeholder="请选择所在地区" @click="regionShow=true"
  113. v-model="form.location"></u-input>
  114. </u-form-item>
  115. </view>
  116. <view class="border">
  117. <u-form-item label="具体地址" label-position="top" prop="address">
  118. <u-input :border="false" disabled placeholder="请详细写到门店编号" v-model="form.address"></u-input>
  119. <view slot="right">
  120. <u-button @click="chooseAddress" size="mini">获取地址</u-button>
  121. </view>
  122. </u-form-item>
  123. </view>
  124. <view class="border">
  125. <view style="padding: 30rpx 0 10rpx;">
  126. <text :style="{'color':'#6d6d6d'}">店铺封面</text>
  127. <text style="font-size: 24rpx;color: #999999;">(请上传店铺封面)</text>
  128. <mp-upload-img style="height: 120rpx;" ref="mpUploadCover" @click='uploadShopCover'
  129. col="4" :count="1"></mp-upload-img>
  130. </view>
  131. </view>
  132. <view class="border">
  133. <view style="padding: 30rpx 0 10rpx;">
  134. <text :style="{'color':'#6d6d6d'}">店铺实况</text>
  135. <text style="font-size: 24rpx;color: #999999;">(请依次上传门头、店内照片)</text>
  136. <mp-upload-img ref="mpUploadImg" @click='uploadShopPics' :count="2" col="4">
  137. </mp-upload-img>
  138. </view>
  139. </view>
  140. </view>
  141. <view v-show="merchantSubjectShow">
  142. <view class="border">
  143. <u-form-item label="上传营业执照" prop="businessLicense" label-position="top" label-width="180">
  144. <upload-img title="请上传营业执照" @click="chooseBizilicense"
  145. :model="auditForm.businessLicense" dataName="businessLicense"></upload-img>
  146. </u-form-item>
  147. </view>
  148. <view class="border">
  149. <u-form-item label="公司主体" prop="entity" label-width="210">
  150. <u-input :border="false" placeholder="请输入公司主体" v-model="auditForm.entity">
  151. </u-input>
  152. </u-form-item>
  153. </view>
  154. <view class="border">
  155. <u-form-item label="营业执照编号" prop="licenceNo" label-width="210">
  156. <u-input :border="false" placeholder="请填写营业执照编号" v-model="auditForm.licenceNo">
  157. </u-input>
  158. </u-form-item>
  159. </view>
  160. <view class="border">
  161. <u-form-item label="开户许可证编号" prop="licenceNo" label-width="210">
  162. <u-input :border="false" placeholder="请填写开户许可证编号"
  163. v-model="auditForm.openAccountLicenceNo">
  164. </u-input>
  165. </u-form-item>
  166. <u-form-item label="开户许可证照片" prop="openAccountLicenceUrl" label-position="top">
  167. <upload-img title="请上传开户许可证照片" @click="chooseImageAudit"
  168. :model="auditForm.openAccountLicenceUrl" dataName="openAccountLicenceUrl">
  169. </upload-img>
  170. </u-form-item>
  171. </view>
  172. <view class="border">
  173. <u-form-item label="手持营业执照在经营场所的照片" prop="handLicenceUrl" label-position="top">
  174. <upload-img title="请上传手持营业执照在经营场所的照片" @click="chooseImageAudit"
  175. :model="auditForm.handLicenceUrl" dataName="handLicenceUrl"></upload-img>
  176. </u-form-item>
  177. </view>
  178. </view>
  179. <view v-show="merchantCorporationShow">
  180. <view class="photo border">
  181. <text>请拿出商户法人有效二代身份证件准备拍摄</text>
  182. <view class="box">
  183. <ocr-navigator @onSuccess="idCardSuccess" certificateType="idCard" :opposite="false">
  184. <upload-img :width="520" :height="300" title="上传人像面照片"
  185. :model="auditForm.idCardFront" dataName="idCardFront" :enableImg="true">
  186. </upload-img>
  187. </ocr-navigator>
  188. </view>
  189. <view class="box" style="margin-top: 0;">
  190. <ocr-navigator @onSuccess="idCardSuccess" certificateType="idCard" :opposite="true">
  191. <upload-img :width="520" :height="300" title="上传国徽面照片"
  192. :model="auditForm.idCardContrary" dataName="idCardContrary" :enableImg="true"
  193. :bgImg="idCardContraryBgImg"></upload-img>
  194. </ocr-navigator>
  195. </view>
  196. <view style="margin: 30rpx 0;" class="tips">
  197. <text>拍摄时确保身份证边框完整,字体清晰,亮度均匀</text>
  198. </view>
  199. </view>
  200. <view class="border">
  201. <u-form-item label="商户法人姓名" prop="legalPerson" label-width="230">
  202. <u-input :border="false" placeholder="请输入公司法人姓名" v-model="auditForm.legalPerson">
  203. </u-input>
  204. </u-form-item>
  205. </view>
  206. <view class="border" v-if="typeIndex==1">
  207. <u-form-item label="商户法人手机号" prop="mobile" label-width="230">
  208. <u-input :border="false" placeholder="请输入商户法人手机号" v-model="auditForm.contactMobile">
  209. </u-input>
  210. </u-form-item>
  211. </view>
  212. <view class="border">
  213. <u-form-item label="商户法人身份证号码" prop="personIdCard" label-position="top">
  214. <u-input :border="false" placeholder="请输入商户法人身份证号码" v-model="auditForm.idCard">
  215. </u-input>
  216. </u-form-item>
  217. </view>
  218. <view class="border" v-if="typeIndex==0">
  219. <u-form-item label="商户联系人姓名" prop="personName" label-width="230">
  220. <u-input :disabled="isEdit" :border="false" placeholder="商户联系人姓名"
  221. v-model="form.personName">
  222. </u-input>
  223. </u-form-item>
  224. </view>
  225. <view class="border" v-if="typeIndex==0">
  226. <u-form-item label="商户联系人身份证号" prop="email" label-position="top">
  227. <u-input :border="false" placeholder="请输入商户联系人身份证号"
  228. v-model="auditForm.contactLicenceNo">
  229. </u-input>
  230. </u-form-item>
  231. </view>
  232. </view>
  233. <view v-show="settlementAccountShow" style="padding-bottom: 40rpx;">
  234. <view class="">
  235. <u-form-item :request="true" label="请填写结算银行账户号码" prop="bankCardNo" label-position="top">
  236. <u-input :border="false" placeholder="请填写结算银行账户号码" v-model="auditForm.bankCardNo">
  237. </u-input>
  238. <ocr-navigator slot="right" hover-class="none" @onSuccess="bankSuccess"
  239. certificateType="bankCard">
  240. <u-icon name="scan" size="42"></u-icon>
  241. </ocr-navigator>
  242. </u-form-item>
  243. <u-form-item :request="true" label="银行类型" label-position="top">
  244. <u-input :border="false" :select-open="bankCodeShow" type="select" placeholder="请选择银行类型"
  245. v-model="auditForm.bankCodeLabel" @click="bankCodeShow = true" />
  246. </u-form-item>
  247. <u-form-item :request="true" label="账户类型" label-position="top">
  248. <!-- <u-input type="select" placeholder="请选银行择账户类型" v-model="auditForm.bankAccountTypeLabel" @click="bankAccountTypeShow = true"/> -->
  249. <u-input :border="false" disabled placeholder="请选银行择账户类型"
  250. v-model="auditForm.bankAccountTypeLabel" />
  251. </u-form-item>
  252. </view>
  253. </view>
  254. </u-form>
  255. </view>
  256. <view v-if="step<totalStep" class="center flex-direction" style="margin: 100rpx 0 ;">
  257. <view @click="nextStep" class="btn cu-btn round" style="width:90%;height: 90rpx;font-size: 34rpx;">
  258. 下一步
  259. </view>
  260. </view>
  261. <view v-else class="center flex-direction margin-bottom-30" style="margin-top: 100rpx;">
  262. <view v-if="!isEdit" class=" margin-bottom-20 text-sm center ">
  263. <text style="color: #949494;">确认注册即代表已阅读并同意</text>
  264. <text style="color: #104DFF;" @click="protocol">《联兑通软件服务协议》</text>
  265. </view>
  266. <view @click="submit" class="btn cu-btn round" style="width:90%;height: 90rpx;font-size: 34rpx;">
  267. 提交资料
  268. </view>
  269. </view>
  270. </view>
  271. <!-- 商场 -->
  272. <u-popup border-radius="8" height="60%" mode="bottom" v-model="mallShow">
  273. <view class="fixed cu-bar search bg-white">
  274. <view class="search-form radius">
  275. <text class="cuIcon-search"></text>
  276. <u-input style="width: 90%;" v-model="mallKeyWord" type="text" :adjust-position="false"
  277. placeholder="请输入关键字搜索" confirm-type="search" />
  278. </view>
  279. </view>
  280. <scroll-view v-if="!$isEmpty(mallList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true">
  281. <view @click="selectMall(item)" hover-class="hoverClass"
  282. :class="{'solid-bottom':mallList.length!=(index+1)} " class="text-center padding-30"
  283. v-for="(item,index) in mallList" :key="index">
  284. <text>{{item.mallName}}</text>
  285. </view>
  286. <u-divider fontSize="24" v-if="mallList.length>=8" height="80">只显示8条数据,其余数据请搜索</u-divider>
  287. </scroll-view>
  288. <u-empty v-else name="search"></u-empty>
  289. </u-popup>
  290. <u-popup border-radius="8" height="60%" mode="bottom" v-model="bankCodeShow">
  291. <view class="fixed cu-bar search bg-white">
  292. <view class="search-form radius">
  293. <text class="cuIcon-search"></text>
  294. <u-input style="width: 100%;" v-model="bankKeyword" type="text" :adjust-position="false"
  295. placeholder="请输入关键字搜索" confirm-type="search" />
  296. </view>
  297. </view>
  298. <scroll-view v-if="!$isEmpty(bankCodeList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true">
  299. <view @click="bankTypeConfirm(item)" hover-class="hoverClass"
  300. :class="{'solid-bottom':bankCodeList.length!=(index+1)} " class="item text-center padding-30 "
  301. v-for="(item,index) in bankCodeList" :key="index">
  302. <text>{{item.label}}</text>
  303. </view>
  304. <u-divider fontSize="24" v-if="bankCodeList.length>=8" height="80">只显示8条数据,其余数据请搜索</u-divider>
  305. </scroll-view>
  306. <u-empty v-else name="search"></u-empty>
  307. </u-popup>
  308. <u-select confirm-color="#EF9944" v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column"
  309. :list="mallAreaList" @confirm="mallAreaConfirm"></u-select>
  310. <!-- 地区 -->
  311. <!-- <u-picker confirm-color="#EF9944" @confirm="regionConfirm" v-model="regionShow" mode="region"></u-picker> -->
  312. <city-select :defaultRegion="defaultRegion" v-model="regionShow" @city-change="regionConfirm"></city-select>
  313. <!-- <u-select v-model="bankCodeShow" :list="bankCodeList" @confirm="bankTypeConfirm"></u-select> -->
  314. <u-select confirm-color="#EF9944" v-model="bankAccountTypeShow" :list="bankAccountTypeList"
  315. @confirm="bankAccountTypeConfirm">
  316. </u-select>
  317. <toast ref="toast"></toast>
  318. <loading ref="loading" type="3" />
  319. </view>
  320. </template>
  321. <script>
  322. import citySelect from './u-city-select.vue';
  323. import mpUploadImg from "@/components/mp-uploadImg/mp-uploadImg.vue"
  324. import uploadImg from "@/components/uploadimg/uploadImg.vue"
  325. export default {
  326. components: {
  327. citySelect,
  328. uploadImg,
  329. mpUploadImg
  330. },
  331. computed: {
  332. stepShow: {
  333. get() {
  334. if (this.isEdit) {
  335. if (this.step <= this.totalStep && this.step != 2) {
  336. return true
  337. }
  338. return false
  339. }
  340. if (this.step <= this.totalStep && this.step != 1) {
  341. return true
  342. } else {
  343. return false
  344. }
  345. }
  346. },
  347. settlementAccountShow: {
  348. get() {
  349. if (!this.needBankInfo) {
  350. return false
  351. }
  352. if (this.typeIndex == 0 && this.step == 5) {
  353. return true
  354. }
  355. if (this.typeIndex == 1 && this.step == 4) {
  356. return true
  357. }
  358. return false
  359. }
  360. },
  361. merchantCorporationShow: {
  362. get() {
  363. if (this.typeIndex == 0 && this.step == 4) {
  364. return true
  365. }
  366. if (this.typeIndex == 1 && this.step == 3) {
  367. return true
  368. }
  369. return false
  370. }
  371. },
  372. merchantSubjectShow: {
  373. get() {
  374. if (this.typeIndex == 0 && this.step == 3) {
  375. return true
  376. }
  377. return false
  378. }
  379. },
  380. },
  381. data() {
  382. return {
  383. labelStyle:{'color':'#6d6d6d'},
  384. loading: true,
  385. typeIndex: 1,
  386. //银行类型
  387. bankKeyword: '',
  388. bankCodeShow: false,
  389. bankCodeList: [],
  390. //账户类型
  391. bankAccountTypeShow: false,
  392. bankAccountTypeList: [],
  393. //身份证正面背景图
  394. idCardContraryBgImg: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/525724b4977d457eafea331f8595a675-6MM5CLdbBt1z7042ac12465719c764f2ca05a37ffee9.png',
  395. //上传图片
  396. imgList: [],
  397. title: '',
  398. labelWidth: 170,
  399. form: {
  400. /**
  401. * 主键
  402. */
  403. id: "",
  404. /**
  405. * 商户名称
  406. */
  407. name: "",
  408. /**
  409. * 代理人
  410. */
  411. agenter: "",
  412. /**
  413. * 代理人头像
  414. */
  415. agentAvatar: "",
  416. /**
  417. * 代理人姓名
  418. */
  419. agentName: "",
  420. /**
  421. * 商场id
  422. */
  423. mallId: "",
  424. /**
  425. * 商场label
  426. */
  427. mallLabel: "",
  428. /**
  429. * 负责人
  430. */
  431. personName: "",
  432. /**
  433. * 联系方式
  434. */
  435. personTel: "",
  436. /**
  437. * 区域编码
  438. */
  439. locationCode: "",
  440. /**
  441. * 所在地区
  442. */
  443. location: "",
  444. /**
  445. * 商户封面
  446. */
  447. cover: "",
  448. /**
  449. * 商户logo
  450. */
  451. logo: "",
  452. /**
  453. * 父标签ids,逗号分割
  454. */
  455. labelParentIds: "",
  456. /**
  457. * 商户标签json字符串
  458. */
  459. labelJson: "",
  460. /**
  461. * 商户标签key
  462. */
  463. labelKey: "",
  464. /**
  465. * 店铺图片
  466. */
  467. shopPic: "",
  468. /**
  469. * 邮箱
  470. */
  471. email: "",
  472. /**
  473. * 标语,逗号分割
  474. */
  475. slogan: "",
  476. /**
  477. * 审核状态
  478. */
  479. auditStatus: "",
  480. /**
  481. * 审核意见
  482. */
  483. auditAdvice: "",
  484. /**
  485. * 经度
  486. */
  487. longitude: "",
  488. /**
  489. * 纬度
  490. */
  491. latitude: "",
  492. /**
  493. * 详细地址
  494. */
  495. address: "",
  496. /**
  497. * 易宝商户编号
  498. */
  499. merchantNo: "",
  500. /**
  501. * openId
  502. */
  503. openId: "",
  504. },
  505. //审核表单
  506. auditForm: {
  507. /**
  508. * 主键
  509. */
  510. id: "",
  511. /**
  512. * 流程定义主键
  513. */
  514. processDefinitionId: "",
  515. /**
  516. * 流程实例主键
  517. */
  518. processInstanceId: "",
  519. /**
  520. * 主体信息
  521. */
  522. entity: "",
  523. /**
  524. * 商场或商店ID
  525. */
  526. entityId: "",
  527. /**
  528. * 身份证号
  529. */
  530. idCard: "",
  531. /**
  532. * 商户名称
  533. */
  534. shopName: "",
  535. /**
  536. * 商户logo
  537. */
  538. shopLogo: "",
  539. /**
  540. * 审核状态
  541. */
  542. auditStatus: "",
  543. /**
  544. * 商户申请号
  545. */
  546. requestNo: "",
  547. /**
  548. * 入网商户的业务角色
  549. */
  550. businessRole: "",
  551. /**
  552. * 商户签约类型
  553. */
  554. signType: "ENTERPRISE",
  555. /**
  556. * 企业名称【商户全称】
  557. */
  558. enterpriseName: "",
  559. /**
  560. * 组成形式
  561. */
  562. typeOfOrganization: "",
  563. /**
  564. * 企业类型
  565. */
  566. typeOfEnterprise: "MINICRO",
  567. /**
  568. * 经营范围
  569. */
  570. businessScope: "",
  571. /**
  572. * 注册资本
  573. */
  574. registeredCapital: "",
  575. /**
  576. * 实收资本
  577. */
  578. paidInCapital: "",
  579. /**
  580. * 营业期限
  581. */
  582. validPeriod: "",
  583. /**
  584. * 成立日期
  585. */
  586. registeredDate: "",
  587. /**
  588. * 注册号
  589. */
  590. regNum: "",
  591. /**
  592. * 商户证件编号
  593. */
  594. licenceNo: "",
  595. /**
  596. * 营业执照【易宝:商户证件照片】
  597. */
  598. businessLicense: "",
  599. /**
  600. * 商户签约名称
  601. */
  602. signName: "",
  603. /**
  604. * 商户简称
  605. */
  606. shortName: "",
  607. /**
  608. * 开户许可证编号
  609. */
  610. openAccountLicenceNo: "",
  611. /**
  612. * 开户许可证照片
  613. */
  614. openAccountLicenceUrl: "",
  615. /**
  616. * 手持营业执照在经营场所的照片
  617. */
  618. handLicenceUrl: "",
  619. /**
  620. * 法人姓名【legalName】
  621. */
  622. legalPerson: "",
  623. /**
  624. * 法人证件类型
  625. */
  626. legalLicenceType: "ID_CARD",
  627. /**
  628. * 法人证件号码
  629. */
  630. legalLicenceNo: "",
  631. /**
  632. * 身份证-正面【legalLicenceFrontUrl】
  633. */
  634. idCardFront: "",
  635. /**
  636. * 身份证-反面【legalLicenceBackUrl】
  637. */
  638. idCardContrary: "",
  639. /**
  640. * 性别
  641. */
  642. gender: "",
  643. /**
  644. * 住址
  645. */
  646. addr: "",
  647. /**
  648. * 民族
  649. */
  650. nationality: "",
  651. /**
  652. * 有效日期
  653. */
  654. validDate: "",
  655. /**
  656. * 商户联系人姓名
  657. */
  658. contactName: "",
  659. /**
  660. * 商户联系人证件号码
  661. */
  662. contactLicenceNo: "",
  663. /**
  664. * 商户联系人手机号
  665. */
  666. contactMobile: "",
  667. /**
  668. * 商户联系人邮箱
  669. */
  670. contactEmail: "",
  671. /**
  672. * 客服电话
  673. */
  674. servicePhone: "",
  675. /**
  676. * 商户实际经营地所在省
  677. */
  678. province: "",
  679. /**
  680. * 商户实际经营地所在市
  681. */
  682. city: "",
  683. /**
  684. * 商户实际经营地所在区
  685. */
  686. district: "",
  687. /**
  688. * 商户实际经营详细地址
  689. */
  690. address: "",
  691. /**
  692. * 结算方向
  693. */
  694. settlementDirection: "",
  695. /**
  696. * 银行账户类型
  697. */
  698. bankAccountType: "",
  699. /**
  700. * 银行账户类型label
  701. */
  702. bankAccountTypeLabel: "",
  703. /**
  704. * 银行账户号码
  705. */
  706. bankCardNo: "",
  707. /**
  708. * 银行账户开户总行编码
  709. */
  710. bankCode: "",
  711. /**
  712. * 银行账户开户总行编码label
  713. */
  714. bankCodeLabel: "",
  715. /**
  716. * 注册地址
  717. */
  718. officeAddress: ""
  719. },
  720. //OCR营业执照
  721. OCRBizilicenseInfo: {},
  722. //OCR身份证
  723. OCRBiziIdCardInfo: {},
  724. //商场
  725. mallShow: false,
  726. mallKeyWord: '',
  727. mallList: [],
  728. mallLabel: '',
  729. //区域
  730. mallAreaShow: false,
  731. mallAreaList: [],
  732. mallAreaLabel: '',
  733. //所在地区
  734. regionShow: false,
  735. defaultRegion: [],
  736. //门店地址
  737. shopAddress: '',
  738. step: 1,
  739. totalStep: 4,
  740. needBankInfo: true,
  741. //编辑还是修改
  742. isEdit: false,
  743. //审核失败,重新申请
  744. isFail: false,
  745. shopId: "",
  746. flowDetail: {},
  747. failReason: "",
  748. flowList: []
  749. }
  750. },
  751. watch: {
  752. mallKeyWord() {
  753. let that = this
  754. //节流函数
  755. if (this.timer) {
  756. clearTimeout(this.timer)
  757. }
  758. this.timer = setTimeout(() => {
  759. this.mallList = []
  760. that.fetchMallList()
  761. }, 500)
  762. },
  763. bankKeyword() {
  764. console.log("1111");
  765. let that = this
  766. //节流函数
  767. if (this.timer) {
  768. clearTimeout(this.timer)
  769. }
  770. this.timer = setTimeout(() => {
  771. this.bankCodeList = []
  772. that.getBankType()
  773. }, 500)
  774. },
  775. imgList() {
  776. if (!this.$isEmpty(this.imgList)) {
  777. this.form.shopPic = this.imgList.join(",")
  778. }
  779. },
  780. },
  781. onShow() {
  782. uni.hideLoading()
  783. },
  784. async onLoad(options) {
  785. this.$refs.loading.showLoading()
  786. this.form.personTel = this.$cache.get('phone')
  787. this.auditForm.contactMobile = this.form.personTel
  788. //监听从chooseLable页面返回的数据
  789. uni.$on('labelData', (labelData) => {
  790. this.form.labelJson = labelData.labelJson
  791. this.form.labelKey = labelData.labelKey
  792. this.form.labelParentIds = labelData.labelParentIds
  793. this.$forceUpdate()
  794. })
  795. if (options.edit) {
  796. //修改资料
  797. this.isEdit = true
  798. this.step = 2
  799. await this.fetchShopDetail(this.vuex_shopId)
  800. await this.fetchAuditDetail(this.vuex_shopId)
  801. } else if (options.isFail) {
  802. //审核失败,重新申请
  803. this.isFail = true
  804. this.shopId = options.shopId
  805. await this.fetchShopDetail(this.shopId)
  806. await this.fetchAuditDetail(this.shopId)
  807. } else {
  808. this.initCacheData()
  809. //新增数据时才跑流程
  810. this.getProcessDefinitionId()
  811. }
  812. await this.initDict()
  813. await this.fetchMallList( )
  814. this.$refs.loading.hide()
  815. this.loading=false
  816. },
  817. methods: {
  818. clickType(index) {
  819. this.typeIndex = index
  820. if (this.typeIndex == 0) {
  821. //企业
  822. this.auditForm.bankAccountType = 'PUBLIC_CARD'
  823. this.auditForm.bankAccountTypeLabel = '对公卡'
  824. }
  825. if (this.typeIndex == 1) {
  826. //小微企业
  827. this.auditForm.bankAccountType = 'DEBIT_CARD'
  828. this.auditForm.bankAccountTypeLabel = '借记卡'
  829. }
  830. },
  831. async getHistoryFlowList() {
  832. let processInstanceId = this.auditForm.processInstanceId
  833. this.flowList = (await this.$api.flow.historyFlowList({
  834. processInstanceId
  835. })).data
  836. let failList = this.flowList.filter(item => !item.pass && item.comment)
  837. if (this.$isNotEmpty(failList)) {
  838. let index = failList.length - 1
  839. this.failReason = failList[index].comment
  840. }
  841. },
  842. getTaskId() {
  843. let params = {
  844. assignee: '$INITIATOR',
  845. processInstanceId: this.auditForm.processInstanceId
  846. }
  847. this.$api.flow.getTaskId(params).then(res => {
  848. this.flowDetail = res.data.records[0]
  849. })
  850. },
  851. initCacheData() {
  852. let shopAuditInfo = this.$cache.get('shopAuditInfo')
  853. if (shopAuditInfo) {
  854. this.form = shopAuditInfo.shop
  855. this.auditForm = shopAuditInfo.audit
  856. this.mallLabel = this.form.mallLabel
  857. this.imgList = this.$isNotEmpty(this.form.shopPic) ? this.form.shopPic.split(",") : []
  858. this.$refs.mpUploadCover.changeImgList([this.form.cover])
  859. this.$refs.mpUploadImg.changeImgList(this.imgList)
  860. }
  861. },
  862. async getOpenId() {
  863. if (this.$isEmpty(this.form.openId)) {
  864. let code = (await this.$mpi.wxLogin()).code
  865. let params = {
  866. code,
  867. type: "SHOP"
  868. }
  869. let res = await this.$api.wxApp.getOpenId(params)
  870. this.form.openId = res.data.openid
  871. }
  872. },
  873. //获取商户审核流程id
  874. getProcessDefinitionId() {
  875. let params = {
  876. category: 'flow_3',
  877. mode: 1
  878. }
  879. this.$api.flow.getProcessDefinitionId(params).then(res => {
  880. this.auditForm.processDefinitionId = res.data.records[0].id
  881. if (this.$isEmpty(this.auditForm.processDefinitionId)) {
  882. this.$dialog.showModalAndBack("系统错误,获取流程主键失败")
  883. return
  884. }
  885. })
  886. },
  887. //所在地区
  888. regionConfirm(e) {
  889. this.form.location = e.location
  890. this.form.locationCode = e.locationCode
  891. // this.form.location = e.province.label + "-" + e.city.label + "-" + e.area.label
  892. // this.form.locationCode = e.province.value + "0000," + e.city.value + "00," + e.area.value
  893. },
  894. //具体地址
  895. chooseAddress() {
  896. var _this = this
  897. uni.chooseLocation({
  898. success(res) {
  899. console.log(res);
  900. _this.form.address = res.address
  901. _this.form.longitude = res.longitude
  902. _this.form.latitude = res.latitude
  903. }
  904. })
  905. },
  906. //选择标签
  907. chooseLabel() {
  908. uni.navigateTo({
  909. url: "../chooseLable/chooseLable?label=" + this.form.labelJson
  910. })
  911. },
  912. uploadShopCover(data) {
  913. this.form.cover = data[0]
  914. this.$refs.mpUploadCover.changeImgList(data)
  915. },
  916. uploadShopPics(data) {
  917. this.imgList = data
  918. this.$refs.mpUploadImg.changeImgList(this.imgList)
  919. },
  920. bankSuccess(e) {
  921. console.log(e);
  922. this.auditForm.bankCardNo = e.detail.number.text
  923. },
  924. async chooseBank() {
  925. let image = (await this.$mpi.chooseImage())[0]
  926. this.$api.ocr.bank(image).then(res => {
  927. console.log(res);
  928. })
  929. console.log(res);
  930. },
  931. async fetchShopDetail(id) {
  932. let params = {
  933. id
  934. }
  935. let res = await this.$api.shop.detail(params)
  936. this.$util.objectCopy(this.form, res.data)
  937. if (this.$isNotEmpty(res.data.mallId) && res.data.mallId != -1) {
  938. this.mallLabel = (await this.$api.mall.detail({
  939. id: res.data.mallId
  940. })).data.mallName
  941. }
  942. console.log(this.form.location.split('-'));
  943. this.defaultRegion = this.form.location.split('-')
  944. this.imgList = this.$isNotEmpty(this.form.shopPic) ? this.form.shopPic.split(",") : []
  945. this.$refs.mpUploadCover.changeImgList([this.form.cover])
  946. this.$refs.mpUploadImg.changeImgList(this.imgList)
  947. },
  948. async fetchAuditDetail(id) {
  949. let params = {
  950. entityId: id
  951. }
  952. let res = await this.$api.audit.detail(params)
  953. this.$util.objectCopy(this.auditForm, res.data)
  954. if (this.isFail) {
  955. //获取流程历史
  956. this.getHistoryFlowList()
  957. this.getTaskId()
  958. }
  959. },
  960. prevStep() {
  961. this.step--
  962. },
  963. nextStep() {
  964. if (this.step == 1) {
  965. if (this.typeIndex == 0) {
  966. this.auditForm.typeOfEnterprise = 'ENTERPRISE'
  967. //企业
  968. if (this.needBankInfo) {
  969. this.totalStep = 5
  970. } else {
  971. this.totalStep = 4
  972. }
  973. }
  974. if (this.typeIndex == 1) {
  975. //小微企业
  976. this.auditForm.typeOfEnterprise = 'MINICRO'
  977. if (this.needBankInfo) {
  978. this.totalStep = 4
  979. } else {
  980. this.totalStep = 3
  981. }
  982. }
  983. }
  984. if (this.step == 2) {
  985. if (this.$isEmpty(this.auditForm.signName) && this.typeIndex == 1) {
  986. this.$refs.toast.info('请输入店铺全称')
  987. return
  988. }
  989. if (this.$isEmpty(this.form.name)) {
  990. this.$refs.toast.info('请输入店铺简称')
  991. return
  992. }
  993. if (this.$isEmpty(this.form.personTel)) {
  994. this.$refs.toast.info('请输入商户联系人手机号')
  995. return
  996. }
  997. if (this.$isEmpty(this.form.email)) {
  998. this.$refs.toast.info('请输入商户联系人邮箱')
  999. return
  1000. }
  1001. if (this.$isEmpty(this.form.labelKey)) {
  1002. this.$refs.toast.info('请选择公司种类')
  1003. return
  1004. }
  1005. if (this.$isEmpty(this.form.location)) {
  1006. this.$refs.toast.info('请选择所在地区')
  1007. return
  1008. }
  1009. if (this.$isEmpty(this.form.address)) {
  1010. this.$refs.toast.info('请选择具体地址')
  1011. return
  1012. }
  1013. if (this.$isEmpty(this.form.cover)) {
  1014. this.$refs.toast.info('请上传店铺封面')
  1015. return
  1016. }
  1017. if (this.$isEmpty(this.form.shopPic)) {
  1018. this.$refs.toast.info('请上传店铺实况')
  1019. return
  1020. }
  1021. if (this.imgList.length < 2) {
  1022. this.$refs.toast.info('请依次上传门头,店内照片')
  1023. return
  1024. }
  1025. }
  1026. if (this.step == 3 && this.typeIndex == 0) {
  1027. if (this.$isEmpty(this.auditForm.businessLicense)) {
  1028. this.$refs.toast.info('请上传营业执照')
  1029. return
  1030. }
  1031. if (this.$isEmpty(this.auditForm.openAccountLicenceNo)) {
  1032. this.$refs.toast.info('请填写开户许可证编号')
  1033. return
  1034. }
  1035. if (this.$isEmpty(this.auditForm.openAccountLicenceUrl)) {
  1036. this.$refs.toast.info('请上传开户许可证照片')
  1037. return
  1038. }
  1039. if (this.$isEmpty(this.auditForm.openAccountLicenceUrl)) {
  1040. this.$refs.toast.info('请上传手持营业执照在经营场所的照片')
  1041. return
  1042. }
  1043. }
  1044. if (this.step > 0 && this.step < this.totalStep) {
  1045. this.step++
  1046. }
  1047. },
  1048. clear(t) {
  1049. if (t == 'mallAreaLabel') {
  1050. this.mallAreaLabel = ''
  1051. } else if (t == 'mallLabel') {
  1052. this.mallLabel = ''
  1053. this.form.mallId = null
  1054. }
  1055. },
  1056. async chooseImageShop(name) {
  1057. let res = await this.$mpi.chooseImage()
  1058. this.$api.uploadFile(res[0]).then(res => {
  1059. this.form[name] = res.data.link
  1060. })
  1061. },
  1062. async chooseImageAudit(name) {
  1063. if (this.isEdit) {
  1064. this.$refs.toast.info('不可修改')
  1065. return
  1066. }
  1067. let res = await this.$mpi.chooseImage()
  1068. this.$api.uploadFile(res[0]).then(res => {
  1069. this.auditForm[name] = res.data.link
  1070. })
  1071. },
  1072. idCardSuccess(e) {
  1073. console.log(e, "e********");
  1074. let data = e.detail
  1075. console.log(data, "data******");
  1076. if (data.type == 0) {
  1077. //身份证正面
  1078. this.auditForm.addr = data.address.text
  1079. this.auditForm.gender = data.gender.text
  1080. this.auditForm.idCard = data.id.text
  1081. this.auditForm.nationality = data.nationality.text
  1082. this.auditForm.name = data.name.text
  1083. this.auditForm.legalPerson = data.name.text
  1084. this.form.personName = data.name.text
  1085. this.auditForm.contactLicenceNo = data.id.text
  1086. } else {
  1087. this.auditForm.validDate = data.valid_date.text
  1088. }
  1089. this.$api.uploadFile(data.image_path).then(res => {
  1090. if (data.type == 0) {
  1091. //正面
  1092. this.auditForm.idCardFront = res.data.link
  1093. } else {
  1094. //反面
  1095. this.auditForm.idCardContrary = res.data.link
  1096. }
  1097. })
  1098. },
  1099. async chooseIdCard(name) {
  1100. if (this.isEdit) {
  1101. this.$refs.toast.info('不可修改')
  1102. return
  1103. }
  1104. let image = (await this.$mpi.chooseImage())[0]
  1105. this.$dialog.showLoading('证件上传中...')
  1106. this.$api.ocr.idcard(image).then(res => {
  1107. if (res.data[0].errmsg != "ok") {
  1108. this.$refs.toast.error('非法证件照')
  1109. return
  1110. }
  1111. if (name == 'idCardFront') {
  1112. //上传身份证正面照解析数据
  1113. this.OCRBiziIdCardInfo = res.data[0]
  1114. this.OCRBiziIdCardInfo.idCard = this.OCRBiziIdCardInfo.id
  1115. //删除OCRBiziIdCardInfo 的id防止将id值覆盖调auditForm的id值
  1116. delete this.OCRBiziIdCardInfo.id
  1117. delete this.OCRBiziIdCardInfo.validDate
  1118. Object.assign(this.auditForm, this.OCRBiziIdCardInfo)
  1119. this.auditForm.legalPerson = this.OCRBiziIdCardInfo.name
  1120. this.form.personName = this.OCRBiziIdCardInfo.name
  1121. this.auditForm.contactLicenceNo = this.OCRBiziIdCardInfo.idCard
  1122. } else {
  1123. this.OCRBiziIdCardInfo.validDate = res.data[0].validDate
  1124. this.auditForm.validDate = res.data[0].validDate
  1125. }
  1126. this.auditForm[name] = res.data[1].link
  1127. uni.hideLoading()
  1128. }).catch(err => {
  1129. uni.hideLoading()
  1130. })
  1131. },
  1132. async chooseBizilicense() {
  1133. if (this.isEdit) {
  1134. this.$refs.toast.info('不可修改')
  1135. return
  1136. }
  1137. let image = (await this.$mpi.chooseImage())[0]
  1138. this.$dialog.showLoading('证件上传中...')
  1139. this.$api.ocr.bizilicense(image).then(res => {
  1140. if (res.data[0].errmsg != "ok") {
  1141. this.$refs.toast.error('非法证件照')
  1142. return
  1143. }
  1144. this.OCRBizilicenseInfo = res.data[0]
  1145. delete this.OCRBizilicenseInfo.typeOfEnterprise
  1146. Object.assign(this.auditForm, this.OCRBizilicenseInfo)
  1147. this.auditForm.businessLicense = res.data[1].link
  1148. this.auditForm.licenceNo = this.OCRBizilicenseInfo.serial
  1149. this.auditForm.officeAddress = this.OCRBizilicenseInfo.address
  1150. this.auditForm.entity = this.OCRBizilicenseInfo.enterpriseName
  1151. uni.hideLoading()
  1152. }).catch(err => {
  1153. uni.hideLoading()
  1154. })
  1155. },
  1156. async fetchMallList() {
  1157. let params = {
  1158. name: this.mallKeyWord,
  1159. auditStatus: 'PASS',
  1160. size: 20
  1161. }
  1162. let res = await this.$api.mall.list(params)
  1163. this.mallList = res.data.records
  1164. },
  1165. fetchMallAreaList() {
  1166. this.$api.mall.getMallAreaByMallId(this.form.mallId).then(res => {
  1167. this.mallAreaList = res.data
  1168. })
  1169. },
  1170. selectMall(item) {
  1171. this.mallLabel = item.mallName
  1172. this.form.mallId = item.id
  1173. this.form.mallLabel = this.mallLabel
  1174. this.mallShow = false
  1175. // this.fetchMallAreaList()
  1176. },
  1177. mallAreaConfirm(e) {
  1178. this.mallAreaLabel = e[0].label
  1179. this.form.mallAreaId = e[0].value
  1180. },
  1181. async submit() {
  1182. let _this = this
  1183. if (this.$isEmpty(this.auditForm.idCardFront)) {
  1184. this.$refs.toast.info('请上传身份证正面照')
  1185. return
  1186. }
  1187. if (this.$isEmpty(this.auditForm.idCardContrary)) {
  1188. this.$refs.toast.info('请上传身份证反面照')
  1189. return
  1190. }
  1191. if (this.$isEmpty(this.form.personName)) {
  1192. this.$refs.toast.info('请填写商户联系人姓名')
  1193. return
  1194. }
  1195. if (this.$isEmpty(this.auditForm.contactLicenceNo)) {
  1196. this.$refs.toast.info('请填写商户联系人身份证号')
  1197. return
  1198. }
  1199. if (this.$isEmpty(this.auditForm.bankCardNo)) {
  1200. this.$refs.toast.info('请填写结算银行账户号码')
  1201. return
  1202. }
  1203. if (this.$cache.get('promotionCode')) {
  1204. this.form.agenter = this.$cache.get('promotionCode')
  1205. }
  1206. this.$refs.loading.showLoading('资料提交中..')
  1207. this.initAuditInfo()
  1208. await this.getOpenId()
  1209. let params = {
  1210. shop: this.form,
  1211. audit: this.auditForm,
  1212. }
  1213. this.$cache.put('shopAuditInfo', params)
  1214. this.$api.shop.submitAudit(params).then(res => {
  1215. setTimeout(() => {
  1216. if (res.success == true) {
  1217. _this.$cache.remove('shopAuditInfo')
  1218. _this.doReSubmit()
  1219. _this.jump()
  1220. }
  1221. _this.$refs.loading.hide()
  1222. }, 300)
  1223. }).catch(err => {
  1224. setTimeout(() => {
  1225. _this.$refs.loading.hide()
  1226. }, 300)
  1227. })
  1228. },
  1229. jump() {
  1230. let jumpData = {
  1231. path: '/pages/index/index',
  1232. title: this.isEdit ? '资料修改成功' : '资料提交成功,请耐心等待审核'
  1233. }
  1234. uni.redirectTo({
  1235. url: '/pages/login/submit-success?params=' + JSON.stringify(jumpData)
  1236. })
  1237. },
  1238. protocol() {
  1239. uni.navigateTo({
  1240. url: "/pages/webView/webView?url=" + this.$global.shopRegister
  1241. })
  1242. },
  1243. doReSubmit() {
  1244. if (this.isFail) {
  1245. this.flowDetail.comment = '重新修改并提交'
  1246. this.flowDetail.flag = 'ok'
  1247. this.flowDetail.variables.pass = true
  1248. this.flowDetail.variables.applyPass = false
  1249. this.$api.flow.flowAuditSubmit(this.flowDetail)
  1250. }
  1251. },
  1252. //获取推荐人的信息
  1253. async initAgenterInfo() {
  1254. if (this.$cache.get('promotionCode')) {
  1255. let agenter = this.$cache.get('promotionCode')
  1256. let records = (await this.$api.loginUser.list({
  1257. id: agenter
  1258. })).data.records
  1259. let user = records[0]
  1260. this.form.agenter = this.$isNotEmpty(user) ? user.id : ""
  1261. this.form.agentAvatar = user.avatar
  1262. this.form.agentName = user.nickName
  1263. }
  1264. },
  1265. //经营地址
  1266. initAuditInfo() {
  1267. let locationCode = this.form.locationCode.split(",")
  1268. this.auditForm.province = locationCode[0],
  1269. this.auditForm.city = locationCode[1],
  1270. this.auditForm.district = locationCode[2],
  1271. this.auditForm.address = this.form.address
  1272. this.auditForm.contactEmail = this.form.email
  1273. this.auditForm.shopName = this.form.name
  1274. this.auditForm.shopLogo = this.form.cover
  1275. this.auditForm.contactMobile = this.form.personTel
  1276. this.auditForm.contactName = this.form.personName
  1277. this.auditForm.shortName = this.form.name
  1278. if (this.$isEmpty(this.auditForm.signName)) {
  1279. this.auditForm.signName = this.auditForm.enterpriseName
  1280. }
  1281. this.auditForm.legalLicenceNo = this.auditForm.idCard
  1282. },
  1283. //字典 begin
  1284. async initDict() {
  1285. await this.getBankType()
  1286. await this.getBankAccountType()
  1287. },
  1288. async getBankType() {
  1289. let params = {
  1290. code: 'bank_type',
  1291. size: 9
  1292. }
  1293. if (this.$isNotEmpty(this.bankKeyword)) {
  1294. params.keyword = this.bankKeyword
  1295. }
  1296. let res = await this.$api.dict.dictionaryPage(params)
  1297. let list = res.data.records
  1298. if (list[0].parentId == '0') {
  1299. list.shift()
  1300. }
  1301. list.forEach(item => {
  1302. let obj = {
  1303. label: JSON.parse(item.dictValue).name,
  1304. value: item.dictKey
  1305. }
  1306. this.bankCodeList.push(obj)
  1307. })
  1308. if (this.$isEmpty(this.auditForm.bankCodeLabel) && this.$isEmpty(this.auditForm.bankCode)) {
  1309. this.auditForm.bankCodeLabel = this.bankCodeList[0].label
  1310. this.auditForm.bankCode = this.bankCodeList[0].value
  1311. }
  1312. },
  1313. async getBankAccountType() {
  1314. let res = await this.$api.dict.list({
  1315. code: 'bank_account_type'
  1316. })
  1317. res.data.forEach(item => {
  1318. let obj = {
  1319. label: item.dictValue,
  1320. value: item.dictKey
  1321. }
  1322. this.bankAccountTypeList.push(obj)
  1323. this.auditForm.bankAccountType = this.bankAccountTypeList[0].value
  1324. this.auditForm.bankAccountTypeLabel = this.bankAccountTypeList[0].label
  1325. })
  1326. },
  1327. //字典 end
  1328. bankTypeConfirm(e) {
  1329. this.bankCodeShow = false
  1330. this.auditForm.bankCodeLabel = e.label
  1331. this.auditForm.bankCode = e.value
  1332. },
  1333. bankAccountTypeConfirm(e) {
  1334. this.auditForm.bankAccountTypeLabel = e[0].label
  1335. this.auditForm.bankAccountType = e[0].value
  1336. },
  1337. }
  1338. }
  1339. </script>
  1340. <style lang="scss" scoped>
  1341. .clear {
  1342. position: absolute;
  1343. right: 50rpx;
  1344. top: 50%;
  1345. transform: translateY(-50%);
  1346. z-index: 99;
  1347. }
  1348. .title {
  1349. padding: 30rpx 40rpx;
  1350. font-size: 34rpx;
  1351. color: #000;
  1352. font-weight: 800;
  1353. }
  1354. .bg {
  1355. height: 220rpx;
  1356. background-image: linear-gradient(#D18C42, #C99864);
  1357. border-radius: 0 0 30% 30%;
  1358. }
  1359. .btn {
  1360. background-color: #EF9944;
  1361. color: #FFFFFF;
  1362. }
  1363. .border {
  1364. // border-bottom: 1rpx solid #F4F4F4;
  1365. }
  1366. .tips {
  1367. color: $color;
  1368. text-align: right;
  1369. margin-top: 10rpx;
  1370. font-size: 22rpx;
  1371. }
  1372. .card {
  1373. background-color: #FFFFFF;
  1374. padding: 40rpx;
  1375. .photo {
  1376. font-size: 26rpx;
  1377. padding-top: 20rpx;
  1378. .box {
  1379. display: flex;
  1380. justify-content: center;
  1381. align-items: center;
  1382. margin-top: 30rpx;
  1383. }
  1384. }
  1385. }
  1386. .steps1 {
  1387. display: flex;
  1388. justify-content: flex-start;
  1389. flex-direction: column;
  1390. .item {
  1391. background-color: #FFFFFF;
  1392. display: flex;
  1393. width: 100%;
  1394. justify-content: space-between;
  1395. padding: 60rpx 0rpx;
  1396. border-radius: 30rpx;
  1397. .icon {
  1398. width: 120rpx;
  1399. height: 120rpx;
  1400. border-radius: 50%;
  1401. }
  1402. .item-content {
  1403. display: flex;
  1404. flex-direction: column;
  1405. width: 70%;
  1406. margin-left: 20rpx;
  1407. text:first-child {
  1408. color: #353535;
  1409. font-size: 32rpx;
  1410. font-weight: 800;
  1411. }
  1412. text:last-child {
  1413. margin-top: 20rpx;
  1414. color: #999999;
  1415. font-size: 26rpx;
  1416. }
  1417. }
  1418. }
  1419. }
  1420. .ocr-wrapper {
  1421. margin: 40rpx auto;
  1422. width: 375rpx;
  1423. }
  1424. .intro {
  1425. margin: 40rpx;
  1426. }
  1427. </style>