|
|
@@ -2,7 +2,10 @@
|
|
|
<div class="app-content">
|
|
|
<form @submit="formSubmit">
|
|
|
<div class="module-com">
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
<div class="tui-title">花店名称</div>
|
|
|
<input
|
|
|
v-model="form.name"
|
|
|
@@ -13,17 +16,42 @@
|
|
|
placeholder="请输入花店名称"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ :arrow="true"
|
|
|
+ @click="openAddres"
|
|
|
+ >
|
|
|
<div class="tui-title">所在城市</div>
|
|
|
- <div class="tui-input" v-if="form.province">{{ form.province + '-' + form.city }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择</div>
|
|
|
+ <div
|
|
|
+ class="tui-input"
|
|
|
+ v-if="form.province"
|
|
|
+ >{{ form.province + '-' + form.city }}</div>
|
|
|
+ <div
|
|
|
+ class="tui-placeholder"
|
|
|
+ v-else
|
|
|
+ >请选择</div>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ :arrow="true"
|
|
|
+ @click="selRegionFn"
|
|
|
+ >
|
|
|
<div class="tui-title">详细地址</div>
|
|
|
- <div class="tui-input" v-if="form.address">{{ form.address }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请填写详细地址</div>
|
|
|
+ <div
|
|
|
+ class="tui-input"
|
|
|
+ v-if="form.address"
|
|
|
+ >{{ form.address }}</div>
|
|
|
+ <div
|
|
|
+ class="tui-placeholder"
|
|
|
+ v-else
|
|
|
+ >请填写详细地址</div>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
<div class="tui-title">门牌号</div>
|
|
|
<input
|
|
|
v-model="form.floor"
|
|
|
@@ -34,10 +62,31 @@
|
|
|
placeholder="楼号门牌号(选填)"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
+ <div class="tui-title">头像</div>
|
|
|
+ <app-uploader
|
|
|
+ @resultData="_resultData"
|
|
|
+ :num="1"
|
|
|
+ />
|
|
|
+ <!-- <input
|
|
|
+ v-model="form.name"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ placeholder-style="color:#CCCCCC"
|
|
|
+ class="tui-input"
|
|
|
+ name="name"
|
|
|
+ placeholder="请输入营业执照编号"
|
|
|
+ /> -->
|
|
|
+ </tui-list-cell>
|
|
|
</div>
|
|
|
<!-- 店长昵称 -->
|
|
|
<div class="module-com">
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
<div class="tui-title">店长姓名</div>
|
|
|
<input
|
|
|
v-model="form.adminName"
|
|
|
@@ -49,44 +98,60 @@
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
<AppBindInfo
|
|
|
- @bindInfo="bindInfo"
|
|
|
- nameTetx="我的昵称">
|
|
|
+ @bindInfo="bindInfo"
|
|
|
+ nameTetx="我的昵称"
|
|
|
+ >
|
|
|
</AppBindInfo>
|
|
|
</div>
|
|
|
<!-- 手机号 -->
|
|
|
<div class="module-com">
|
|
|
- <tui-list-cell
|
|
|
- v-if="option.style == 1"
|
|
|
- class="line-cell code-wrap" :hover="false">
|
|
|
- <div class="tui-title">主营业务</div>
|
|
|
- <div>
|
|
|
- <button
|
|
|
- @click="changeMain(1)"
|
|
|
- :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']">
|
|
|
- 零售
|
|
|
- </button>
|
|
|
- <button
|
|
|
- @click="changeMain(2)"
|
|
|
- style="margin-left:10px;" :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']">
|
|
|
- 培训
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">营业执照编号</div>
|
|
|
- <input
|
|
|
- v-model="form.licenseNo"
|
|
|
- placeholder-class="phcolor"
|
|
|
- placeholder-style="color:#CCCCCC"
|
|
|
- class="tui-input"
|
|
|
- name="name"
|
|
|
- placeholder="请输入营业执照编号"
|
|
|
- />
|
|
|
- </tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">营业执照片</div>
|
|
|
- <app-uploader @resultData="resultData" ref="appUploader" :num="1" />
|
|
|
- <!-- <input
|
|
|
+ <tui-list-cell
|
|
|
+ v-if="option.style == 1"
|
|
|
+ class="line-cell code-wrap"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
+ <div class="tui-title">主营业务</div>
|
|
|
+ <div>
|
|
|
+ <button
|
|
|
+ @click="changeMain(1)"
|
|
|
+ :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']"
|
|
|
+ >
|
|
|
+ 零售
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ @click="changeMain(2)"
|
|
|
+ style="margin-left:10px;"
|
|
|
+ :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']"
|
|
|
+ >
|
|
|
+ 培训
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
+ <div class="tui-title">营业执照编号</div>
|
|
|
+ <input
|
|
|
+ v-model="form.licenseNo"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ placeholder-style="color:#CCCCCC"
|
|
|
+ class="tui-input"
|
|
|
+ name="name"
|
|
|
+ placeholder="请输入营业执照编号"
|
|
|
+ />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ >
|
|
|
+ <div class="tui-title">营业执照片</div>
|
|
|
+ <app-uploader
|
|
|
+ @resultData="resultData"
|
|
|
+ ref="appUploader"
|
|
|
+ :num="1"
|
|
|
+ />
|
|
|
+ <!-- <input
|
|
|
v-model="form.name"
|
|
|
placeholder-class="phcolor"
|
|
|
placeholder-style="color:#CCCCCC"
|
|
|
@@ -94,14 +159,22 @@
|
|
|
name="name"
|
|
|
placeholder="请输入营业执照编号"
|
|
|
/> -->
|
|
|
- </tui-list-cell>
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
</div>
|
|
|
<!-- 推荐人 -->
|
|
|
- <div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
|
|
|
+ <div
|
|
|
+ class="module-com recommend-wrap"
|
|
|
+ v-if="!$util.isEmpty(merchantData)"
|
|
|
+ >
|
|
|
<div class="recommend-tag">推荐人</div>
|
|
|
<div class="recommend-det">
|
|
|
- <image style="width:90rpx;height:90rpx;border-radius:42rpx;" mode="scaleToFill" :src="merchantData.smallLogoUrl" @error="imageError" />
|
|
|
+ <image
|
|
|
+ style="width:90rpx;height:90rpx;border-radius:42rpx;"
|
|
|
+ mode="scaleToFill"
|
|
|
+ :src="merchantData.smallLogoUrl"
|
|
|
+ @error="imageError"
|
|
|
+ />
|
|
|
<div class="recommend-info">
|
|
|
<div class="app-size-32">{{ merchantData.name }}</div>
|
|
|
<div class="app-color-2">{{ merchantData.fullAddress }}</div>
|
|
|
@@ -110,10 +183,17 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="btn-wrap">
|
|
|
- <button class="admin-button-com blue big" formType="submit">确认</button>
|
|
|
+ <button
|
|
|
+ class="admin-button-com blue big"
|
|
|
+ formType="submit"
|
|
|
+ >确认</button>
|
|
|
</div>
|
|
|
<!-- 选择地区 -->
|
|
|
- <app-area-sel :show.sync="showRegion" @change="changeAreaFn" :city="form.city" />
|
|
|
+ <app-area-sel
|
|
|
+ :show.sync="showRegion"
|
|
|
+ @change="changeAreaFn"
|
|
|
+ :city="form.city"
|
|
|
+ />
|
|
|
<!-- 省市联动 -->
|
|
|
<simple-address
|
|
|
ref="simpleAddress"
|
|
|
@@ -151,7 +231,7 @@ export default {
|
|
|
AppUploader,
|
|
|
AppBindInfo
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
merchantData: {},
|
|
|
form: {
|
|
|
@@ -161,15 +241,15 @@ export default {
|
|
|
city: "",
|
|
|
dist: "",
|
|
|
address: "",
|
|
|
- adminName:'',
|
|
|
- nickName:'',
|
|
|
+ adminName: '',
|
|
|
+ nickName: '',
|
|
|
main: 1,
|
|
|
licenseNo: "",
|
|
|
- license: "",
|
|
|
+ license: "",
|
|
|
// floor: "",
|
|
|
longitude: "",
|
|
|
latitude: "",
|
|
|
-
|
|
|
+ logo: ''
|
|
|
},
|
|
|
showRegion: false,
|
|
|
// 省市联动
|
|
|
@@ -182,7 +262,7 @@ export default {
|
|
|
nickName: ""
|
|
|
};
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad () {
|
|
|
// form 来源 introMerchantId 推荐ID style 供货商 | 零售
|
|
|
// if (!this.$util.isLogin()) {
|
|
|
// // getShopUser()
|
|
|
@@ -192,22 +272,26 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//图片地址
|
|
|
- resultData(val){
|
|
|
+ resultData (val) {
|
|
|
this.form.license = val.shortUrl
|
|
|
},
|
|
|
- changeMain(val){
|
|
|
+ _resultData (val) {
|
|
|
+ console.log(val)
|
|
|
+ this.form.logo = val.shortUrl
|
|
|
+ },
|
|
|
+ changeMain (val) {
|
|
|
this.form.main = val
|
|
|
},
|
|
|
- bindInfo(val){
|
|
|
+ bindInfo (val) {
|
|
|
this.form.nickName = val.nickName;
|
|
|
this.form.mobile = val.mobile
|
|
|
},
|
|
|
- init() {
|
|
|
+ init () {
|
|
|
this.$util.getCheckLogin().then(res => {
|
|
|
if (res) {
|
|
|
- if(this.option.introMerchantId) {
|
|
|
- this._getMerchantDet();
|
|
|
- }
|
|
|
+ if (this.option.introMerchantId) {
|
|
|
+ this._getMerchantDet();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -216,15 +300,15 @@ export default {
|
|
|
// this.regionData = res.data.tree;
|
|
|
// });
|
|
|
// },
|
|
|
- _getMerchantDet() {
|
|
|
+ _getMerchantDet () {
|
|
|
// let id = uni.getStorageSync("introMerchantId");
|
|
|
getIntroduce({ id: this.option.introMerchantId || 0 }).then(res => {
|
|
|
this.merchantData = res.data;
|
|
|
});
|
|
|
},
|
|
|
// ==============
|
|
|
- confirmFn() {
|
|
|
- // console.log('cs',this.option.shopAdminId)
|
|
|
+ confirmFn () {
|
|
|
+ // console.log('cs',this.option.shopAdminId)
|
|
|
// let id = uni.getStorageSync("introMerchantId");
|
|
|
applyRegister({
|
|
|
shopAdminId: this.option.shopAdminId,
|
|
|
@@ -242,7 +326,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 选择地址
|
|
|
- selRegionFn() {
|
|
|
+ selRegionFn () {
|
|
|
if (!this.form.city) {
|
|
|
this.$msg("请先选择城市!");
|
|
|
return false;
|
|
|
@@ -261,7 +345,7 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
- changeAreaFn(e) {
|
|
|
+ changeAreaFn (e) {
|
|
|
console.log("changeAreaFn", e);
|
|
|
this.form.address = e.address;
|
|
|
this.form.latitude = e.location.lat;
|
|
|
@@ -270,17 +354,17 @@ export default {
|
|
|
},
|
|
|
// -----
|
|
|
// 省市联动
|
|
|
- openAddres() {
|
|
|
+ openAddres () {
|
|
|
this.$refs.simpleAddress.open();
|
|
|
},
|
|
|
- onCityConfirm(e) {
|
|
|
+ onCityConfirm (e) {
|
|
|
// this.form.receiveAddress = e.label
|
|
|
this.form.province = e.provinceName;
|
|
|
this.form.city = e.cityName;
|
|
|
// this.pickerText = JSON.stringify(e)
|
|
|
},
|
|
|
// 表单验证
|
|
|
- formSubmit(e) {
|
|
|
+ formSubmit (e) {
|
|
|
// 表单规则
|
|
|
let rules = [
|
|
|
{
|
|
|
@@ -309,7 +393,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
+ watch: {
|
|
|
// imageList(val){
|
|
|
// this.form.
|
|
|
// console.log(val)
|