|
|
|
@ -36,6 +36,10 @@
|
|
|
|
|
text-align: right;
|
|
|
|
|
margin-bottom: 8px;"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" size="mini" icon="search" @click="selectDrugLevel"
|
|
|
|
|
style="text-align:right"
|
|
|
|
|
>选入药品层级
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" icon="search" @click="addDrugLevel"
|
|
|
|
|
style="text-align:right"
|
|
|
|
|
>新增药品层级
|
|
|
|
@ -657,6 +661,74 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选入药品层级"
|
|
|
|
|
:visible.sync="selectDrugLevelVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="85%"
|
|
|
|
|
v-if="selectDrugLevelVisible"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-form :model="filterQueryDrugLevel" class="query-form" label-width="100px" >
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="层级标识:">
|
|
|
|
|
<el-input v-model="filterQueryDrugLevel.nameCode" placeholder="请输入层级标识" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="通用名称:">
|
|
|
|
|
<el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入通用名称" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<div style=" float: right;
|
|
|
|
|
text-align: right;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
margin-right: 15px;"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="handleCurrentChange"
|
|
|
|
|
style="text-align:right"
|
|
|
|
|
>查询
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table :data="selectDrugLevelList" style="width: 100%; margin-bottom: 8px" key="2" border>
|
|
|
|
|
<el-table-column label="序号" type="index" ></el-table-column>
|
|
|
|
|
<el-table-column label="层级标识" prop="nameCode" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="药品类型" prop="type" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="生产企业" prop="manufacturer" show-overflow-tooltip width="200px"></el-table-column>
|
|
|
|
|
<el-table-column label="产品名称通用名称" prop="cpmctymc" show-overflow-tooltip width="200px"></el-table-column>
|
|
|
|
|
<el-table-column label="剂型" prop="form" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="剂型规格" prop="formSpec" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="商品名称" prop="spmc" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="包装规格" prop="bzgg" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="包装比例" prop="packRatio" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" @click="selectDrugLevelItem(scope.row)" >
|
|
|
|
|
选入
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="filterQueryDrugLevel.total>0"
|
|
|
|
|
:total="filterQueryDrugLevel.total"
|
|
|
|
|
:page.sync="filterQueryDrugLevel.page"
|
|
|
|
|
:limit.sync="filterQueryDrugLevel.limit"
|
|
|
|
|
@pagination="handleCurrentChange"
|
|
|
|
|
|
|
|
|
|
></pagination>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -665,7 +737,8 @@ import {
|
|
|
|
|
addDrug,
|
|
|
|
|
updatetDrug,
|
|
|
|
|
delDrugLevel,
|
|
|
|
|
updateLevelDrug, calculateDistCount, calculateUseCount
|
|
|
|
|
updateLevelDrug, calculateDistCount, calculateUseCount,
|
|
|
|
|
getDrugLevelList,getDrugLevelListBycode
|
|
|
|
|
} from '@/api/basic/product/drugUdiinfos'
|
|
|
|
|
import {getCodeRelDetail} from '@/api/basic/product/udiRelevance'
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
@ -717,6 +790,13 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
ybDrugDetail: {},
|
|
|
|
|
productData: {},
|
|
|
|
|
filterQueryDrugLevel: {
|
|
|
|
|
nameCode: "",
|
|
|
|
|
cpmctymc: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
total: 0,
|
|
|
|
|
},
|
|
|
|
|
newProductData: {
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
bzgg: null,
|
|
|
|
@ -747,6 +827,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
thirdSys: [],
|
|
|
|
|
classifyList: [],
|
|
|
|
|
selectDrugLevelList: [],
|
|
|
|
|
saveLoading: false,
|
|
|
|
|
activeNames: ['0', '1', '2'],
|
|
|
|
|
formRules: {
|
|
|
|
@ -819,6 +900,7 @@ export default {
|
|
|
|
|
tollProjectDialogVisible: false,
|
|
|
|
|
sysList: [],
|
|
|
|
|
chooseHouseDrugVisible: false,
|
|
|
|
|
selectDrugLevelVisible: false,
|
|
|
|
|
isImport: false,
|
|
|
|
|
defaultSys: null,
|
|
|
|
|
levelUnitList: [],
|
|
|
|
@ -1045,6 +1127,75 @@ export default {
|
|
|
|
|
row.isUpDisabled = true
|
|
|
|
|
row.rowDisabled = false
|
|
|
|
|
},
|
|
|
|
|
selectDrugLevel(){
|
|
|
|
|
//获取分页列表
|
|
|
|
|
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(() => {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
selectDrugLevelItem(row){
|
|
|
|
|
getDrugLevelListBycode({nameCode:row.nameCode}).then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
if (response.data.length > 0){
|
|
|
|
|
response.data.forEach( item => {
|
|
|
|
|
//新增层级
|
|
|
|
|
let parts = item.bzgg.split('/');
|
|
|
|
|
// 首先,根据 ':' 分割字符串
|
|
|
|
|
const ratioParts = item.packRatio.split(':');
|
|
|
|
|
let selectedValue;
|
|
|
|
|
if (item.packLevel >= 0 && item.packLevel < ratioParts.length) {
|
|
|
|
|
selectedValue = ratioParts[item.packLevel];
|
|
|
|
|
} else {
|
|
|
|
|
selectedValue = null; // 或者你可以设置一个默认值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let editQuery = {
|
|
|
|
|
nameCode: item.nameCode,
|
|
|
|
|
packLevel: item.packLevel,
|
|
|
|
|
packUnit: parts[1] || '',
|
|
|
|
|
bhxjsl: selectedValue,
|
|
|
|
|
relId: this.newProductData.id,
|
|
|
|
|
uuid: this.newProductData.uuid,
|
|
|
|
|
productId: item.productId,
|
|
|
|
|
diType: item.packLevel == 1?1:4,
|
|
|
|
|
xjdw: item.xjdw
|
|
|
|
|
}
|
|
|
|
|
updateLevelDrug(editQuery).then(res => {
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.detailList.push({
|
|
|
|
|
nameCode: item.nameCode,
|
|
|
|
|
packLevel: item.packLevel,
|
|
|
|
|
packUnit: parts[1] || '',
|
|
|
|
|
bhxjsl: selectedValue,
|
|
|
|
|
diType: item.packLevel == 1?1:4,
|
|
|
|
|
isDisabled: false,
|
|
|
|
|
rowDisabled: false,
|
|
|
|
|
isUpDisabled: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.newProductData.productId = null
|
|
|
|
|
this.selectedIndex = this.detailList.length - 1
|
|
|
|
|
this.isSave = false
|
|
|
|
|
this.selectDrugLevelVisible = false
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(){
|
|
|
|
|
this.selectDrugLevel()
|
|
|
|
|
},
|
|
|
|
|
addDrugLevel() {
|
|
|
|
|
this.detailList.push({
|
|
|
|
|
nameCode: '',
|
|
|
|
@ -1114,7 +1265,7 @@ export default {
|
|
|
|
|
filterByUuid(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.detailList = response.data || []
|
|
|
|
|
this.detailList = response.data.list || []
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|