|
|
@ -67,11 +67,15 @@ const actions = {
|
|
|
|
transform: async ({ dispatch }, data) => {
|
|
|
|
transform: async ({ dispatch }, data) => {
|
|
|
|
let res = await api.transform(data);
|
|
|
|
let res = await api.transform(data);
|
|
|
|
if (res) {
|
|
|
|
if (res) {
|
|
|
|
ElMessage.success('保存成功');
|
|
|
|
ElMessage.success(`转移成功${res}件商品`);
|
|
|
|
dispatch('search');
|
|
|
|
dispatch('search');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (res === false || res === 0) {
|
|
|
|
|
|
|
|
ElMessage.success('没有商品需要转移');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ElMessage.error('保存失败');
|
|
|
|
ElMessage.error('保存失败');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sort: async ({ dispatch }, data) => {
|
|
|
|
sort: async ({ dispatch }, data) => {
|
|
|
|