|
|
|
@ -21,45 +21,53 @@
|
|
|
|
|
key="3"
|
|
|
|
|
@current-change="handleDetail"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="药品标识" prop="nameCode" show-overflow-tooltip>
|
|
|
|
|
<el-table-column label="层级标识" prop="nameCode" show-overflow-tooltip width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.nameCode"
|
|
|
|
|
:disabled="scope.row.rowDisabled"
|
|
|
|
|
placeholder="请输入药品标识" style="width: 100%"
|
|
|
|
|
<el-input v-model="productData.nameCode"
|
|
|
|
|
placeholder="" style="width: 100%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip>
|
|
|
|
|
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.packLevel"
|
|
|
|
|
:disabled="scope.row.rowDisabled"
|
|
|
|
|
type="number"
|
|
|
|
|
placeholder="请输入包装级别" style="width: 100%"
|
|
|
|
|
<el-input v-model="productData.packLevel"
|
|
|
|
|
placeholder="" style="width: 100%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!--<el-table-column label="包装单位" prop="packUnit" show-overflow-tooltip>-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <el-input v-model="scope.row.packUnit"-->
|
|
|
|
|
<!-- :disabled="scope.row.rowDisabled"-->
|
|
|
|
|
<!-- placeholder="请输入包装单位" style="width: 100%"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!--</el-table-column>-->
|
|
|
|
|
<el-table-column label="包含下级数量" prop="bhxjsl" show-overflow-tooltip>
|
|
|
|
|
<el-table-column label="层级单位" prop="packUnit" show-overflow-tooltip width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="productData.packUnit"
|
|
|
|
|
placeholder="" style="width: 100%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="上级标识" prop="sjcpbm" show-overflow-tooltip width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="productData.packUnit"
|
|
|
|
|
placeholder="" style="width: 100%;margin: 5px"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="下级标识" prop="bhxjcpbm" show-overflow-tooltip width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="productData.packUnit"
|
|
|
|
|
placeholder="" style="width: 100%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="下级数量" prop="bhxjsl" show-overflow-tooltip width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.bhxjsl"
|
|
|
|
|
:disabled="scope.row.rowDisabled"
|
|
|
|
|
<el-input v-model="productData.bhxjsl"
|
|
|
|
|
type="number"
|
|
|
|
|
placeholder="请输入包含下级数量" style="width: 100%"
|
|
|
|
|
placeholder="" style="width: 100%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="180px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" @click.native="save(scope.row)" :disabled="scope.row.isDisabled">保存</el-button>
|
|
|
|
|
<el-button type="text" @click.native="update(scope.row)" :disabled="scope.row.isUpDisabled">编辑</el-button>
|
|
|
|
|
<el-button type="text" @click.native="remove(scope.row)">删除</el-button>
|
|
|
|
|
<el-button type="text" @click.native="levelSave(productData)">保存</el-button>
|
|
|
|
|
<el-button type="text">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -233,30 +241,6 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row type="flex">
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<el-form-item label="统一社会信用号:" prop="tyshxydm">
|
|
|
|
|
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
|
|
|
|
|
v-model.trim="newProductData.tyshxydm"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<el-form-item label="药品状态:" prop="majorStatus">
|
|
|
|
|
<el-select v-model="newProductData.majorStatus" style="width: 90%" placeholder="选择药品状态" clearable>
|
|
|
|
|
<el-option label="停用" :value="0"></el-option>
|
|
|
|
|
<el-option label="在用" :value="1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!--<el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="产品描述:" prop="cpms">-->
|
|
|
|
|
<!-- <el-input style="width: 90%" type="textarea" size="mini" rows="1" placeholder="请输入产品描述"-->
|
|
|
|
|
<!-- v-model.trim="newProductData.cpms"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!--</el-col>-->
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- <el-row type="flex">-->
|
|
|
|
|
<!-- <el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="产品类别:" prop="cplb">-->
|
|
|
|
@ -302,7 +286,30 @@
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!--</el-row>-->
|
|
|
|
|
|
|
|
|
|
<el-row type="flex">
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<el-form-item label="统一社会信用号:" prop="tyshxydm">
|
|
|
|
|
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
|
|
|
|
|
v-model.trim="newProductData.tyshxydm"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11" class="el-col">
|
|
|
|
|
<el-form-item label="药品状态:" prop="majorStatus">
|
|
|
|
|
<el-select v-model="newProductData.majorStatus" style="width: 90%" placeholder="选择药品状态" clearable>
|
|
|
|
|
<el-option label="停用" :value="0"></el-option>
|
|
|
|
|
<el-option label="在用" :value="1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!--<el-col :span="11" class="el-col">-->
|
|
|
|
|
<!-- <el-form-item label="产品描述:" prop="cpms">-->
|
|
|
|
|
<!-- <el-input style="width: 90%" type="textarea" size="mini" rows="1" placeholder="请输入产品描述"-->
|
|
|
|
|
<!-- v-model.trim="newProductData.cpms"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!--</el-col>-->
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row type="flex">
|
|
|
|
|
<el-col :span="23" class="el-col">
|
|
|
|
@ -359,14 +366,14 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="text-align: center; margin-top: 20px;">
|
|
|
|
|
<el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button>
|
|
|
|
|
<el-button @click="closeAddDialog">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="closeAddDialog">取消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getYbHcflDetail, addProduct, addDrug, updatetDrug } from '@/api/basic/product/udiRelevance'
|
|
|
|
|
import { filterClassify } from '@/api/purchase/classifyCode'
|
|
|
|
|
import {getYbHcflDetail, addProduct, addDrug, updatetDrug} from '@/api/basic/product/udiRelevance'
|
|
|
|
|
import {filterClassify} from '@/api/purchase/classifyCode'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'drugAdd',
|
|
|
|
@ -387,7 +394,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
ybHcflDetail: {},
|
|
|
|
|
drugLevelList: [],
|
|
|
|
|
productData: {},
|
|
|
|
|
newProductData: {
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
bzgg: null,
|
|
|
|
@ -407,42 +414,42 @@ export default {
|
|
|
|
|
activeNames: ['1', '2'],
|
|
|
|
|
formRules: {
|
|
|
|
|
cpmctymc: [
|
|
|
|
|
{ required: true, message: '请输入药品通用名', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入药品通用名', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
prepnSpec: [
|
|
|
|
|
{ required: true, message: '请输入制剂规格', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入制剂规格', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
packUnit: [
|
|
|
|
|
{ required: true, message: '请输入包装单位', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入包装单位', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
prepnUnit: [
|
|
|
|
|
{ required: true, message: '请输入制剂单位', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入制剂单位', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
packRatio: [
|
|
|
|
|
{ required: true, message: '请输入包装比例', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入包装比例', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
packMatrial: [
|
|
|
|
|
{ required: true, message: '请输入包装材质', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入包装材质', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
registerNo: [
|
|
|
|
|
{ required: true, message: '请输入批准文号', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '请输入批准文号', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
manufactory: [
|
|
|
|
|
{ required: true, message: '生产企业不能为空', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '生产企业不能为空', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
physicType: [
|
|
|
|
|
{ required: true, message: '药品类型不能为空', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '药品类型不能为空', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
ybbm: [
|
|
|
|
|
{ required: true, message: '医保编码不能为空', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '医保编码不能为空', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
price: [
|
|
|
|
|
{ required: true, message: '药品价格不能为空', trigger: 'blur' }
|
|
|
|
|
{required: true, message: '药品价格不能为空', trigger: 'blur'}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
detailList: [
|
|
|
|
|
// 初始化一个空对象或包含默认值的对象
|
|
|
|
|
{ nameCode: '', packLevel: null, bhxjsl: null ,isDisabled: false, isUpDisabled: true,rowDisabled: false }
|
|
|
|
|
{nameCode: '', packLevel: null, bhxjsl: null, isDisabled: false, isUpDisabled: true, rowDisabled: false}
|
|
|
|
|
],
|
|
|
|
|
status: false,
|
|
|
|
|
rowDisabled: false
|
|
|
|
@ -548,7 +555,9 @@ export default {
|
|
|
|
|
closeAddDialog() {
|
|
|
|
|
this.closeDialog()
|
|
|
|
|
},
|
|
|
|
|
save(row) {
|
|
|
|
|
|
|
|
|
|
//层级保存
|
|
|
|
|
levelSave(row) {
|
|
|
|
|
const isNotEmpty = row.nameCode || row.packLevel || row.bhxjsl;
|
|
|
|
|
if (!isNotEmpty) {
|
|
|
|
|
return this.$message.error("至少填写一个属性");
|
|
|
|
@ -570,7 +579,7 @@ export default {
|
|
|
|
|
// this.drugLevelList.push(data)
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
update(row){
|
|
|
|
|
update(row) {
|
|
|
|
|
row.isDisabled = false
|
|
|
|
|
row.isUpDisabled = true
|
|
|
|
|
row.rowDisabled = false
|
|
|
|
@ -589,7 +598,7 @@ export default {
|
|
|
|
|
remove(row) {
|
|
|
|
|
// 从 detailList 中删除当前行数据
|
|
|
|
|
const index = this.detailList.indexOf(row);
|
|
|
|
|
if (index == 0){
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
return this.$message.error("至少添加一层")
|
|
|
|
|
}
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|