diff --git a/src/api/basic/product/udiRelevance.js b/src/api/basic/product/udiRelevance.js index 13727978..95d72553 100644 --- a/src/api/basic/product/udiRelevance.js +++ b/src/api/basic/product/udiRelevance.js @@ -234,4 +234,11 @@ export function getYbDrugDetail(query) { }); } +export function getCodeRelDetail(query) { + return axios({ + url: "/spms/udchs/codeRe/list", + method: "post", + data: query + }); +} diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue index 4d1cd413..afa9c6b7 100644 --- a/src/views/basic/product/productEdit.vue +++ b/src/views/basic/product/productEdit.vue @@ -1149,7 +1149,7 @@ import { removeDiRl, removeRl, thirdSysDetail, - updatetSingleUdiInfo, updatetUdiInfos + updatetSingleUdiInfo, updatetUdiInfos,getCodeRelDetail } from "@/api/basic/product/udiRelevance"; import {isBlank} from "@/utils/strUtil"; import {filterByUuid, levelByUuid} from "@/api/basic/product/udiInfo"; @@ -1251,6 +1251,7 @@ export default { measname: null, manufactory: null, ybbm: null, + sptm: null, cpms: null, productsType: 2, //高级设置默认开启扫码 @@ -1745,6 +1746,20 @@ export default { this.selectedIndex = null this.getDetailList() this.getDiLevel(); + + //如果都为空 进行补充 + if (!this.$isNotBlank(this.editQuery.sptm) && !this.$isNotBlank(this.editQuery.ybbm)) { + getCodeRelDetail({drugcode:row.nameCode}).then((response) => { + if (response.code == 20000) { + if (this.response.data != null && this.response.data.length > 0) { + this.editQuery.sptm = this.response.data[0].sptm; + this.editQuery.ybbm = this.response.data[0].ybbm; + } + } + }).catch(() => { + }) + } + } else { this.isSave = true this.$message.error(res.message)