You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udiwms-vue-frame/src/views/basic/product/drug/drugAdd.vue

853 lines
32 KiB
Vue

8 months ago
<template>
<div>
<el-form :model="newProductData" :rules="formRules" label-width="140px" ref="dataForm">
8 months ago
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">药品层级</p>
</template>
8 months ago
<div style=" float: right;
text-align: right;
margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addDrugLevel"
style="text-align:right">新增药品层级
</el-button>
</div>
8 months ago
<el-table
v-loading="loading"
:data="detailList"
style="width: 100%;"
border
key="3"
@current-change="handleDetail"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="层级标识" prop="nameCode" show-overflow-tooltip width="160">
8 months ago
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.nameCode" style="width: 100%;margin: 4px;"
:disabled="scope.$index !== selectedIndex"
8 months ago
></el-input>
</template>
</el-table-column>
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip width="160">
8 months ago
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.packLevel" style="width: 100%"
type="number"
:disabled="scope.$index !== selectedIndex"
8 months ago
></el-input>
</template>
</el-table-column>
<el-table-column label="层级单位" prop="packUnit" show-overflow-tooltip width="100">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.packUnit" style="width: 100%"
:disabled="scope.$index !== selectedIndex"
></el-input>
</template>
</el-table-column>
<el-table-column label="上级标识" prop="sjcpbm" show-overflow-tooltip width="160">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.sjcpbm" style="width: 100%"
:disabled="scope.$index !== selectedIndex"
></el-input>
</template>
</el-table-column>
<el-table-column label="下级标识" prop="bhxjcpbm" show-overflow-tooltip width="160">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.bhxjcpbm" style="width: 100%"
:disabled="scope.$index !== selectedIndex"
></el-input>
</template>
</el-table-column>
<el-table-column label="下级数量" prop="bhxjsl" show-overflow-tooltip width="100">
8 months ago
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.bhxjsl" style="width: 100%"
8 months ago
type="number"
:disabled="scope.$index !== selectedIndex"
8 months ago
></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="180px" fixed="right">
8 months ago
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.$index == selectedIndex" @click.stop="true"
@click.native="levelSave(scope.row)">保存
</el-button>
<el-button
type="text"
size="small"
v-if="scope.$index != selectedIndex "
@click.stop="true"
@click.native="rowChange(scope.$index,scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.stop="true"
:disabled="scope.$index == selectedIndex || scope.row.id == null"
@click.native="deleteLevel(scope.$index, scope.row)"
>删除
</el-button>
8 months ago
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item name="2">
<template slot="title">
<p class="form-title">基本信息</p>
</template>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="药品通用名称:" prop="cpmctymc">
<el-input style="width: 90%" size="small" placeholder="请输入药品通用名称"
v-model.trim="newProductData.cpmctymc"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="商品名称:" prop="spmc">
<el-input style="width: 90%" size="small" placeholder="请输入商品名称"
v-model.trim="newProductData.spmc"
></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="bzgg">
<el-input style="width: 90%" size="small" placeholder="请输入包装规格"
v-model.trim="newProductData.bzgg"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="包装单位:" prop="packUnit">
<el-input style="width: 90%" size="small" placeholder="请输入包装单位"
v-model.trim="newProductData.packUnit"
></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="prepnSpec">
<el-input style="width: 90%" size="small" placeholder="请输入制剂规格"
v-model.trim="newProductData.prepnSpec"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="制剂单位:" prop="prepnUnit">
<el-input style="width: 90%" size="small" placeholder="请输入制剂单位"
v-model.trim="newProductData.prepnUnit"
></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="packMatrial">
<el-input style="width: 90%" size="small" placeholder="请输入包装材质"
v-model.trim="newProductData.packMatrial"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="包装比例:" prop="packRatio">
<el-input style="width: 90%" size="small" placeholder="请输入制剂单位"
v-model.trim="newProductData.packRatio"
></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="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入批准文号"
v-model.trim="newProductData.registerNo"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业"
v-model.trim="newProductData.manufactory"
></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="physicType">
<el-select v-model="newProductData.physicType" 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>
<el-option label="未分类" :value="9"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="药品分类:" prop="majorType">
<el-select v-model="newProductData.majorType" 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>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入医保编码"
v-model.trim="newProductData.ybbm"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="医保分类:" prop="medicareType">
<el-select v-model="newProductData.medicareType" 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>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="药品价格:" prop="price">
<el-input
style="width: 90%"
size="small"
placeholder="请输入药品价格"
type="number"
:precision="2"
:min="0"
v-model.number="newProductData.price"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="有效期:" prop="indate">
<el-date-picker
style="width: 90%"
v-model="newProductData.indate"
type="datetime"
format="yyyy 年 MM 月 dd 日 HH 点 mm 分 ss 秒"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择有效期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="存储条件:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入存储条件"
v-model.trim="newProductData.storageCondition"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="运输条件:" prop="transportCondition">
<el-input style="width: 90%" size="small" placeholder="请输入运输条件"
v-model.trim="newProductData.transportCondition"
></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="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-row>
<el-row type="flex" class="edit-row">
<el-col :span="12">
<el-form-item label="收费项目编码:">
<el-input
style="width: 65%"
size="small"
placeholder="选择项目收费编码"
v-model="newProductData.payFeeCode"
></el-input>
<el-button type="primary" size="mini" style="margin-left: 10px" @click="selectPayFeecode"></el-button>
</el-form-item>
</el-col>
</el-row>
8 months ago
<el-row type="flex">
<el-col :span="23" class="el-col">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述"
v-model.trim="newProductData.cpms"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
8 months ago
<el-collapse-item name="3">
<template slot="title">
<p class="form-title">参数设置</p>
</template>
<el-row :gutter="20">
<el-col :span="11" class="el-col">
<el-form-item label="流通计量层级标识:" prop="distributeLevelDi" label-width="160px">
<el-select v-model="newProductData.distributeLevelDi" size="small" style="width: 90%"
@change="distributeLevelDiChange"
clearable
placeholder="请选择流通计量层级标识">
<el-option
v-for="item in detailList"
:key="item.nameCode"
:value="item.nameCode"
:label="item.nameCode">
<span style="float: left">{{ item.nameCode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.packLevel }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="使用计量层级标识:" prop="useLevelDi" label-width="160px">
<el-select v-model="newProductData.useLevelDi" size="small" style="width: 90%"
@change="useLevelDiChange"
clearable
placeholder="请选择流通计量层级标识">
<el-option
v-for="item in detailList"
:key="item.nameCode"
:value="item.nameCode"
:label="item.nameCode">
<span style="float: left">{{ item.nameCode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.packLevel }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="流通计量层级单位:" prop="distributeLevelUnit" label-width="160px">
<el-input style="width: 90%" size="small" placeholder="请输入流通计量层级单位"
disabled
v-model="newProductData.distributeLevelUnit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="使用计量层级标识:" prop="useLevelUnit" label-width="160px">
<el-input style="width: 90%" size="small" placeholder="请输入使用计量层级标识"
disabled
v-model.trim="newProductData.useLevelUnit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="流通时含计量单元数量:" prop="distributeLevelCount" label-width="160px">
<el-input style="width: 90%" size="small" placeholder="请输入流通时包含计量单元的数量"
v-model.trim="newProductData.distributeLevelCount"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="使用时含计量单元数量:" prop="useLeverCount" label-width="160px">
<el-input style="width: 90%" size="small" placeholder="请输入使用时包含计量单元的数量"
v-model.trim="newProductData.useLeverCount"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="4">
8 months ago
<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;">
<el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
8 months ago
</div>
<el-dialog
title="收费项目选入"
:visible.sync="tollProjectDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="tollProjectDialogVisible"
append-to-body
>
<!--<product-single-edit-->
<!-- :editQuery="editSingleFormat"-->
<!--&gt;</product-single-edit>-->
<selectChargesProjectDialog
:getData="getData"
>
</selectChargesProjectDialog>
<!--<div style="text-align: center;margin-top: 12px">-->
<!-- <el-button type="primary" size="small" icon="search" @click="onAddSingleSubmit(false)" :loading="addLoading"-->
<!-- >提交-->
<!-- </el-button>-->
<!-- <el-button type="primary" size="small" icon="search" @click="cancelDialog"-->
<!-- >取消-->
<!-- </el-button>-->
<!--</div>-->
</el-dialog>
8 months ago
</div>
</template>
<script>
import {
addDrug,
updatetDrug,
delDrugLevel,
updateLevelDrug, calculateDistCount, calculateUseCount
} from '@/api/basic/product/drugUdiinfos'
import {
getYbHcflDetail,
} from '@/api/basic/product/udiRelevance'
import {filterClassify} from '@/api/purchase/classifyCode'
import {filterByUuid} from "@/api/basic/product/udiInfo";
import selectChargesProjectDialog from "./selectChargesProjectDialog"
8 months ago
export default {
name: 'drugAdd',
props: {
closeDialog: {
type: Function,
required: true
},
rowData: {
type: Object,
required: false
},
type: {
//1新增2编辑
8 months ago
type: Object,
required: false
}
},
components: {selectChargesProjectDialog},
8 months ago
data() {
return {
ybHcflDetail: {},
productData: {},
8 months ago
newProductData: {
cpmctymc: null,
bzgg: null,
spmc: null,
measname: null,
manufactory: null,
ybbm: null,
cpms: null,
productsType: 2,
//高级设置默认开启扫码
status: false,
relId: null,
drugLevelLists: [],
useLevelDi: null,
distributeLevelDi: null,
distributeLevelUnit: null,
useLeverCount: null,
distributeLevelCount: null,
useLevelUnit: null,
8 months ago
},
thirdSys: [],
classifyList: [],
saveLoading: false,
activeNames: ['1', '2'],
formRules: {
cpmctymc: [
{required: true, message: '请输入药品通用名', trigger: 'blur'}
8 months ago
],
prepnSpec: [
{required: true, message: '请输入制剂规格', trigger: 'blur'}
8 months ago
],
packUnit: [
{required: true, message: '请输入包装单位', trigger: 'blur'}
8 months ago
],
prepnUnit: [
{required: true, message: '请输入制剂单位', trigger: 'blur'}
8 months ago
],
packRatio: [
{required: true, message: '请输入包装比例', trigger: 'blur'}
8 months ago
],
packMatrial: [
{required: true, message: '请输入包装材质', trigger: 'blur'}
8 months ago
],
registerNo: [
{required: true, message: '请输入批准文号', trigger: 'blur'}
8 months ago
],
manufactory: [
{required: true, message: '生产企业不能为空', trigger: 'blur'}
8 months ago
],
physicType: [
{required: true, message: '药品类型不能为空', trigger: 'blur'}
8 months ago
],
ybbm: [
{required: true, message: '医保编码不能为空', trigger: 'blur'}
8 months ago
],
price: [
{required: true, message: '药品价格不能为空', trigger: 'blur'}
8 months ago
]
},
8 months ago
detailList: [
// 初始化一个空对象或包含默认值的对象
{nameCode: '', packLevel: null, bhxjsl: null, isDisabled: false, isUpDisabled: true, rowDisabled: false}
8 months ago
],
status: false,
rowDisabled: false,
selectedIndex: null,
loading: false,
tollProjectDialogVisible: false,
8 months ago
}
},
methods: {
classifyChange() {
this.classifyChange(this.newProductData.flbm)
let item = this.classifyList.find(item => item.code == this.newProductData.flbm)
if (item != null) this.newProductData.requireScanCode = item.requireScanCode
},
classifySearch(key) {
let query = {
key: key
}
filterClassify(query)
.then(response => {
this.loading = false
this.classifyList = response.data.list || []
})
.catch(() => {
this.loading = false
this.classifyList = []
})
},
getYbHcData() {
let query = {
specificationCode: this.newProductData.ybbm
}
getYbHcflDetail(query).then((response) => {
if (response.code == 20000) {
this.ybHcflDetail = response.data
this.newProductData.catalogname1 = this.ybHcflDetail.catalogname1
this.newProductData.catalogname2 = this.ybHcflDetail.catalogname2
this.newProductData.catalogname3 = this.ybHcflDetail.catalogname3
this.newProductData.matrial = this.ybHcflDetail.matrial
this.$forceUpdate()
} else {
this.newProductData.catalogname1 = ''
this.newProductData.catalogname2 = ''
this.newProductData.catalogname3 = ''
this.newProductData.matrial = ''
this.$forceUpdate()
}
}).catch(() => {
})
},
saveNewProduct() {
this.addProductDialogVisible = false
//新增
8 months ago
if (this.type == 1) {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
if (this.status) {
this.newProductData.requireScanCode = 1
} else {
this.newProductData.requireScanCode = 0
}
this.saveLoading = true
if (this.detailList.length <= 0) {
this.$message.error('请先添加药品层级标识')
return
} else {
const validateItem = (item, fieldName, errorMessage) => {
if (!item[fieldName]) {
this.$message.error(errorMessage);
return false;
}
return true;
};
for (let i = 0; i < this.detailList.length; i++) {
const item = this.detailList[i];
if (!validateItem(item, 'nameCode', '药品层级标识不能为空!') ||
!validateItem(item, 'packLevel', '包装级别不能为空') ||
!validateItem(item, 'packUnit', '层级单位不能为空')) {
return;
}
}
const isLevel1 = this.detailList.some(item => item.packLevel === 1);
if (!isLevel1) {
this.$message.error('药品层级缺少一级标识!');
}
this.newProductData.drugLevelLists = this.detailList;
}
8 months ago
addDrug(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//清空弹窗数据
this.closeDialog()
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
this.$message.error(error.message)
})
}
})
} else {
if (this.status) {
this.newProductData.requireScanCode = 1
} else {
this.newProductData.requireScanCode = 0
}
this.newProductData.uuid = this.rowData.uuid
this.newProductData.nameCode = this.rowData.nameCode
this.newProductData.relId = this.newProductData.id;
8 months ago
updatetDrug(this.newProductData).then(res => {
this.saveLoading = false
if (res.code == 20000) {
//清空弹窗数据
this.closeDialog()
this.$message.success('保存成功')
8 months ago
} else {
this.$message.error(res.message)
8 months ago
}
})
}
},
closeAddDialog() {
this.closeDialog()
},
//层级保存
levelSave(row) {
if (row.nameCode == null) {
this.$message.error("层级标识不能为空");
return
}
if (row.packLevel == null) {
this.$message.error("包装级别不能为空");
return
}
if (row.packUnit == null) {
this.$message.error("层级单位不能为空");
return
}
let editQuery = {
nameCode: row.nameCode,
packLevel: row.packLevel,
packUnit: row.packUnit,
sjcpbm: row.sjcpbm,
bhxjcpbm: row.bhxjcpbm,
bhxjsl: row.bhxjsl,
relId: this.newProductData.id,
uuid: this.newProductData.uuid
8 months ago
}
updateLevelDrug(editQuery).then(res => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success("保存成功!");
if (this.newProductData.id != null)
this.getDetailList();
} else {
this.$message.error(res.message)
}
})
8 months ago
},
update(row) {
8 months ago
row.isDisabled = false
row.isUpDisabled = true
row.rowDisabled = false
},
addDrugLevel() {
this.detailList.push({
nameCode: '',
packLevel: null,
bhxjsl: null,
isDisabled: false,
rowDisabled: false,
isUpDisabled: true
});
},
rowChange(index, val) {
this.selectedIndex = index;
},
deleteLevel(index, row) {
this.$confirm('此操作将删除该层级,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {nameCode: row.nameCode};
delDrugLevel(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
this.getList();
}
})
}).catch(() => {
});
},
//获取层级标识
getDetailList() {
this.loading = true;
if (this.newProductData.uuid != null) {
let query = {
uuid: this.newProductData.uuid,
id: this.newProductData.id
}
filterByUuid(query)
.then((response) => {
this.loading = false;
this.detailList = response.data || [];
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
8 months ago
}
},
distributeLevelDiChange(val) {
const matchingItem = this.detailList.find(item => item.nameCode == val);
if (matchingItem) {
this.newProductData.distributeLevelUnit = matchingItem.packUnit;
8 months ago
}
calculateDistCount(matchingItem).then((res) => {
this.newProductData = {
...this.newProductData,
distributeLevelCount: res.data.distributeLevelCount,
}
})
8 months ago
},
useLevelDiChange(val) {
const matchingItem = this.detailList.find(item => item.nameCode == val);
if (matchingItem) {
this.newProductData.useLevelUnit = matchingItem.packUnit;
}
calculateUseCount(matchingItem).then((res) => {
this.newProductData = {
...this.newProductData,
useLeverCount: res.data.useLeverCount,
}
})
},
/**
* 选择收费项目
*/
selectPayFeecode(){
this.tollProjectDialogVisible = true
},
getData(data){
this.tollProjectDialogVisible = false
this.newProductData.payFeeCode = data.medCatalogCode
}
8 months ago
},
created() {
if (this.rowData != null) {
this.newProductData = this.rowData
this.newProductData.cpmctymc = this.rowData.cpmctymc
this.newProductData.registerNo = this.rowData.zczbhhzbapzbh
if (this.rowData.requireScanCode == 1) {
this.status = true
} else {
this.status = false
}
this.getDetailList();
8 months ago
}
},
directives: {
'debounce-input': {
inserted(el, binding) {
let timeout
el.addEventListener('input', () => {
clearTimeout(timeout)
timeout = setTimeout(() => {
binding.value()
}, parseInt(binding.arg) || 300)
})
}
}
}
}
</script>
<style scoped>
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
</style>