Commit 44c60bda authored by 邓学云's avatar 邓学云

商品详情 dc详情=>res.data[0] 商品详情页模板启动禁用

parent 763bcd8e
......@@ -66,7 +66,8 @@
<a-divider type="vertical" />
<a type="primary" @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a type="primary">启用</a>
<a type="primary" @click="modifyStatus(record)" v-if="record.STATUS==0">启用</a>
<a type="primary" @click="modifyStatus(record)" v-else>停用</a>
<a-divider type="vertical" />
<a-popconfirm title="是否要删除此行?" @confirm="remove(record.GUID)">
<a>删除</a>
......@@ -99,7 +100,7 @@
required
:labelCol="labelCol"
:wrapperCol="wrapperCol">
<a-select v-decorator="['STATUS ',{rules:[{required:true,message:'请选择是否启用'}],initialValue:'1',normalize:checkNull}]" placeholder="请选择">
<a-select v-decorator="['STATUS',{rules:[{required:true,message:'请选择是否启用'}],initialValue:'1',normalize:checkNull}]" placeholder="请选择">
<a-select-option value="0">不启用</a-select-option>
<a-select-option value="1">启用</a-select-option>
</a-select>
......@@ -251,6 +252,26 @@ export default {
},
methods: {
moment,
// 修改状态
modifyStatus(record){
const statusChange={
GUID:record.GUID,
STATUS:record.STATUS
};
if(statusChange.STATUS==1){
statusChange.STATUS=0;
}else{
statusChange.STATUS=1;
}
modifyGoodsTemplate(statusChange).then(res => {
if(res.status==200){
this.$message.success(res.message)
this.$refs.table.refresh();
}
}).catch(err => {
})
},
// 删除
remove(value){
deleteGoodsTemplate(value).then(res => {
......
......@@ -570,14 +570,14 @@
};
getDCDetails(id).then(res => {
this.$nextTick(() => {
this.addressProvince=res.RECIVER_PROVINCE;
this.addressCity=res.RECIVER_CITY;
this.addressRegion=resizeBy.RECIVER_REGION;
res.WORK_TIME_START=this.timeGet(res.WORK_TIME)[0]
res.WORK_TIME_END=this.timeGet(res.WORK_TIME)[1]
res.DELIVERY_TIME_START=this.timeGet(res.DELIVERY_TIME)[0]
res.DELIVERY_TIME_END=this.timeGet(res.DELIVERY_TIME)[1]
this.form.setFieldsValue(res)
this.addressProvince=res.data[0].RECIVER_PROVINCE;
this.addressCity=res.data[0].RECIVER_CITY;
this.addressRegion=res.data[0].RECIVER_REGION;
res.data[0].WORK_TIME_START=this.timeGet(res.data[0].WORK_TIME)[0]
res.data[0].WORK_TIME_END=this.timeGet(res.data[0].WORK_TIME)[1]
res.data[0].DELIVERY_TIME_START=this.timeGet(res.data[0].DELIVERY_TIME)[0]
res.data[0].DELIVERY_TIME_END=this.timeGet(res.data[0].DELIVERY_TIME)[1]
this.form.setFieldsValue(res.data[0])
})
}).catch(err => {
......
......@@ -245,12 +245,12 @@
<a-col :span="3"></a-col>
<a-col :span="8">
<span>开始营业时间</span>
<a-time-picker @change="(val,dateStrings)=>changeTime(val,dateStrings,'worktime_start')" v-decorator="['WORK_TIME_START',{normalize:checkDate}]" />
<a-time-picker id="startWorktime" @change="(val,dateStrings)=>changeTime(val,dateStrings,'worktime_start')" v-decorator="['WORK_TIME_START',{normalize:checkDate}]" />
</a-col>
<a-col :span="2"></a-col>
<a-col :span="8">
<span>结束营业时间</span>
<a-time-picker hideDisabledOptions @change="(val,dateStrings)=>changeTime(val,dateStrings,'worktime_end')" :disabledHours="getDisabledHours" :disabledMinutes="getDisabledMinutes" :disabledSeconds="getDisabledSeconds" v-decorator="['WORK_TIME_END',{normalize:checkDate}]" />
<a-time-picker id="endWorktime" hideDisabledOptions @change="(val,dateStrings)=>changeTime(val,dateStrings,'worktime_end')" :disabledHours="getDisabledHours" :disabledMinutes="getDisabledMinutes" :disabledSeconds="getDisabledSeconds" v-decorator="['WORK_TIME_END',{normalize:checkDate}]" />
</a-col>
<a-col :span="3"></a-col>
</a-form-item>
......@@ -261,12 +261,12 @@
<a-col :span="3"></a-col>
<a-col :span="8">
<span>开始配送时间</span>
<a-time-picker @change="(val,dateStrings)=>changeTime(val,dateStrings,'develiytime_start')" v-decorator="['DELIVERY_TIME_START',{normalize:checkDate}]" />
<a-time-picker id="startDeliveritime" @change="(val,dateStrings)=>changeTime(val,dateStrings,'develiytime_start')" v-decorator="['DELIVERY_TIME_START',{normalize:checkDate}]" />
</a-col>
<a-col :span="2"></a-col>
<a-col :span="8">
<span>结束配送时间</span>
<a-time-picker hideDisabledOptions @change="(val,dateStrings)=>changeTime(val,dateStrings,'develiytime_end')" :disabledHours="getDisabledHoursDeveliy" :disabledMinutes="getDisabledMinutesDeveliy" :disabledSeconds="getDisabledSecondsDeveliy" v-decorator="['DELIVERY_TIME_END',{normalize:checkDate}]" />
<a-time-picker id="endDeliveritime" hideDisabledOptions @change="(val,dateStrings)=>changeTime(val,dateStrings,'develiytime_end')" :disabledHours="getDisabledHoursDeveliy" :disabledMinutes="getDisabledMinutesDeveliy" :disabledSeconds="getDisabledSecondsDeveliy" v-decorator="['DELIVERY_TIME_END',{normalize:checkDate}]" />
</a-col>
<a-col :span="3"></a-col>
</a-form-item>
......@@ -794,31 +794,31 @@
var id=this.$route.query.GUID;
getStoreDetails(id).then(res => {
this.$nextTick(() => {
this.addressProvince=res.RECIVER_PROVINCE;
this.addressCity=res.RECIVER_CITY;
this.addressRegion=resizeBy.RECIVER_REGION;
res.WORK_TIME_START=this.timeGet(res.WORK_TIME)[0]
res.WORK_TIME_END=this.timeGet(res.WORK_TIME)[1]
res.DELIVERY_TIME_START=this.timeGet(res.DELIVERY_TIME)[0]
res.DELIVERY_TIME_END=this.timeGet(res.DELIVERY_TIME)[1]
if(res.LICENCE_IMAGE_PATH){
this.addressProvince=res.data[0].RECIVER_PROVINCE;
this.addressCity=res.data[0].RECIVER_CITY;
this.addressRegion=res.data[0].RECIVER_REGION;
res.data[0].WORK_TIME_START=this.timeGet(res.data[0].WORK_TIME)[0]
res.data[0].WORK_TIME_END=this.timeGet(res.data[0].WORK_TIME)[1]
res.data[0].DELIVERY_TIME_START=this.timeGet(res.data[0].DELIVERY_TIME)[0]
res.data[0].DELIVERY_TIME_END=this.timeGet(res.data[0].DELIVERY_TIME)[1]
if(res.data[0].LICENCE_IMAGE_PATH){
this.fileList.push({
uid:'-1',
name:'test.png',
status:'done',
url:res.LICENCE_IMAGE_PATH,
url:res.data[0].LICENCE_IMAGE_PATH,
})
}
if(res.BRANCH_IMAGE_PATH){
if(res.data[0].BRANCH_IMAGE_PATH){
this.BranchfileList.push({
uid:'-1',
name:'test.png',
status:'done',
url:res.BRANCH_IMAGE_PATH,
url:res.data[0].BRANCH_IMAGE_PATH,
})
}
console.log(res)
this.form.setFieldsValue(res)
console.log(res.data[0])
this.form.setFieldsValue(res.data[0])
})
}).catch(err => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment