|
|
@@ -4,47 +4,64 @@
|
|
|
<view class="bg"></view>
|
|
|
<view class="card">
|
|
|
<view class="title">店铺资料</view>
|
|
|
- <u-form :model="form" :label-width="labelWidth">
|
|
|
+ <u-form :model="form" :label-width="labelWidth" ref="uForm">
|
|
|
<view class="border">
|
|
|
- <u-form-item label="用户名" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入用户名" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="联系方式" prop="personTel">
|
|
|
+ <u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="业务联系人" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入业务联系人" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="所在商场" prop="phone">
|
|
|
+ <u-input @click="mallShow=true" :border="false" placeholder="请选择所在商场" v-model="mallLabel"
|
|
|
+ type="select"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="border" v-if="form.mallId">
|
|
|
+ <u-form-item label="所在区域" prop="phone">
|
|
|
+ <u-input @click="mallAreaShow=true" :border="false" placeholder="请选择所在区域" v-model="mallAreaLabel"
|
|
|
+ type="select"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="border">
|
|
|
+ <u-form-item label="店铺名" prop="name">
|
|
|
+ <u-input :border="false" placeholder="请输入店铺名" v-model="form.name" type="number"></u-input>
|
|
|
+ </u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="border">
|
|
|
+ <u-form-item label="业务联系人" prop="personName">
|
|
|
+ <u-input :border="false" placeholder="请输入业务联系人" v-model="form.personName" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="tips">
|
|
|
<text>*认证通过后,姓名将不可修改</text>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="身份证号码" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入身份证号码" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="身份证号码" prop="personIdCard">
|
|
|
+ <u-input :border="false" placeholder="请输入身份证号码" v-model="form.personIdCard" ></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="photo border">
|
|
|
<text>请拿出本人有效二代身份证件准备拍摄</text>
|
|
|
<view class="box">
|
|
|
- <view class="flex flex-direction">
|
|
|
- <upload-img :width="$isEmpty(form.face)?430:430" :height="$isEmpty(form.face)?260:260"
|
|
|
- :currentImage="form.face" bgsrc="/static/icon/photo.png">
|
|
|
+ <view @click="chooseImage('idCardFront')" class="flex flex-direction">
|
|
|
+ <upload-img width="430" height="260"
|
|
|
+ :currentImage="form.idCardFront" bgsrc="/static/icon/photo.png">
|
|
|
</upload-img>
|
|
|
<view class="text-center padding-top-20 btn-color">
|
|
|
<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
|
|
|
- <text v-if="$isEmpty(form.face)">请上传身份证正脸照</text>
|
|
|
+ <text v-if="$isEmpty(form.idCardFront)">请上传身份证正脸照</text>
|
|
|
<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="box">
|
|
|
- <view class="flex flex-direction">
|
|
|
- <upload-img :width="$isEmpty(form.face)?430:430" :height="$isEmpty(form.face)?260:260"
|
|
|
- :currentImage="form.face" bgsrc="/static/icon/photo.png">
|
|
|
+ <view @click="chooseImage('idCardContrary')" class="flex flex-direction">
|
|
|
+ <upload-img width="430" height="260"
|
|
|
+ :currentImage="form.idCardContrary" bgsrc="/static/icon/photo.png">
|
|
|
</upload-img>
|
|
|
<view class="text-center padding-top-20 btn-color">
|
|
|
<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
|
|
|
- <text v-if="$isEmpty(form.face)">请上传身份证正脸照</text>
|
|
|
+ <text v-if="$isEmpty(form.idCardContrary)">请上传身份证正脸照</text>
|
|
|
<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -54,74 +71,76 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="邮箱" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入邮箱" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="邮箱" prop="email">
|
|
|
+ <u-input :border="false" placeholder="请输入邮箱" v-model="form.email" ></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="联系方式" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入联系方式" v-model="form.account" type="number"></u-input>
|
|
|
- </u-form-item>
|
|
|
- </view>
|
|
|
- <view class="border">
|
|
|
- <u-form-item label="门店地址" prop="phone">
|
|
|
- <u-input @click="regionShow=true" :border="false" placeholder="请选择门店地址" v-model="form.address"
|
|
|
+ <u-form-item label="门店地址" prop="area">
|
|
|
+ <u-input @click="regionShow=true" :border="false" placeholder="请选择门店地址" v-model="shopAddress"
|
|
|
type="select"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="具体地址" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入具体地址" v-model="form.account" type="number"></u-input>
|
|
|
- </u-form-item>
|
|
|
- </view>
|
|
|
- <view class="border">
|
|
|
- <u-form-item label="单位名称" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入单位名称" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="具体地址" prop="adderess">
|
|
|
+ <u-input :border="false" placeholder="请输入具体地址" v-model="form.adderess" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="公司网址" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请输入公司网址" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="单位全称" prop="fullName">
|
|
|
+ <u-input :border="false" placeholder="请输入单位全称" v-model="form.fullName" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="公司法人姓名" prop="phone" label-position="top">
|
|
|
- <u-input :border="false" placeholder="请输入公司法人姓名" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="公司网址" prop="webUrl">
|
|
|
+ <u-input :border="false" placeholder="请输入公司网址" v-model="form.webUrl" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="公司种类" prop="phone">
|
|
|
- <u-input :border="false" placeholder="请添加公司种类" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item label="公司法人姓名" prop="legalPersonName" label-position="top">
|
|
|
+ <u-input :border="false" placeholder="请输入公司法人姓名" v-model="form.legalPersonName" type="number"></u-input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="统一社会信用代码" prop="phone" label-position="top">
|
|
|
- <u-input :border="false" placeholder="请输入统一社会信用代码" v-model="form.account" type="number"></u-input>
|
|
|
+ <u-form-item @click="showCheckBox" label-width="200" label="公司种类" left-icon="grid">
|
|
|
+ <view @click="checkboxShow=true" class="flex justify-between ">
|
|
|
+ <view @click.stop="" style="display: flex;flex-direction: column;justify-content: center;">
|
|
|
+ <u-checkbox-group>
|
|
|
+ <u-checkbox @change="checkboxChange" v-model="item.checked" v-if="index<=1"
|
|
|
+ v-for="(item, index) in checkboxList" :key="index" :name="index">
|
|
|
+ {{ item.name }}
|
|
|
+ </u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <u-icon name="arrow-right" color="#737373"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="上传营业执照" prop="phone" label-position="top">
|
|
|
- <view class="flex-direction center margin-top-30">
|
|
|
- <upload-img :width="$isEmpty(form.face)?480:480" :height="$isEmpty(form.face)?300:300"
|
|
|
- :currentImage="form.face" bgsrc="/static/icon/upload.png">
|
|
|
+ <u-form-item label="上传营业执照" prop="businessLicense" label-position="top">
|
|
|
+ <view @click="chooseImage('businessLicense')" class="flex-direction center margin-top-30">
|
|
|
+ <upload-img width="480" height="300"
|
|
|
+ :currentImage="form.businessLicense" bgsrc="/static/icon/upload.png">
|
|
|
</upload-img>
|
|
|
<view class="text-center padding-top-20 btn-color">
|
|
|
<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
|
|
|
- <text v-if="$isEmpty(form.face)">请上传营业执照</text>
|
|
|
+ <text v-if="$isEmpty(form.businessLicense)">请上传营业执照</text>
|
|
|
<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="border">
|
|
|
- <u-form-item label="店铺实况" prop="phone" label-position="top">
|
|
|
- <view class="flex-direction center margin-top-30">
|
|
|
- <upload-img :width="$isEmpty(form.face)?480:480" :height="$isEmpty(form.face)?300:300"
|
|
|
- :currentImage="form.face" bgsrc="/static/icon/upload.png">
|
|
|
+ <u-form-item label="店铺实况" prop="shopPic" label-position="top">
|
|
|
+ <view @click="chooseImage('shopPic')" class="flex-direction center margin-top-30">
|
|
|
+ <upload-img width="480" height="300"
|
|
|
+ :currentImage="form.shopPic" bgsrc="/static/icon/upload.png">
|
|
|
</upload-img>
|
|
|
<view class="text-center padding-top-20 btn-color">
|
|
|
<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
|
|
|
- <text v-if="$isEmpty(form.face)">请上传店铺实况</text>
|
|
|
+ <text v-if="$isEmpty(form.shopPic)">请上传店铺实况</text>
|
|
|
<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -139,7 +158,35 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 商场 -->
|
|
|
+ <u-popup border-radius="60" height="60%" mode="bottom" v-model="mallShow">
|
|
|
+ <view class="fixed cu-bar search bg-white">
|
|
|
+ <view class="search-form round">
|
|
|
+ <text class="cuIcon-search"></text>
|
|
|
+ <u-input style="width: 90%;" v-model="mallKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <scroll-view v-if="!$isEmpty(mallList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
+ <view @click="selectMall(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in mallList" :key="index">
|
|
|
+ <text>{{item.name}}</text>
|
|
|
+ </view>
|
|
|
+ <u-divider v-if="mallList.length>=20" height="80">只显示20条数据</u-divider>
|
|
|
+ </scroll-view>
|
|
|
+ <u-empty v-else name="search"></u-empty>
|
|
|
+ </u-popup>
|
|
|
+
|
|
|
|
|
|
+ <u-popup v-model="checkboxShow" mode="bottom" height="50%" border-radius="12">
|
|
|
+ <view class="padding-30">
|
|
|
+ <u-checkbox-group>
|
|
|
+ <u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in checkboxList"
|
|
|
+ :key="index" :name="index">
|
|
|
+ {{ item.name }}
|
|
|
+ </u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <u-select v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column" :list="mallAreaList" @confirm="mallAreaConfirm"></u-select>
|
|
|
<u-picker mode="region" @confirm="regionConfirm" v-model="regionShow"></u-picker>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -157,10 +204,81 @@
|
|
|
backgroundColor: '#D18C42',
|
|
|
},
|
|
|
labelWidth: 170,
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ mallId:'',
|
|
|
+ mallAreaId:'',
|
|
|
+ name:'',
|
|
|
+ personName:'',
|
|
|
+ personIdCard:'',
|
|
|
+ idCardFront:'',
|
|
|
+ idCardContrary:'',
|
|
|
+ personTel:'',
|
|
|
+ adderess:'',
|
|
|
+ fullName:'',
|
|
|
+ webUrl:'',
|
|
|
+ legalPersonName:'',
|
|
|
+ businessLicense:'',
|
|
|
+ shopPic:'',
|
|
|
+
|
|
|
+ province:'',
|
|
|
+ city:'',
|
|
|
+ area:'',
|
|
|
+ provinceCode:'',
|
|
|
+ cityCode:'',
|
|
|
+ areaCode:'',
|
|
|
+
|
|
|
+ auditStatus:0,
|
|
|
+ labelIds:''
|
|
|
+ },
|
|
|
regionShow: false,
|
|
|
+
|
|
|
+ //商场
|
|
|
+ mallShow:false,
|
|
|
+ mallKeyWord:'',
|
|
|
+ mallList:[],
|
|
|
+ mallLabel:'',
|
|
|
+ //区域
|
|
|
+ mallAreaShow:false,
|
|
|
+ mallAreaList:[],
|
|
|
+ mallAreaLabel:'',
|
|
|
+ //门店地址
|
|
|
+ shopAddress:'',
|
|
|
+ //公司总类
|
|
|
+ checkboxShow: false,
|
|
|
+ checkboxList: [],
|
|
|
+
|
|
|
+ rules: {
|
|
|
+ name: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入店铺名',
|
|
|
+ trigger: ['change', 'blur'],
|
|
|
+ }],
|
|
|
+ personName: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入业务联系人',
|
|
|
+ trigger: ['change', 'blur'],
|
|
|
+ }],
|
|
|
+ personIdCard:[{
|
|
|
+ required: true,
|
|
|
+ message: '请输入身份证号码',
|
|
|
+ trigger: ['change', 'blur'],
|
|
|
+ }],
|
|
|
+ businessLicense:[{
|
|
|
+ required: true,
|
|
|
+ message: '请上传营业执照',
|
|
|
+ trigger: ['change', 'blur'],
|
|
|
+ }],
|
|
|
+ area:[{
|
|
|
+ required: true,
|
|
|
+ message: '请选择门店地址',
|
|
|
+ trigger: ['change', 'blur'],
|
|
|
+ }],
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
+ onReady() {
|
|
|
+ this.$refs.uForm.setRules(this.rules);
|
|
|
+ },
|
|
|
onPageScroll(e) {
|
|
|
if (e.scrollTop>100) {
|
|
|
this.title='店铺资料'
|
|
|
@@ -168,9 +286,108 @@
|
|
|
this.title=''
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ mallKeyWord(){
|
|
|
+ let that=this
|
|
|
+ //节流函数
|
|
|
+ if (this.timer){
|
|
|
+ clearTimeout(this.timer)
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.mallList=[]
|
|
|
+ that.fetchMallList()
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ if (this.$isEmpty(options.phone)) {
|
|
|
+ this.$dialog.showModal('系统错误',false).then(()=>{
|
|
|
+ this.$back()
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.form.personTel=options.phone
|
|
|
+ this.fetchMallList()
|
|
|
+ this.getShopLabelByMallId()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async chooseImage(name) {
|
|
|
+ let res = await this.$mpi.chooseImage()
|
|
|
+ this.$api.uploadFile(res[0]).then(res => {
|
|
|
+ this.form[name] = res.data.link
|
|
|
+ })
|
|
|
+ },
|
|
|
regionConfirm(e) {
|
|
|
- this.form.address=e.province.label +'-'+e.city.label+'-'+e.area.label
|
|
|
+ this.form.province=e.province.label
|
|
|
+ this.form.city=e.city.label
|
|
|
+ this.form.area=e.area.label
|
|
|
+ this.form.provinceCode=e.province.value + "0000"
|
|
|
+ this.form.cityCode=e.city.value + "00"
|
|
|
+ this.form.areaCode=e.area.value
|
|
|
+ this.shopAddress=e.province.label +"-"+e.city.label+"-"+e.area.label
|
|
|
+ },
|
|
|
+ fetchMallList(){
|
|
|
+ let params={
|
|
|
+ name:this.mallKeyWord,
|
|
|
+ size:20
|
|
|
+ }
|
|
|
+ this.$api.mall.list(params).then(res=>{
|
|
|
+ this.mallList=res.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fetchMallAreaList(){
|
|
|
+ this.$api.mall.getMallAreaByMallId(this.form.mallId).then(res=>{
|
|
|
+ this.mallAreaList=res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectMall(item){
|
|
|
+ this.mallLabel=item.name
|
|
|
+ this.form.mallId=item.id
|
|
|
+ this.mallShow=false
|
|
|
+ this.fetchMallAreaList()
|
|
|
+ //重新获取标签
|
|
|
+ this.getShopLabelByMallId()
|
|
|
+ },
|
|
|
+ mallAreaConfirm(e){
|
|
|
+ this.mallAreaLabel=e[0].label
|
|
|
+ this.form.mallAreaId=e[0].value
|
|
|
+ },
|
|
|
+ //获取多选的标签
|
|
|
+ getShopLabelByMallId() {
|
|
|
+ this.$api.mall.getShopLabelByMallId(this.form.mallId).then(res => {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ item.checked = false
|
|
|
+ })
|
|
|
+ this.checkboxList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //多选确认
|
|
|
+ checkboxChange(e) {
|
|
|
+ this.checkboxList[e.name].checked = e.value
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ submit(){
|
|
|
+ try{
|
|
|
+ this.form.labelIds= this.checkboxList.filter(item=>item.checked==true).map(item=>item.id).join(",")
|
|
|
+ }catch(e){
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$isEmpty(this.form.labelIds)) {
|
|
|
+ this.$u.toast('请选择公司总类')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.uForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.$api.shop.submit(this.form).then(res=>{
|
|
|
+ if (res.success==true) {
|
|
|
+ this.$dialog.showModal('提交成功,请耐心等待商场管理员审核!',false).then(()=>{
|
|
|
+ this.$back()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|