settled.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. <template>
  2. <view>
  3. <cu-custom :bgColor="title == '申请入驻' ? 'bg-gradual-blue1' : 'bg-fff'" :isBack="true">
  4. <block slot="content">{{ title }}</block>
  5. </cu-custom>
  6. <view class="progress" v-if="title == '申请入驻'">
  7. <view class="progress-style progress-bag">
  8. <view v-if="tab == 1" class="progress-icon"></view>
  9. <view v-if="tab == 2" class="progress-style progress-bag1">
  10. <view class="progress-icon1"></view>
  11. </view>
  12. <view v-if="tab == 3" class="progress-style progress-bag2">
  13. <view class="progress-icon1"></view>
  14. </view>
  15. </view>
  16. <view class="progress-title flex justify-between">
  17. <view :class="tab == '1' ? 'color' : ''">账户信息</view>
  18. <view :class="tab == '2' ? 'color' : ''">提交资料</view>
  19. <view :class="tab == '3' ? 'color' : ''">门店信息</view>
  20. </view>
  21. </view>
  22. <view class="progress-status" v-else>
  23. <view v-if="form.status == 0">
  24. <view class="status">
  25. <image src="/static/login/status1.png" mode="aspectFit"></image>
  26. <text>待审核</text>
  27. </view>
  28. <view>{{form.updateTime }} 提交的店铺信息待审核中</view>
  29. </view>
  30. <view v-if="form.status == 1">
  31. <view class="status">
  32. <image src="/static/login/status2.png" mode="aspectFit"></image>
  33. <text style="color: #53CC48;">审核通过</text>
  34. </view>
  35. <view>{{form.updateTime }} 提交的店铺信息审核通过</view>
  36. </view>
  37. <view v-if="form.status == 2">
  38. <view class="status">
  39. <image src="/static/login/status3.png" mode="aspectFit"></image>
  40. <text>审核驳回</text>
  41. </view>
  42. <view>驳回原因:{{form.remark }} </view>
  43. </view>
  44. </view>
  45. <view v-if="tab == 1" class="tab-top">
  46. <form>
  47. <!-- <view class="borderRadiu">
  48. <view class="flex cu-form-group margin-top1 ">
  49. <view class="content ">
  50. <text class="text-bold" >选择所属供应商</text>
  51. <i class="text-bg " ></i>
  52. </view>
  53. </view>
  54. <view class="cu-form-group ">
  55. <view class="title">供应商</view>
  56. <picker @change="PickerChange" :value="form.purveyorId" range-key="purveyorName"
  57. :range="supplierOption">
  58. <view class="picker" v-if="form.purveyorId">
  59. {{ supplierOption.find(e => e.id == form.purveyorId).purveyorName }}
  60. </view>
  61. <view class="picker" v-else style="color: #999999;">
  62. 请选择
  63. </view>
  64. </picker>
  65. </view>
  66. </view> -->
  67. <view class="borderRadiu">
  68. <view class="flex cu-form-group margin-top1 ">
  69. <view class="content ">
  70. <text class="text-bold">账户信息</text>
  71. <i class="text-bg "></i>
  72. </view>
  73. </view>
  74. <view class=" cu-form-group ">
  75. <view class="title">姓名</view>
  76. <input placeholder="请输入联系人姓名" v-model="form.name" name="input"></input>
  77. </view>
  78. </view>
  79. </form>
  80. </view>
  81. <view v-if="tab == 2" class="tab-top" :style="title == '店铺信息' ? 'margin-top: 120upx' : ''">
  82. <form>
  83. <view class="borderRadiu">
  84. <view class="flex cu-form-group margin-top1">
  85. <view class="content ">
  86. <text class="text-bold">提交经营主体资料</text>
  87. <i class="text-bg "></i>
  88. </view>
  89. </view>
  90. <view class=" cu-form-group">
  91. <view class="title">主体类型</view>
  92. <!-- <uni-data-checkbox v-model="form.type" :localdata="hobby"></uni-data-checkbox> -->
  93. <radio-group @change="typeChang($event, 'type')" v-model="form.type">
  94. <label class="margin-left-sm">
  95. <radio :class="form.type == '1' ? 'checked blue' : ''"
  96. :checked="form.type == '1' ? true : false" value="1"></radio>
  97. <!-- <checkbox class=' blue' :class="form.type?'checked':''" :checked="form.type?true:false" value="1"></checkbox> -->
  98. <text class="margin-left-sm">普通企业</text>
  99. </label>
  100. <label class="margin-left-sm">
  101. <radio :class="form.type == '2' ? 'checked blue' : ''"
  102. :checked="form.type == '2' ? true : false" value="2"></radio>
  103. <text class="margin-left-sm">个体工商户</text>
  104. </label>
  105. </radio-group>
  106. </view>
  107. <view class="cu-form-group">
  108. <view class="title">公司名称</view>
  109. <input placeholder="请输入公司名称" v-model="form.corporateName" name="input"></input>
  110. </view>
  111. <view class="cu-form-group">
  112. <view class="title">统一代码</view>
  113. <input placeholder="请输入统一社会信用代码" v-model="form.creditCode" name="input"></input>
  114. </view>
  115. <view class="cu-form-group">
  116. <view class="title">有效期 </view>
  117. <!-- <uni-data-checkbox v-model="form.lifespan" :localdata="lifespanOption"></uni-data-checkbox> -->
  118. <radio-group @change="typeChang($event, 'lifespanType')" v-model="form.lifespanType">
  119. <label class="margin-left-sm">
  120. <radio :class="form.lifespanType == '1' ? 'checked blue' : ''"
  121. :checked="form.lifespanType == '1' ? true : false" value="1"></radio>
  122. <!-- <checkbox class=' blue' :class="form.type?'checked':''" :checked="form.type?true:false" value="1"></checkbox> -->
  123. <text class="margin-left-sm">长期有效</text>
  124. </label>
  125. <label class="margin-left-sm">
  126. <radio :class="form.lifespanType == '2' ? 'checked blue' : ''"
  127. :checked="form.lifespanType == '2' ? true : false" value="2"></radio>
  128. <text class="margin-left-sm">固定期限</text>
  129. </label>
  130. </radio-group>
  131. <!-- <radio-group @change="typeChang($event, 'lifespan')" v-model="form.lifespan">
  132. <label class="margin-left-sm">
  133. <radio class="blue radio" value="1" checked></radio>
  134. <text class="margin-left-sm">长期有效</text>
  135. </label>
  136. <label class="margin-left-sm">
  137. <radio class="blue radio" value="2"></radio>
  138. <text class="margin-left-sm">固定期限</text>
  139. </label>
  140. </radio-group> -->
  141. </view>
  142. <view class="cu-form-group" v-if="form.lifespanType == 2">
  143. <view class="title">有效期起</view>
  144. <picker mode="date" :value="form.lifespanBegin" @change="typeChang($event, 'lifespanBegin')">
  145. <view class="picker" v-if="form.lifespanBegin">
  146. {{ form.lifespanBegin }}
  147. </view>
  148. <view class="picker" v-else style="color: #999999;">
  149. 请选择
  150. </view>
  151. </picker>
  152. </view>
  153. <view class="cu-form-group" v-if="form.lifespanType == 2">
  154. <view class="title">有效期止</view>
  155. <picker mode="date" :value="form.lifespanEnd" @change="typeChang($event, 'lifespanEnd')">
  156. <view class="picker" v-if="form.lifespanEnd">
  157. {{ form.lifespanEnd }}
  158. </view>
  159. <view class="picker" v-else style="color: #999999;">
  160. 请选择
  161. </view>
  162. </picker>
  163. </view>
  164. <view class="customize">
  165. <view class="title">营业执照</view>
  166. <view style="border-bottom: 1px solid #EEEEEE;">
  167. <view class="business-img flex align-center">
  168. <image
  169. :src="businessLicenseImg ? businessLicenseImg : '/static/login/yingyezhizhao.png'"
  170. mode="" @click="businessChange('businessLicense')">
  171. </image>
  172. </view>
  173. </view>
  174. <view class="business-prompt">
  175. 请上传营业执照照片或复印件,复印件需加盖公司公章,仅支持jpg、png格式;图片需清晰、完整、无反光、无PS、无不相关水印、非拍屏
  176. </view>
  177. </view>
  178. </view>
  179. <view class="borderRadiu" style="margin-bottom: 114upx;">
  180. <view class="flex cu-form-group margin-top1 ">
  181. <view class="content ">
  182. <text class="text-bold">法人信息</text>
  183. <i class="text-bg "></i>
  184. </view>
  185. </view>
  186. <view class="cu-form-group ">
  187. <view class="title">法人姓名</view>
  188. <input placeholder="请输入法人姓名" v-model="form.legalPerson" name="input"></input>
  189. </view>
  190. <view class="cu-form-group">
  191. <view class="title">法人证件号</view>
  192. <input placeholder="请输入法人证件号" v-model="form.legalPersonCode" name="input"></input>
  193. </view>
  194. <view class="customize">
  195. <view class="title">法人证件照片</view>
  196. <view style="padding: 16upx 0;border-bottom: 1px solid #EEEEEE;">
  197. <view class="flex upload justify-between">
  198. <view class="imgOcr-border">
  199. <image :src="identityOneImg ? identityOneImg : '/static/login/code1.png'" mode=""
  200. @click="businessChange('identityOne')"></image>
  201. </view>
  202. <view class="imgOcr-border">
  203. <image :src="identityTwoImg ? identityTwoImg : '/static/login/code2.png'" mode=""
  204. @click="businessChange('identityTwo')"></image>
  205. </view>
  206. </view>
  207. </view>
  208. <view class="business-prompt">
  209. <view>请上传中国大陆公民.身份证照片,仅支持jpg、png格式</view>
  210. <view>1、需提供与主体证照上一致的法人证件照片</view>
  211. <view>2、图片需清晰、完整、无反光、无PS、无不相关水印、非拍屏</view>
  212. <view>3、证件未过期</view>
  213. </view>
  214. </view>
  215. </view>
  216. </form>
  217. </view>
  218. <view v-if="tab == 3" class="tab-top" :style="title == '店铺信息' ? 'margin-top: 120upx' : ''">
  219. <form>
  220. <view class="borderRadiu" style="margin-bottom: 114upx;">
  221. <view class="flex cu-form-group margin-top1">
  222. <view class="content ">
  223. <text class="text-bold">提交门店信息</text>
  224. <i class="text-bg "></i>
  225. </view>
  226. </view>
  227. <view class="cu-form-group">
  228. <view class="title">门店名称</view>
  229. <input placeholder="请输入门店名称" v-model="form.storeName" name="input"></input>
  230. </view>
  231. <view class="cu-form-group">
  232. <view class="title">所在地区</view>
  233. <input disabled="true" @mousedown="$refs.picker.show()" placeholder="请选择所在地区" ref="inputRef"
  234. name="input" v-model="form.locality"></input>
  235. <text class='cuIcon-right' style="color: #C7C6CA ;" @click="$refs.picker.show()"></text>
  236. <w-picker :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
  237. @confirm="onConfirm($event, 'region')"></w-picker>
  238. </view>
  239. <view class="cu-form-group">
  240. <view class="title">门店地址</view>
  241. <input placeholder="请输入门店地址详细地址" v-model="form.address" name="input"></input>
  242. </view>
  243. <view class="customize">
  244. <view class="title">地理位置</view>
  245. <view class=" booder-top" style="padding-bottom: 16upx;">
  246. <map style="width: 100%; height: 218upx;" :latitude="latitude" scale="14"
  247. :longitude="longitude" :markers="markers" @tap="handleMarkerTap"></map>
  248. </view>
  249. <!-- <aMap class=" booder-top" style="padding-bottom: 7px;"></aMap> -->
  250. <view class="business-prompt">
  251. 若位置有误直接影响客户到店,请在地图中仔细核对,可拖拽地图确保位置正确
  252. </view>
  253. </view>
  254. <view class="customize">
  255. <view class="title">门头照片</view>
  256. <view class="grid col-3 grid-square flex-sub booder-top">
  257. <view class="bg-img" v-for="(item, index) in form.headPhoto" :key="index" @tap="ViewImage"
  258. :data-url="form.headPhoto[index]">
  259. <image :src="form.headPhoto[index]" mode="aspectFill"></image>
  260. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
  261. <text class='cuIcon-close'></text>
  262. </view>
  263. </view>
  264. <view class="solids" @tap="ChooseImage" v-if="form.headPhoto.length < 4">
  265. <text class='cuIcon-cameraadd'></text>
  266. </view>
  267. </view>
  268. <view class="business-prompt">
  269. 门店照片需包含完整的门店入口和招牌名称,建议现场拍摄门头照;最多可上传10张,支持格式bmp、png、jpeg、jpg,单个图片不超过5MB,建议尺寸在2000*1500px以上
  270. </view>
  271. </view>
  272. </view>
  273. </form>
  274. </view>
  275. <view v-if="tab == 1" class="padding flex flex-direction sub-bottom">
  276. <button class="cu-btn bg-blue round " @click="tab = 2">保存并下一步</button>
  277. </view>
  278. <view v-if="tab == 2 && title == '申请入驻'" class="padding flex sub-bottom">
  279. <button class="cu-btn round line-blue shadow" @click="tab = 1">上一步</button>
  280. <button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click="tab = 3">保存并下一步</button>
  281. </view>
  282. <view v-if="tab == 2 && title == '店铺信息'" class="padding flex sub-bottom">
  283. <button class="cu-btn round line-gray shadow" @click="$Router.push({ name: 'settings' })">取消</button>
  284. <button style="margin-left: 12upx;width:77%" class="cu-btn line-blue round shadow"
  285. @click="tab = 3">下一页</button>
  286. </view>
  287. <view v-if="tab == 3" class="padding flex sub-bottom">
  288. <button class="cu-btn round line-blue shadow" @click="tab = 2">{{ title == '申请入驻' ? '上一步' : '上一页'
  289. }}</button>
  290. <button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
  291. </view>
  292. <view class="cu-load load-modal" v-if="lodingshow">
  293. <image src="/static/logo.png" mode="aspectFit"></image>
  294. <view class="gray-text">加载中...</view>
  295. </view>
  296. </view>
  297. </template>
  298. <script>
  299. import configService from '../../common/service/config.service'
  300. import regionPicker from "../../components/w-picker/region-picker.vue"
  301. // import aMap from "./map.vue"
  302. export default {
  303. components: {
  304. regionPicker,
  305. // aMap
  306. },
  307. data() {
  308. return {
  309. latitude: 37.827066,
  310. longitude: 112.34988,
  311. title: '申请入驻',
  312. lodingshow: false,
  313. form: {
  314. name: null,
  315. type: 1,
  316. corporateName: null,
  317. creditCode: null,
  318. lifespanType: 1,
  319. lifespanBegin: this.timestampToTime(),
  320. lifespanEnd: '9999-12-31',
  321. businessLicense: null,
  322. legalPerson: null,
  323. legalPersonCode: null,
  324. storeName: null,
  325. country: null,
  326. locality: '',
  327. address: null,
  328. // headPhoto: null,
  329. passWord: uni.getStorageSync('password'),
  330. phone: uni.getStorageSync('phone'),
  331. },
  332. tab: 1,
  333. supplierOption: [],
  334. businessLicenseImg: '',
  335. identityOneImg: '',
  336. identityTwoImg: '',
  337. visible: false,
  338. index: -1,
  339. country: '',
  340. // markers:[{
  341. // latitude: 37.827066,
  342. // longitude: 112.34988,
  343. // iconPath: '../../static/avatar_girl.png'
  344. // }]
  345. markers: []
  346. }
  347. },
  348. onShow() {
  349. this.markers = uni.getStorageSync('address') ?
  350. [Object.assign(uni.getStorageSync('address'), { iconPath: '../../static/boiaoji.png' })]
  351. : []
  352. console.log(this.markers, 888888888);
  353. },
  354. async onLoad(data) {
  355. if (data.params) {
  356. let obj = JSON.parse(decodeURIComponent(data.params));
  357. this.title = '店铺信息'
  358. this.tab = 2
  359. obj.lifespanType = obj.lifespanType ? obj.lifespanType : '1'
  360. this.markers = this.form.longitude && this.form.latitude ?
  361. [{ longitude: this.form.longitude, latitude: this.form.latitude, iconPath: '../../static/boiaoji.png' }]
  362. : []
  363. this.businessLicenseImg = configService.apiUrl + '/' + obj.businessLicense
  364. this.identityOneImg = configService.apiUrl + '/' + obj.identityOne
  365. obj.headPhoto=obj.headPhoto? obj.headPhoto.split(',').filter(id => id !== ''):[]
  366. this.form = obj
  367. }
  368. // let res = await this.$http.get("/merchant/app/allList")
  369. // if (res.data.success) {
  370. // this.supplierOption = res.data.result
  371. // } else {
  372. // this.$tip.toast(res.data.message);
  373. // }
  374. },
  375. methods: {
  376. handleMarkerTap() {
  377. const queryString = uni.getStorageSync('address') ? encodeURIComponent(JSON.stringify(uni.getStorageSync('address'))) : ''
  378. uni.navigateTo({
  379. url: '/pages/login/map?position=${queryString}'
  380. })
  381. },
  382. ChooseImage() {
  383. uni.chooseImage({
  384. // count: 4, //默认9
  385. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  386. sourceType: ['album'], //从相册选择
  387. success: (res) => {
  388. if (res) {
  389. // this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
  390. uni.uploadFile({
  391. url: configService.apiUrl + '/sys/common/upload',
  392. filePath: res.tempFilePaths[0],
  393. name: "file",
  394. formData: {
  395. 'biz': 'temp',
  396. },
  397. success: (files) => {
  398. let data = JSON.parse(files.data);
  399. if (data.success) {
  400. if (this.form.headPhoto.length != 0) {
  401. this.form.headPhoto.push(configService.apiUrl + '/' + data.message)
  402. } else {
  403. this.form.headPhoto = [configService.apiUrl + '/' + data.message]
  404. }
  405. // this.form.headPhoto =this.form.headPhoto+'/'+ data.message
  406. }
  407. }
  408. })
  409. }
  410. }
  411. });
  412. },
  413. ViewImage(e) {
  414. uni.previewImage({
  415. urls: this.form.headPhoto,
  416. current: e.currentTarget.dataset.url
  417. });
  418. },
  419. DelImg(e) {
  420. uni.showModal({
  421. title: '提示',
  422. content: '确定要删除?',
  423. cancelText: '取消',
  424. confirmText: '确定',
  425. success: res => {
  426. if (res.confirm) {
  427. this.form.headPhoto.splice(e.currentTarget.dataset.index, 1)
  428. this.form.headPhoto.splice(e.currentTarget.dataset.index, 1)
  429. }
  430. }
  431. })
  432. },
  433. onConfirm(e) {
  434. this.form.locality = e.result
  435. this.form.country = e.value[e.value.length - 1]
  436. },
  437. PickerChange(e) {
  438. this.form.purveyorId = this.supplierOption[e.detail.value].id
  439. },
  440. typeChang(e, val) {
  441. this.form[val] = e.detail.value
  442. },
  443. async businessChange(type) {
  444. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  445. count: 1,
  446. sizeType: ['compressed']
  447. });
  448. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  449. if (!size) {
  450. this.$refs.uToast.show({
  451. title: '上传图片大小不能超过 5MB!',
  452. type: 'error',
  453. })
  454. return false
  455. }
  456. if (chooseImageRes) {
  457. this.lodingshow = true;
  458. // this.$tip.loading()
  459. this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
  460. uni.uploadFile({
  461. url: configService.apiUrl + '/sys/common/upload',
  462. filePath: chooseImageRes.tempFilePaths[0],
  463. name: "file",
  464. formData: {
  465. 'biz': 'temp',
  466. },
  467. success: (files) => {
  468. let data = JSON.parse(files.data);
  469. if (data.success) {
  470. this.form[type] = data.message
  471. if (type == 'businessLicense' || type == 'identityOne') {
  472. uni.uploadFile({
  473. url: configService.apiUrl + `${type == 'businessLicense' ? '/order/identify/businessLicense' : '/order/identify/idCard'}`,
  474. filePath: chooseImageRes.tempFilePaths[0],
  475. name: "image1",
  476. success: (uploadFileRes) => {
  477. let data1 = JSON.parse(uploadFileRes.data).result;
  478. let obj = {}
  479. if (type == 'businessLicense') {
  480. obj = {
  481. corporateName: data1.company ? data1.company : '', //公司名称
  482. creditCode: data1.socialCreditCode ? data1.socialCreditCode : '', //统一社会信用代码
  483. lifespanBegin: data1.registerDate ? data1.registerDate.substr(0,
  484. 4) + '-' + data1.registerDate.substr(5, 2) + '-' + data1.registerDate
  485. .substr(8, 2) : '',
  486. lifespanEnd: data1.effectiveDate && data1.effectiveDate.includes('年') ? data1.effectiveDate.substr(0,
  487. 4) + '-' + data1.effectiveDate.substr(5, 2) + '-' + data1.effectiveDate
  488. .substr(8, 2) : '9999-12-31',
  489. lifespanType: data1.registerDate || data1.effectiveDate ? '2' : '1',
  490. }
  491. }
  492. else {
  493. obj = {
  494. legalPerson: data1.customerInfo.name ? data1.customerInfo.name : '', //法人姓名
  495. legalPersonCode: data1.customerInfo.identifyNumber ? data1.customerInfo.identifyNumber : '', //法人证件号
  496. }
  497. }
  498. this.$nextTick(() => {
  499. this.form = {
  500. ...this.form,
  501. ...obj,
  502. }
  503. // this.$set(this.form, obj);
  504. // this.form=Object.assign(this.form,obj)
  505. console.log(obj, this.form, 88888);
  506. })
  507. this.lodingshow = false;
  508. }
  509. });
  510. }
  511. }
  512. }
  513. });
  514. } else {
  515. this.lodingshow = false;
  516. }
  517. },
  518. timestampToTime(timestamp) {
  519. // let date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  520. let date = new Date(new Date());//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  521. let Y = date.getFullYear() + '-';
  522. let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  523. let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  524. return Y + M + D;
  525. },
  526. sumbit() {
  527. if (this.title == '申请入驻') {
  528. for (let j in this.form) {
  529. if (!this.form[j]) {
  530. if (this.form['lifespanType'] == 2 && (this.form['lifespanBegin'] == null || this.form['lifespanEnd'] == null)) {
  531. this.$tip.alert('请选择日期!')
  532. return
  533. }
  534. if (this.form['businessLicense'] == null) {
  535. this.$tip.alert('请上传营业执照!')
  536. return
  537. }
  538. this.$tip.alert('请填写所有信息!')
  539. return
  540. }
  541. }
  542. this.$http.post('/merchant/app/add', { ...this.form, source: 2, headPhoto: this.form.headPhoto.join(',') , longitude: this.markers[0].longitude, latitude: this.markers[0].latitude }).then(res => {
  543. if (res.data.success) {
  544. this.$tip.success(res.data.result || '成功')
  545. this.$Router.push({ name: "login" })
  546. }
  547. else {
  548. this.$tip.error(res.data.message);
  549. }
  550. })
  551. }
  552. else {
  553. this.$http.post('/merchant/localMerchantInfo/edit', { ...this.form, source: 2,headPhoto: this.form.headPhoto.join(',') }).then(res => {
  554. if (res.data.success) {
  555. this.$tip.success(res.data.result || '成功')
  556. uni.navigateBack({
  557. delta: 1 // 返回的页面数,默认为1
  558. })
  559. }
  560. else {
  561. this.$tip.error(res.data.message);
  562. }
  563. })
  564. }
  565. }
  566. }
  567. }
  568. </script>
  569. <style scoped lang="scss">
  570. page {
  571. background: #F8F8FA;
  572. }
  573. .cu-form-group .title {
  574. width: 190upx;
  575. }
  576. .cu-bg {
  577. background: linear-gradient(180deg, #D6E9FF 0%, #FFFFFF 100%);
  578. }
  579. .tab-top {
  580. margin-top: 78upx;
  581. padding: 26upx;
  582. }
  583. .borderRadiu {
  584. border-radius: 8px;
  585. padding-bottom: 10px;
  586. background-color: #ffffff;
  587. // border-bottom: 1px solid #eee;
  588. }
  589. .sub-bottom {
  590. position: fixed;
  591. width: 100%;
  592. bottom: 0;
  593. background: #FFFFFF;
  594. border-top: 1px solid #EEEEEE;
  595. }
  596. .progress-status {
  597. position: fixed;
  598. width: 100%;
  599. z-index: 9999;
  600. padding: 26upx 42upx;
  601. background: #FFFFFF;
  602. .status {
  603. font-size: 38upx;
  604. color: #F6863E;
  605. font-weight: 500;
  606. margin-bottom: 10upx;
  607. text {
  608. margin-left: 5upx
  609. }
  610. image {
  611. vertical-align: text-top;
  612. width: 42upx;
  613. height: 42upx;
  614. }
  615. }
  616. }
  617. .progress {
  618. position: fixed;
  619. height: 96upx;
  620. width: 100%;
  621. z-index: 9999;
  622. background: #FFFFFF;
  623. padding: 20upx 30upx;
  624. .progress-title {
  625. margin-top: 16upx;
  626. font-size: 24upx;
  627. color: #999999;
  628. .color {
  629. color: #333333;
  630. }
  631. }
  632. .progress-style {
  633. width: 100%;
  634. height: 10upx;
  635. border-radius: 5px 5px 5px 5px;
  636. }
  637. .progress-bag {
  638. position: relative;
  639. background: rgba(68, 154, 255, 0.05);
  640. .progress-icon {
  641. position: absolute;
  642. margin-top: -1px;
  643. width: 12upx;
  644. height: 12upx;
  645. background: #449AFF;
  646. border-radius: 50%;
  647. box-shadow: 0px 0px 0px 7upx rgba(68, 154, 255, 0.3);
  648. }
  649. .progress-icon1 {
  650. position: absolute;
  651. margin-top: -1px;
  652. width: 12upx;
  653. height: 12upx;
  654. background: #449AFF;
  655. border-radius: 50%;
  656. left: 99%;
  657. box-shadow: 0px 0px 0px 7upx rgba(68, 154, 255, 0.3);
  658. }
  659. .progress-bag1 {
  660. width: 50%;
  661. position: absolute;
  662. background: rgba(68, 154, 255, 0.8);
  663. }
  664. .progress-bag2 {
  665. position: absolute;
  666. background: rgba(68, 154, 255, 0.8);
  667. }
  668. }
  669. }
  670. .customize {
  671. background-color: #fff;
  672. // border-top: 0.5px solid #eee;
  673. margin: 16upx 18upx;
  674. .title {
  675. font-size: 30upx;
  676. // padding: 10px;
  677. }
  678. .business-img {
  679. height: 218upx;
  680. width: 360upx;
  681. padding: 16upx;
  682. // padding-bottom: 16upx;
  683. background: url('/static/login/yingye2.png');
  684. margin: 16upx auto;
  685. background-size: cover;
  686. image {
  687. width: 100%;
  688. height: 100%;
  689. }
  690. }
  691. .business-prompt {
  692. padding-top: 16upx;
  693. font-size: 20upx;
  694. color: #999999;
  695. }
  696. }
  697. .booder-top {
  698. border-bottom: 1px solid rgb(238, 238, 238);
  699. padding-top: 7px;
  700. }
  701. .img-border {
  702. padding: 15px 20px;
  703. }
  704. .upload {
  705. width: 100%;
  706. height: 188upx;
  707. // padding: 15px 20px;
  708. background-color: white;
  709. .imgOcr-border {
  710. position: relative;
  711. width: 48%;
  712. height: 100%;
  713. padding: 12upx;
  714. // background-color: #fff;
  715. background: url('/static/login/code3.png');
  716. background-size: cover;
  717. // box-shadow: 0px 4px 10px 0px #DAE3F4;
  718. image {
  719. width: 100%;
  720. // border-radius: 4px;
  721. height: 100%;
  722. }
  723. }
  724. }
  725. </style>