1、选入药品层级校验产品名称查询

dev_unify
qiuyt 3 months ago
parent e8aa275973
commit 7ecc8ab042

@ -534,7 +534,7 @@
@close="closeSelectDrugLevelVisible"
>
<el-form :model="filterQueryDrugLevel" class="query-form" label-width="100px">
<el-form :rules="formRulesSelectedDrug" :model="filterQueryDrugLevel" class="query-form" label-width="100px" ref="formSelectedDrug">
<el-row>
<el-col :span="4">
<el-form-item label="层级标识:">
@ -542,8 +542,8 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="通用名:">
<el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入通用名" clearable></el-input>
<el-form-item label="药品通用名:" prop="cpmctymc">
<el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入药品通用名" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
@ -759,6 +759,11 @@ export default {
// {required: true, message: '', trigger: 'blur'}
// ],
},
formRulesSelectedDrug: {
cpmctymc: [
{ required: true, message: '请输入药品通用名', trigger: 'blur' }
],
},
detailList: [
//
{
@ -1018,19 +1023,27 @@ export default {
row.isUpDisabled = true
row.rowDisabled = false
},
selectDrugLevel(){
this.filterQueryDrugLevel.uuid = this.newProductData.uuid
this.filterQueryDrugLevel.ybbm = this.newProductData.ybbm
//
// this.filterQueryDrugLevel.approvalNum = this.newProductData.zczbhhzbapzbh
getDrugLevelList(this.filterQueryDrugLevel).then((response) => {
if (response.code == 20000) {
this.selectDrugLevelList = response.data.list || []
this.filterQueryDrugLevel.total = response.data.total || 0
this.selectDrugLevelVisible = true
}
}).catch(() => {
})
selectDrugLevel() {
this.selectDrugLevelVisible = true
setTimeout(() => {
this.$refs['formSelectedDrug'].validate((valid) => {
if (valid) {
this.filterQueryDrugLevel.uuid = this.newProductData.uuid
this.filterQueryDrugLevel.ybbm = this.newProductData.ybbm
//
// this.filterQueryDrugLevel.approvalNum = this.newProductData.zczbhhzbapzbh
getDrugLevelList(this.filterQueryDrugLevel).then((response) => {
if (response.code == 20000) {
this.selectDrugLevelList = response.data.list || []
this.filterQueryDrugLevel.total = response.data.total || 0
}
}).catch(() => {
})
}
})
}, 500)
},
selectDrugLevelItem(row){
this.filterQueryDrugLevel.uuid = this.newProductData.uuid

@ -696,7 +696,9 @@
@close="closeSelectDrugLevelVisible"
>
<el-form :model="filterQueryDrugLevel" class="query-form" label-width="100px">
<el-form :rules="formRulesSelectedDrug" :model="filterQueryDrugLevel" class="query-form" label-width="100px"
ref="formSelectedDrug"
>
<el-row>
<el-col :span="4">
<el-form-item label="层级标识:">
@ -704,8 +706,8 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="通用名:">
<el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入通用名" clearable></el-input>
<el-form-item label="药品通用名:" prop="cpmctymc">
<el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入药品通用名" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
@ -779,7 +781,7 @@ import {
updatetDrug,
delDrugLevel,
updateLevelDrug, calculateDistCount, calculateUseCount,
getDrugLevelList,getDrugLevelListBycode,updateLevelDrugAli
getDrugLevelList, getDrugLevelListBycode, updateLevelDrugAli
} from '@/api/basic/product/drugUdiinfos'
import { isBlank } from '@/utils/strUtil'
@ -911,8 +913,13 @@ export default {
{ required: true, message: '请选择允许采集的最大层级', trigger: 'blur' }
],
detailSort: [
{required: true, message: '请选择明细分类', trigger: 'blur'}
],
{ required: true, message: '请选择明细分类', trigger: 'blur' }
]
},
formRulesSelectedDrug: {
cpmctymc: [
{ required: true, message: '请输入药品通用名', trigger: 'blur' }
]
},
detailList: [
//
@ -946,9 +953,9 @@ export default {
page: 1,
limit: 20,
total: 0,
approvalNum: "",
approvalNum: ''
},
isSpecial:false
isSpecial: false
}
},
@ -1113,14 +1120,14 @@ export default {
this.$message.error('层级标识不能为空')
return
}
if (isBlank(row.bhxjsl) ) {
if (isBlank(row.bhxjsl)) {
row.bhxjsl = 0
}
if (isNaN(row.packLevel)) {
row.packLevel = 0
}
if(this.newProductData.detailSort > 9 && row.packLevel == '0' ){
if (this.newProductData.detailSort > 9 && row.packLevel == '0') {
this.$message.error('包装级别必须大于0')
return
@ -1179,24 +1186,32 @@ export default {
}
this.selectDrugLevel()
},
selectDrugLevel(){
this.filterQueryDrugLevel.uuid = this.newProductData.uuid
this.filterQueryDrugLevel.ybbm = this.newProductData.ybbm
//
// this.filterQueryDrugLevel.approvalNum = this.newProductData.zczbhhzbapzbh
getDrugLevelList(this.filterQueryDrugLevel).then((response) => {
if (response.code == 20000) {
this.selectDrugLevelList = response.data.list || []
this.filterQueryDrugLevel.total = response.data.total || 0
this.selectDrugLevelVisible = true
}
}).catch(() => {
})
selectDrugLevel() {
this.selectDrugLevelVisible = true
setTimeout(() => {
this.$refs['formSelectedDrug'].validate((valid) => {
if (valid) {
this.filterQueryDrugLevel.uuid = this.newProductData.uuid
this.filterQueryDrugLevel.ybbm = this.newProductData.ybbm
//
// this.filterQueryDrugLevel.approvalNum = this.newProductData.zczbhhzbapzbh
getDrugLevelList(this.filterQueryDrugLevel).then((response) => {
if (response.code == 20000) {
this.selectDrugLevelList = response.data.list || []
this.filterQueryDrugLevel.total = response.data.total || 0
}
}).catch(() => {
})
}
})
}, 500)
},
selectDrugLevelItem(row){
selectDrugLevelItem(row) {
this.filterQueryDrugLevel.uuid = this.newProductData.uuid
this.filterQueryDrugLevel.ybbm = this.newProductData.ybbm
this.filterQueryDrugLevel.nameCodeRow = row.nameCode
this.filterQueryDrugLevel.nameCodeRow = row.nameCode
// console.log('drug',drug)
updateLevelDrugAli(this.filterQueryDrugLevel).then((response) => {
if (response.code == 20000) {
@ -1212,7 +1227,6 @@ export default {
}).catch(() => {
})
}
,
@ -1289,8 +1303,8 @@ export default {
}
},
//
checkIsSpecial(){
if (this.detailList.length > 0){
checkIsSpecial() {
if (this.detailList.length > 0) {
this.detailList.forEach(item => {
if (item.nameCode.startsWith('89')) {
this.isSpecial = true
@ -1439,13 +1453,13 @@ export default {
},
//
handleInput(index, value,type){
const intValue = parseInt(value, 10);
handleInput(index, value, type) {
const intValue = parseInt(value, 10)
//
if (type == 1){
this.$set(this.detailList[index], 'packLevel', intValue);
}else {
this.$set(this.detailList[index], 'bhxjsl', intValue);
if (type == 1) {
this.$set(this.detailList[index], 'packLevel', intValue)
} else {
this.$set(this.detailList[index], 'bhxjsl', intValue)
}
}

Loading…
Cancel
Save