|
@@ -620,7 +620,8 @@ export default {
|
|
|
}
|
|
|
console.log(res);
|
|
|
this.loading = false;
|
|
|
- if (res && res.code === 0) {
|
|
|
+ const { code, data, message } = res;
|
|
|
+ if (code === 0) {
|
|
|
const title = this.type === "add" ? "新建成功!" : "库存修改成功!";
|
|
|
this.$notify.success({
|
|
|
title: title,
|
|
@@ -629,6 +630,22 @@ export default {
|
|
|
this.showModelThis = false;
|
|
|
// 刷新
|
|
|
this.$emit("refresh", true);
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else if (code == 1005) {
|
|
|
+ let resList = JSON.parse(JSON.stringify(data));
|
|
|
+ let htmlList = "<ul>";
|
|
|
+ resList.forEach((v) => {
|
|
|
+ htmlList += `<li>${v.outCode}</li>`;
|
|
|
+ });
|
|
|
+ htmlList += "</ul>";
|
|
|
+ this.$notify({
|
|
|
+ title: message,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: htmlList,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
} else {
|
|
|
console.log("error submit!!");
|