fix-0609-xwk
向文可 2 years ago
parent 8fb57b7bff
commit 37af798e8b

@ -112,24 +112,25 @@ const actions = {
if (data.limit === 0) {
delete data.singleBuyLimit;
}
data.virtualProductModifyDTOList = [
...data.fileList.map((item) => {
return {
shipType: 1,
shipContent: item,
};
}),
{
data.virtualProductModifyDTOList = data.fileList.map((item) => {
return {
shipType: 1,
shipContent: item,
};
});
if (data.autoSend) {
data.virtualProductModifyDTOList.push({
shipType: 2,
shipContent: data.autoSend,
},
];
});
}
let res = await save(data);
if (res) {
ElMessage.success('保存成功');
dispatch('search');
} else {
ElMessage.error('保存失败');
res = null;
}
return res;
},

@ -80,7 +80,7 @@
form: {
id: null,
categoryId: null,
productType: 2,
productType: 1,
name: null,
remark: null,
isRecommend: false,
@ -143,14 +143,16 @@
let data = _.cloneDeep(state.form);
data.mainPicture = data.pictureList[0];
state.form.id = await store.dispatch('product/save', state.form);
unref(state.refsForm).resetFields();
router.push({
name: 'UpdateProduct',
params: {
id: route.params.id || state.form.id,
step: 2,
},
});
if (state.form.id) {
unref(state.refsForm).resetFields();
router.push({
name: 'UpdateProduct',
params: {
id: route.params.id || state.form.id,
step: 2,
},
});
}
} catch (e) {
console.info('取消保存', e);
}

Loading…
Cancel
Save