|
|
@@ -1,100 +1,97 @@
|
|
|
<template>
|
|
|
- <div class="app-content">
|
|
|
- <!-- 门店信息 -->
|
|
|
+ <view class="app-content">
|
|
|
<form @submit="formSubmit">
|
|
|
- <div class="module-com input-line-wrap">
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title required">门店名称</div>
|
|
|
+ <view class="tui-title required">门店名称</view>
|
|
|
<input v-model="form.shopName" placeholder-class="phcolor" class="tui-input" name="shopName" placeholder="请输入名称,如同安店" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
|
-<!--
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title required" >门店图片</div>
|
|
|
- <app-uploader :remark="'建议上传比例750X480'" @chooseImage="_resultData" :num="4" :prefixShow="true" :imgList="form.img"/>
|
|
|
- </tui-list-cell>
|
|
|
--->
|
|
|
- </div>
|
|
|
- <!-- <div class="prompt-text">注: 请先关注公众号,绑定后可以在移动端自动登录</div> -->
|
|
|
- <!-- 登录信息 -->
|
|
|
- <div class="module-com input-line-wrap">
|
|
|
- <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title required">营业时间</div>
|
|
|
- <input v-model="form.openTime" placeholder-class="phcolor" class="tui-input" name="openTime" placeholder="请输入营业时间 例如:8:00 - 22:00" maxlength="50" type="text" />
|
|
|
- </tui-list-cell> -->
|
|
|
-
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">是否营业</div>
|
|
|
+ <view class="tui-title">营业状态</view>
|
|
|
<view><switch style="transform:scale(0.7,0.7)" :checked="form.open == 0 ? false : true" @change="openChange" /></view>
|
|
|
</tui-list-cell>
|
|
|
- <div v-if="visible">
|
|
|
+ <template v-if="visible">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">营业时间</div>
|
|
|
- <radio-group class="tui-input flex-center-between" @change="radioChange">
|
|
|
- <label class="list" for="customLink">
|
|
|
- <radio value="0" :checked="form.openType == 0" />
|
|
|
+ <view class="tui-title">营业时间</view>
|
|
|
+ <radio-group class="tui-input" @change="radioChange">
|
|
|
+ <label class="list" for="hourLink">
|
|
|
+ <radio id="hourLink" value="0" :checked="form.openType == 0" />
|
|
|
<span class="checkbox-text">24小时</span>
|
|
|
</label>
|
|
|
- <label class="list" for="goodsLink">
|
|
|
- <radio value="1" :checked="form.openType == 1" />
|
|
|
+ <label class="list" for="setTimeLink">
|
|
|
+ <radio id="setTimeLink" value="1" :checked="form.openType == 1" />
|
|
|
<span class="checkbox-text">指定时段</span>
|
|
|
</label>
|
|
|
<input v-model="form.openType" name="openType" hidden />
|
|
|
</radio-group>
|
|
|
</tui-list-cell>
|
|
|
- <div v-if="openTimeVisible">
|
|
|
+ <template v-if="openTimeVisible">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">开店时间</div>
|
|
|
+ <view class="tui-title">开店时间</view>
|
|
|
<picker mode="time" :value="start_time" start="00:00" end="24:00" @change="startTimeChange">
|
|
|
<view class="uni-input">{{start_time}}</view>
|
|
|
</picker>
|
|
|
<input v-model="form.openStartTime" name="openStartTime" hidden />
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">关店时间</div>
|
|
|
+ <view class="tui-title">关店时间</view>
|
|
|
<picker mode="time" :value="end_time" start="00:00" end="24:00" @change="endTimeChange">
|
|
|
<view class="uni-input">{{end_time}}</view>
|
|
|
</picker>
|
|
|
<input v-model="form.openEndTime" name="openEndTime" hidden />
|
|
|
</tui-list-cell>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">门店类型</view>
|
|
|
+ <radio-group class="tui-input" @change="joinChange">
|
|
|
+ <label class="list" for="chainLink">
|
|
|
+ <radio id="chainLink" value="0" :checked="form.join == 0" />
|
|
|
+ <span class="checkbox-text">直营店</span>
|
|
|
+ </label>
|
|
|
+ <label class="list" for="joinLink">
|
|
|
+ <radio id="joinLink" value="1" :checked="form.join == 1" />
|
|
|
+ <span class="checkbox-text">加盟店</span>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title required">手机号</div>
|
|
|
+ <view class="tui-title required">手机号</view>
|
|
|
<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" maxlength="50" type="number" />
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
|
- <div class="tui-title required">所在城市</div>
|
|
|
- <div class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择</div>
|
|
|
+ <view class="tui-title required">所在城市</view>
|
|
|
+ <view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
|
|
|
+ <view class="tui-placeholder" v-else>请选择</view>
|
|
|
<input v-model="form.province" name="province" hidden />
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
|
|
|
- <div class="tui-title required">地址</div>
|
|
|
- <div class="tui-input" v-if="form.address">{{ form.address }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请填写详细地址</div>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
|
|
|
+ <view class="tui-title required">地址</view>
|
|
|
+ <view class="tui-input" v-if="form.address">{{ form.address }}</view>
|
|
|
+ <view class="tui-placeholder" v-else>请填写详细地址</view>
|
|
|
<input v-model="form.address" name="address" hidden />
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title ">门牌号</div>
|
|
|
+ <view class="tui-title ">门牌号</view>
|
|
|
<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
|
- <div class="tui-title">简介</div>
|
|
|
- <div class="tui-input">
|
|
|
+ <view class="tui-title">简介</view>
|
|
|
+ <view class="tui-input">
|
|
|
<textarea v-model="form.introduction" class="tui-textarea remark" placeholder-class="phcolor" placeholder="请输入简介" />
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</tui-list-cell>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
<!-- 提交 -->
|
|
|
- <div class="confirm-btn">
|
|
|
+ <view class="confirm-btn">
|
|
|
<button class="admin-button-com big blue" formType="submit">提交</button>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</form>
|
|
|
<!-- 省市联动 -->
|
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
|
|
|
<!-- 选择地区 -->
|
|
|
<app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -120,14 +117,14 @@
|
|
|
visible: true,
|
|
|
openTimeVisible: false,
|
|
|
start_time: '00:00',
|
|
|
- end_time: '00:00',
|
|
|
+ end_time: '00:00',
|
|
|
form: {
|
|
|
+ join:0,
|
|
|
shopName: '',
|
|
|
province: '',
|
|
|
city: '',
|
|
|
address: '',
|
|
|
floor: '',
|
|
|
- // openTime: '8:00 - 22:00',
|
|
|
open: 1,
|
|
|
openType: 0, // openType: 0. 表示 24小时营业 1. 表示 xx ~ xx
|
|
|
openStartTime: '',
|
|
|
@@ -136,14 +133,12 @@
|
|
|
mobile: '',
|
|
|
img: []
|
|
|
},
|
|
|
- // 详细地址
|
|
|
showRegion: false,
|
|
|
region: {
|
|
|
lat: 0,
|
|
|
long: 0
|
|
|
},
|
|
|
- // 省市联动
|
|
|
- regionData: [],
|
|
|
+ regionData: [],
|
|
|
cityPickerValueDefault: [0, 0]
|
|
|
}
|
|
|
},
|
|
|
@@ -200,12 +195,15 @@
|
|
|
},
|
|
|
startTimeChange: function(e) {
|
|
|
this.start_time = e.detail.value
|
|
|
- this.form.openStartTime = e.detail.value
|
|
|
+ this.form.openStartTime = e.detail.value
|
|
|
},
|
|
|
endTimeChange: function(e) {
|
|
|
this.end_time = e.detail.value
|
|
|
this.form.openEndTime = e.detail.value
|
|
|
},
|
|
|
+ joinChange(e){
|
|
|
+ this.form.join = e.detail.value
|
|
|
+ },
|
|
|
radioChange(e) {
|
|
|
this.openTimeVisible = e.detail.value == 0 ? false : true;
|
|
|
this.form.openType = e.detail.value == 0 ? 0 : 1; // openType: 0. 24小时 1. xx ~ xx
|
|
|
@@ -215,7 +213,7 @@
|
|
|
}
|
|
|
},
|
|
|
// 选择地址
|
|
|
- selRegionFn() {
|
|
|
+ selectRegion() {
|
|
|
if (!this.form.city) {
|
|
|
this.$msg('请先选择城市!')
|
|
|
return false
|
|
|
@@ -223,7 +221,6 @@
|
|
|
this.showRegion = true
|
|
|
},
|
|
|
changeAreaFn(e) {
|
|
|
- console.log('changeAreaFn', e)
|
|
|
this.form.address = e.title
|
|
|
this.region.lat = e.location.lat
|
|
|
this.region.long = e.location.lng
|
|
|
@@ -266,11 +263,6 @@
|
|
|
rule: ['required'],
|
|
|
msg: ['请输入名称']
|
|
|
},
|
|
|
- // {
|
|
|
- // name: 'openTime',
|
|
|
- // rule: ['required'],
|
|
|
- // msg: ['请输入营业时间']
|
|
|
- // },
|
|
|
{
|
|
|
name: 'mobile',
|
|
|
rule: ['required'],
|
|
|
@@ -311,7 +303,6 @@
|
|
|
padding-left: 30upx;
|
|
|
margin-bottom: 30upx;
|
|
|
}
|
|
|
- // ---
|
|
|
.module-com {
|
|
|
margin-bottom: 20upx;
|
|
|
.member-wrap {
|