|
@@ -15,11 +15,6 @@
|
|
|
<u-input :border="false" placeholder="比如名杨国福麻辣烫(时尚天河2店)" v-model="form.name"></u-input>
|
|
<u-input :border="false" placeholder="比如名杨国福麻辣烫(时尚天河2店)" v-model="form.name"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="border">
|
|
|
|
|
- <u-form-item label="店铺全称" prop="fullName">
|
|
|
|
|
- <u-input :border="false" placeholder="请输入店铺全称(非必填项)" v-model="form.fullName"></u-input>
|
|
|
|
|
- </u-form-item>
|
|
|
|
|
- </view>
|
|
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="业务联系人" prop="personName">
|
|
<u-form-item label="业务联系人" prop="personName">
|
|
|
<u-input :disabled="isEdit" :border="false" placeholder="请输入业务联系人"
|
|
<u-input :disabled="isEdit" :border="false" placeholder="请输入业务联系人"
|
|
@@ -34,6 +29,11 @@
|
|
|
<u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
|
|
<u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="border">
|
|
|
|
|
+ <u-form-item label="邮箱" prop="email">
|
|
|
|
|
+ <u-input :border="false" placeholder="请输入邮箱(非必填项)" v-model="form.email"></u-input>
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ </view>
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="所在商场" prop="phone">
|
|
<u-form-item label="所在商场" prop="phone">
|
|
|
<u-input @click="mallShow=true" :border="false" placeholder="请选择所在商场(非必填项)"
|
|
<u-input @click="mallShow=true" :border="false" placeholder="请选择所在商场(非必填项)"
|
|
@@ -57,7 +57,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label-width="200" label="公司种类" left-icon="grid">
|
|
<u-form-item label-width="200" label="公司种类" left-icon="grid">
|
|
|
- <view class="flex justify-between " @click="$jump('/pages/chooseLable/chooseLable')">
|
|
|
|
|
|
|
+ <view class="flex justify-between " @click="chooseLabel">
|
|
|
<view class="u-flex u-flex-wrap">
|
|
<view class="u-flex u-flex-wrap">
|
|
|
<text v-if="form.labelKey" class="text-cut-1">{{form.labelKey}}</text>
|
|
<text v-if="form.labelKey" class="text-cut-1">{{form.labelKey}}</text>
|
|
|
<text v-else style="color: #c0c4cc;">请选择</text>
|
|
<text v-else style="color: #c0c4cc;">请选择</text>
|
|
@@ -68,6 +68,11 @@
|
|
|
</view>
|
|
</view>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="border">
|
|
|
|
|
+ <u-form-item label="所在地区" prop="address">
|
|
|
|
|
+ <u-input :disabled="true" :border="false" placeholder="请选择所在地区" @click="regionShow=true" v-model="form.location"></u-input>
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ </view>
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="具体地址" label-position="top" prop="address">
|
|
<u-form-item label="具体地址" label-position="top" prop="address">
|
|
|
<u-input :border="false" placeholder="请详细写到门店编号" v-model="form.address"></u-input>
|
|
<u-input :border="false" placeholder="请详细写到门店编号" v-model="form.address"></u-input>
|
|
@@ -81,13 +86,13 @@
|
|
|
<block v-else-if="step==2">
|
|
<block v-else-if="step==2">
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="上传店铺封面" prop="cover" label-position="top">
|
|
<u-form-item label="上传店铺封面" prop="cover" label-position="top">
|
|
|
- <upload-img title="请上传店铺封面" @click="chooseImage" :model="form.cover"
|
|
|
|
|
|
|
+ <upload-img title="请上传店铺封面" @click="chooseImageShop" :model="form.cover"
|
|
|
dataName="cover" ></upload-img>
|
|
dataName="cover" ></upload-img>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="上传营业执照" prop="businessLicense" label-position="top">
|
|
<u-form-item label="上传营业执照" prop="businessLicense" label-position="top">
|
|
|
- <upload-img title="请上传营业执照" @click="chooseImage" :model="form.businessLicense"
|
|
|
|
|
|
|
+ <upload-img title="请上传营业执照" @click="chooseImageAudit" :model="auditForm.businessLicense"
|
|
|
dataName="businessLicense" ></upload-img>
|
|
dataName="businessLicense" ></upload-img>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
@@ -104,21 +109,15 @@
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
- <u-form-item label="公司法人姓名" prop="legalPersonName" label-position="top">
|
|
|
|
|
- <u-input :border="false" placeholder="请输入公司法人姓名(非必填项)" v-model="form.legalPersonName">
|
|
|
|
|
|
|
+ <u-form-item label="公司法人姓名" prop="legalPerson" label-position="top">
|
|
|
|
|
+ <u-input :border="false" placeholder="请输入公司法人姓名(非必填项)" v-model="auditForm.legalPerson">
|
|
|
</u-input>
|
|
</u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="border">
|
|
|
|
|
- <u-form-item label="邮箱" prop="email">
|
|
|
|
|
- <u-input :border="false" placeholder="请输入邮箱(非必填项)" v-model="form.email"></u-input>
|
|
|
|
|
- </u-form-item>
|
|
|
|
|
- </view>
|
|
|
|
|
<view class="border">
|
|
<view class="border">
|
|
|
<u-form-item label="身份证号码" prop="personIdCard">
|
|
<u-form-item label="身份证号码" prop="personIdCard">
|
|
|
<u-input :disabled="isEdit" :border="false" placeholder="请输入身份证号码"
|
|
<u-input :disabled="isEdit" :border="false" placeholder="请输入身份证号码"
|
|
|
- v-model="form.personIdCard"></u-input>
|
|
|
|
|
|
|
+ v-model="auditForm.idCard"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tips">
|
|
<view class="tips">
|
|
@@ -127,14 +126,14 @@
|
|
|
<view class="photo border">
|
|
<view class="photo border">
|
|
|
<text>请拿出本人有效二代身份证件准备拍摄</text>
|
|
<text>请拿出本人有效二代身份证件准备拍摄</text>
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
- <upload-img title="上传人像面照片" @click="chooseImage" :model="form.idCardFront"
|
|
|
|
|
|
|
+ <upload-img title="上传人像面照片" @click="chooseImageAudit" :model="auditForm.idCardFront"
|
|
|
dataName="idCardFront" :enableImg="true"></upload-img>
|
|
dataName="idCardFront" :enableImg="true"></upload-img>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tips">
|
|
<view class="tips">
|
|
|
<text>*认证通过后,身份证人像面将不可修改</text>
|
|
<text>*认证通过后,身份证人像面将不可修改</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box" style="margin-top: 0;">
|
|
<view class="box" style="margin-top: 0;">
|
|
|
- <upload-img title="上传国徽面照片" @click="chooseImage" :model="form.idCardContrary"
|
|
|
|
|
|
|
+ <upload-img title="上传国徽面照片" @click="chooseImageAudit" :model="auditForm.idCardContrary"
|
|
|
dataName="idCardContrary" :enableImg="true" :bgImg="idCardContraryBgImg"></upload-img>
|
|
dataName="idCardContrary" :enableImg="true" :bgImg="idCardContraryBgImg"></upload-img>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tips">
|
|
<view class="tips">
|
|
@@ -183,6 +182,7 @@
|
|
|
|
|
|
|
|
<u-select v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column" :list="mallAreaList"
|
|
<u-select v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column" :list="mallAreaList"
|
|
|
@confirm="mallAreaConfirm"></u-select>
|
|
@confirm="mallAreaConfirm"></u-select>
|
|
|
|
|
+ <u-picker @confirm="regionConfirm" v-model="regionShow" mode="region"></u-picker>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -205,36 +205,35 @@
|
|
|
backgroundColor: '#D18C42',
|
|
backgroundColor: '#D18C42',
|
|
|
},
|
|
},
|
|
|
labelWidth: 170,
|
|
labelWidth: 170,
|
|
|
|
|
+ //商户实体
|
|
|
form: {
|
|
form: {
|
|
|
id: '',
|
|
id: '',
|
|
|
mallId: '',
|
|
mallId: '',
|
|
|
- mallAreaId: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
personName: '',
|
|
personName: '',
|
|
|
- personIdCard: '',
|
|
|
|
|
- idCardFront: '',
|
|
|
|
|
- idCardContrary: '',
|
|
|
|
|
personTel: '',
|
|
personTel: '',
|
|
|
- address: '',
|
|
|
|
|
- fullName: '',
|
|
|
|
|
- webUrl: '',
|
|
|
|
|
- legalPersonName: '',
|
|
|
|
|
- businessLicense: '',
|
|
|
|
|
- shopPic: '',
|
|
|
|
|
- slogan: '',
|
|
|
|
|
- email: '',
|
|
|
|
|
-
|
|
|
|
|
- province: '',
|
|
|
|
|
- city: '',
|
|
|
|
|
- area: '',
|
|
|
|
|
- provinceCode: '',
|
|
|
|
|
- cityCode: '',
|
|
|
|
|
- areaCode: '',
|
|
|
|
|
-
|
|
|
|
|
- auditStatus: 0,
|
|
|
|
|
|
|
+ locationCode:'',
|
|
|
|
|
+ location:'',
|
|
|
cover: '',
|
|
cover: '',
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ labelParentIds:'',
|
|
|
|
|
+ labelJson:"",
|
|
|
|
|
+ labelKey:"",
|
|
|
|
|
+ shopPic:"",
|
|
|
|
|
+ email: '',
|
|
|
|
|
+ slogan: '',
|
|
|
|
|
+ longitude:'',
|
|
|
|
|
+ latitude:'',
|
|
|
|
|
+ address:'',
|
|
|
|
|
+ auditStatus: this.$global.SHOP_AUDIT.WAITING,//待审核
|
|
|
|
|
+ },
|
|
|
|
|
+ auditForm:{
|
|
|
|
|
+ address:"",
|
|
|
|
|
+ entity:'',
|
|
|
|
|
+ idCard:'',
|
|
|
|
|
+ idCardFront:'',
|
|
|
|
|
+ idCardContrary:'',
|
|
|
|
|
+ businessLicense:'',
|
|
|
|
|
+ legalPerson:"",
|
|
|
},
|
|
},
|
|
|
//商场
|
|
//商场
|
|
|
mallShow: false,
|
|
mallShow: false,
|
|
@@ -245,6 +244,8 @@
|
|
|
mallAreaShow: false,
|
|
mallAreaShow: false,
|
|
|
mallAreaList: [],
|
|
mallAreaList: [],
|
|
|
mallAreaLabel: '',
|
|
mallAreaLabel: '',
|
|
|
|
|
+ //所在地区
|
|
|
|
|
+ regionShow:false,
|
|
|
//门店地址
|
|
//门店地址
|
|
|
shopAddress: '',
|
|
shopAddress: '',
|
|
|
step: 1,
|
|
step: 1,
|
|
@@ -278,10 +279,12 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
uni.$on('labelData',(labelData)=>{
|
|
uni.$on('labelData',(labelData)=>{
|
|
|
- this.$set(this.form,Object.assign(this.form,labelData))
|
|
|
|
|
|
|
+ this.form.labelJson=labelData.labelJson
|
|
|
|
|
+ this.form.labelKey=labelData.labelKey
|
|
|
|
|
+ this.form.labelParentIds=labelData.labelParentIds
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
})
|
|
})
|
|
|
this.form.personTel = options.phone
|
|
this.form.personTel = options.phone
|
|
|
- this.getLabel()
|
|
|
|
|
if (options.edit) {
|
|
if (options.edit) {
|
|
|
this.isEdit = true
|
|
this.isEdit = true
|
|
|
this.fetchShopDetail()
|
|
this.fetchShopDetail()
|
|
@@ -289,19 +292,32 @@
|
|
|
this.fetchMallList()
|
|
this.fetchMallList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getLabel(){
|
|
|
|
|
- this.$api.dict.dictionaryTree({code:'business_label'}).then(res=>{
|
|
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+ //所在地区
|
|
|
|
|
+ regionConfirm(e){
|
|
|
|
|
+ this.form.location=e.province.label+"-"+e.city.label+"-"+e.area.label
|
|
|
|
|
+ this.form.locationCode=e.province.value+"0000,"+e.city.value+"00,"+e.area.value
|
|
|
|
|
+ },
|
|
|
|
|
+ //具体地址
|
|
|
|
|
+ chooseAddress() {
|
|
|
|
|
+ var _this = this
|
|
|
|
|
+ uni.chooseLocation({
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ _this.form.address = res.address
|
|
|
|
|
+ _this.form.longitude = res.longitude
|
|
|
|
|
+ _this.form.latitude = res.latitude
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ //选择标签
|
|
|
|
|
+ chooseLabel(){
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url:"../chooseLable/chooseLable?label="+this.form.labelJson
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
uploadShopPics(data) {
|
|
uploadShopPics(data) {
|
|
|
this.imgList=data
|
|
this.imgList=data
|
|
|
},
|
|
},
|
|
|
- delImg(index) {
|
|
|
|
|
- this.$dialog.showModal('确定删除?').then(res => {
|
|
|
|
|
- this.imgList.splice(index, 1)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
async fetchShopDetail() {
|
|
async fetchShopDetail() {
|
|
|
let params = {
|
|
let params = {
|
|
|
id: this.vuex_shopId
|
|
id: this.vuex_shopId
|
|
@@ -327,19 +343,21 @@
|
|
|
this.$u.toast('请输入业务联系人')
|
|
this.$u.toast('请输入业务联系人')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- // labelIds labelNames
|
|
|
|
|
- if (this.$isEmpty(this.form.labelIds)) {
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.form.labelKey)) {
|
|
|
this.$u.toast('请选择公司种类')
|
|
this.$u.toast('请选择公司种类')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.$isEmpty(this.form.location)) {
|
|
|
|
|
+ this.$u.toast('请选择所在地区')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (this.$isEmpty(this.form.address)) {
|
|
if (this.$isEmpty(this.form.address)) {
|
|
|
this.$u.toast('请选择具体地址')
|
|
this.$u.toast('请选择具体地址')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if (this.step == 2) {
|
|
if (this.step == 2) {
|
|
|
- if (this.$isEmpty(this.form.businessLicense)) {
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.auditForm.businessLicense)) {
|
|
|
this.$u.toast('请上传营业执照')
|
|
this.$u.toast('请上传营业执照')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -348,17 +366,7 @@
|
|
|
this.step++
|
|
this.step++
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- chooseAddress() {
|
|
|
|
|
- var _this = this
|
|
|
|
|
- uni.chooseLocation({
|
|
|
|
|
- success(res) {
|
|
|
|
|
- console.log(res);
|
|
|
|
|
- _this.form.address = res.address
|
|
|
|
|
- _this.form.longitude = res.longitude
|
|
|
|
|
- _this.form.latitude = res.latitude
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
clear(t) {
|
|
clear(t) {
|
|
|
if (t == 'mallAreaLabel') {
|
|
if (t == 'mallAreaLabel') {
|
|
|
this.mallAreaLabel = ''
|
|
this.mallAreaLabel = ''
|
|
@@ -366,14 +374,21 @@
|
|
|
this.mallLabel = ''
|
|
this.mallLabel = ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async chooseImage(name) {
|
|
|
|
|
- if (this.isEdit && (name == 'businessLicense' || name == 'idCardFront' || name == 'idCardContrary')) {
|
|
|
|
|
|
|
+ async chooseImageShop(name) {
|
|
|
|
|
+ let res = await this.$mpi.chooseImage()
|
|
|
|
|
+ this.$api.uploadFile(res[0]).then(res => {
|
|
|
|
|
+ this.form[name] = res.data.link
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ async chooseImageAudit(name) {
|
|
|
|
|
+ if (this.isEdit) {
|
|
|
this.$u.toast('不可修改')
|
|
this.$u.toast('不可修改')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
let res = await this.$mpi.chooseImage()
|
|
let res = await this.$mpi.chooseImage()
|
|
|
this.$api.uploadFile(res[0]).then(res => {
|
|
this.$api.uploadFile(res[0]).then(res => {
|
|
|
- this.form[name] = res.data.link
|
|
|
|
|
|
|
+ this.auditForm[name] = res.data.link
|
|
|
|
|
+ console.log(this.auditForm[name]);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
fetchMallList() {
|
|
fetchMallList() {
|
|
@@ -394,7 +409,7 @@
|
|
|
this.mallLabel = item.name
|
|
this.mallLabel = item.name
|
|
|
this.form.mallId = item.id
|
|
this.form.mallId = item.id
|
|
|
this.mallShow = false
|
|
this.mallShow = false
|
|
|
- this.fetchMallAreaList()
|
|
|
|
|
|
|
+ // this.fetchMallAreaList()
|
|
|
//重新获取标签
|
|
//重新获取标签
|
|
|
this.getShopLabelByMallId()
|
|
this.getShopLabelByMallId()
|
|
|
},
|
|
},
|
|
@@ -403,36 +418,27 @@
|
|
|
this.form.mallAreaId = e[0].value
|
|
this.form.mallAreaId = e[0].value
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
- if (this.$isEmpty(this.form.personIdCard)) {
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.auditForm.idCard)) {
|
|
|
this.$u.toast('请输入身份证号码')
|
|
this.$u.toast('请输入身份证号码')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (this.$isEmpty(this.form.idCardFront)) {
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.auditForm.idCardFront)) {
|
|
|
this.$u.toast('请上传身份证正面照')
|
|
this.$u.toast('请上传身份证正面照')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (this.$isEmpty(this.form.idCardContrary)) {
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.auditForm.idCardContrary)) {
|
|
|
this.$u.toast('请上传身份证反面照')
|
|
this.$u.toast('请上传身份证反面照')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- let content = '提交成功,请耐心等待商场管理员审核'
|
|
|
|
|
- let url = '/pages/login/account-login'
|
|
|
|
|
- if (this.isEdit) {
|
|
|
|
|
- content = '修改成功'
|
|
|
|
|
- url = '/pages/index/index'
|
|
|
|
|
- } else {
|
|
|
|
|
- if (this.$isEmpty(this.form.mallId)) {
|
|
|
|
|
- content = '提交成功,请耐心等待平台审核'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ let params={
|
|
|
|
|
+ shop:this.form,
|
|
|
|
|
+ audit:this.auditForm
|
|
|
}
|
|
}
|
|
|
- this.$api.shop.submit(this.form).then(res => {
|
|
|
|
|
|
|
+ this.$api.shop.submitAudit(params).then(res=>{
|
|
|
if (res.success == true) {
|
|
if (res.success == true) {
|
|
|
- this.$dialog.showModal(content, false).then(() => {
|
|
|
|
|
- uni.reLaunch({
|
|
|
|
|
- url
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url:"/pages/login/submit-success"
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|