update:新增店铺开业状态-开业筹备中
This commit is contained in:
parent
feb7fb758e
commit
c46a2a0390
@ -94,19 +94,41 @@
|
||||
label-width="150px"
|
||||
prop="store_biz_state"
|
||||
>
|
||||
<el-switch
|
||||
<el-select
|
||||
v-model="storeForm.store_biz_state"
|
||||
active-color="#13ce66"
|
||||
:active-value="1"
|
||||
:inactive-value="2"
|
||||
inactive-color="#ff4949"
|
||||
active-text="营业中"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleStoreStatus"
|
||||
inactive-text="已打烊"
|
||||
></el-switch>
|
||||
>
|
||||
<el-option
|
||||
v-for="item in store_biz_state_option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="storeForm.store_biz_state == 3">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item
|
||||
label="开业时间"
|
||||
label-width="150px"
|
||||
prop="store_biz_opening_date"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="storeForm.store_biz_opening_date"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
:placeholder="__('选择日期')"
|
||||
:picker-options="endTimeOptions"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
@ -503,6 +525,23 @@
|
||||
},
|
||||
test: 666,
|
||||
treeData: [],
|
||||
store_biz_state_option:[
|
||||
{
|
||||
index:1,
|
||||
value:1,
|
||||
label:'营业中',
|
||||
},
|
||||
{
|
||||
index:1,
|
||||
value:2,
|
||||
label:'已打烊',
|
||||
},
|
||||
{
|
||||
index:1,
|
||||
value:3,
|
||||
label:'开业筹备中',
|
||||
},
|
||||
],
|
||||
activeName: 'first',
|
||||
optionslist: [
|
||||
{
|
||||
@ -518,6 +557,17 @@
|
||||
label: this.__('免费送货'),
|
||||
},
|
||||
],
|
||||
tomorrow() {
|
||||
const d = new Date();
|
||||
d.setDate(d.getDate() + 1);
|
||||
d.setHours(0, 0, 0, 0);
|
||||
return d.getTime();
|
||||
},
|
||||
endTimeOptions: {
|
||||
disabledDate: time => {
|
||||
return time.getTime() < this.tomorrow();
|
||||
}
|
||||
},
|
||||
value: '',
|
||||
options: {
|
||||
theme: 'snow',
|
||||
@ -593,6 +643,7 @@
|
||||
store_o2o_tags: [],
|
||||
store_district_id: '',
|
||||
packing_fee: 0,
|
||||
store_biz_opening_date:'',
|
||||
},
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
@ -636,6 +687,7 @@
|
||||
company_description: form.company_description,
|
||||
store_biz_state: form.store_biz_state,
|
||||
packing_fee: form.packing_fee,
|
||||
store_biz_opening_date: form.store_biz_opening_date
|
||||
}
|
||||
|
||||
if (this.queryArea.province.name) {
|
||||
@ -751,6 +803,7 @@
|
||||
store_biz_state: data.store_biz_state,
|
||||
packing_fee: data.packing_fee,
|
||||
ringtone_is_enable: data.ringtone_is_enable,
|
||||
store_biz_opening_date: data.store_biz_opening_date || '',
|
||||
}
|
||||
|
||||
this.srcList.push(data.wx_qrcode)
|
||||
@ -774,6 +827,14 @@
|
||||
this.initQueryArea(store_district_id, store_area)
|
||||
this.form.store_o2o_flag = data.store_o2o_flag
|
||||
},
|
||||
disabledPastDates(time) {
|
||||
// 获取今天的凌晨 00:00:00 时间戳
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
||||
// 时间戳对比:如果选择的日期 <= 今天凌晨,则禁用(返回 true 表示禁用)
|
||||
return time.getTime() <= today.getTime();
|
||||
},
|
||||
initQueryArea(store_district_id, store_area) {
|
||||
if (!store_district_id && store_area) return
|
||||
if (store_district_id[0]) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user