|
|
|
@ -67,7 +67,8 @@
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.diType"
|
|
|
|
|
:disabled="scope.$index !== selectedIndex"
|
|
|
|
|
style="width: 90%" placeholder="选择标识类型" clearable>
|
|
|
|
|
style="width: 90%" placeholder="选择标识类型" clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option label="最小销售标识" :value="1"></el-option>
|
|
|
|
|
<!-- <el-option label="使用单元标识" :value="2"></el-option>-->
|
|
|
|
|
<!-- <el-option label="本体标识" :value="3"></el-option>-->
|
|
|
|
@ -80,6 +81,7 @@
|
|
|
|
|
<el-input size="small" v-model="scope.row.packLevel" style="width: 100%"
|
|
|
|
|
type="number"
|
|
|
|
|
:disabled="scope.$index !== selectedIndex"
|
|
|
|
|
@input="handleInput(scope.$index, $event,1)"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -95,6 +97,7 @@
|
|
|
|
|
<el-input size="small" v-model="scope.row.bhxjsl" style="width: 100%"
|
|
|
|
|
type="number"
|
|
|
|
|
:disabled="scope.$index !== selectedIndex"
|
|
|
|
|
@input="handleInput(scope.$index, $event,2)"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -572,42 +575,42 @@
|
|
|
|
|
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- </el-collapse-item>-->
|
|
|
|
|
<el-collapse-item name="4">
|
|
|
|
|
<template slot="title">
|
|
|
|
|
<p class="form-title">高级设置</p>
|
|
|
|
|
</template>
|
|
|
|
|
<el-row type="flex">
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<span>参数</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<span>设置</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<span>参数设置说明</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row type="flex">
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<span class="sptext">是否禁用</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="status"
|
|
|
|
|
active-color="#13ce66"
|
|
|
|
|
inactive-color="#ff4949"
|
|
|
|
|
>
|
|
|
|
|
</el-switch>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<span class="sptext">禁用后该药品将无法扫码使用</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
<!--<el-collapse-item name="4">-->
|
|
|
|
|
<!-- <template slot="title">-->
|
|
|
|
|
<!-- <p class="form-title">高级设置</p>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <el-row type="flex">-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <span>参数</span>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-divider direction="vertical"></el-divider>-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <span>设置</span>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-divider direction="vertical"></el-divider>-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <span>参数设置说明</span>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- <el-row type="flex">-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <span class="sptext">是否禁用</span>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-divider direction="vertical"></el-divider>-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <el-switch-->
|
|
|
|
|
<!-- v-model="status"-->
|
|
|
|
|
<!-- active-color="#13ce66"-->
|
|
|
|
|
<!-- inactive-color="#ff4949"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-switch>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-divider direction="vertical"></el-divider>-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <span class="sptext">禁用后该药品将无法扫码使用</span>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!--</el-collapse-item>-->
|
|
|
|
|
</el-collapse>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="text-align: center; margin-top: 20px;" v-if="type != 2">
|
|
|
|
@ -688,7 +691,11 @@
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
margin-right: 15px;"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="handleCurrentChange"
|
|
|
|
|
<el-button type="primary" icon="search" @click="onResetDrugLevelList"
|
|
|
|
|
style="text-align:right"
|
|
|
|
|
>重置
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="getDrugLevelList"
|
|
|
|
|
style="text-align:right"
|
|
|
|
|
>查询
|
|
|
|
|
</el-button>
|
|
|
|
@ -724,12 +731,12 @@
|
|
|
|
|
:total="filterQueryDrugLevel.total"
|
|
|
|
|
:page.sync="filterQueryDrugLevel.page"
|
|
|
|
|
:limit.sync="filterQueryDrugLevel.limit"
|
|
|
|
|
@pagination="handleCurrentChange"
|
|
|
|
|
|
|
|
|
|
@pagination="selectDrugLevel"
|
|
|
|
|
></pagination>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
@ -740,7 +747,7 @@ import {
|
|
|
|
|
updateLevelDrug, calculateDistCount, calculateUseCount,
|
|
|
|
|
getDrugLevelList, getDrugLevelListBycode
|
|
|
|
|
} from '@/api/basic/product/drugUdiinfos'
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import { isBlank } from '@/utils/strUtil'
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
getYbDrugDetail, removeRl, thirdSysDetail
|
|
|
|
@ -868,7 +875,7 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
useMaxLevel: [
|
|
|
|
|
{ required: true, message: '请选择允许采集的最大层级', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
detailList: [
|
|
|
|
|
// 初始化一个空对象或包含默认值的对象
|
|
|
|
@ -897,12 +904,12 @@ export default {
|
|
|
|
|
selectDrugLevelVisible: false,
|
|
|
|
|
selectDrugLevelList: [],
|
|
|
|
|
filterQueryDrugLevel: {
|
|
|
|
|
nameCode: "",
|
|
|
|
|
cpmctymc: "",
|
|
|
|
|
nameCode: '',
|
|
|
|
|
cpmctymc: '',
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
total: 0,
|
|
|
|
|
},
|
|
|
|
|
total: 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
@ -938,7 +945,7 @@ export default {
|
|
|
|
|
this.newProductData.zczbhhzbapzbh = this.ybDrugDetail.approvalCode
|
|
|
|
|
this.newProductData.cpmctymc = this.ybDrugDetail.registeredProductName
|
|
|
|
|
this.newProductData.spmc = this.ybDrugDetail.goodsName
|
|
|
|
|
this.newProductData.bzgg = this.ybDrugDetail.factor + this.ybDrugDetail.minUnit + "/" + this.ybDrugDetail.unit
|
|
|
|
|
this.newProductData.bzgg = this.ybDrugDetail.factor + this.ybDrugDetail.minUnit + '/' + this.ybDrugDetail.unit
|
|
|
|
|
this.newProductData.matrial = this.ybDrugDetail.materialName
|
|
|
|
|
this.newProductData.packMatrial = this.ybDrugDetail.materialName
|
|
|
|
|
this.newProductData.packUnit = this.ybDrugDetail.unit
|
|
|
|
@ -946,12 +953,12 @@ export default {
|
|
|
|
|
this.newProductData.manufactory = this.ybDrugDetail.companyNameSc
|
|
|
|
|
this.newProductData.prepnUnit = this.ybDrugDetail.realityMedicinemodel
|
|
|
|
|
|
|
|
|
|
if (this.ybDrugDetail.productInsuranceType != "" && this.ybDrugDetail.productInsuranceType != null) {
|
|
|
|
|
if ("甲" == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
if (this.ybDrugDetail.productInsuranceType != '' && this.ybDrugDetail.productInsuranceType != null) {
|
|
|
|
|
if ('甲' == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
this.newProductData.medicareType = 1
|
|
|
|
|
} else if ("乙" == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
} else if ('乙' == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
this.newProductData.medicareType = 2
|
|
|
|
|
} else if ("丙" == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
} else if ('丙' == this.ybDrugDetail.productInsuranceType) {
|
|
|
|
|
this.newProductData.medicareType = 3
|
|
|
|
|
} else {
|
|
|
|
|
this.newProductData.medicareType = null
|
|
|
|
@ -970,7 +977,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
saveNewProduct() {
|
|
|
|
|
if (!this.isSave) {
|
|
|
|
|
return this.$message.error("请先保存药品层级")
|
|
|
|
|
return this.$message.error('请先保存药品层级')
|
|
|
|
|
}
|
|
|
|
|
this.addProductDialogVisible = false
|
|
|
|
|
this.newProductData.registerNo = this.newProductData.zczbhhzbapzbh
|
|
|
|
@ -1096,7 +1103,7 @@ export default {
|
|
|
|
|
this.$message.success('保存成功!')
|
|
|
|
|
this.selectedIndex = null
|
|
|
|
|
this.getDetailList()
|
|
|
|
|
this.getDiLevel();
|
|
|
|
|
this.getDiLevel()
|
|
|
|
|
} else {
|
|
|
|
|
this.isSave = true
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
@ -1108,6 +1115,23 @@ export default {
|
|
|
|
|
row.isUpDisabled = true
|
|
|
|
|
row.rowDisabled = false
|
|
|
|
|
},
|
|
|
|
|
getDrugLevelList() {
|
|
|
|
|
this.filterQueryDrugLevel.page = 1
|
|
|
|
|
this.selectDrugLevel()
|
|
|
|
|
},
|
|
|
|
|
onResetDrugLevelList() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: ''
|
|
|
|
|
})
|
|
|
|
|
this.filterQueryDrugLevel = {
|
|
|
|
|
nameCode: '',
|
|
|
|
|
cpmctymc: '',
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
total: 0
|
|
|
|
|
}
|
|
|
|
|
this.selectDrugLevel()
|
|
|
|
|
},
|
|
|
|
|
selectDrugLevel() {
|
|
|
|
|
//获取分页列表
|
|
|
|
|
getDrugLevelList(this.filterQueryDrugLevel).then((response) => {
|
|
|
|
@ -1125,14 +1149,14 @@ export default {
|
|
|
|
|
if (response.data.length > 0) {
|
|
|
|
|
response.data.forEach(item => {
|
|
|
|
|
//新增层级
|
|
|
|
|
let parts = item.bzgg.split('/');
|
|
|
|
|
let parts = item.bzgg.split('/')
|
|
|
|
|
// 首先,根据 ':' 分割字符串
|
|
|
|
|
const ratioParts = item.packRatio.split(':');
|
|
|
|
|
let selectedValue;
|
|
|
|
|
const ratioParts = item.packRatio.split(':')
|
|
|
|
|
let selectedValue
|
|
|
|
|
if (item.packLevel >= 0 && item.packLevel < ratioParts.length) {
|
|
|
|
|
selectedValue = ratioParts[item.packLevel];
|
|
|
|
|
selectedValue = ratioParts[item.packLevel]
|
|
|
|
|
} else {
|
|
|
|
|
selectedValue = null; // 或者你可以设置一个默认值
|
|
|
|
|
selectedValue = null // 或者你可以设置一个默认值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let editQuery = {
|
|
|
|
@ -1231,10 +1255,10 @@ export default {
|
|
|
|
|
uuid: this.newProductData.uuid,
|
|
|
|
|
id: this.newProductData.rlId,
|
|
|
|
|
nameCode: this.newProductData.nameCode,
|
|
|
|
|
productType: this.newProductData.productsType,
|
|
|
|
|
productType: this.newProductData.productsType
|
|
|
|
|
}
|
|
|
|
|
this.loading = true
|
|
|
|
|
console.log("djdjd",query)
|
|
|
|
|
console.log('djdjd', query)
|
|
|
|
|
filterByUuid(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false
|
|
|
|
@ -1292,10 +1316,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
findMaxLevelObject() {
|
|
|
|
|
this.maxLevel = 1;
|
|
|
|
|
this.maxLevel = 1
|
|
|
|
|
for (const obj of this.levelUnitList) {
|
|
|
|
|
if (obj.packLevel > this.maxLevel) {
|
|
|
|
|
this.maxLevel = Number(obj.packLevel);
|
|
|
|
|
this.maxLevel = Number(obj.packLevel)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1384,6 +1408,18 @@ export default {
|
|
|
|
|
closeUdi(val) {
|
|
|
|
|
this.chooseHouseDrugVisible = false
|
|
|
|
|
this.getThirdSysDetail()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//自动去除小数
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|