|
|
|
@ -194,7 +194,6 @@
|
|
|
|
|
<el-form-item label="计量单位:" prop="useLevel" label-width="160px">
|
|
|
|
|
|
|
|
|
|
<el-select v-model="newProductData.useLevel" size="small" style="width: 90%"
|
|
|
|
|
clearable
|
|
|
|
|
@change="useLevelDiChange"
|
|
|
|
|
placeholder="请选择计量单位"
|
|
|
|
|
>
|
|
|
|
@ -568,42 +567,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;">
|
|
|
|
@ -950,6 +949,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setDefaultLevel()
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
if (!valid) {
|
|
|
|
|
return this.$message.error('请补充必要数据')
|
|
|
|
@ -962,6 +962,7 @@ export default {
|
|
|
|
|
this.newProductData.uuid = this.rowData.uuid
|
|
|
|
|
this.newProductData.nameCode = this.rowData.nameCode
|
|
|
|
|
this.newProductData.relId = this.newProductData.id
|
|
|
|
|
|
|
|
|
|
updatetDrug(this.newProductData).then(res => {
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
@ -980,6 +981,23 @@ export default {
|
|
|
|
|
this.closeDialog()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//设置层级
|
|
|
|
|
setDefaultLevel(){
|
|
|
|
|
//判断流通 最大层级
|
|
|
|
|
if (this.newProductData.distributeMaxLevel == null){
|
|
|
|
|
let levelUnit = this.levelUnitList[this.levelUnitList.length - 1];
|
|
|
|
|
this.newProductData.distributeMaxLevel = levelUnit.packLevel
|
|
|
|
|
}
|
|
|
|
|
// 判断使用 采集最大层级
|
|
|
|
|
if (this.newProductData.useMaxLevel == null){
|
|
|
|
|
//获取获取第一个 如果packUnit且为null的话就设置第二个
|
|
|
|
|
let levelUnit = this.levelUnitList[0];
|
|
|
|
|
if (isBlank(levelUnit.packUnit)){
|
|
|
|
|
levelUnit = this.levelUnitList[1]
|
|
|
|
|
}
|
|
|
|
|
this.newProductData.useMaxLevel = levelUnit.packLevel
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//层级保存
|
|
|
|
|
levelSave(row) {
|
|
|
|
|
this.editRowSwitch = false
|
|
|
|
|