Commit 1d122e82 authored by zhoutong's avatar zhoutong

预装\理货\装柜移出,需要弹窗提示关联单是否要移出

parent 6c5dbaf5
...@@ -520,10 +520,11 @@ export function deleteSection(id) { ...@@ -520,10 +520,11 @@ export function deleteSection(id) {
* @param {*} id * @param {*} id
* @return {*} * @return {*}
*/ */
export function deleteGoods(id) { export function deleteGoods(params) {
return request({ return request({
url: "/ecw/box-preload-goods/delete?ids=" + id.join(","), url: "/ecw/box-preload-goods/delete",
method: "delete", method: "delete",
params
}); });
} }
......
...@@ -109,6 +109,9 @@ service.interceptors.response.use(res => { ...@@ -109,6 +109,9 @@ service.interceptors.response.use(res => {
} else if (code === 566) { } else if (code === 566) {
// 额外情况 // 额外情况
return Promise.reject(res.data) return Promise.reject(res.data)
} else if (code === 666) {
// 额外情况
return Promise.reject(res.data)
} else if (code !== 200) { } else if (code !== 200) {
Notification.error({ Notification.error({
title: msg title: msg
......
...@@ -535,6 +535,26 @@ export default { ...@@ -535,6 +535,26 @@ export default {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
})
.catch((_) => {
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
});
}
}); });
}, },
/* 修改柜信息 */ /* 修改柜信息 */
......
...@@ -737,11 +737,33 @@ export default { ...@@ -737,11 +737,33 @@ export default {
if (type === "row") { if (type === "row") {
ids.push(data.id); ids.push(data.id);
} }
let param = {
deleteGoods(ids).then((res) => { ids: ids.join(",")
}
deleteGoods(param).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
})
.then((_) => {
deleteGoods({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
deleteGoods({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
});
}
}); });
}, },
/* 查询所有数据 */ /* 查询所有数据 */
......
...@@ -240,14 +240,35 @@ export default { ...@@ -240,14 +240,35 @@ export default {
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
tallyRemove({ let param = {
orderIdLIst: orderIds, orderIdLIst: orderIds,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
}).then((res) => { }
tallyRemove(param).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getList(); this.getList();
}); });
}); }).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
})
.then((_) => {
tallyRemove({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
})
.catch((_) => {
tallyRemove({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
});
}
});
}) })
.catch((_) => {}); .catch((_) => {});
}, },
......
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