@@ -489,41 +487,49 @@ export default {
}
this.combineQuery.thirdIds.push(row.code);
});
- // if (selected != null) {
- // this.$message.warning("产品编码:" + selected.code + "已被选入");
- // return;
- // }
- this.$confirm("产品编码:" + selected + "已被添加,是否继续添加", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.combineLoading = true;
- addErp(this.combineQuery)
- .then((response) => {
- this.combineLoading = false;
- if (response.code == 20000) {
- this.$emit("closeUdi", true);
- this.$message.success(response.data);
- } else {
+ if (selected != '') {
+ this.$confirm("产品编码:" + selected + "已被添加,是否继续添加", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.combineLoading = true;
+ addErp(this.combineQuery)
+ .then((response) => {
+ this.combineLoading = false;
+ if (response.code == 20000) {
+ this.$emit("closeUdi", true);
+ this.$message.success(response.data);
+ } else {
+ this.$emit("closeUdi", false);
+ this.$message.warning(response.message);
+ }
+ })
+ .catch(() => {
+ this.combineLoading = false;
this.$emit("closeUdi", false);
- this.$message.warning(response.message);
- // let msgs= response.message.split(";");
- // for(let i = 0;i {
- this.combineLoading = false;
+ });
+ })
+ .catch(() => {
+ });
+ } else {
+ addErp(this.combineQuery)
+ .then((response) => {
+ this.combineLoading = false;
+ if (response.code == 20000) {
+ this.$emit("closeUdi", true);
+ this.$message.success(response.data);
+ } else {
this.$emit("closeUdi", false);
- });
- })
- .catch(() => {
- });
+ this.$message.warning(response.message);
+ }
+ })
+ .catch(() => {
+ this.combineLoading = false;
+ this.$emit("closeUdi", false);
+ });
+ }
} else {
this.combineQuery.thirdId = this.currentRow.code;
diff --git a/src/views/basic/basicCompanyProducts.vue b/src/views/basic/basicCompanyProducts.vue
index f57d935..7eac86b 100644
--- a/src/views/basic/basicCompanyProducts.vue
+++ b/src/views/basic/basicCompanyProducts.vue
@@ -79,6 +79,7 @@
>添加产品信息
+ 新增产品信息
@@ -1316,6 +1317,20 @@
layout="prev, pager, next"
:total="total"
>
+
+
+
+
@@ -1342,6 +1357,7 @@ import selectUdi from "./UdiInfoRelevance.vue";
import selectErp from "./UdiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectProduct from "./basicCompanyProductsImport";
+import ThrProductsAdd from "@/views/thrsys/ThrProductsAdd";
export default {
data() {
@@ -1360,7 +1376,9 @@ export default {
filterType: null,
auditStatus: null,
},
+ newType: 2,
selectProductVisible: false,
+ addProductVisible: false,
editQuery: null,
relevanceEdit: {
id: null,
@@ -1554,7 +1572,6 @@ export default {
.catch(() => {
});
},
-
removeDi() {
this.$confirm("此操作将解除该绑定DI器械信息, 是否继续?", "提示", {
confirmButtonText: "确定",
@@ -1584,7 +1601,6 @@ export default {
.catch(() => {
});
},
-
intentSelectErp(val) {
this.uuid = val.uuid;
this.relId = val.rlId;
@@ -1638,8 +1654,6 @@ export default {
console.log("-----" + this.relId);
this.selectLocalVisible = true;
},
-
-
intentImportUdi() {
this.relId = null;
this.selectLocalVisible = true;
@@ -1673,13 +1687,13 @@ export default {
}).catch(() => {
});
},
-
handleSelectionChange(val) {
console.log("----" + val);
this.multipleSelection = val;
},
closeSelDialog(val) {
this.selectProductVisible = false;
+ this.addProductVisible = false;
},
cancelDialog() {
this.editDialogVisible = false;
@@ -1688,7 +1702,6 @@ export default {
this.filterQuery.page = val;
this.getList();
},
-
handleDetailClick(row) {
this.thisData = row;
this.detailDialogVisible = true;
@@ -1732,7 +1745,6 @@ export default {
this.loading = false;
});
},
-
handleModifyClick(row) {
this.uuid = row.uuid;
this.relId = row.rlId;
@@ -1793,8 +1805,6 @@ export default {
});
},
-
-
uploadErpProduct() {
updateErpProduct()
.then((response) => {
@@ -1810,7 +1820,6 @@ export default {
.catch(() => {
});
},
-
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
@@ -1838,7 +1847,6 @@ export default {
this.cancelDialog();
});
},
-
selectSysParam() {
spcombie().then((response) => {
@@ -1882,7 +1890,16 @@ export default {
},
selectProduct() {
this.selectProductVisible = true;
+ },
+ closeAddDialog(val) {
+ if (val) {
+ this.getList();
+ }
+ this.addProductVisible = false;
+ console.log("------closeAddDialog-------")
+ // Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
}
+
}
,
mounted() {
@@ -1892,7 +1909,8 @@ export default {
selectUdi,
selectErp,
selectLocalUdi,
- selectProduct
+ selectProduct,
+ ThrProductsAdd
}
,
created() {
diff --git a/src/views/thrsys/ThrProducts.vue b/src/views/thrsys/ThrProducts.vue
index 5c88cde..6297db2 100644
--- a/src/views/thrsys/ThrProducts.vue
+++ b/src/views/thrsys/ThrProducts.vue
@@ -83,7 +83,8 @@
详情
- 删除
@@ -118,497 +119,270 @@
v-if="addProductVisible"
@close="closeAddDialog"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交
- 取消
-
-
-
+