|
|
@ -542,7 +542,7 @@
|
|
|
|
<el-table-column label="包装规格" prop="bzgg" 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="packRatio" show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column label="操作">
|
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="text" @click="selectDrugLevelItem(scope.row)">
|
|
|
|
<el-button type="text" @click="selectDrugLevelItem(scope.row)">
|
|
|
|
选入
|
|
|
|
选入
|
|
|
@ -925,7 +925,7 @@ export default {
|
|
|
|
sjcpbm: row.sjcpbm,
|
|
|
|
sjcpbm: row.sjcpbm,
|
|
|
|
bhxjcpbm: row.bhxjcpbm,
|
|
|
|
bhxjcpbm: row.bhxjcpbm,
|
|
|
|
bhxjsl: row.bhxjsl,
|
|
|
|
bhxjsl: row.bhxjsl,
|
|
|
|
relId: this.newProductData.id,
|
|
|
|
relId: this.newProductData.rlId,
|
|
|
|
uuid: this.newProductData.uuid,
|
|
|
|
uuid: this.newProductData.uuid,
|
|
|
|
productId: row.productId,
|
|
|
|
productId: row.productId,
|
|
|
|
diType: row.diType,
|
|
|
|
diType: row.diType,
|
|
|
@ -977,22 +977,49 @@ export default {
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
extractNumber(bzgg) {
|
|
|
|
|
|
|
|
// 使用正则表达式提取数字
|
|
|
|
|
|
|
|
const match = bzgg.match(/^\d+/);
|
|
|
|
|
|
|
|
// 如果匹配到,则返回数字,否则返回null
|
|
|
|
|
|
|
|
return match ? parseInt(match[0], 10) : null;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extractUnitAfterNumber(bzgg) {
|
|
|
|
|
|
|
|
// 使用正则表达式提取数字后面的单位
|
|
|
|
|
|
|
|
const match = bzgg.match(/^\d+([^\d/]+)/);
|
|
|
|
|
|
|
|
// 如果匹配到,则返回单位,否则返回null
|
|
|
|
|
|
|
|
return match ? match[1].trim() : null;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectDrugLevelItem(row) {
|
|
|
|
selectDrugLevelItem(row) {
|
|
|
|
getDrugLevelListBycode({nameCode: row.nameCode}).then((response) => {
|
|
|
|
getDrugLevelListBycode({nameCode: row.nameCode}).then((response) => {
|
|
|
|
if (response.code == 20000) {
|
|
|
|
if (response.code == 20000) {
|
|
|
|
if (response.data.length > 0) {
|
|
|
|
if (response.data.length > 0) {
|
|
|
|
response.data.forEach(item => {
|
|
|
|
response.data.forEach(item => {
|
|
|
|
//新增层级
|
|
|
|
|
|
|
|
let parts = item.bzgg.split('/');
|
|
|
|
let parts = item.bzgg.split('/');
|
|
|
|
// 首先,根据 ':' 分割字符串
|
|
|
|
const levels = item.packRatio.split(":").map(Number);
|
|
|
|
const ratioParts = item.packRatio.split(':');
|
|
|
|
const calculatedLevels = [levels[0]];
|
|
|
|
let selectedValue;
|
|
|
|
for (let i = levels.length - 1; i > 0; i--) {
|
|
|
|
if (item.packLevel >= 0 && item.packLevel < ratioParts.length) {
|
|
|
|
const ratio = levels[i] / levels[i - 1];
|
|
|
|
selectedValue = ratioParts[item.packLevel];
|
|
|
|
calculatedLevels.unshift(ratio);
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
selectedValue = null; // 或者你可以设置一个默认值
|
|
|
|
calculatedLevels.reverse();
|
|
|
|
|
|
|
|
let selectedValue = calculatedLevels[item.packLevel - 1];
|
|
|
|
|
|
|
|
console.log(item)
|
|
|
|
|
|
|
|
if (item.packLevel == 1) {
|
|
|
|
|
|
|
|
selectedValue = this.extractNumber(this.newProductData.bzgg)
|
|
|
|
|
|
|
|
item.xjdw = this.extractUnitAfterNumber(this.newProductData.bzgg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const ratioParts = item.packRatio.split(':');
|
|
|
|
|
|
|
|
// let selectedValue;
|
|
|
|
|
|
|
|
// if (item.packLevel >= 0 && item.packLevel < ratioParts.length) {
|
|
|
|
|
|
|
|
// selectedValue = ratioParts[item.packLevel];
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// selectedValue = 1; // 或者你可以设置一个默认值
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
let editQuery = {
|
|
|
|
let editQuery = {
|
|
|
|
nameCode: item.nameCode,
|
|
|
|
nameCode: item.nameCode,
|
|
|
|
packLevel: item.packLevel,
|
|
|
|
packLevel: item.packLevel,
|
|
|
@ -1022,7 +1049,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -1031,10 +1057,15 @@ export default {
|
|
|
|
this.selectedIndex = this.detailList.length - 1
|
|
|
|
this.selectedIndex = this.detailList.length - 1
|
|
|
|
this.isSave = false
|
|
|
|
this.isSave = false
|
|
|
|
this.selectDrugLevelVisible = false
|
|
|
|
this.selectDrugLevelVisible = false
|
|
|
|
},
|
|
|
|
this.getDetailList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleCurrentChange() {
|
|
|
|
handleCurrentChange() {
|
|
|
|
this.selectDrugLevel()
|
|
|
|
this.selectDrugLevel()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
addDrugLevel() {
|
|
|
|
addDrugLevel() {
|
|
|
|
this.detailList.push({
|
|
|
|
this.detailList.push({
|
|
|
|
nameCode: '',
|
|
|
|
nameCode: '',
|
|
|
@ -1047,7 +1078,8 @@ export default {
|
|
|
|
this.newProductData.productId = null
|
|
|
|
this.newProductData.productId = null
|
|
|
|
this.selectedIndex = this.detailList.length - 1
|
|
|
|
this.selectedIndex = this.detailList.length - 1
|
|
|
|
this.isSave = false
|
|
|
|
this.isSave = false
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
rowChange(index, val) {
|
|
|
|
rowChange(index, val) {
|
|
|
|
|
|
|
|
|
|
|
@ -1060,7 +1092,8 @@ export default {
|
|
|
|
this.selectedIndex = index
|
|
|
|
this.selectedIndex = index
|
|
|
|
this.isSave = false
|
|
|
|
this.isSave = false
|
|
|
|
this.editRowSwitch = true
|
|
|
|
this.editRowSwitch = true
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
deleteLevel(index, row) {
|
|
|
|
deleteLevel(index, row) {
|
|
|
|
this.$confirm('此操作将删除该层级,是否继续?', '提示', {
|
|
|
|
this.$confirm('此操作将删除该层级,是否继续?', '提示', {
|
|
|
@ -1089,7 +1122,8 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置层级
|
|
|
|
//设置层级
|
|
|
@ -1129,7 +1163,8 @@ export default {
|
|
|
|
this.detailList = []
|
|
|
|
this.detailList = []
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
distributeLevelDiChange(val) {
|
|
|
|
distributeLevelDiChange(val) {
|
|
|
|
const matchingItem = this.detailList.find(item => item.nameCode == val)
|
|
|
|
const matchingItem = this.detailList.find(item => item.nameCode == val)
|
|
|
@ -1144,7 +1179,8 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
useLevelDiChange(val) {
|
|
|
|
useLevelDiChange(val) {
|
|
|
|
const matchingItem = this.detailList.find(item => item.nameCode == val)
|
|
|
|
const matchingItem = this.detailList.find(item => item.nameCode == val)
|
|
|
|
if (matchingItem) {
|
|
|
|
if (matchingItem) {
|
|
|
@ -1157,7 +1193,8 @@ export default {
|
|
|
|
useLeverCount: res.data.useLeverCount
|
|
|
|
useLeverCount: res.data.useLeverCount
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
getDiLevel() {
|
|
|
|
getDiLevel() {
|
|
|
|
let query = {
|
|
|
|
let query = {
|
|
|
|
id: this.relId
|
|
|
|
id: this.relId
|
|
|
@ -1173,7 +1210,8 @@ export default {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
this.levelUnitList = []
|
|
|
|
this.levelUnitList = []
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
findMaxLevelObject() {
|
|
|
|
findMaxLevelObject() {
|
|
|
|
this.maxLevel = 1;
|
|
|
|
this.maxLevel = 1;
|
|
|
@ -1182,19 +1220,22 @@ export default {
|
|
|
|
this.maxLevel = Number(obj.packLevel);
|
|
|
|
this.maxLevel = Number(obj.packLevel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 选择收费项目
|
|
|
|
* 选择收费项目
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
selectPayFeecode() {
|
|
|
|
selectPayFeecode() {
|
|
|
|
this.tollProjectDialogVisible = true
|
|
|
|
this.tollProjectDialogVisible = true
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
|
|
getData(data) {
|
|
|
|
getData(data) {
|
|
|
|
this.tollProjectDialogVisible = false
|
|
|
|
this.tollProjectDialogVisible = false
|
|
|
|
this.newProductData.payFeeCode = data.medCatalogCode
|
|
|
|
this.newProductData.payFeeCode = data.medCatalogCode
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 第三方系统药品信息
|
|
|
|
* 第三方系统药品信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1212,7 +1253,8 @@ export default {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
this.sysList = []
|
|
|
|
this.sysList = []
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
resetThirdId() {
|
|
|
|
resetThirdId() {
|
|
|
|
this.sysList.forEach((item) => {
|
|
|
|
this.sysList.forEach((item) => {
|
|
|
|
if (item.sysId === 'thirdId') {
|
|
|
|
if (item.sysId === 'thirdId') {
|
|
|
@ -1227,7 +1269,8 @@ export default {
|
|
|
|
this.newProductData.thirdId4 = item.thirdId
|
|
|
|
this.newProductData.thirdId4 = item.thirdId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 关联 第三方
|
|
|
|
* 关联 第三方
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1235,7 +1278,8 @@ export default {
|
|
|
|
this.defaultSys = row.sysId
|
|
|
|
this.defaultSys = row.sysId
|
|
|
|
this.isImport = false
|
|
|
|
this.isImport = false
|
|
|
|
this.chooseHouseDrugVisible = true
|
|
|
|
this.chooseHouseDrugVisible = true
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
removeErp(row) {
|
|
|
|
removeErp(row) {
|
|
|
|
this.$confirm('此操作将解除该绑定药品信息, 是否继续?', '提示', {
|
|
|
|
this.$confirm('此操作将解除该绑定药品信息, 是否继续?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: '确定',
|
|
|
@ -1264,11 +1308,13 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
closeUdi(val) {
|
|
|
|
closeUdi(val) {
|
|
|
|
this.chooseHouseDrugVisible = false
|
|
|
|
this.chooseHouseDrugVisible = false
|
|
|
|
this.getThirdSysDetail()
|
|
|
|
this.getThirdSysDetail()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
handleInput(index, value, type) {
|
|
|
|
handleInput(index, value, type) {
|
|
|
|
const intValue = parseInt(value, 10);
|
|
|
|
const intValue = parseInt(value, 10);
|
|
|
|
// 更新行的数据
|
|
|
|
// 更新行的数据
|
|
|
@ -1297,9 +1343,11 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.selectedIndex = 0
|
|
|
|
this.selectedIndex = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
,
|
|
|
|
directives: {
|
|
|
|
directives: {
|
|
|
|
'debounce-input': {
|
|
|
|
'debounce-input':
|
|
|
|
|
|
|
|
{
|
|
|
|
inserted(el, binding) {
|
|
|
|
inserted(el, binding) {
|
|
|
|
let timeout
|
|
|
|
let timeout
|
|
|
|
el.addEventListener('input', () => {
|
|
|
|
el.addEventListener('input', () => {
|
|
|
|