registerAndAudit.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#666666" @onlyLink='onlyLink'></navbar>
  4. <form @submit="nextStep">
  5. <!--企业信息-->
  6. <view v-if="step==0">
  7. <view class="u-flex u-bg-abc5b5 step-pd">
  8. <view>
  9. <text class="iconfont font68">&#xe696;</text>
  10. </view>
  11. <view class="u-ml45 u-00321E">
  12. <view class="u-font28 u-bold">第一步:企业信息</view>
  13. <view class="u-font22">共两步</view>
  14. </view>
  15. </view>
  16. <view class="bg-fff">
  17. <view class="u-plr30 pt14">
  18. <view>
  19. <text class="vertical-bar">|</text>
  20. <text class="u-ml10 u-font30 u-060606">企业信息</text>
  21. </view>
  22. <view>
  23. <view class="uni-form-item u-flex ">
  24. <view class="title u-font28 u-1A1A1A">
  25. <required-tag></required-tag>
  26. 企业名称
  27. </view>
  28. <input class="uni-input u-font26" maxlength="16" name="company_name" :value="dataform.company_name"
  29. placeholder="请输入企业名称" />
  30. </view>
  31. <view class="uni-form-item u-flex ">
  32. <view class="title u-font28 u-1A1A1A">统一信用代码</view>
  33. <input class="uni-input u-font26" maxlength='18' name="credit_code" :value="dataform.credit_code"
  34. placeholder="请输入统一信用代码" />
  35. </view>
  36. <view class="uni-form-item u-flex ">
  37. <view class="title u-font28 u-1A1A1A">经营范围</view>
  38. <input class="uni-input u-font26" maxlength='25' name="business_scope" :value="dataform.business_scope"
  39. placeholder="请输入经营范围" />
  40. </view>
  41. <!-- <picker class="pickerList" mode="multiSelector" :range="newProvinceDataList"
  42. range-key="label" :value="multiIndex" @change="enterprisePickerChange"
  43. @columnchange="enterprisePickerColumnchange">
  44. <view class="uni-form-item u-flex ">
  45. <view class="title u-font28 u-1A1A1A">所属地区</view>
  46. <view v-if="dataform.province != '' " class="uni-input u-font26">
  47. {{dataform.province}}
  48. </view>
  49. <view v-if="dataform.province == '' " class="uni-input u-999">请选择省市区</view>
  50. </view>
  51. </picker> -->
  52. <view class="uni-form-item u-flex" @click="openAreaSelect(1)">
  53. <view class="title u-font28 u-1A1A1A">
  54. <required-tag></required-tag>所属地区
  55. </view>
  56. <view v-if="dataform.province != '' " class="uni-input u-font26">
  57. {{dataform.province}}
  58. </view>
  59. <view v-if="dataform.province == '' " class="uni-input u-999">请选择省市区</view>
  60. </view>
  61. <view class="uni-form-item u-flex ">
  62. <view class="title u-font28 u-1A1A1A">详细地址</view>
  63. <input class="uni-input u-font26" maxlength='25' name="company_address"
  64. :value="dataform.company_address" placeholder="详细地址" />
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <!--法人信息-->
  70. <view class="bg-fff u-mt10">
  71. <view class="u-plr30 pt14">
  72. <view>
  73. <text class="vertical-bar">|</text>
  74. <text class="u-ml10 u-font30 u-060606">法人信息</text>
  75. </view>
  76. <view>
  77. <view class="uni-form-item u-flex ">
  78. <view class="title u-font28 u-1A1A1A">
  79. <required-tag></required-tag>法人姓名
  80. </view>
  81. <input class="uni-input u-font26" maxlength='5' name="legal_representative"
  82. :value="dataform.legal_representative" placeholder="请输入法人姓名" />
  83. </view>
  84. <view class="uni-form-item u-flex-center-sb ">
  85. <view class="title u-font28 u-1A1A1A">证件类型</view>
  86. <view>
  87. <label class="radio" @click="radio(0)">
  88. <radio value="0" style="transform:scale(0.7)" :checked="dataform.id_type==0" />
  89. 身份证
  90. </label>
  91. <label class="radio u-ml20" @click="radio(1)">
  92. <radio value="1" style="transform:scale(0.7)" :checked="dataform.id_type==1" />
  93. 护照
  94. </label>
  95. </view>
  96. </view>
  97. <view class="uni-form-item u-flex ">
  98. <view class="title u-font28 u-1A1A1A">证件号码</view>
  99. <input class="uni-input u-font26" maxlength="18" name="id_number" :value="dataform.id_number"
  100. placeholder="请输入证件号码" />
  101. </view>
  102. <view class="uni-form-item u-flex ">
  103. <view class="title u-font28 u-1A1A1A">
  104. <required-tag></required-tag>法人手机号
  105. </view>
  106. <input class="uni-input u-font26" type="number" name="lr_mobile" maxlength="11"
  107. :value="dataform.lr_mobile" placeholder="请输入法人手机号" />
  108. </view>
  109. <view class="uni-form-item u-flex ">
  110. <view class="title u-font28 u-1A1A1A">法人邮箱</view>
  111. <input class="uni-input u-font26" maxlength='20' name="lr_email" :value="dataform.lr_email"
  112. placeholder="请输入法人邮箱" />
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <!--上传图片-->
  118. <view class="bg-fff u-mt10">
  119. <view class="u-plr30">
  120. <view class="pt30">
  121. <text class="vertical-bar">|</text>
  122. <text class="u-ml10 u-font30 u-060606">上传附件</text>
  123. </view>
  124. <view class="u-mt20">
  125. <view class="">
  126. <text>营业执照</text>
  127. <!-- <text class="u-ml10">查看示例图</text> -->
  128. </view>
  129. <view class="u-mt25">
  130. <uploadImg imgCount="2" uploadImgCount="2" :imgArr="business_license_images" :type="upimgtype" url=""
  131. @result="resultUrlthree"></uploadImg>
  132. </view>
  133. </view>
  134. <view class="u-mt20">
  135. <view class="">
  136. <text>法人申请身份证</text>
  137. <!-- <text class="u-ml10 u-6087F2">查看示例图(需传身份证正反两面)</text> -->
  138. </view>
  139. <view class="u-mt25">
  140. <uploadImg imgCount="2" uploadImgCount="2" :imgArr="identty_images" :type="upimgtype" url=""
  141. @result="resultUrlone"></uploadImg>
  142. </view>
  143. </view>
  144. <view class="btn" v-if="dataform.audit_status !=0">
  145. <button class="u-btn" v-if="step==0" form-type="submit">填写店铺信息</button>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </form>
  151. <form @submit="formSubmit">
  152. <!-- v-if="step==1" -->
  153. <view v-if="step==1">
  154. <view class="u-flex u-bg-abc5b5 step-pd">
  155. <view>
  156. <text class="iconfont font68">&#xe63b;</text>
  157. </view>
  158. <view class="u-ml45 u-00321E">
  159. <view class="u-font28 u-bold">第二步:店铺信息</view>
  160. <view class="u-font22">共两步</view>
  161. </view>
  162. </view>
  163. <!--门店信息-->
  164. <view class="bg-fff">
  165. <view class="u-plr30">
  166. <view class="pt30">
  167. <text class="vertical-bar">|</text>
  168. <text class="u-ml10 u-font30 u-060606">店铺信息 <text class="u-999">(审核失败后可修改)</text></text>
  169. </view>
  170. <view>
  171. <view class="uni-form-item u-flex ">
  172. <view class="title u-font28 u-1A1A1A">
  173. <required-tag></required-tag>店铺名称
  174. </view>
  175. <input class="uni-input u-font26" maxlength='16' name="shop_name" :value="dataform.shop_name"
  176. placeholder="请输入店铺名称" />
  177. </view>
  178. <!-- <picker class="pickerList" mode="multiSelector" :range="newProvinceDataList"
  179. range-key="label" :value="multiIndex" @change="pickerChange"
  180. @columnchange="pickerColumnchange">
  181. <view class="uni-form-item u-flex ">
  182. <view class="title u-font28 u-1A1A1A">所属地区</view>
  183. <view class="uni-input u-font26" v-if="dataform.province_name != '' ">
  184. {{dataform.province_name}}{{dataform.city_name}}{{dataform.area_name}}
  185. </view>
  186. <view v-if="dataform.province_name == '' " class="uni-input u-999">请选择省市区</view>
  187. </view>
  188. </picker> -->
  189. <view class="uni-form-item u-flex" @click="openAreaSelect(2)">
  190. <view class="title u-font28 u-1A1A1A">
  191. <required-tag></required-tag>所属地区
  192. </view>
  193. <view class="uni-input u-font26" v-if="dataform.province_name != '' ">
  194. {{dataform.province_name}}{{dataform.city_name}}{{dataform.area_name}}
  195. </view>
  196. <view v-if="dataform.province_name == '' " class="uni-input u-999">请选择省市区</view>
  197. </view>
  198. <!-- <view class="uni-form-item u-flex " @click="streetChange">
  199. <view class="title u-font28 u-1A1A1A">所属街道</view>
  200. <view v-if="dataform.street_name " class="uni-input u-font26">{{dataform.street_name}}
  201. </view>
  202. <view v-else class="uni-input u-999">请选择街道</view>
  203. </view>
  204. <view class="uni-form-item u-flex " @click="communityChange">
  205. <view class="title u-font28 u-1A1A1A">所属社区</view>
  206. <view v-if="dataform.community_code" class="uni-input u-font26">
  207. {{dataform.community_name}}
  208. </view>
  209. <view v-else class="uni-input u-999">请选择社区</view>
  210. </view> -->
  211. <view class="uni-form-item u-flex ">
  212. <view class="title u-font28 u-1A1A1A">详细地址</view>
  213. <input class="uni-input u-font26" maxlength='20' name="address" :value="dataform.address" type="button"
  214. placeholder="详细地址" />
  215. </view>
  216. <view class="uni-form-item u-flex-center-sb " @click="goMap">
  217. <view class="title u-font28 u-1A1A1A">店铺地图选址</view>
  218. <view class="iconfont" v-if="showSelected==false">&#xe6db;</view>
  219. <view v-if="showSelected==true">已选</view>
  220. </view>
  221. <view class="uni-form-item u-flex ">
  222. <view class="title u-font28 u-1A1A1A">
  223. <required-tag></required-tag>客服电话
  224. </view>
  225. <input class="uni-input u-font26" maxlength="11" name="customer_service_phone"
  226. :value="dataform.customer_service_phone" placeholder="请输入客服电话" />
  227. </view>
  228. <view class="uni-form-item u-flex ">
  229. <view class="title u-font28 u-1A1A1A">营业时间</view>
  230. <input class="uni-input u-font26" maxlength="26" name="business_hours" disabled @click="goWeeks()"
  231. :value="dataform.business_hours" placeholder="选择营业时间" />
  232. </view>
  233. <view class="uni-form-item u-flex ">
  234. <view class="title u-font28 u-1A1A1A">营业时间段</view>
  235. <picker mode="time" :value="beginTime" @change="beginTimeChange">
  236. <input class="uni-input u-font26" name="beginTime" disabled :value="beginTime" placeholder="开始时间"
  237. style="width: 180rpx;" />
  238. </picker>
  239. <picker mode="time" :value="endTime" @change="endTimeChange" class="u-ml20">
  240. <input class="uni-input u-font26" name="endTime" disabled :value="endTime" placeholder="结束时间"
  241. style="width: 180rpx;" />
  242. </picker>
  243. </view>
  244. <view class="uni-form-item u-flex ">
  245. <view class="title u-font28 u-1A1A1A">商业主体名称</view>
  246. <input class="uni-input u-font26" maxlength='20' name="main_name" :value="dataform.main_name"
  247. placeholder="请输入商业主体名称" />
  248. </view>
  249. <view class="uni-form-item u-flex ">
  250. <view class="title u-font28 u-1A1A1A">运营人姓名</view>
  251. <input class="uni-input u-font26" maxlength='5' name="loser" :value="dataform.loser"
  252. placeholder="请输入运营人姓名" />
  253. </view>
  254. <view class="uni-form-item u-flex ">
  255. <view class="title u-font28 u-1A1A1A">运营人手机号</view>
  256. <input class="uni-input u-font26" type="number" maxlength='11' name="mobile" :value="dataform.mobile"
  257. placeholder="请输入运营人手机号" />
  258. </view>
  259. <template v-if="settleMode == 1">
  260. <view class="uni-form-item u-flex ">
  261. <view class="title u-font28 u-1A1A1A" style="width: 300rpx;">门店打赏比例</view>
  262. <input class="uni-input u-font26" max="100" name="reward_ratio" :value="dataform.reward_ratio"
  263. placeholder="请输入门店打赏比例" />(%)
  264. </view>
  265. <view class="uni-form-textarea">
  266. <view>优惠介绍</view>
  267. <textarea class="textarea" maxlength='400' name="special_offers" :value="dataform.special_offers"
  268. placeholder="请输入优惠介绍"></textarea>
  269. </view>
  270. </template>
  271. <view class="uni-form-textarea">
  272. <view>店铺介绍</view>
  273. <textarea class="textarea" maxlength='400' name="remark" :value="dataform.remark"
  274. placeholder="请输入店铺介绍"></textarea>
  275. </view>
  276. <view class="uni-form-textarea">
  277. <view>场地说明</view>
  278. <textarea class="textarea" maxlength='200' name="place_remark" :value="dataform.place_remark"
  279. placeholder="请输入场地说明"></textarea>
  280. </view>
  281. </view>
  282. </view>
  283. </view>
  284. <!--上传图片-->
  285. <view class="bg-fff u-mt10">
  286. <view class="u-plr30">
  287. <view class="pt30">
  288. <text class="vertical-bar">|</text>
  289. <text class="u-ml10 u-font30 u-060606">申请材料</text>
  290. </view>
  291. <view class="u-mt20">
  292. <view class="">
  293. <text>
  294. <required-tag></required-tag>店铺logo
  295. </text>
  296. <!-- <text class="u-ml10">查看示例图</text> -->
  297. </view>
  298. <view class="u-mt25">
  299. <uploadImg imgCount="1" :imgArr="logo" :type="upimgtype" url="" @result="resultUrlLogo">
  300. </uploadImg>
  301. </view>
  302. </view>
  303. <view class="u-mt20">
  304. <view class="">
  305. <text>店铺图片</text>
  306. <!-- <text class="u-ml10">查看示例图</text> -->
  307. </view>
  308. <view class="u-mt25">
  309. <uploadImg imgCount="2" :imgArr="store_images" :type="upimgtype" url="" @result="resultUrltwo"
  310. uploadImgCount="2"></uploadImg>
  311. </view>
  312. </view>
  313. <view class="u-flex-center u-mt25">
  314. <view class="check u-mr10" @click="aggrementCheck">
  315. <text class="iconfont iconbox u-font32 u-FF0000 " v-if="checkAggrement">&#xe646;</text>
  316. <view class="radios" v-else></view>
  317. </view>
  318. <text class="u-006BC9 u-font24" @click="linkAgreement">勾选注册协议及隐私声明</text>
  319. </view>
  320. <view class="btn" v-if="dataform.audit_status !=0">
  321. <button class="u-btn" form-type="submit" v-if="step==1">立即提交</button>
  322. </view>
  323. </view>
  324. </view>
  325. </view>
  326. </form>
  327. <u-popup mode="bottom" v-model="weekShow" ref="weeksOpen">
  328. <view class="u-bg-fff u-p30">
  329. <view class="week" :class="{ checkedYes: checkedArrey.indexOf(item) != -1 }" v-for="(item,index) in weeks"
  330. :key="index" @click="appointment(item)">
  331. <view>{{item}}</view>
  332. </view>
  333. <view>
  334. <button class="weeks-btn" @click="gbClose()">确定</button>
  335. </view>
  336. </view>
  337. </u-popup>
  338. <!-- 地区 -->
  339. <u-select v-model="areaShow" mode="mutil-column-auto" :list="newProvinceDataList" @confirm="areaConfirm">
  340. </u-select>
  341. <!-- 街道弹窗 -->
  342. <u-select v-model="streetShow" mode="single-column" :list="streetList" @confirm="streetConfirm"></u-select>
  343. <!-- 社区弹窗 -->
  344. <u-select v-model="communityShow" mode="single-column" :list="communityList" @confirm="communityConfirm">
  345. </u-select>
  346. </view>
  347. </template>
  348. <script>
  349. import uploadImg from "../../../components/uploadImg/imgUpload.vue"
  350. import uniPopup from "../../../components/uni-popup/uni-popup.vue"
  351. import {
  352. cos
  353. } from "mathjs"
  354. export default {
  355. components: {
  356. uploadImg,
  357. uniPopup
  358. },
  359. data() {
  360. return {
  361. config: {
  362. back: true, //false是tolbar页面 是则不写
  363. title: '成为商家',
  364. color: '#1A1A1A',
  365. //背景颜色;参数一透明度(0-1);参数二背景颜色(array则为线性渐变,string为单色背景)
  366. backgroundColor: [1, "#fff"],
  367. statusBarFontColor: '#1A1A1A',
  368. onlyMy: true
  369. },
  370. upimgtype: 'other',
  371. step: 0, //0 显示企业,1显示店铺
  372. certificateType: null,
  373. oldpProvinceDataList: [],
  374. newProvinceDataList: [
  375. // [],
  376. // [],
  377. // []
  378. ],
  379. multiIndex: [0, 0, 0],
  380. dataform: {
  381. company_name: '', //企业名称
  382. credit_code: '', //统一信用代码
  383. business_scope: '', //经营范围
  384. province: '', //企业省市区
  385. company_address: '', //企业地址
  386. legal_representative: '', //法人姓名
  387. id_type: null, //法人代证件类型(0身份证、1护照)
  388. id_number: '', //法代证件号码
  389. lr_mobile: '', //法人手机号
  390. lr_email: '', //法代邮箱
  391. mobile: "", //手机
  392. identity_code: "", //身份证号
  393. shop_name: "", //店铺名
  394. main_name: '', //主体名称
  395. loser: '', //运营人姓名
  396. province_name: "", //省的名称
  397. province_code: "", //省编号
  398. city_code: "", //市编号
  399. city_name: "", //市名称
  400. area_name: "", //区名称
  401. area_code: "", //区编号
  402. address: "", //详细地址
  403. map_punctuation: '', //店铺地图选址
  404. business_hours: "", //营业时间
  405. time_quantum: '', //时间段
  406. customer_service_phone: '', //客服电话
  407. remark: "", //店铺介绍
  408. place_remark: '', //场地说明
  409. noticeItems: "", //注意事项
  410. tx_longitude: "", //微信经度
  411. tx_latitude: "", //微信纬度
  412. logo: "", //店铺logo
  413. store_images: "", //门店图片
  414. business_license_images: "", //商家经营执照
  415. identty_images: "", //身份证下反面
  416. },
  417. showSelected: false,
  418. checkAggrement: true,
  419. audit_status: "1", //审核状态(0待审核,1审核通过,2审核不通过)
  420. checkedArrey: [],
  421. weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日', ],
  422. beginTime: "",
  423. endTime: "",
  424. logo: [], //店铺logo
  425. store_images: [], //门店图片
  426. business_license_images: [], //商家经营执照
  427. identty_images: [], //身份证下反面
  428. streetList: [],
  429. communityList: [],
  430. areaShow: false,
  431. streetShow: false,
  432. communityShow: false,
  433. areaShowType: 1, //弹窗类型 1 企业信息地区 2商家地区
  434. weekShow: false,
  435. settleMode: 0, // 入驻方式 0 线上 1 联盟
  436. }
  437. },
  438. //写这监听滑动事件,是为了点击填写店铺信息资料时,回到顶部
  439. onPageScroll(e) {
  440. if (e.scrollTop > 300) {
  441. this.floorstatus = true
  442. } else {
  443. this.floorstatus = false
  444. }
  445. },
  446. onLoad(options) {
  447. if (options.settleMode) {
  448. this.settleMode = options.settleMode
  449. }
  450. let that = this;
  451. if (options.type) {
  452. //1 审核不通过
  453. if (options.type == 1) {
  454. this.getUserInfo()
  455. }
  456. }
  457. //获取省市区
  458. this.$http.get('/cnarea/tree-lbs', {}).then(async res => {
  459. let provincesList = res.tree.children;
  460. // for (let i = 0; i < provincesList.length; i++) {
  461. // this.newProvinceDataList[0].push(provincesList[i]);
  462. // for (let c = 0; c < provincesList[i].children.length; c++) {
  463. // this.newProvinceDataList[1].push(provincesList[i].children[c]);
  464. // if (provincesList[i].children[c].children) {
  465. // for (let a = 0; a < provincesList[i].children[c].children.length; a++) {
  466. // this.newProvinceDataList[2].push(provincesList[i].children[c].children[a]);
  467. // }
  468. // } else {
  469. // this.newProvinceDataList[2] = [];
  470. // }
  471. // }
  472. // }
  473. this.newProvinceDataList = provincesList
  474. that.oldpProvinceDataList = provincesList;
  475. })
  476. },
  477. methods: {
  478. // 协议勾选
  479. aggrementCheck() {
  480. this.checkAggrement = !this.checkAggrement
  481. },
  482. linkAgreement() {
  483. uni.navigateTo({
  484. url: '/pages/user/agreement?type=2'
  485. })
  486. },
  487. openAreaSelect(num) {
  488. this.areaShow = true;
  489. this.areaShowType = num;
  490. },
  491. // 获取地区
  492. areaConfirm(e) {
  493. if (e.length > 0) {
  494. if (this.areaShowType == 1) {
  495. this.dataform.province = e[0].label + e[1].label + e[2].label
  496. } else {
  497. this.dataform.province_name = e[0].label;
  498. this.dataform.province_code = e[0].value;
  499. this.dataform.city_name = e[1].label;
  500. this.dataform.city_code = e[1].value;
  501. this.dataform.area_name = e[2].label;
  502. this.dataform.area_code = e[2].value;
  503. this.getAreaList(this.dataform.area_code, 'street');
  504. this.dataform.street_name = "";
  505. this.dataform.street_code = "";
  506. this.dataform.community_name = "";
  507. this.dataform.community_code = ""
  508. }
  509. }
  510. },
  511. // 获取街道列表
  512. getAreaList(parentCode, type) {
  513. this.$http.get(`/cnarea/lbs-children/${parentCode}`, {}).then(res => {
  514. if (res && res.code == 200) {
  515. if (type == 'street') {
  516. this.streetList = res.list;
  517. // this.getAreaList(this.streetList[this.streetListIndex].value,'community');
  518. } else {
  519. this.communityList = res.list;
  520. }
  521. }
  522. });
  523. },
  524. // 选择街道
  525. streetConfirm(e) {
  526. if (e.length > 0) {
  527. this.dataform.street_name = e[0].label;
  528. this.dataform.street_code = e[0].value;
  529. this.getAreaList(this.dataform.street_code, 'community')
  530. } else {
  531. this.dataform.street_name = null;
  532. this.dataform.street_code = null;
  533. this.communityList = [];
  534. }
  535. this.dataform.community_name = "";
  536. this.dataform.community_code = ""
  537. },
  538. // 选择社区
  539. communityConfirm(e) {
  540. if (e.length > 0) {
  541. this.dataform.community_name = e[0].label;
  542. this.dataform.community_code = e[0].value
  543. } else {
  544. this.dataform.community_name = null;
  545. this.dataform.community_code = null;
  546. }
  547. },
  548. onlyLink(e) {
  549. if (e == 1) {
  550. if (this.step == 1) {
  551. this.step = 0
  552. } else if (this.step == 0) {
  553. uni.navigateBack({
  554. delta: 1
  555. })
  556. }
  557. }
  558. },
  559. getUserInfo() {
  560. //获取店铺信息
  561. this.$http.get('/yxt/shopapply/shopApplyInfo', {
  562. union_business: this.settleMode == 0 ? false : true
  563. }).then(res => {
  564. if (res && res.code == 200 && res.data) {
  565. this.dataform = res.data
  566. //将字符串转成图片数组
  567. if (res.data.logo) {
  568. this.logo = res.data.logo.split(',')
  569. }
  570. if (res.data.business_license_images) {
  571. this.business_license_images = res.data.business_license_images.split(',')
  572. }
  573. if (res.data.identty_images) {
  574. this.identty_images = res.data.identty_images.split(',')
  575. }
  576. if (res.data.store_images) {
  577. this.store_images = res.data.store_images.split(',')
  578. }
  579. //拆分时间
  580. if (res.data.time_quantum) {
  581. this.beginTime = res.data.time_quantum.split('-')[0]
  582. this.endTime = res.data.time_quantum.split('-')[1]
  583. }
  584. if (res.data.tx_longitude) {
  585. this.showSelected = true
  586. }
  587. }
  588. })
  589. },
  590. //上传身份证
  591. resultUrlone(e) {
  592. this.identty_images = e
  593. },
  594. //上传店铺logo
  595. resultUrlLogo(e) {
  596. this.logo = e
  597. },
  598. //上传门店
  599. resultUrltwo(e) {
  600. this.store_images = e
  601. },
  602. //上传营业执照
  603. resultUrlthree(e) {
  604. this.business_license_images = e
  605. },
  606. //证件类型
  607. radio(e) {
  608. this.dataform.id_type = e
  609. },
  610. //步骤e
  611. nextStep(e) {
  612. let target = e.detail.value;
  613. if (!target.company_name) {
  614. this.$mUtil.toast('请输入企业名称')
  615. return false
  616. }
  617. // if (!target.credit_code) {
  618. // this.$mUtil.toast('请输入统一信用代码')
  619. // return false
  620. // }
  621. // if (!target.business_scope) {
  622. // this.$mUtil.toast('请输入经营范围')
  623. // return false
  624. // }
  625. if (!this.dataform.province) {
  626. this.$mUtil.toast('请选择省市区')
  627. return false
  628. }
  629. // if (!target.company_address) {
  630. // this.$mUtil.toast('请输入企业地址')
  631. // return false
  632. // }
  633. if (!target.legal_representative) {
  634. this.$mUtil.toast('请输入法人姓名')
  635. return false
  636. }
  637. // if (this.dataform.id_type == null) {
  638. // this.$mUtil.toast('请选择法人证件类型')
  639. // return false
  640. // }
  641. // if (!target.id_number) {
  642. // this.$mUtil.toast('请输入法人证件号码')
  643. // return false
  644. // }
  645. if (!target.lr_mobile) {
  646. this.$mUtil.toast('请输入法人手机号')
  647. return false
  648. }
  649. if (!(target.lr_mobile.match(this.$mConfig.telRegex))) {
  650. this.$mUtil.toast('请输入正确手机号')
  651. return false
  652. }
  653. // if (!target.lr_email) {
  654. // this.$mUtil.toast('请输入法人邮箱')
  655. // return false
  656. // }
  657. if (target.lr_email && !target.lr_email.match(this.$mConfig.mailVerify)) {
  658. this.$mUtil.toast('请输入正确邮箱')
  659. return false
  660. }
  661. // if (this.business_license_images == '') {
  662. // this.$mUtil.toast('请上传营业执照')
  663. // return false
  664. // }
  665. // if (this.identty_images == '') {
  666. // this.$mUtil.toast('请上传法人身份证(正反面)')
  667. // return false
  668. // }
  669. // if (this.identty_images.length < 2) {
  670. // this.$mUtil.toast('请上传法人身份证(正反面)')
  671. // return false
  672. // }
  673. //将图片转换字符串
  674. this.dataform.company_name = target.company_name
  675. this.dataform.credit_code = target.credit_code
  676. this.dataform.business_scope = target.business_scope
  677. this.dataform.company_address = target.company_address
  678. this.dataform.legal_representative = target.legal_representative
  679. this.dataform.id_number = target.id_number
  680. this.dataform.lr_mobile = target.lr_mobile
  681. this.dataform.lr_email = target.lr_email
  682. this.dataform.business_license_images = this.business_license_images.join(',')
  683. this.dataform.identty_images = this.identty_images.join(',')
  684. if (uni.pageScrollTo) {
  685. uni.pageScrollTo({
  686. scrollTop: 0
  687. })
  688. } else {
  689. uni.showModal({
  690. title: '提示',
  691. content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  692. })
  693. }
  694. this.step = 1
  695. },
  696. //跳转到地图
  697. goMap() {
  698. uni.chooseLocation({
  699. success: (res) => {
  700. if (res.address) {
  701. this.dataform.map_punctuation = res.address;
  702. this.dataform.tx_latitude = res.latitude
  703. this.dataform.tx_longitude = res.longitude
  704. this.showSelected = true
  705. } else {
  706. this.showSelected = false
  707. }
  708. },
  709. })
  710. },
  711. //点击选择营业时间
  712. goWeeks() {
  713. // this.$refs.weeksOpen.open()
  714. this.weekShow = true;
  715. },
  716. //点击关闭
  717. gbClose() {
  718. this.$refs.weeksOpen.close()
  719. this.dataform.business_hours = this.checkedArrey.join(',')
  720. },
  721. appointment(value) {
  722. if (this.checkedArrey.indexOf(value) != -1) {
  723. this.checkedArrey.splice(this.checkedArrey.indexOf(value), 1);
  724. } else {
  725. this.checkedArrey.push(value);
  726. }
  727. },
  728. beginTimeChange(e) {
  729. this.beginTime = e.target.value
  730. },
  731. endTimeChange(e) {
  732. this.endTime = e.target.value
  733. },
  734. //提交申请
  735. formSubmit(e) {
  736. let target = e.detail.value;
  737. if (!target.shop_name) {
  738. this.$mUtil.toast('请输入店铺名称')
  739. return false
  740. }
  741. if (!this.dataform.province_name) {
  742. this.$mUtil.toast('请选择省市区')
  743. return false
  744. }
  745. // if(!this.dataform.street_name){
  746. // this.$mUtil.toast('请选择所属街道')
  747. // return false
  748. // }
  749. // if(!this.dataform.community_name){
  750. // this.$mUtil.toast('请选择所属社区')
  751. // return false
  752. // }
  753. // if (!target.address) {
  754. // this.$mUtil.toast('请输入店铺详细地址')
  755. // return false
  756. // }
  757. // if(!this.dataform.map_punctuation){
  758. // this.$mUtil.toast('请选择店铺地图选址')
  759. // return false
  760. // }
  761. if (!target.customer_service_phone) {
  762. this.$mUtil.toast('请输入客服电话')
  763. return false
  764. }
  765. // if (!this.dataform.business_hours) {
  766. // this.$mUtil.toast('请选择营业时间')
  767. // return false
  768. // }
  769. // if (this.beginTime == '') {
  770. // this.$mUtil.toast('请选择开始时间段')
  771. // return false
  772. // }
  773. // if (this.endTime == '') {
  774. // this.$mUtil.toast('请选择结束时间段')
  775. // return false
  776. // }
  777. // if (!target.main_name) {
  778. // this.$mUtil.toast('请输入商业主体名称')
  779. // return false
  780. // }
  781. // if (!target.loser) {
  782. // this.$mUtil.toast('请输入运营人姓名')
  783. // return false
  784. // }
  785. // if (!target.mobile) {
  786. // this.$mUtil.toast('请输入运营人电话')
  787. // return false
  788. // }
  789. if (target.reward_ratio) {
  790. if (this.$u.test.chinese(target.reward_ratio)) {
  791. return this.$mUtil.toast('请输入数字类型')
  792. } else if (!this.$u.test.amount(target.reward_ratio)) {
  793. return this.$mUtil.toast('门店打赏比例最多保留两位小数')
  794. } else if (!this.$u.test.range(target.reward_ratio, [0,
  795. 100
  796. ])) {
  797. return this.$mUtil.toast('门店打赏比例请输入0-100的值')
  798. }
  799. }
  800. // if (!(target.mobile.match(this.$mConfig.telRegex))) {
  801. // this.$mUtil.toast('运营人手机号格式错误')
  802. // return false
  803. // }
  804. // if (!target.remark) {
  805. // this.$mUtil.toast('请输入店铺介绍')
  806. // return false
  807. // }
  808. // if (!target.place_remark) {
  809. // this.$mUtil.toast('请输入场地说明')
  810. // return false
  811. // }
  812. if (this.logo == '') {
  813. this.$mUtil.toast('请上传店铺logo')
  814. return false
  815. }
  816. // if (this.store_images == '') {
  817. // this.$mUtil.toast('请上传店铺图片')
  818. // return false
  819. // }
  820. if (!this.checkAggrement) {
  821. this.$mUtil.toast('请先同意协议')
  822. return false
  823. }
  824. this.dataform.shop_name = target.shop_name
  825. this.dataform.address = target.address
  826. this.dataform.mobile = target.mobile
  827. this.dataform.main_name = target.main_name
  828. this.dataform.loser = target.loser
  829. this.dataform.customer_service_phone = target.customer_service_phone
  830. this.dataform.place_remark = target.place_remark
  831. this.dataform.remark = target.remark
  832. //将图片数组转成字符串
  833. this.dataform.logo = this.logo.join(',')
  834. this.dataform.store_images = this.store_images.join(',')
  835. //拼接时间段
  836. this.dataform.time_quantum = this.beginTime + '-' + this.endTime
  837. // 商家入驻类型
  838. if (this.settleMode == 1) {
  839. this.dataform.union_business = true
  840. this.dataform.reward_ratio = target.reward_ratio || 0
  841. this.dataform.special_offers = target.special_offers
  842. }
  843. console.log('this.dataform', this.dataform)
  844. this.$http.post('/yxt/shopapply/apply', this.dataform).then(async res => {
  845. if (res && res.code == 200) {
  846. uni.showToast({
  847. title: "提交成功",
  848. icon: "none",
  849. duration: 3000
  850. })
  851. setTimeout(() => {
  852. // uni.switchTab({
  853. // url:'../../index/personal'
  854. // })
  855. // uni.navigateTo({
  856. // url: "../../research/setup/toBusiness"
  857. // })
  858. // uni.navigateTo({
  859. // url:"/pages/user/merchant/audit"
  860. // })
  861. if (this.settleMode == 0) {
  862. uni.reLaunch({
  863. url: '/pages/user/merchant/audit'
  864. });
  865. } else {
  866. uni.reLaunch({
  867. url: '/pages/workbench/shop/audit'
  868. });
  869. }
  870. }, 1000)
  871. } else {
  872. this.$mUtil.toast(res.msg)
  873. }
  874. })
  875. },
  876. //企业选择————企业省市区确认事件
  877. // enterprisePickerChange(e) {
  878. // this.multiIndex = e.detail.value;
  879. // if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
  880. // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
  881. // .newProvinceDataList[1][this.multiIndex[1]].label + this.newProvinceDataList[2][this.multiIndex[2]]
  882. // .label
  883. // } else {
  884. // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
  885. // .newProvinceDataList[1][this.multiIndex[1]].label
  886. // }
  887. // },
  888. enterprisePickerColumnchange(e) {
  889. // 第几列滑动
  890. // console.log(e.detail.column);
  891. // 第几列滑动的下标
  892. // console.log(e.detail.value)
  893. // 第一列滑动
  894. if (e.detail.column === 0) {
  895. this.multiIndex[0] = e.detail.value
  896. this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
  897. index) => {
  898. return item
  899. })
  900. //当三级存在
  901. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  902. if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
  903. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  904. .multiIndex[1]].children
  905. .map((item, index) => {
  906. return item
  907. })
  908. }
  909. } else {
  910. this.newProvinceDataList[2] = []
  911. }
  912. // 第一列滑动 第二列 和第三列 都变为第一个
  913. this.multiIndex.splice(1, 1, 0)
  914. this.multiIndex.splice(2, 1, 0)
  915. }
  916. // 第二列滑动
  917. if (e.detail.column === 1) {
  918. this.multiIndex[1] = e.detail.value
  919. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  920. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  921. .multiIndex[1]].children
  922. .map(
  923. (item, index) => {
  924. return item
  925. })
  926. } else {
  927. this.newProvinceDataList[2] = []
  928. }
  929. // 第二列 滑动 第三列 变成第一个
  930. this.multiIndex.splice(2, 1, 0)
  931. }
  932. // 第三列滑动
  933. if (e.detail.column === 2) {
  934. this.multiIndex[2] = e.detail.value
  935. // console.log('第三列滑动')
  936. // console.log(this.multiIndex)
  937. }
  938. },
  939. //商家选择————省市区确认事件
  940. pickerChange(e) {
  941. this.multiIndex = e.detail.value;
  942. if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
  943. this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
  944. this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
  945. this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
  946. this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
  947. this.dataform.area_name = this.newProvinceDataList[2][this.multiIndex[2]].label
  948. this.dataform.area_code = this.newProvinceDataList[2][this.multiIndex[2]].value
  949. // this.dataform.tx_latitude = this.newProvinceDataList[2][this.multiIndex[2]].latitude
  950. // this.dataform.tx_longitude = this.newProvinceDataList[2][this.multiIndex[2]].longitude
  951. this.getAreaList(this.dataform.area_code, 'street')
  952. } else {
  953. this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
  954. this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
  955. this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
  956. this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
  957. // this.dataform.tx_latitude = this.newProvinceDataList[1][this.multiIndex[1]].latitude
  958. // this.dataform.tx_longitude = this.newProvinceDataList[1][this.multiIndex[1]].longitude
  959. this.streetList = [];
  960. this.communityList = [];
  961. }
  962. },
  963. streetChange(e) {
  964. if (this.streetList && this.streetList.length <= 0) {
  965. uni.showToast({
  966. icon: "none",
  967. title: '请选择所属地区',
  968. duration: 2000
  969. });
  970. return
  971. }
  972. this.streetShow = true
  973. },
  974. communityChange() {
  975. if (this.communityList && this.communityList.length <= 0) {
  976. uni.showToast({
  977. icon: "none",
  978. title: '请选择所属街道',
  979. duration: 2000
  980. });
  981. return
  982. }
  983. this.communityShow = true
  984. },
  985. pickerColumnchange(e) {
  986. // 第几列滑动
  987. // console.log(e.detail.column);
  988. // 第几列滑动的下标
  989. // console.log(e.detail.value)
  990. // 第一列滑动
  991. if (e.detail.column === 0) {
  992. this.multiIndex[0] = e.detail.value
  993. this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
  994. index) => {
  995. return item
  996. })
  997. //当三级存在
  998. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  999. if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
  1000. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  1001. .multiIndex[1]].children
  1002. .map((item, index) => {
  1003. return item
  1004. })
  1005. }
  1006. } else {
  1007. this.newProvinceDataList[2] = []
  1008. }
  1009. // 第一列滑动 第二列 和第三列 都变为第一个
  1010. this.multiIndex.splice(1, 1, 0)
  1011. this.multiIndex.splice(2, 1, 0)
  1012. }
  1013. // 第二列滑动
  1014. if (e.detail.column === 1) {
  1015. this.multiIndex[1] = e.detail.value
  1016. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  1017. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  1018. .multiIndex[1]].children
  1019. .map(
  1020. (item, index) => {
  1021. return item
  1022. })
  1023. } else {
  1024. this.newProvinceDataList[2] = []
  1025. }
  1026. // 第二列 滑动 第三列 变成第一个
  1027. this.multiIndex.splice(2, 1, 0)
  1028. }
  1029. // 第三列滑动
  1030. if (e.detail.column === 2) {
  1031. this.multiIndex[2] = e.detail.value
  1032. // console.log('第三列滑动')
  1033. // console.log(this.multiIndex)
  1034. }
  1035. }
  1036. }
  1037. }
  1038. </script>
  1039. <style lang="scss">
  1040. page {
  1041. background-color: #F5F5F5;
  1042. }
  1043. .step-pd {
  1044. padding: 40rpx 30rpx;
  1045. }
  1046. .font68 {
  1047. color: #FFFFFF;
  1048. font-size: 68rpx;
  1049. }
  1050. .u-6087F2 {
  1051. color: #6087F2;
  1052. }
  1053. .vertical-bar {
  1054. width: 6rpx;
  1055. height: 30rpx;
  1056. background: #FA6138;
  1057. border-radius: 2rpx;
  1058. color: #0B844A;
  1059. }
  1060. .pt14 {
  1061. padding-top: 14rpx;
  1062. }
  1063. .pt30 {
  1064. padding-top: 30rpx;
  1065. }
  1066. .audit {
  1067. width: 100%;
  1068. padding: 42rpx 0rpx;
  1069. margin-bottom: 30rpx;
  1070. }
  1071. .radio {}
  1072. .auditImg {
  1073. width: 214rpx;
  1074. height: 160rpx;
  1075. }
  1076. .bg-F5FFF9 {
  1077. background-color: #F5FFF9;
  1078. }
  1079. .bg-fff {
  1080. background-color: #FFFFFF;
  1081. padding-bottom: 40rpx;
  1082. }
  1083. .uni-form-item {
  1084. height: 104rpx;
  1085. line-height: 104rpx;
  1086. // margin-top: 34rpx;
  1087. border-bottom: 1rpx solid #d9d9d9;
  1088. }
  1089. .title {
  1090. width: 250rpx;
  1091. }
  1092. .uni-input {
  1093. width: 100%;
  1094. // height: 70rpx;
  1095. height: 104rpx;
  1096. padding-left: 20rpx;
  1097. text-align: right;
  1098. // border: 1rpx solid #d9d9d9;
  1099. // border-radius: 8rpx;
  1100. // padding-left: 20rpx;
  1101. }
  1102. .u-position-re {
  1103. position: relative;
  1104. .iconfont {
  1105. position: absolute;
  1106. top: 0rpx;
  1107. left: 20rpx;
  1108. }
  1109. .uni-input {
  1110. width: 366rpx;
  1111. padding-left: 60rpx;
  1112. }
  1113. }
  1114. .uni-form-textarea {
  1115. margin-top: 35rpx;
  1116. .textarea {
  1117. width: 100%;
  1118. height: 282rpx;
  1119. background-color: #F7F7F7;
  1120. border-radius: 8rpx;
  1121. padding-top: 14rpx;
  1122. margin-top: 24rpx;
  1123. box-sizing: border-box;
  1124. padding-left: 22rpx;
  1125. }
  1126. }
  1127. .btn {
  1128. margin-top: 100rpx;
  1129. margin-bottom: 40rpx;
  1130. display: flex;
  1131. justify-content: center;
  1132. }
  1133. .week {
  1134. text-align: center;
  1135. padding-bottom: 20rpx;
  1136. }
  1137. .checkedYes {
  1138. color: #FF0000;
  1139. }
  1140. .weeks-btn {
  1141. background: #FA6138;
  1142. color: #FFFFFF;
  1143. }
  1144. .check {
  1145. position: relative;
  1146. width: 32rpx;
  1147. height: 32rpx;
  1148. .radios {
  1149. width: 30rpx;
  1150. height: 30rpx;
  1151. display: block;
  1152. border: 1px solid #ccc;
  1153. border-radius: 50%;
  1154. position: absolute;
  1155. left: 0;
  1156. top: 0;
  1157. z-index: 1;
  1158. }
  1159. .iconbox {
  1160. position: relative;
  1161. z-index: 2;
  1162. }
  1163. }
  1164. .u-bg-abc5b5 {
  1165. background-color: rgba(55, 117, 246, 0.5);
  1166. }
  1167. </style>