| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210 |
- <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" 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" 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" 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" 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" 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)" :checked="dataform.id_type==0" />
- 身份证
- </label>
- <label class="radio u-ml20" @click="radio(1)">
- <radio value="1" style="transform:scale(0.7)" :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" 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" 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" 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">
- <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 class="u-999">(审核失败后可修改)</text></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: 0, //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) {
- if (options.settleMode) {
- this.settleMode = options.settleMode
- }
- let that = this;
- if (options.type) {
- //1 审核不通过
- if (options.type == 1) {
- this.getUserInfo()
- }
- }
- //获取省市区
- 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/shopapply/shopApplyInfo', {
- union_business: this.settleMode == 0 ? false : 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.reward_ratio) {
- if (this.$u.test.chinese(target.reward_ratio)) {
- return this.$mUtil.toast('请输入数字类型')
- } else if (!this.$u.test.amount(target.reward_ratio)) {
- return this.$mUtil.toast('门店打赏比例最多保留两位小数')
- } else if (!this.$u.test.range(target.reward_ratio, [0,
- 100
- ])) {
- return this.$mUtil.toast('门店打赏比例请输入0-100的值')
- }
- }
- // if (!(target.mobile.match(this.$mConfig.telRegex))) {
- // this.$mUtil.toast('运营人手机号格式错误')
- // return false
- // }
- // 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)
- this.$http.post('/yxt/shopapply/apply', this.dataform).then(async res => {
- if (res && res.code == 200) {
- uni.showToast({
- title: "提交成功",
- icon: "none",
- duration: 3000
- })
- setTimeout(() => {
- // uni.switchTab({
- // url:'../../index/personal'
- // })
- // uni.navigateTo({
- // url: "../../research/setup/toBusiness"
- // })
- // uni.navigateTo({
- // url:"/pages/user/merchant/audit"
- // })
- if (this.settleMode == 0) {
- uni.reLaunch({
- url: '/pages/user/merchant/audit'
- });
- } else {
- uni.reLaunch({
- url: '/pages/workbench/shop/audit'
- });
- }
- }, 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>
|