feat: 耗材字典新增功能

20231126-yw
chenhc 1 year ago
parent 05ad40a7d8
commit b7a65bded3

@ -95,6 +95,14 @@ export function addErp(query) {
});
}
export function addProduct(query) {
return axios({
url: "/udi/udirel/addProduct",
method: "post",
data: query
});
}
export function addAllErp(query) {
return axios({
url: "/udi/udirel/addAllErp",

@ -298,6 +298,10 @@
>关联添加
</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="addProducType"
v-if="vueRouteSource==1"
>新增产品
</el-button>
</template>
</el-button-group>
</div>
@ -1622,6 +1626,22 @@
:isImportUdi="isImportUdi"
></selectUdi>
</el-dialog>
<el-dialog
title="新增-产品信息"
:visible.sync="addProductDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="addProductDialogVisible"
@close="closeUdi"
>
<productAdd
:closeDialog="closeDialog"
@closeUdi="closeUdi">
</productAdd>
</el-dialog>
<el-dialog
title="耗材字典-从指定系统添加器械信息"
:visible.sync="selectErpDialogVisible"
@ -1757,6 +1777,7 @@ import selectErp from "./udiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectUdiVersion from "./UdiinfoSelectVersion";
import ProductEdit from "@/views/basic/product/productEdit";
import ProductAdd from "@/views/basic/product/productAdd";
import ProductSingleEdit from "@/views/basic/product/productSingleEdit";
import productUdiType from "@/views/basic/product/productUdiType";
import selectHospProduct from "@/views/basic/product/bindHospProduct";
@ -1882,6 +1903,7 @@ export default {
editDialogVisible: false, //
editDiDialogVisible: false,
editSingleDiDialogVisible: false,
addProductDialogVisible: false,//
selectUdiDialogVisible: false, //
selectErpDialogVisible: false, //ERP
selectVersionVisible: false,
@ -2060,6 +2082,10 @@ export default {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
addProducType() {
this.isImportUdi = false;
this.addProductDialogVisible = true;
},
addSelectErp(row) {
this.defaultSys = row.sysId;
this.isImport = false;
@ -2302,6 +2328,7 @@ export default {
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.selectHospProductVisible = false;
this.addProductDialogVisible = false;
this.getThirdSysDetail();
let ttquery = {
id: this.relId,
@ -2355,6 +2382,7 @@ export default {
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.selectHospProductVisible = false;
this.addProductVisible = false;
this.selectUnBindHospProductVisible = false;
},
onAddSubmit(relSubmit) {
@ -2403,7 +2431,6 @@ export default {
editUdiType() {
this.selectUdiTypeVisible = true;
},
getTerrList() {
getListTree(this.query)
.then((response) => {
@ -2475,6 +2502,7 @@ export default {
components: {
ProductSingleEdit,
ProductEdit,
ProductAdd,
selectUdi,
selectErp,
selectLocalUdi,

@ -0,0 +1,177 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"></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="spec">
<el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入计量单位" v-model.trim="newProductData.measname"></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="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业" v-model.trim="newProductData.manufactory"></el-input>
</el-form-item>
</el-col>
<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-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.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称" v-model.trim="newProductData.ylqxzcrbarywmc"></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">
<el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></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="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"></el-input>
</el-form-item>
</el-col>
<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-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="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<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>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import {addProduct} from "@/api/basic/product/udiRelevance";
export default {
name: "productAdd",
props: {
closeUdi: {
type: Function,
required: true,
}
},
data() {
return {
newProductData: {
name: null,
spec: null,
code: null,
measname: null,
manufactory: null,
registerNo: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cpms: null,
},
thirdSys: [],
}
},
methods: {
saveNewProduct() {
this.addProductDialogVisible = false;
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning("产品名称不能为空!");
return;
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning("规格型号不能为空");
return;
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning("计量单位不能为空!");
return;
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning("生产企业不能为空!");
return;
}
if (this.$isBlank(this.newProductData.registerNo)) {
this.$message.warning("注册证号不能为空!");
return;
}
addProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
this.$emit("closeUdi", true);
}else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
})
},
closeAddDialog(){
this.$emit("closeUdi", false);
}
},
created() {
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save