fix: 修改商品分组编辑时间的问题
This commit is contained in:
parent
784941f558
commit
d675341444
|
|
@ -253,7 +253,8 @@ async function addConfirm() {
|
|||
})
|
||||
obj.productIds = arr
|
||||
}
|
||||
if (obj.time.length) {
|
||||
console.log(obj, '商品分组的参数')
|
||||
if (obj.time && obj.time.length) {
|
||||
obj.saleStartTime = obj.time[0]
|
||||
obj.saleEndTime = obj.time[1]
|
||||
}
|
||||
|
|
@ -264,6 +265,10 @@ async function addConfirm() {
|
|||
myDialogRefAdd.value.close()
|
||||
}
|
||||
} else {
|
||||
if (obj.useTime == 0) {
|
||||
obj.saleStartTime = null
|
||||
obj.saleEndTime = null
|
||||
}
|
||||
let res = await UserAPI.update(obj)
|
||||
if (res.code == 200) {
|
||||
ElMessage.success("编辑成功");
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@
|
|||
<div style="display: block;width: 100%;">
|
||||
<div class="head-container">
|
||||
<el-radio-group v-model="ruleForm.groupType" @change="typeChange">
|
||||
<el-radio-button label="0">固定套餐</el-radio-button>
|
||||
<el-radio-button label="1">可选套餐</el-radio-button>
|
||||
<el-radio-button :label="0">固定套餐</el-radio-button>
|
||||
<el-radio-button :label="1">可选套餐</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div v-if="ruleForm.groupType == '0'">
|
||||
|
|
@ -774,7 +774,9 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (ruleForm.type == 'weight') {
|
||||
ruleForm.specId = ''
|
||||
}
|
||||
if (ruleForm.id) {
|
||||
let res = await UserAPI3.update(ruleForm)
|
||||
if (res.code == 200) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue