registerAndAudit.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205
  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" disabled maxlength="16" name="company_name"
  29. :value="dataform.company_name" 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" disabled maxlength='18' name="credit_code"
  34. :value="dataform.credit_code" 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" disabled maxlength='25' name="business_scope"
  39. :value="dataform.business_scope" 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" disabled 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" disabled 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)" disabled :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)" disabled :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" disabled 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" disabled 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" disabled 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" v-if="false">
  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>
  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: 1, //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. let that = this;
  448. if (options.type) {
  449. //1 审核不通过
  450. if (options.type == 1) {
  451. this.getUserInfo()
  452. }
  453. }
  454. if (options.settleMode) {
  455. this.settleMode = options.settleMode
  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/shop/my-shop', {
  562. union_business: 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.mobile.match(this.$mConfig.telRegex))) {
  790. // this.$mUtil.toast('运营人手机号格式错误')
  791. // return false
  792. // }
  793. if (this.settleMode == 1) {
  794. if (target.reward_ratio) {
  795. if (this.$u.test.chinese(target.reward_ratio)) {
  796. return this.$mUtil.toast('请输入数字类型')
  797. } else if (!this.$u.test.range(target.reward_ratio, [1, 100])) {
  798. return this.$mUtil.toast('门店打赏比例请输入0-100的值')
  799. } else if (!this.$u.test.amount(target.reward_ratio)) {
  800. return this.$mUtil.toast('门店打赏比例最多保留两位小数')
  801. }
  802. }
  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. let url = '/shop/update/record/apply'
  845. if (this.dataform.audit_status == 2) {
  846. url = '/yxt/shopapply/apply'
  847. }
  848. this.$http.post(url, this.dataform).then(
  849. async res => {
  850. if (res && res.code == 200) {
  851. uni.showToast({
  852. title: "提交成功",
  853. icon: "none",
  854. duration: 3000
  855. })
  856. setTimeout(() => {
  857. if (this.dataform.audit_status == 2) {
  858. uni.redirectTo({
  859. url: '/pages/workbench/shop/audit'
  860. });
  861. } else {
  862. uni.navigateBack()
  863. }
  864. }, 1000)
  865. } else {
  866. this.$mUtil.toast(res.msg)
  867. }
  868. })
  869. },
  870. //企业选择————企业省市区确认事件
  871. // enterprisePickerChange(e) {
  872. // this.multiIndex = e.detail.value;
  873. // if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
  874. // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
  875. // .newProvinceDataList[1][this.multiIndex[1]].label + this.newProvinceDataList[2][this.multiIndex[2]]
  876. // .label
  877. // } else {
  878. // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
  879. // .newProvinceDataList[1][this.multiIndex[1]].label
  880. // }
  881. // },
  882. enterprisePickerColumnchange(e) {
  883. // 第几列滑动
  884. // console.log(e.detail.column);
  885. // 第几列滑动的下标
  886. // console.log(e.detail.value)
  887. // 第一列滑动
  888. if (e.detail.column === 0) {
  889. this.multiIndex[0] = e.detail.value
  890. this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
  891. index) => {
  892. return item
  893. })
  894. //当三级存在
  895. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  896. if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
  897. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  898. .multiIndex[1]].children
  899. .map((item, index) => {
  900. return item
  901. })
  902. }
  903. } else {
  904. this.newProvinceDataList[2] = []
  905. }
  906. // 第一列滑动 第二列 和第三列 都变为第一个
  907. this.multiIndex.splice(1, 1, 0)
  908. this.multiIndex.splice(2, 1, 0)
  909. }
  910. // 第二列滑动
  911. if (e.detail.column === 1) {
  912. this.multiIndex[1] = e.detail.value
  913. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  914. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  915. .multiIndex[1]].children
  916. .map(
  917. (item, index) => {
  918. return item
  919. })
  920. } else {
  921. this.newProvinceDataList[2] = []
  922. }
  923. // 第二列 滑动 第三列 变成第一个
  924. this.multiIndex.splice(2, 1, 0)
  925. }
  926. // 第三列滑动
  927. if (e.detail.column === 2) {
  928. this.multiIndex[2] = e.detail.value
  929. // console.log('第三列滑动')
  930. // console.log(this.multiIndex)
  931. }
  932. },
  933. //商家选择————省市区确认事件
  934. pickerChange(e) {
  935. this.multiIndex = e.detail.value;
  936. if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
  937. this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
  938. this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
  939. this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
  940. this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
  941. this.dataform.area_name = this.newProvinceDataList[2][this.multiIndex[2]].label
  942. this.dataform.area_code = this.newProvinceDataList[2][this.multiIndex[2]].value
  943. // this.dataform.tx_latitude = this.newProvinceDataList[2][this.multiIndex[2]].latitude
  944. // this.dataform.tx_longitude = this.newProvinceDataList[2][this.multiIndex[2]].longitude
  945. this.getAreaList(this.dataform.area_code, 'street')
  946. } else {
  947. this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
  948. this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
  949. this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
  950. this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
  951. // this.dataform.tx_latitude = this.newProvinceDataList[1][this.multiIndex[1]].latitude
  952. // this.dataform.tx_longitude = this.newProvinceDataList[1][this.multiIndex[1]].longitude
  953. this.streetList = [];
  954. this.communityList = [];
  955. }
  956. },
  957. streetChange(e) {
  958. if (this.streetList && this.streetList.length <= 0) {
  959. uni.showToast({
  960. icon: "none",
  961. title: '请选择所属地区',
  962. duration: 2000
  963. });
  964. return
  965. }
  966. this.streetShow = true
  967. },
  968. communityChange() {
  969. if (this.communityList && this.communityList.length <= 0) {
  970. uni.showToast({
  971. icon: "none",
  972. title: '请选择所属街道',
  973. duration: 2000
  974. });
  975. return
  976. }
  977. this.communityShow = true
  978. },
  979. pickerColumnchange(e) {
  980. // 第几列滑动
  981. // console.log(e.detail.column);
  982. // 第几列滑动的下标
  983. // console.log(e.detail.value)
  984. // 第一列滑动
  985. if (e.detail.column === 0) {
  986. this.multiIndex[0] = e.detail.value
  987. this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
  988. index) => {
  989. return item
  990. })
  991. //当三级存在
  992. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  993. if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
  994. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  995. .multiIndex[1]].children
  996. .map((item, index) => {
  997. return item
  998. })
  999. }
  1000. } else {
  1001. this.newProvinceDataList[2] = []
  1002. }
  1003. // 第一列滑动 第二列 和第三列 都变为第一个
  1004. this.multiIndex.splice(1, 1, 0)
  1005. this.multiIndex.splice(2, 1, 0)
  1006. }
  1007. // 第二列滑动
  1008. if (e.detail.column === 1) {
  1009. this.multiIndex[1] = e.detail.value
  1010. if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
  1011. this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
  1012. .multiIndex[1]].children
  1013. .map(
  1014. (item, index) => {
  1015. return item
  1016. })
  1017. } else {
  1018. this.newProvinceDataList[2] = []
  1019. }
  1020. // 第二列 滑动 第三列 变成第一个
  1021. this.multiIndex.splice(2, 1, 0)
  1022. }
  1023. // 第三列滑动
  1024. if (e.detail.column === 2) {
  1025. this.multiIndex[2] = e.detail.value
  1026. // console.log('第三列滑动')
  1027. // console.log(this.multiIndex)
  1028. }
  1029. }
  1030. }
  1031. }
  1032. </script>
  1033. <style lang="scss">
  1034. page {
  1035. background-color: #F5F5F5;
  1036. }
  1037. .step-pd {
  1038. padding: 40rpx 30rpx;
  1039. }
  1040. .font68 {
  1041. color: #FFFFFF;
  1042. font-size: 68rpx;
  1043. }
  1044. .u-6087F2 {
  1045. color: #6087F2;
  1046. }
  1047. .vertical-bar {
  1048. width: 6rpx;
  1049. height: 30rpx;
  1050. background: #FA6138;
  1051. border-radius: 2rpx;
  1052. color: #0B844A;
  1053. }
  1054. .pt14 {
  1055. padding-top: 14rpx;
  1056. }
  1057. .pt30 {
  1058. padding-top: 30rpx;
  1059. }
  1060. .audit {
  1061. width: 100%;
  1062. padding: 42rpx 0rpx;
  1063. margin-bottom: 30rpx;
  1064. }
  1065. .radio {}
  1066. .auditImg {
  1067. width: 214rpx;
  1068. height: 160rpx;
  1069. }
  1070. .bg-F5FFF9 {
  1071. background-color: #F5FFF9;
  1072. }
  1073. .bg-fff {
  1074. background-color: #FFFFFF;
  1075. padding-bottom: 40rpx;
  1076. }
  1077. .uni-form-item {
  1078. height: 104rpx;
  1079. line-height: 104rpx;
  1080. // margin-top: 34rpx;
  1081. border-bottom: 1rpx solid #d9d9d9;
  1082. }
  1083. .title {
  1084. width: 250rpx;
  1085. }
  1086. .uni-input {
  1087. width: 100%;
  1088. // height: 70rpx;
  1089. height: 104rpx;
  1090. padding-left: 20rpx;
  1091. text-align: right;
  1092. // border: 1rpx solid #d9d9d9;
  1093. // border-radius: 8rpx;
  1094. // padding-left: 20rpx;
  1095. }
  1096. .u-position-re {
  1097. position: relative;
  1098. .iconfont {
  1099. position: absolute;
  1100. top: 0rpx;
  1101. left: 20rpx;
  1102. }
  1103. .uni-input {
  1104. width: 366rpx;
  1105. padding-left: 60rpx;
  1106. }
  1107. }
  1108. .uni-form-textarea {
  1109. margin-top: 35rpx;
  1110. .textarea {
  1111. width: 100%;
  1112. height: 282rpx;
  1113. background-color: #F7F7F7;
  1114. border-radius: 8rpx;
  1115. padding-top: 14rpx;
  1116. margin-top: 24rpx;
  1117. box-sizing: border-box;
  1118. padding-left: 22rpx;
  1119. }
  1120. }
  1121. .btn {
  1122. margin-top: 100rpx;
  1123. margin-bottom: 40rpx;
  1124. display: flex;
  1125. justify-content: center;
  1126. }
  1127. .week {
  1128. text-align: center;
  1129. padding-bottom: 20rpx;
  1130. }
  1131. .checkedYes {
  1132. color: #FF0000;
  1133. }
  1134. .weeks-btn {
  1135. background: #FA6138;
  1136. color: #FFFFFF;
  1137. }
  1138. .check {
  1139. position: relative;
  1140. width: 32rpx;
  1141. height: 32rpx;
  1142. .radios {
  1143. width: 30rpx;
  1144. height: 30rpx;
  1145. display: block;
  1146. border: 1px solid #ccc;
  1147. border-radius: 50%;
  1148. position: absolute;
  1149. left: 0;
  1150. top: 0;
  1151. z-index: 1;
  1152. }
  1153. .iconbox {
  1154. position: relative;
  1155. z-index: 2;
  1156. }
  1157. }
  1158. .u-bg-abc5b5 {
  1159. background-color: rgba(55, 117, 246, 0.5);
  1160. }
  1161. </style>