| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205 |
- <template>
- <view class="container">
- <navbar :config="config" backColor="#666666" @onlyLink='onlyLink'></navbar>
- <form @submit="nextStep">
- <!--企业信息-->
- <view v-if="step==0">
- <view class="u-flex u-bg-abc5b5 step-pd">
- <view>
- <text class="iconfont font68"></text>
- </view>
- <view class="u-ml45 u-00321E">
- <view class="u-font28 u-bold">第一步:企业信息</view>
- <view class="u-font22">共两步</view>
- </view>
- </view>
- <view class="bg-fff">
- <view class="u-plr30 pt14">
- <view>
- <text class="vertical-bar">|</text>
- <text class="u-ml10 u-font30 u-060606">企业信息</text>
- </view>
- <view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>
- 企业名称
- </view>
- <input class="uni-input u-font26" disabled maxlength="16" name="company_name"
- :value="dataform.company_name" placeholder="请输入企业名称" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">统一信用代码</view>
- <input class="uni-input u-font26" disabled maxlength='18' name="credit_code"
- :value="dataform.credit_code" placeholder="请输入统一信用代码" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">经营范围</view>
- <input class="uni-input u-font26" disabled maxlength='25' name="business_scope"
- :value="dataform.business_scope" placeholder="请输入经营范围" />
- </view>
- <!-- <picker class="pickerList" mode="multiSelector" :range="newProvinceDataList"
- range-key="label" :value="multiIndex" @change="enterprisePickerChange"
- @columnchange="enterprisePickerColumnchange">
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">所属地区</view>
- <view v-if="dataform.province != '' " class="uni-input u-font26">
- {{dataform.province}}
- </view>
- <view v-if="dataform.province == '' " class="uni-input u-999">请选择省市区</view>
- </view>
- </picker> -->
- <view class="uni-form-item u-flex" @click="openAreaSelect(1)">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>所属地区
- </view>
- <view v-if="dataform.province != '' " class="uni-input u-font26">
- {{dataform.province}}
- </view>
- <view v-if="dataform.province == '' " class="uni-input u-999">请选择省市区</view>
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">详细地址</view>
- <input class="uni-input u-font26" disabled maxlength='25' name="company_address"
- :value="dataform.company_address" placeholder="详细地址" />
- </view>
- </view>
- </view>
- </view>
- <!--法人信息-->
- <view class="bg-fff u-mt10">
- <view class="u-plr30 pt14">
- <view>
- <text class="vertical-bar">|</text>
- <text class="u-ml10 u-font30 u-060606">法人信息</text>
- </view>
- <view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>法人姓名
- </view>
- <input class="uni-input u-font26" disabled maxlength='5' name="legal_representative"
- :value="dataform.legal_representative" placeholder="请输入法人姓名" />
- </view>
- <view class="uni-form-item u-flex-center-sb ">
- <view class="title u-font28 u-1A1A1A">证件类型</view>
- <view>
- <label class="radio" @click="radio(0)">
- <radio value="0" style="transform:scale(0.7)" disabled :checked="dataform.id_type==0" />
- 身份证
- </label>
- <label class="radio u-ml20" @click="radio(1)">
- <radio value="1" style="transform:scale(0.7)" disabled :checked="dataform.id_type==1" />
- 护照
- </label>
- </view>
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">证件号码</view>
- <input class="uni-input u-font26" disabled maxlength="18" name="id_number" :value="dataform.id_number"
- placeholder="请输入证件号码" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>法人手机号
- </view>
- <input class="uni-input u-font26" disabled type="number" name="lr_mobile" maxlength="11"
- :value="dataform.lr_mobile" placeholder="请输入法人手机号" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">法人邮箱</view>
- <input class="uni-input u-font26" disabled maxlength='20' name="lr_email" :value="dataform.lr_email"
- placeholder="请输入法人邮箱" />
- </view>
- </view>
- </view>
- </view>
- <!--上传图片-->
- <view class="bg-fff u-mt10">
- <view class="u-plr30">
- <view class="pt30">
- <text class="vertical-bar">|</text>
- <text class="u-ml10 u-font30 u-060606">上传附件</text>
- </view>
- <view class="u-mt20">
- <view class="">
- <text>营业执照</text>
- <!-- <text class="u-ml10">查看示例图</text> -->
- </view>
- <view class="u-mt25">
- <uploadImg imgCount="2" uploadImgCount="2" :imgArr="business_license_images" :type="upimgtype" url=""
- @result="resultUrlthree"></uploadImg>
- </view>
- </view>
- <view class="u-mt20">
- <view class="">
- <text>法人申请身份证</text>
- <!-- <text class="u-ml10 u-6087F2">查看示例图(需传身份证正反两面)</text> -->
- </view>
- <view class="u-mt25">
- <uploadImg imgCount="2" uploadImgCount="2" :imgArr="identty_images" :type="upimgtype" url=""
- @result="resultUrlone"></uploadImg>
- </view>
- </view>
- <view class="btn" v-if="dataform.audit_status !=0">
- <button class="u-btn" v-if="step==0" form-type="submit">填写店铺信息</button>
- </view>
- </view>
- </view>
- </view>
- </form>
- <form @submit="formSubmit">
- <!-- v-if="step==1" -->
- <view v-if="step==1">
- <view class="u-flex u-bg-abc5b5 step-pd" v-if="false">
- <view>
- <text class="iconfont font68"></text>
- </view>
- <view class="u-ml45 u-00321E">
- <view class="u-font28 u-bold">第二步:店铺信息</view>
- <view class="u-font22">共两步</view>
- </view>
- </view>
- <!--门店信息-->
- <view class="bg-fff">
- <view class="u-plr30">
- <view class="pt30">
- <text class="vertical-bar">|</text>
- <text class="u-ml10 u-font30 u-060606">店铺信息</text>
- </view>
- <view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>店铺名称
- </view>
- <input class="uni-input u-font26" maxlength='16' name="shop_name" :value="dataform.shop_name"
- placeholder="请输入店铺名称" />
- </view>
- <!-- <picker class="pickerList" mode="multiSelector" :range="newProvinceDataList"
- range-key="label" :value="multiIndex" @change="pickerChange"
- @columnchange="pickerColumnchange">
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">所属地区</view>
- <view class="uni-input u-font26" v-if="dataform.province_name != '' ">
- {{dataform.province_name}}{{dataform.city_name}}{{dataform.area_name}}
- </view>
- <view v-if="dataform.province_name == '' " class="uni-input u-999">请选择省市区</view>
- </view>
- </picker> -->
- <view class="uni-form-item u-flex" @click="openAreaSelect(2)">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>所属地区
- </view>
- <view class="uni-input u-font26" v-if="dataform.province_name != '' ">
- {{dataform.province_name}}{{dataform.city_name}}{{dataform.area_name}}
- </view>
- <view v-if="dataform.province_name == '' " class="uni-input u-999">请选择省市区</view>
- </view>
- <!-- <view class="uni-form-item u-flex " @click="streetChange">
- <view class="title u-font28 u-1A1A1A">所属街道</view>
- <view v-if="dataform.street_name " class="uni-input u-font26">{{dataform.street_name}}
- </view>
- <view v-else class="uni-input u-999">请选择街道</view>
- </view>
- <view class="uni-form-item u-flex " @click="communityChange">
- <view class="title u-font28 u-1A1A1A">所属社区</view>
- <view v-if="dataform.community_code" class="uni-input u-font26">
- {{dataform.community_name}}
- </view>
- <view v-else class="uni-input u-999">请选择社区</view>
- </view> -->
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">详细地址</view>
- <input class="uni-input u-font26" maxlength='20' name="address" :value="dataform.address" type="button"
- placeholder="详细地址" />
- </view>
- <view class="uni-form-item u-flex-center-sb " @click="goMap">
- <view class="title u-font28 u-1A1A1A">店铺地图选址</view>
- <view class="iconfont" v-if="showSelected==false"></view>
- <view v-if="showSelected==true">已选</view>
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">
- <required-tag></required-tag>客服电话
- </view>
- <input class="uni-input u-font26" maxlength="11" name="customer_service_phone"
- :value="dataform.customer_service_phone" placeholder="请输入客服电话" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">营业时间</view>
- <input class="uni-input u-font26" maxlength="26" name="business_hours" disabled @click="goWeeks()"
- :value="dataform.business_hours" placeholder="选择营业时间" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">营业时间段</view>
- <picker mode="time" :value="beginTime" @change="beginTimeChange">
- <input class="uni-input u-font26" name="beginTime" disabled :value="beginTime" placeholder="开始时间"
- style="width: 180rpx;" />
- </picker>
- <picker mode="time" :value="endTime" @change="endTimeChange" class="u-ml20">
- <input class="uni-input u-font26" name="endTime" disabled :value="endTime" placeholder="结束时间"
- style="width: 180rpx;" />
- </picker>
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">商业主体名称</view>
- <input class="uni-input u-font26" maxlength='20' name="main_name" :value="dataform.main_name"
- placeholder="请输入商业主体名称" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">运营人姓名</view>
- <input class="uni-input u-font26" maxlength='5' name="loser" :value="dataform.loser"
- placeholder="请输入运营人姓名" />
- </view>
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A">运营人手机号</view>
- <input class="uni-input u-font26" type="number" maxlength='11' name="mobile" :value="dataform.mobile"
- placeholder="请输入运营人手机号" />
- </view>
- <template v-if="settleMode == 1">
- <view class="uni-form-item u-flex ">
- <view class="title u-font28 u-1A1A1A" style="width: 300rpx;">门店打赏比例</view>
- <input class="uni-input u-font26" max="100" name="reward_ratio" :value="dataform.reward_ratio"
- placeholder="请输入门店打赏比例" />(%)
- </view>
- <view class="uni-form-textarea">
- <view>优惠介绍</view>
- <textarea class="textarea" maxlength='400' name="special_offers" :value="dataform.special_offers"
- placeholder="请输入优惠介绍"></textarea>
- </view>
- </template>
- <view class="uni-form-textarea">
- <view>店铺介绍</view>
- <textarea class="textarea" maxlength='400' name="remark" :value="dataform.remark"
- placeholder="请输入店铺介绍"></textarea>
- </view>
- <view class="uni-form-textarea">
- <view>场地说明</view>
- <textarea class="textarea" maxlength='200' name="place_remark" :value="dataform.place_remark"
- placeholder="请输入场地说明"></textarea>
- </view>
- </view>
- </view>
- </view>
- <!--上传图片-->
- <view class="bg-fff u-mt10">
- <view class="u-plr30">
- <view class="pt30">
- <text class="vertical-bar">|</text>
- <text class="u-ml10 u-font30 u-060606">申请材料</text>
- </view>
- <view class="u-mt20">
- <view class="">
- <text>
- <required-tag></required-tag>店铺logo
- </text>
- <!-- <text class="u-ml10">查看示例图</text> -->
- </view>
- <view class="u-mt25">
- <uploadImg imgCount="1" :imgArr="logo" :type="upimgtype" url="" @result="resultUrlLogo">
- </uploadImg>
- </view>
- </view>
- <view class="u-mt20">
- <view class="">
- <text>店铺图片</text>
- <!-- <text class="u-ml10">查看示例图</text> -->
- </view>
- <view class="u-mt25">
- <uploadImg imgCount="2" :imgArr="store_images" :type="upimgtype" url="" @result="resultUrltwo"
- uploadImgCount="2"></uploadImg>
- </view>
- </view>
- <view class="u-flex-center u-mt25">
- <view class="check u-mr10" @click="aggrementCheck">
- <text class="iconfont iconbox u-font32 u-FF0000 " v-if="checkAggrement"></text>
- <view class="radios" v-else></view>
- </view>
- <text class="u-006BC9 u-font24" @click="linkAgreement">勾选注册协议及隐私声明</text>
- </view>
- <view class="btn" v-if="dataform.audit_status !=0">
- <button class="u-btn" form-type="submit" v-if="step==1">立即提交</button>
- </view>
- </view>
- </view>
- </view>
- </form>
- <u-popup mode="bottom" v-model="weekShow" ref="weeksOpen">
- <view class="u-bg-fff u-p30">
- <view class="week" :class="{ checkedYes: checkedArrey.indexOf(item) != -1 }" v-for="(item,index) in weeks"
- :key="index" @click="appointment(item)">
- <view>{{item}}</view>
- </view>
- <view>
- <button class="weeks-btn" @click="gbClose()">确定</button>
- </view>
- </view>
- </u-popup>
- <!-- 地区 -->
- <u-select v-model="areaShow" mode="mutil-column-auto" :list="newProvinceDataList" @confirm="areaConfirm">
- </u-select>
- <!-- 街道弹窗 -->
- <u-select v-model="streetShow" mode="single-column" :list="streetList" @confirm="streetConfirm"></u-select>
- <!-- 社区弹窗 -->
- <u-select v-model="communityShow" mode="single-column" :list="communityList" @confirm="communityConfirm">
- </u-select>
- </view>
- </template>
- <script>
- import uploadImg from "../../../components/uploadImg/imgUpload.vue"
- import uniPopup from "../../../components/uni-popup/uni-popup.vue"
- import {
- cos
- } from "mathjs"
- export default {
- components: {
- uploadImg,
- uniPopup
- },
- data() {
- return {
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '店铺管理',
- color: '#1A1A1A',
- //背景颜色;参数一透明度(0-1);参数二背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#fff"],
- statusBarFontColor: '#1A1A1A',
- onlyMy: true
- },
- upimgtype: 'other',
- step: 1, //0 显示企业,1显示店铺
- certificateType: null,
- oldpProvinceDataList: [],
- newProvinceDataList: [
- // [],
- // [],
- // []
- ],
- multiIndex: [0, 0, 0],
- dataform: {
- company_name: '', //企业名称
- credit_code: '', //统一信用代码
- business_scope: '', //经营范围
- province: '', //企业省市区
- company_address: '', //企业地址
- legal_representative: '', //法人姓名
- id_type: null, //法人代证件类型(0身份证、1护照)
- id_number: '', //法代证件号码
- lr_mobile: '', //法人手机号
- lr_email: '', //法代邮箱
- mobile: "", //手机
- identity_code: "", //身份证号
- shop_name: "", //店铺名
- main_name: '', //主体名称
- loser: '', //运营人姓名
- province_name: "", //省的名称
- province_code: "", //省编号
- city_code: "", //市编号
- city_name: "", //市名称
- area_name: "", //区名称
- area_code: "", //区编号
- address: "", //详细地址
- map_punctuation: '', //店铺地图选址
- business_hours: "", //营业时间
- time_quantum: '', //时间段
- customer_service_phone: '', //客服电话
- remark: "", //店铺介绍
- place_remark: '', //场地说明
- noticeItems: "", //注意事项
- tx_longitude: "", //微信经度
- tx_latitude: "", //微信纬度
- logo: "", //店铺logo
- store_images: "", //门店图片
- business_license_images: "", //商家经营执照
- identty_images: "", //身份证下反面
- },
- showSelected: false,
- checkAggrement: true,
- audit_status: "1", //审核状态(0待审核,1审核通过,2审核不通过)
- checkedArrey: [],
- weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日', ],
- beginTime: "",
- endTime: "",
- logo: [], //店铺logo
- store_images: [], //门店图片
- business_license_images: [], //商家经营执照
- identty_images: [], //身份证下反面
- streetList: [],
- communityList: [],
- areaShow: false,
- streetShow: false,
- communityShow: false,
- areaShowType: 1, //弹窗类型 1 企业信息地区 2商家地区
- weekShow: false,
- settleMode: 0, // 入驻方式 0 线上 1 联盟
- }
- },
- //写这监听滑动事件,是为了点击填写店铺信息资料时,回到顶部
- onPageScroll(e) {
- if (e.scrollTop > 300) {
- this.floorstatus = true
- } else {
- this.floorstatus = false
- }
- },
- onLoad(options) {
- let that = this;
- if (options.type) {
- //1 审核不通过
- if (options.type == 1) {
- this.getUserInfo()
- }
- }
- if (options.settleMode) {
- this.settleMode = options.settleMode
- }
- //获取省市区
- this.$http.get('/cnarea/tree-lbs', {}).then(async res => {
- let provincesList = res.tree.children;
- // for (let i = 0; i < provincesList.length; i++) {
- // this.newProvinceDataList[0].push(provincesList[i]);
- // for (let c = 0; c < provincesList[i].children.length; c++) {
- // this.newProvinceDataList[1].push(provincesList[i].children[c]);
- // if (provincesList[i].children[c].children) {
- // for (let a = 0; a < provincesList[i].children[c].children.length; a++) {
- // this.newProvinceDataList[2].push(provincesList[i].children[c].children[a]);
- // }
- // } else {
- // this.newProvinceDataList[2] = [];
- // }
- // }
- // }
- this.newProvinceDataList = provincesList
- that.oldpProvinceDataList = provincesList;
- })
- },
- methods: {
- // 协议勾选
- aggrementCheck() {
- this.checkAggrement = !this.checkAggrement
- },
- linkAgreement() {
- uni.navigateTo({
- url: '/pages/user/agreement?type=2'
- })
- },
- openAreaSelect(num) {
- this.areaShow = true;
- this.areaShowType = num;
- },
- // 获取地区
- areaConfirm(e) {
- if (e.length > 0) {
- if (this.areaShowType == 1) {
- this.dataform.province = e[0].label + e[1].label + e[2].label
- } else {
- this.dataform.province_name = e[0].label;
- this.dataform.province_code = e[0].value;
- this.dataform.city_name = e[1].label;
- this.dataform.city_code = e[1].value;
- this.dataform.area_name = e[2].label;
- this.dataform.area_code = e[2].value;
- this.getAreaList(this.dataform.area_code, 'street');
- this.dataform.street_name = "";
- this.dataform.street_code = "";
- this.dataform.community_name = "";
- this.dataform.community_code = ""
- }
- }
- },
- // 获取街道列表
- getAreaList(parentCode, type) {
- this.$http.get(`/cnarea/lbs-children/${parentCode}`, {}).then(res => {
- if (res && res.code == 200) {
- if (type == 'street') {
- this.streetList = res.list;
- // this.getAreaList(this.streetList[this.streetListIndex].value,'community');
- } else {
- this.communityList = res.list;
- }
- }
- });
- },
- // 选择街道
- streetConfirm(e) {
- if (e.length > 0) {
- this.dataform.street_name = e[0].label;
- this.dataform.street_code = e[0].value;
- this.getAreaList(this.dataform.street_code, 'community')
- } else {
- this.dataform.street_name = null;
- this.dataform.street_code = null;
- this.communityList = [];
- }
- this.dataform.community_name = "";
- this.dataform.community_code = ""
- },
- // 选择社区
- communityConfirm(e) {
- if (e.length > 0) {
- this.dataform.community_name = e[0].label;
- this.dataform.community_code = e[0].value
- } else {
- this.dataform.community_name = null;
- this.dataform.community_code = null;
- }
- },
- onlyLink(e) {
- if (e == 1) {
- if (this.step == 1) {
- this.step = 0
- } else if (this.step == 0) {
- uni.navigateBack({
- delta: 1
- })
- }
- }
- },
- getUserInfo() {
- //获取店铺信息
- this.$http.get('/yxt/shop/my-shop', {
- union_business: true
- }).then(res => {
- if (res && res.code == 200 && res.data) {
- this.dataform = res.data
- //将字符串转成图片数组
- if (res.data.logo) {
- this.logo = res.data.logo.split(',')
- }
- if (res.data.business_license_images) {
- this.business_license_images = res.data.business_license_images.split(',')
- }
- if (res.data.identty_images) {
- this.identty_images = res.data.identty_images.split(',')
- }
- if (res.data.store_images) {
- this.store_images = res.data.store_images.split(',')
- }
- //拆分时间
- if (res.data.time_quantum) {
- this.beginTime = res.data.time_quantum.split('-')[0]
- this.endTime = res.data.time_quantum.split('-')[1]
- }
- if (res.data.tx_longitude) {
- this.showSelected = true
- }
- }
- })
- },
- //上传身份证
- resultUrlone(e) {
- this.identty_images = e
- },
- //上传店铺logo
- resultUrlLogo(e) {
- this.logo = e
- },
- //上传门店
- resultUrltwo(e) {
- this.store_images = e
- },
- //上传营业执照
- resultUrlthree(e) {
- this.business_license_images = e
- },
- //证件类型
- radio(e) {
- this.dataform.id_type = e
- },
- //步骤e
- nextStep(e) {
- let target = e.detail.value;
- if (!target.company_name) {
- this.$mUtil.toast('请输入企业名称')
- return false
- }
- // if (!target.credit_code) {
- // this.$mUtil.toast('请输入统一信用代码')
- // return false
- // }
- // if (!target.business_scope) {
- // this.$mUtil.toast('请输入经营范围')
- // return false
- // }
- if (!this.dataform.province) {
- this.$mUtil.toast('请选择省市区')
- return false
- }
- // if (!target.company_address) {
- // this.$mUtil.toast('请输入企业地址')
- // return false
- // }
- if (!target.legal_representative) {
- this.$mUtil.toast('请输入法人姓名')
- return false
- }
- // if (this.dataform.id_type == null) {
- // this.$mUtil.toast('请选择法人证件类型')
- // return false
- // }
- // if (!target.id_number) {
- // this.$mUtil.toast('请输入法人证件号码')
- // return false
- // }
- if (!target.lr_mobile) {
- this.$mUtil.toast('请输入法人手机号')
- return false
- }
- if (!(target.lr_mobile.match(this.$mConfig.telRegex))) {
- this.$mUtil.toast('请输入正确手机号')
- return false
- }
- // if (!target.lr_email) {
- // this.$mUtil.toast('请输入法人邮箱')
- // return false
- // }
- if (target.lr_email && !target.lr_email.match(this.$mConfig.mailVerify)) {
- this.$mUtil.toast('请输入正确邮箱')
- return false
- }
- // if (this.business_license_images == '') {
- // this.$mUtil.toast('请上传营业执照')
- // return false
- // }
- // if (this.identty_images == '') {
- // this.$mUtil.toast('请上传法人身份证(正反面)')
- // return false
- // }
- // if (this.identty_images.length < 2) {
- // this.$mUtil.toast('请上传法人身份证(正反面)')
- // return false
- // }
- //将图片转换字符串
- this.dataform.company_name = target.company_name
- this.dataform.credit_code = target.credit_code
- this.dataform.business_scope = target.business_scope
- this.dataform.company_address = target.company_address
- this.dataform.legal_representative = target.legal_representative
- this.dataform.id_number = target.id_number
- this.dataform.lr_mobile = target.lr_mobile
- this.dataform.lr_email = target.lr_email
- this.dataform.business_license_images = this.business_license_images.join(',')
- this.dataform.identty_images = this.identty_images.join(',')
- if (uni.pageScrollTo) {
- uni.pageScrollTo({
- scrollTop: 0
- })
- } else {
- uni.showModal({
- title: '提示',
- content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
- })
- }
- this.step = 1
- },
- //跳转到地图
- goMap() {
- uni.chooseLocation({
- success: (res) => {
- if (res.address) {
- this.dataform.map_punctuation = res.address;
- this.dataform.tx_latitude = res.latitude
- this.dataform.tx_longitude = res.longitude
- this.showSelected = true
- } else {
- this.showSelected = false
- }
- },
- })
- },
- //点击选择营业时间
- goWeeks() {
- // this.$refs.weeksOpen.open()
- this.weekShow = true;
- },
- //点击关闭
- gbClose() {
- this.$refs.weeksOpen.close()
- this.dataform.business_hours = this.checkedArrey.join(',')
- },
- appointment(value) {
- if (this.checkedArrey.indexOf(value) != -1) {
- this.checkedArrey.splice(this.checkedArrey.indexOf(value), 1);
- } else {
- this.checkedArrey.push(value);
- }
- },
- beginTimeChange(e) {
- this.beginTime = e.target.value
- },
- endTimeChange(e) {
- this.endTime = e.target.value
- },
- //提交申请
- formSubmit(e) {
- let target = e.detail.value;
- if (!target.shop_name) {
- this.$mUtil.toast('请输入店铺名称')
- return false
- }
- if (!this.dataform.province_name) {
- this.$mUtil.toast('请选择省市区')
- return false
- }
- // if(!this.dataform.street_name){
- // this.$mUtil.toast('请选择所属街道')
- // return false
- // }
- // if(!this.dataform.community_name){
- // this.$mUtil.toast('请选择所属社区')
- // return false
- // }
- // if (!target.address) {
- // this.$mUtil.toast('请输入店铺详细地址')
- // return false
- // }
- // if(!this.dataform.map_punctuation){
- // this.$mUtil.toast('请选择店铺地图选址')
- // return false
- // }
- if (!target.customer_service_phone) {
- this.$mUtil.toast('请输入客服电话')
- return false
- }
- // if (!this.dataform.business_hours) {
- // this.$mUtil.toast('请选择营业时间')
- // return false
- // }
- // if (this.beginTime == '') {
- // this.$mUtil.toast('请选择开始时间段')
- // return false
- // }
- // if (this.endTime == '') {
- // this.$mUtil.toast('请选择结束时间段')
- // return false
- // }
- // if (!target.main_name) {
- // this.$mUtil.toast('请输入商业主体名称')
- // return false
- // }
- // if (!target.loser) {
- // this.$mUtil.toast('请输入运营人姓名')
- // return false
- // }
- // if (!target.mobile) {
- // this.$mUtil.toast('请输入运营人电话')
- // return false
- // }
- // if (!(target.mobile.match(this.$mConfig.telRegex))) {
- // this.$mUtil.toast('运营人手机号格式错误')
- // return false
- // }
- if (this.settleMode == 1) {
- if (target.reward_ratio) {
- if (this.$u.test.chinese(target.reward_ratio)) {
- return this.$mUtil.toast('请输入数字类型')
- } else if (!this.$u.test.range(target.reward_ratio, [1, 100])) {
- return this.$mUtil.toast('门店打赏比例请输入0-100的值')
- } else if (!this.$u.test.amount(target.reward_ratio)) {
- return this.$mUtil.toast('门店打赏比例最多保留两位小数')
- }
- }
- }
- // if (!target.remark) {
- // this.$mUtil.toast('请输入店铺介绍')
- // return false
- // }
- // if (!target.place_remark) {
- // this.$mUtil.toast('请输入场地说明')
- // return false
- // }
- if (this.logo == '') {
- this.$mUtil.toast('请上传店铺logo')
- return false
- }
- // if (this.store_images == '') {
- // this.$mUtil.toast('请上传店铺图片')
- // return false
- // }
- if (!this.checkAggrement) {
- this.$mUtil.toast('请先同意协议')
- return false
- }
- this.dataform.shop_name = target.shop_name
- this.dataform.address = target.address
- this.dataform.mobile = target.mobile
- this.dataform.main_name = target.main_name
- this.dataform.loser = target.loser
- this.dataform.customer_service_phone = target.customer_service_phone
- this.dataform.place_remark = target.place_remark
- this.dataform.remark = target.remark
- //将图片数组转成字符串
- this.dataform.logo = this.logo.join(',')
- this.dataform.store_images = this.store_images.join(',')
- //拼接时间段
- this.dataform.time_quantum = this.beginTime + '-' + this.endTime
- // 商家入驻类型
- if (this.settleMode == 1) {
- this.dataform.union_business = true
- this.dataform.reward_ratio = target.reward_ratio || 0
- this.dataform.special_offers = target.special_offers
- }
- console.log('this.dataform', this.dataform)
- let url = '/shop/update/record/apply'
- if (this.dataform.audit_status == 2) {
- url = '/yxt/shopapply/apply'
- }
- this.$http.post(url, this.dataform).then(
- async res => {
- if (res && res.code == 200) {
- uni.showToast({
- title: "提交成功",
- icon: "none",
- duration: 3000
- })
- setTimeout(() => {
- if (this.dataform.audit_status == 2) {
- uni.redirectTo({
- url: '/pages/workbench/shop/audit'
- });
- } else {
- uni.navigateBack()
- }
- }, 1000)
- } else {
- this.$mUtil.toast(res.msg)
- }
- })
- },
- //企业选择————企业省市区确认事件
- // enterprisePickerChange(e) {
- // this.multiIndex = e.detail.value;
- // if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
- // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
- // .newProvinceDataList[1][this.multiIndex[1]].label + this.newProvinceDataList[2][this.multiIndex[2]]
- // .label
- // } else {
- // this.dataform.province = this.newProvinceDataList[0][this.multiIndex[0]].label + this
- // .newProvinceDataList[1][this.multiIndex[1]].label
- // }
- // },
- enterprisePickerColumnchange(e) {
- // 第几列滑动
- // console.log(e.detail.column);
- // 第几列滑动的下标
- // console.log(e.detail.value)
- // 第一列滑动
- if (e.detail.column === 0) {
- this.multiIndex[0] = e.detail.value
- this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
- index) => {
- return item
- })
- //当三级存在
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
- this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
- .multiIndex[1]].children
- .map((item, index) => {
- return item
- })
- }
- } else {
- this.newProvinceDataList[2] = []
- }
- // 第一列滑动 第二列 和第三列 都变为第一个
- this.multiIndex.splice(1, 1, 0)
- this.multiIndex.splice(2, 1, 0)
- }
- // 第二列滑动
- if (e.detail.column === 1) {
- this.multiIndex[1] = e.detail.value
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
- this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
- .multiIndex[1]].children
- .map(
- (item, index) => {
- return item
- })
- } else {
- this.newProvinceDataList[2] = []
- }
- // 第二列 滑动 第三列 变成第一个
- this.multiIndex.splice(2, 1, 0)
- }
- // 第三列滑动
- if (e.detail.column === 2) {
- this.multiIndex[2] = e.detail.value
- // console.log('第三列滑动')
- // console.log(this.multiIndex)
- }
- },
- //商家选择————省市区确认事件
- pickerChange(e) {
- this.multiIndex = e.detail.value;
- if (this.newProvinceDataList[2][this.multiIndex[2]] != undefined) {
- this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
- this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
- this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
- this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
- this.dataform.area_name = this.newProvinceDataList[2][this.multiIndex[2]].label
- this.dataform.area_code = this.newProvinceDataList[2][this.multiIndex[2]].value
- // this.dataform.tx_latitude = this.newProvinceDataList[2][this.multiIndex[2]].latitude
- // this.dataform.tx_longitude = this.newProvinceDataList[2][this.multiIndex[2]].longitude
- this.getAreaList(this.dataform.area_code, 'street')
- } else {
- this.dataform.province_name = this.newProvinceDataList[0][this.multiIndex[0]].label
- this.dataform.province_code = this.newProvinceDataList[0][this.multiIndex[0]].value
- this.dataform.city_name = this.newProvinceDataList[1][this.multiIndex[1]].label
- this.dataform.city_code = this.newProvinceDataList[1][this.multiIndex[1]].value
- // this.dataform.tx_latitude = this.newProvinceDataList[1][this.multiIndex[1]].latitude
- // this.dataform.tx_longitude = this.newProvinceDataList[1][this.multiIndex[1]].longitude
- this.streetList = [];
- this.communityList = [];
- }
- },
- streetChange(e) {
- if (this.streetList && this.streetList.length <= 0) {
- uni.showToast({
- icon: "none",
- title: '请选择所属地区',
- duration: 2000
- });
- return
- }
- this.streetShow = true
- },
- communityChange() {
- if (this.communityList && this.communityList.length <= 0) {
- uni.showToast({
- icon: "none",
- title: '请选择所属街道',
- duration: 2000
- });
- return
- }
- this.communityShow = true
- },
- pickerColumnchange(e) {
- // 第几列滑动
- // console.log(e.detail.column);
- // 第几列滑动的下标
- // console.log(e.detail.value)
- // 第一列滑动
- if (e.detail.column === 0) {
- this.multiIndex[0] = e.detail.value
- this.newProvinceDataList[1] = this.oldpProvinceDataList[this.multiIndex[0]].children.map((item,
- index) => {
- return item
- })
- //当三级存在
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[this.multiIndex[1]]) {
- this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
- .multiIndex[1]].children
- .map((item, index) => {
- return item
- })
- }
- } else {
- this.newProvinceDataList[2] = []
- }
- // 第一列滑动 第二列 和第三列 都变为第一个
- this.multiIndex.splice(1, 1, 0)
- this.multiIndex.splice(2, 1, 0)
- }
- // 第二列滑动
- if (e.detail.column === 1) {
- this.multiIndex[1] = e.detail.value
- if (this.oldpProvinceDataList[this.multiIndex[0]].children[0].children) {
- this.newProvinceDataList[2] = this.oldpProvinceDataList[this.multiIndex[0]].children[this
- .multiIndex[1]].children
- .map(
- (item, index) => {
- return item
- })
- } else {
- this.newProvinceDataList[2] = []
- }
- // 第二列 滑动 第三列 变成第一个
- this.multiIndex.splice(2, 1, 0)
- }
- // 第三列滑动
- if (e.detail.column === 2) {
- this.multiIndex[2] = e.detail.value
- // console.log('第三列滑动')
- // console.log(this.multiIndex)
- }
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F5F5F5;
- }
- .step-pd {
- padding: 40rpx 30rpx;
- }
- .font68 {
- color: #FFFFFF;
- font-size: 68rpx;
- }
- .u-6087F2 {
- color: #6087F2;
- }
- .vertical-bar {
- width: 6rpx;
- height: 30rpx;
- background: #FA6138;
- border-radius: 2rpx;
- color: #0B844A;
- }
- .pt14 {
- padding-top: 14rpx;
- }
- .pt30 {
- padding-top: 30rpx;
- }
- .audit {
- width: 100%;
- padding: 42rpx 0rpx;
- margin-bottom: 30rpx;
- }
- .radio {}
- .auditImg {
- width: 214rpx;
- height: 160rpx;
- }
- .bg-F5FFF9 {
- background-color: #F5FFF9;
- }
- .bg-fff {
- background-color: #FFFFFF;
- padding-bottom: 40rpx;
- }
- .uni-form-item {
- height: 104rpx;
- line-height: 104rpx;
- // margin-top: 34rpx;
- border-bottom: 1rpx solid #d9d9d9;
- }
- .title {
- width: 250rpx;
- }
- .uni-input {
- width: 100%;
- // height: 70rpx;
- height: 104rpx;
- padding-left: 20rpx;
- text-align: right;
- // border: 1rpx solid #d9d9d9;
- // border-radius: 8rpx;
- // padding-left: 20rpx;
- }
- .u-position-re {
- position: relative;
- .iconfont {
- position: absolute;
- top: 0rpx;
- left: 20rpx;
- }
- .uni-input {
- width: 366rpx;
- padding-left: 60rpx;
- }
- }
- .uni-form-textarea {
- margin-top: 35rpx;
- .textarea {
- width: 100%;
- height: 282rpx;
- background-color: #F7F7F7;
- border-radius: 8rpx;
- padding-top: 14rpx;
- margin-top: 24rpx;
- box-sizing: border-box;
- padding-left: 22rpx;
- }
- }
- .btn {
- margin-top: 100rpx;
- margin-bottom: 40rpx;
- display: flex;
- justify-content: center;
- }
- .week {
- text-align: center;
- padding-bottom: 20rpx;
- }
- .checkedYes {
- color: #FF0000;
- }
- .weeks-btn {
- background: #FA6138;
- color: #FFFFFF;
- }
- .check {
- position: relative;
- width: 32rpx;
- height: 32rpx;
- .radios {
- width: 30rpx;
- height: 30rpx;
- display: block;
- border: 1px solid #ccc;
- border-radius: 50%;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1;
- }
- .iconbox {
- position: relative;
- z-index: 2;
- }
- }
- .u-bg-abc5b5 {
- background-color: rgba(55, 117, 246, 0.5);
- }
- </style>
|