feat: 多码融合

dev_unify
chenhc 8 months ago
parent 876f990096
commit 93739a7527

@ -217,6 +217,14 @@ export function getYbHcflDetail(query) {
}); });
} }
export function getCodeRelDetail(query) {
return axios({
url: "/spms/udchs/codeRe/list",
method: "post",
data: query
});
}
export function addDrug(query) { export function addDrug(query) {
return axios({ return axios({

@ -667,6 +667,7 @@ import {
delDrugLevel, delDrugLevel,
updateLevelDrug, calculateDistCount, calculateUseCount updateLevelDrug, calculateDistCount, calculateUseCount
} from '@/api/basic/product/drugUdiinfos' } from '@/api/basic/product/drugUdiinfos'
import {getCodeRelDetail} from '@/api/basic/product/udiRelevance'
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import { import {
@ -723,6 +724,7 @@ export default {
measname: null, measname: null,
manufactory: null, manufactory: null,
ybbm: null, ybbm: null,
sptm: null,
cpms: null, cpms: null,
productsType: 2, productsType: 2,
// //
@ -1014,6 +1016,20 @@ export default {
this.selectedIndex = null this.selectedIndex = null
this.getDetailList() this.getDetailList()
this.getDiLevel(); this.getDiLevel();
//
if (!this.$isNotBlank(this.newProductData.sptm) && !this.$isNotBlank(this.newProductData.ybbm)) {
getCodeRelDetail({drugcode:row.nameCode}).then((response) => {
if (response.code == 20000) {
if (this.response.data != null && this.response.data.length > 0) {
this.newProductData.sptm = this.response.data[0].sptm;
this.newProductData.ybbm = this.response.data[0].ybbm;
}
}
}).catch(() => {
})
}
} else { } else {
this.isSave = true this.isSave = true
this.$message.error(res.message) this.$message.error(res.message)

@ -1149,7 +1149,7 @@ import {
removeDiRl, removeDiRl,
removeRl, removeRl,
thirdSysDetail, thirdSysDetail,
updatetSingleUdiInfo, updatetUdiInfos updatetSingleUdiInfo, updatetUdiInfos,getCodeRelDetail
} from "@/api/basic/product/udiRelevance"; } from "@/api/basic/product/udiRelevance";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {filterByUuid, levelByUuid} from "@/api/basic/product/udiInfo"; import {filterByUuid, levelByUuid} from "@/api/basic/product/udiInfo";
@ -1251,6 +1251,7 @@ export default {
measname: null, measname: null,
manufactory: null, manufactory: null,
ybbm: null, ybbm: null,
sptm: null,
cpms: null, cpms: null,
productsType: 2, productsType: 2,
// //
@ -1746,6 +1747,22 @@ export default {
this.selectedIndex = null this.selectedIndex = null
this.getDetailList() this.getDetailList()
this.getDiLevel(); this.getDiLevel();
//
if (!this.$isNotBlank(this.editQuery.sptm) && !this.$isNotBlank(this.editQuery.ybbm)) {
getCodeRelDetail({dinamecode: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 { } else {
this.isSave = true this.isSave = true
this.$message.error(res.message) this.$message.error(res.message)

@ -435,7 +435,7 @@
</template> </template>
<script> <script>
import {getYbHcflDetail} from '@/api/basic/product/udiRelevance' import {getYbHcflDetail,getCodeRelDetail} from '@/api/basic/product/udiRelevance'
import {getUdiInfos, filterCompany, superSearch} from '../../../api/basic/udiInfo' import {getUdiInfos, filterCompany, superSearch} from '../../../api/basic/udiInfo'
import {combineUdi} from '../../../api/basic/udiRelevance' import {combineUdi} from '../../../api/basic/udiRelevance'
import {addDiProduct} from '@/api/supplier/supProductsAddDi' import {addDiProduct} from '@/api/supplier/supProductsAddDi'
@ -706,6 +706,19 @@ export default {
this.editQuery.manufactory = this.currentRow.ylqxzcrbarmc; this.editQuery.manufactory = this.currentRow.ylqxzcrbarmc;
this.editQuery.spmc = this.currentRow.cpmctymc; this.editQuery.spmc = this.currentRow.cpmctymc;
this.editQuery.cpms = this.currentRow.cpms; this.editQuery.cpms = this.currentRow.cpms;
if (!this.$isNotBlank(this.currentRow.sptm) && !this.$isNotBlank(this.currentRow.ybbm)) {
getCodeRelDetail({dinamecode:this.currentRow.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(() => {
})
}
// //
this.getYbHcData() this.getYbHcData()
}, },

Loading…
Cancel
Save