define({
name: "service",
template: `
是
否
固定
循环
固定:在设置的时间商品自动上下架时间
循环:在循环日期内商品每天在设置的时间点自动循环上下架
下架时间
开启后,循环日期期间,每日重新上架时,库存商品数自动刷新为原始库存数
`,
data(){
return {
// shelves:"1",
pickerOptions: {
shortcuts: [{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}
}, {
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}
}, {
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
}
}]
},
shelves_time: [],
loop_date: [],
widgets:{
service:{
is_automatic:"1",
}
}
}
},
style: ``,
mounted() {
// console.log(this.form,'服务提供')
this.shelves_time = [this.form.starttime * 1000,this.form.endtime * 1000]
this.loop_date = [this.form.loop_date_start * 1000,this.form.loop_date_end * 1000]
},
methods:{
extraDate(){
},
validate(){
return {
starttime:this.shelves_time[0] / 1000,
endtime:this.shelves_time[1] / 1000,
loop_date_start:this.loop_date[0] / 1000,
loop_date_end:this.loop_date[1] / 1000,
is_automatic:this.form.is_automatic,
time_type:this.form.time_type,
loop_time_up:this.form.loop_time_up,
loop_time_down:this.form.loop_time_down,
auth_refresh_stock:this.form.auth_refresh_stock,
original_stock:this.form.original_stock,
}
}
},
props: {
form: {
type: Object,
default() {
return {}
}
}
}
})