8/28 药品数据维护 第三方药品维护

20240912_adapter_z
wangwei 7 months ago
parent f1de28664f
commit 0f3eb56b3d

@ -0,0 +1,604 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="erpQuery" label-width="120px" v-if="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="药品编码:">
<el-input v-model="erpQuery.code" style="width: 90%" placeholder="请输入药品编码" clearable="true"
@keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="药品名称:">
<el-input v-model="erpQuery.name" style="width: 90%" placeholder="请输入药品名称" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="包装规格:">
<el-input v-model="erpQuery.spec" style="width: 90%" placeholder="请输入包装规格" clearable="true"
@keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="批准文号:">
<el-input v-model="erpQuery.registerNo" style="width: 90%" clearable="true" placeholder="请输入批准文号"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="erpQuery.manufactory" style="width: 90%" clearable="true" placeholder="请输入生产企业"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配送企业:">
<el-input v-model="erpQuery.supName" style="width: 90%" clearable="true" placeholder="请输入配送企业"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="thirdSysFk" style="width: 90%" placeholder="请设置主系统" disabled="isImport">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span
style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="searchErpList"></el-button>
<el-button type="primary" icon="el-icon-bottom-left" @click="combine" :loading="combineLoading">选入</el-button>
<el-button type="primary" icon="el-icon-bottom-left" @click="combineAll" v-if="isImport && !supEnable"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table :data="erpList" style="width: 100%" highlight-current-row="true" border
v-loading="erpLloading" @current-change="handleErpChange" @selection-change="handleSelectionChange">
<el-table-column v-if="isImport" type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="物资编码" prop="code"></el-table-column>
<el-table-column label="物资名称" prop="name"></el-table-column>
<el-table-column label="计量单位" prop="measname"></el-table-column>
<el-table-column label="规格型号" prop="spec"></el-table-column>
<el-table-column label="注册/备案号" prop="registerNo"></el-table-column>
<el-table-column label="生产企业" prop="manufactory"></el-table-column>
<el-table-column label="配送企业" prop="supName"></el-table-column>
<el-table-column label="操作" width="60">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="detailDialog(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="pageTotal>0"
:total="pageTotal"
:page.sync="erpQuery.page"
:limit.sync="erpQuery.limit"
@pagination="handleErpPageChange"
></pagination>
</el-card>
<el-card class="el-card" v-if="!isImport">
<el-form label-width="120px">
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="物资名称:">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.cpmctymc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品标识:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.nameCode"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="包装规格:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.bzgg"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="批准文号:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.zczbhhzbapzbh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="注册人英文名称:">-->
<!-- <el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"-->
<!-- v-model="data.ylqxzcrbarywmc"></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="器械类别:">-->
<!-- <el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"-->
<!-- v-model="data.qxlb"></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row>
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="产品类别:">-->
<!-- <el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"-->
<!-- v-model="data.cplb"></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="分类编码:">-->
<!-- <el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"-->
<!-- v-model="data.flbm"></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="商品条码:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医保编码:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="统一社会信用号:">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="data.tyshxydm"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-dialog
title="药品信息详情"
:visible.sync="thrProductsDetailVisible"
width="60%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="thrProductsDetailVisible"
>
<thrProductsDetail
:data="thisData"
></thrProductsDetail>
</el-dialog>
</div>
</template>
<script>
import {modifyRel, addErp, addAllErp, combineUdi} from "@/api/basic/udiRelevance";
import {getInvbasdoc} from "@/api/basic/getErps";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import thrProductsDetail from "../../../thirdSys/drug/thrDrugDetail";
export default {
name: "closeDialog",
props: {
uuid: {
type: Object,
required: true,
},
data: {
type: Object,
required: true,
},
relId: {
type: Number,
required: true,
},
isImport: {
type: Boolean,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
defaultSys: {
type: Object,
required: true,
},
supEnable: {
type: Object,
required: true,
},
intentThirdId: {
type: Object,
required: true,
}
},
data() {
return {
showSearch: true,
erpQuery: {
code: null,
name: null,
spec: null,
registerNo: null,
manufactory: null,
thirdSys: null,
supName: null,
measname: null,
page: 1,
limit: 10,
productType:2
},
thisData: null,
thrProductsDetailVisible: false,
combineLoading: false,
combineQuery: {
thirdId: "",
relId: "",
erpName: "",
keys: [],
thirdIds: [],
thirdSys: null,
query: null,
isRlInv: null,
manufactory: null,
measname: null,
ybbm: null,
sptm: null,
},
udidlList: [],
erpList: [],
pageTotal: 1,
total: 1,
currentRow: null,
loading: false,
erpLloading: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.erpQuery = {
code: null,
name: null,
spec: null,
registerNo: null,
manufactory: null,
thirdSys: null,
supName: null,
measname: null,
page: 1,
limit: 10,
productType:2
};
this.getErpList();
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
detailDialog(row) {
this.thisData = row;
this.thrProductsDetailVisible = true;
},
checkSelectable(row) {
return !row.checked;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleErpChange(val) {
this.currentRow = val;
},
hideSearch() {
this.showSearch = !this.showSearch;
},
handleErpPageChange(val) {
this.erpQuery.page = val.page;
this.getErpList();
},
searchErpList() {
this.erpQuery.page = 1;
this.getErpList();
},
keyup_submit(event) {
this.erpQuery.page = 1;
this.getErpList();
event.target.select();
},
getErpList() {
this.erplLoading = true;
this.erpQuery.thirdSys = this.thirdSysFk;
getInvbasdoc(this.erpQuery)
.then((response) => {
this.erplLoading = false;
if (response.code == 20000) {
this.erpList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.erpList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.erplLoading = false;
this.erpList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
combineAll() {
this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.combineQuery.thirdSys = this.thirdSysFk;
this.combineQuery.query = this.erpQuery;
addAllErp(this.combineQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
this.$emit("closeUdi", true);
} else {
this.$message.error(response.message);
this.$emit("closeUdi", false);
}
})
.catch(() => {
this.$emit("closeUdi", false);
});
})
.catch(() => {
});
},
combine() {
this.combineQuery.query = null;
this.combineQuery.relId = this.relId;
this.combineQuery.thirdSys = this.thirdSysFk;
this.combineQuery.supEnable = this.supEnable;
if (this.isImport) {
this.combineQuery.thirdId = null;
let selectData = this.multipleUdiSelection;
let selected = '';
selectData.forEach((row) => {
if (row.checked) {
selected = selected + row.code + ",";
}
this.combineQuery.thirdIds.push(row.code);
this.combineQuery.manufactory = row.manufactory;
this.combineQuery.measname = row.measname;
});
if (this.currentRow != null) {
this.combineQuery.manufactory = this.currentRow.manufactory;
this.combineQuery.measname = this.currentRow.measname;
}
if (selectData.length == 0) {
this.$message.warning("未选择产品");
return;
}
if (selected != '') {
this.$confirm("物资编码:" + selected + "已被添加,是否继续添加", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.combineLoading = true;
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.closeDialog()
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.combineQuery.thirdIds = [];
this.$emit("closeUdi", false);
});
})
.catch(() => {
this.combineQuery.thirdIds = [];
});
} else {
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.closeDialog()
this.$message.success(response.data);
} else {
this.closeDialog()
this.$message.warning(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.closeDialog()
});
}
} else {
this.combineQuery.thirdId = this.currentRow.code;
this.combineQuery.erpName = this.currentRow.name;
this.combineQuery.manufactory = this.currentRow.manufactory;
this.combineQuery.measname = this.currentRow.measname;
this.combineQuery.ybbm = this.currentRow.ybbm;
this.combineQuery.sptm = this.currentRow.sptm;
this.erpQuery.manufactory = this.currentRow.manufactory;
this.erpQuery.measname = this.currentRow.measname;
this.combineQuery.price = this.currentRow.price;
if (this.currentRow.checked) {
this.$confirm("物资编码:" + this.currentRow.code + "已被选入,是否继续选入", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.combineLoading = true;
modifyRel(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.$emit("closeUdi", true);
} else {
this.$emit("closeUdi", false);
this.$message.error(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("closeUdi", false);
});
})
} else {
this.combineLoading = true;
modifyRel(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.$message.success("更新成功")
this.$emit("closeUdi", false);
} else {
this.$emit("closeUdi", false);
this.$message.error(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("closeUdi", false);
});
}
}
},
handleSelectionChange(val) {
this.multipleUdiSelection = val;
},
getBasicThirdSys() {
let query = {
enabled: true,
mainSys: false,
filter: true,
};
if (this.isImport) {
query.mainSys = true;
}
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.thirdSysFk = this.thirdSys[0].thirdId;
if (this.defaultSys != null) {
this.thirdSysFk = this.defaultSys;
}
this.searchErpList();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
components: {
thrProductsDetail
},
created() {
console.log("jjjjj",this.data)
if (this.data != null){
this.data.spec = this.data.bzgg
}
this.getBasicThirdSys();
this.erpQuery.code = this.intentThirdId;
},
};
</script>
<style scoped>
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>

@ -1,7 +1,32 @@
<template>
<div>
<el-form :model="newProductData" :rules="formRules" label-width="140px" ref="dataForm">
<el-collapse v-model="activeNames">
<el-collapse-item name="0" v-if="type != 1">
<template slot="title">
<p class="form-title">第三方信息</p>
</template>
<el-table :data="sysList" style="width: 100%; margin-bottom: 8px" key="2" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="第三方系统名称" prop="sysName" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方系统药品编码" prop="thirdId" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方系统药品名称" prop="thirdName" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方系统包装规格" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="批准文号" prop="registerNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="addSelectErp(scope.row)" :disabled="scope.row.thirdId==rowData.nameCode">
关联
</el-button>
<el-button type="text" @click.native.stop="removeErp(scope.row)"
:disabled=" scope.row.thirdId==null || scope.row.thirdId==''">解绑
</el-button>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">药品层级</p>
@ -451,6 +476,27 @@
<!-- </el-button>-->
<!--</div>-->
</el-dialog>
<el-dialog
title="药品字典-从指定系统添加药品字典"
:visible.sync="chooseHouseDrugVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="chooseHouseDrugVisible"
>
<chooseHouseDrug
:uuid="uuid"
:relId="relId"
:isImport="isImport"
:data="thisData"
:defaultSys="defaultSys"
:supEnable="false"
@closeUdi="closeUdi"
></chooseHouseDrug>
</el-dialog>
</div>
</template>
@ -463,11 +509,12 @@ import {
} from '@/api/basic/product/drugUdiinfos'
import {
getYbHcflDetail,
getYbHcflDetail, removeRl, thirdSysDetail
} from '@/api/basic/product/udiRelevance'
import {filterClassify} from '@/api/purchase/classifyCode'
import {filterByUuid} from "@/api/basic/product/udiInfo";
import selectChargesProjectDialog from "./selectChargesProjectDialog"
import chooseHouseDrug from './chooseHouseDrug'
export default {
name: 'drugAdd',
@ -484,9 +531,25 @@ export default {
//12
type: Object,
required: false
}
},
uuid: {
type: Object,
required: true,
},
relId: {
type: Object,
required: true,
},
thisData: {
type: Object,
required: true,
},
relevanceEdit: {
type: Object,
required: true,
},
},
components: {selectChargesProjectDialog},
components: {selectChargesProjectDialog,chooseHouseDrug},
data() {
return {
ybHcflDetail: {},
@ -517,7 +580,7 @@ export default {
thirdSys: [],
classifyList: [],
saveLoading: false,
activeNames: ['1', '2'],
activeNames: ['0','1', '2'],
formRules: {
cpmctymc: [
{required: true, message: '请输入药品通用名', trigger: 'blur'}
@ -565,6 +628,10 @@ export default {
selectedIndex: null,
loading: false,
tollProjectDialogVisible: false,
sysList: [],
chooseHouseDrugVisible: false,
isImport: false,
defaultSys: null,
}
},
@ -829,7 +896,81 @@ export default {
getData(data) {
this.tollProjectDialogVisible = false
this.newProductData.payFeeCode = data.medCatalogCode
}
},
/**
* 第三方系统药品信息
*/
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
this.resetThirdId();
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
resetThirdId() {
this.sysList.forEach((item) => {
if (item.sysId === "thirdId") {
this.newProductData.thirdId = item.thirdId;
} else if (item.sysId === "thirdId1") {
this.newProductData.thirdId1 = item.thirdId;
} else if (item.sysId === "thirdId2") {
this.newProductData.thirdId2 = item.thirdId;
} else if (item.sysId === "thirdId3") {
this.newProductData.thirdId3 = item.thirdId;
} else if (item.sysId === "thirdId4") {
this.newProductData.thirdId4 = item.thirdId;
}
})
},
/**
* 关联 第三方
*/
addSelectErp(row) {
this.defaultSys = row.sysId;
this.isImport = false;
this.chooseHouseDrugVisible = true;
},
removeErp(row) {
this.$confirm("此操作将解除该绑定药品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
relId: this.relId,
thirdSys: row.sysId
};
removeRl(query)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "解绑成功!",
});
this.getThirdSysDetail();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
})
.catch(() => {
});
},
closeUdi(val) {
this.chooseHouseDrugVisible = false;
this.getThirdSysDetail();
},
},
created() {
@ -843,8 +984,10 @@ export default {
this.status = false
}
this.getDetailList();
this.getThirdSysDetail()
}else {
this.selectedIndex = 0
}
},
directives: {

@ -84,6 +84,7 @@
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="chooseDrug"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="chooseHouseDrug"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addDrug"></el-button>
</el-button-group>
</div>
@ -140,6 +141,10 @@
:closeDialog="closeDialog"
:rowData="rowData"
:type="type"
:relevanceEdit="relevanceEdit"
:uuid="uuid"
:relId="relId"
:thisData="thisData"
>
</drugAdd>
</el-dialog>
@ -157,6 +162,26 @@
</chooseDrug>
</el-dialog>
<el-dialog
title="药品字典-从指定系统添加药品字典"
:visible.sync="chooseHouseDrugVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="chooseHouseDrugVisible"
>
<chooseHouseDrug
:closeDialog="closeDialog"
:uuid="uuid"
:relId="relId"
:isImport="isImport"
:data="thisData"
:defaultSys="defaultSys"
@closeUdi="closeUdi"
:supEnable="false"
></chooseHouseDrug>
</el-dialog>
</el-card>
</div>
@ -180,9 +205,10 @@ import {
} from '@/api/basic/product/udiRelevance'
import drugAdd from '@/views/basic/product/drug/drugAdd'
import chooseDrug from '@/views/basic/product/drug/chooseDrug'
import chooseHouseDrug from '@/views/basic/product/drug/chooseHouseDrug'
export default {
components: {drugAdd, chooseDrug},
components: {drugAdd, chooseDrug,chooseHouseDrug},
name: 'drugMaintain',
data() {
return {
@ -211,6 +237,29 @@ export default {
'edit': '编辑-药品信息',
},
loading: false,
chooseHouseDrugVisible: false,
uuid: "111",
relId: "",
isImport: false,
pId: 0,
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null,
},
relevanceEdit: {
id: null,
thirdId: "",
isDisable: null,
isUseDy: false,
isLock: null,
isAdavence: null,
allowNoBatch: null,
allowNoExpire: null,
allowNoProduct: null,
allowNoSerial: null,
pId: null,
},
}
},
@ -242,6 +291,15 @@ export default {
},
chooseDrug() {
this.chooseDrugVisible = true
},
chooseHouseDrug(val){
this.defaultSys = null;
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.chooseHouseDrugVisible = true
},
getList() {
getUdiInfos(this.filterQuery)
@ -280,12 +338,27 @@ export default {
},
editDrug(row) {
this.fromName = 'edit'
this.rowData = row
this.type = 2
this.uuid = row.uuid;
this.relId = row.id;
this.isImport = false;
this.thisData = row;
this.pId = row.id;
this.relevanceEdit = {
id: row.id,
isUseDy: row.isUseDy,
isDisable: row.isDisable,
isLock: row.isLock,
isAdavence: row.isAdavence,
};
this.editFormat = JSON.parse(JSON.stringify(row));
this.rowData = row
this.addDrugVisible = true;
},
closeDialog() {
this.addDrugVisible = false;
this.chooseHouseDrugVisible = false;
this.getList()
}
},

@ -88,7 +88,8 @@
remote
@change="busTypeChange"
reserve-keyword
placeholder="请选择业务类型" clearable style="width: 90%">
disabled
placeholder="请选择业务类型" clearable style="width: 60%">
<el-option
v-for="item in busTypeList"
:key="item.documentTypeCode"
@ -99,6 +100,7 @@
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.documentTypeCode }}</span>
</el-option>
</el-select>
<el-button type="primary" @click="toggleBusType"></el-button>
</el-form-item>
</el-col>
@ -428,6 +430,7 @@ export default {
if (this.formData.workPlaceCode != null) {
this.findCurOrder();
}
this.$refs.inputRef.focus();
},
getWorkBindBusTypes(workplaceId) {
this.busQuery.workplaceCode = workplaceId
@ -486,6 +489,11 @@ export default {
}
this.findCurOrder();
},
toggleBusType(){
//
// this.$refs.selectHeadEmpId.blur();
this.selectBusTypeDisabled = true
},
handleClick(blankName) {
// let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId
@ -911,10 +919,9 @@ export default {
this.formData.workPlaceCode = Number(this.$route.query.workplaceId);
this.getWorkBindBusTypes(this.formData.workPlaceCode);
}
}
}
</script>

@ -2,12 +2,14 @@
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form"
size="mini" label-width="100px">
size="mini" label-width="100px"
>
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
:label="item.columnDesc+`:`" :key="item.id"
>
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -18,11 +20,13 @@
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
:label="item.columnDesc+`:`"
>
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
clearable
>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
@ -33,7 +37,8 @@
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
:label="item.columnDesc+`:`"
>
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -42,7 +47,8 @@
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
clearable
>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
@ -53,7 +59,8 @@
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
:label="item.columnDesc+`:`"
>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -67,7 +74,8 @@
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
:label="item.columnDesc+`:`"
>
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
@ -100,11 +108,13 @@
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable"
:default-sort="defaultSort"
:row-style="{ height: '32px' }"
@sort-change="handleSortChange">
@sort-change="handleSortChange"
>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
type="index" :label="item.columnDesc"
></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
@ -151,7 +161,8 @@
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"
>
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
@ -243,20 +254,20 @@
</template>
<script>
import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date";
import prescribeCodePanel from "./PanelOrderTagCode";
import PanelOrderManuTagCode from "./PanelOrderManuTagCode";
import prescribeOriginPanel from "@/views/collect/PannelOrderBiz";
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import addOrder from '@/views/inout/DialogCreateOrder'
import errOrder from '@/views/inout/IoCreateErrorOrder'
import { executeFuc, getHead } from '@/utils/customConfig'
import { convertDate } from '@/utils/date'
import prescribeCodePanel from './PanelOrderTagCode'
import PanelOrderManuTagCode from './PanelOrderManuTagCode'
import prescribeOriginPanel from '@/views/collect/PannelOrderBiz'
import PanelOrderAllDetail from '@/views/collect/PanelOrderAllDetail'
import {orderPage} from "@/api/collect/collectOrder";
import { orderPage } from '@/api/collect/collectOrder'
import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage'
export default {
name: "prescribePanel",
name: 'prescribePanel',
props: {
RowType: {
type: Object,
@ -267,7 +278,7 @@ export default {
type: String,
default: null,
required: true
},
}
},
data() {
return {
@ -293,9 +304,9 @@ export default {
billNo: null,
workPlaceCode: null,
page: 1,
limit: 10,
limit: 10
},
defaultSort: {prop: 'createTime', order: 'desc'},
defaultSort: { prop: 'createTime', order: 'desc' },
loading: false,
list: [],
total: 0,
@ -306,32 +317,32 @@ export default {
preQuery: {
prescribeCode: null,
page: 1,
limit: 10,
limit: 10
},
curRow: null,
panelALive: false,
options: {
findWorkPlace: [],
findWorkPlace: []
},
showType: 1
}
},
components: {
addOrder, errOrder, prescribeCodePanel, prescribeOriginPanel,PanelOrderManuTagCode,PanelOrderAllDetail
addOrder, errOrder, prescribeCodePanel, prescribeOriginPanel, PanelOrderManuTagCode, PanelOrderAllDetail
},
methods: {
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
return executeFuc(this, row, type, clickFuc, value)
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
return eval(expression)
}
return defaultRet;
return defaultRet
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
@ -339,27 +350,26 @@ export default {
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList();
this.query.orderBy = column.prop
this.getList()
},
///------------end
hideSearch() {
this.showSearch = !this.showSearch;
this.showSearch = !this.showSearch
},
onReset() {
this.filterQuery = {};
this.actDateRange = [];
this.getList();
this.filterQuery = {}
this.actDateRange = []
this.getList()
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
this.filterQuery.page = 1
this.getList()
},
getList() {
this.loading = true;
this.loading = true
orderPage(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
@ -371,19 +381,19 @@ export default {
})
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
this.filterQuery.page = val.page
this.getList()
},
prescribeClick(_this, row) {
_this.curRow = row;
_this.refreshCodesPanel(_this);
_this.curRow = row
_this.refreshCodesPanel(_this)
},
refreshCodesPanel(_this) {
_this.panelALive = false;
_this.panelALive = false
_this.$nextTick(() => {
_this.panelALive = true;
});
_this.panelALive = true
})
},
findWorkPlace(_this, val) {
@ -391,22 +401,21 @@ export default {
chargeUser: _this.$store.getters.adminId,
key: val,
page: 1,
limit: 10,
limit: 10
}
filterWorkOptimize(query)
.then((response) => {
_this.loading = false;
_this.options.findWorkPlace = response.data || [];
if (_this.options.findWorkPlace .length == 1){
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code;
_this.loading = false
_this.options.findWorkPlace = response.data || []
if (_this.options.findWorkPlace.length == 1) {
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code
}
})
.catch(() => {
_this.loading = false;
_this.options.findWorkPlace = [];
});
},
_this.loading = false
_this.options.findWorkPlace = []
})
}
},
created() {
@ -414,17 +423,17 @@ export default {
this.filterQuery.workPlaceCode = this.$route.query.workplaceId
this.showType = 2
}
this.findWorkPlace(this,"");
this.filterQuery.workPlaceCode = this.workPlaceCode +''
getHead("prescribePanel", "1").then((re) => {
this.findWorkPlace(this, '')
this.filterQuery.workPlaceCode = this.workPlaceCode + ''
getHead('prescribePanel', '1').then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
this.tableObj = re.data
this.tableHeader = re.data.tableList
this.queryList = re.data.queryList
this.fromList = re.data.fromList
this.getList()
});
})
}

@ -0,0 +1,362 @@
<template>
<div>
<el-card>
<el-form :model="filterQuery" size="mini" label-width="100px" v-if="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="药品编码:">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable
@keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="药品名称:">
<el-input v-model="filterQuery.name" clearable style="width: 90%" placeholder="请输入产品名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="包装规格:">
<el-input v-model="filterQuery.spec" clearable style="width: 90%" placeholder="请输入规格型号"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="批准文号:">
<el-input v-model="filterQuery.registerNo" clearable style="width: 90%"
placeholder="请输入注册/备案凭证"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.manufactory" clearable style="width: 90%" placeholder="请输入生产企业"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange"
style="width: 90%"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true"
:disabled="!configParms.basicThirdProducts">新增
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="80"></el-table-column>
<el-table-column label="药品编码" prop="code"></el-table-column>
<el-table-column label="药品名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="包装规格" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column>
<el-table-column label="批准文号" prop="registerNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="180px">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="detailDialog(scope.row)">编辑</el-button>
<el-button type="text" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0"
:disabled="!configParms.basicThirdProducts">删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="药品信息编辑"
:visible.sync="thrProductsDetailVisible"
width="60%"
class="dialog-two"
top="5vh"
v-if="thrProductsDetailVisible"
>
<thrProductsEdit
:newProductData="thisData"
:closeAddDialog="closeAddDialog"
></thrProductsEdit>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="新增配送药品"
:visible.sync="addProductVisible"
width="60%"
v-if="addProductVisible"
@close="closeAddDialog"
class="dialog-two"
top="5vh"
>
<ThrProductsAdd
:newType="newType"
:closeAddDialog="closeAddDialog"></ThrProductsAdd>
</el-dialog>
</div>
</template>
<script>
import {
delThrProducts, saveNewProduct
} from "@/api/thrsys/thrProducts";
import {getInvbasdoc} from "@/api/thrsys/getErps";
import {getBasicThirdSys, filterDetailByKey} from "@/api/thrsys/basicThirdSys";
import {selectIp} from "@/api/system/systemParamConfig";
import thrProductsEdit from "./thrDrugEdit";
import ThrProductsAdd from "./thrDrugAdd";
import {findConfig} from "@/api/sync/spsSyncStatus";
export default {
data() {
return {
showSearch: true,
filterQuery: {
code: null,
name: "",
spec: null,
registerNo: null,
manufactory: null,
thirdSys: "thirdId",
page: 1,
limit: 20,
productType:2
},
mainThirdSys: '',
total: 0,
thirdSys: [],
thirdSysDetail: null,
list: [],
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
newType: 1,
thrProductsDetailVisible: false,
thisData: null,
loading: false,
addProductVisible: false,
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cplx: null,
cpms: null
},
configParms: {},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
code: null,
spec: null,
registerNo: null,
manufactory: null,
name: "",
thirdSys: this.mainThirdSys,
page: 1,
limit: 20,
productType:2
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
this.loading = true;
getInvbasdoc(this.filterQuery)
.then((response) => {
// this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
delThrProducts(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
detailDialog(row) {
this.thisData = row;
this.thrProductsDetailVisible = true;
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
for (var i = 0; i < this.thirdSys.length; i++) {
if (this.thirdSys[i].mainSys) {
this.filterQuery.thirdSys = this.thirdSys[i].thirdId;
this.mainThirdSys = this.thirdSys[i].thirdId;
}
}
this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail();
this.selectSysParam();
this.getList();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSys,
key: "piQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail();
},
saveNewProduct() {
this.addProductVisible = false;
saveNewProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
}
}).catch((error) => {
this.$message.error(error.message);
})
},
closeAddDialog(val) {
this.thrProductsDetailVisible = false;
this.addProductVisible = false;
if (val) {
this.getList();
}
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParms = response.data;
}
})
.catch(() => {
});
},
},
components: {
thrProductsEdit, ThrProductsAdd
},
mounted() {
},
created() {
this.getList();
this.getBasicThirdSys();
this.getSyncConfig();
},
};
</script>
<style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>

@ -0,0 +1,256 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId"
>
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="药品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入药品编码" v-model.trim="newProductData.code"
></el-input>
</el-form-item>
</el-col>
<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="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"
></el-input>
</el-form-item>
</el-col>
<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-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="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
v-model.trim="newProductData.tyshxydm"
></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="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" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import { saveNewProduct } from '@/api/thrsys/thrProducts'
import { getBasicThirdSys } from '@/api/thrsys/basicThirdSys'
import { addProduct } from '@/api/thrsys/thrProductsAdd'
export default {
name: 'ThrProductsAdd',
props: {
newType: {
type: Object,
required: true
},
closeAddDialog: {
type: Function,
required: true
}
},
data() {
return {
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cplx: null,
cpms: null,
thirdSysFk: null,
cpdls: null
},
thirdSys: [],
saveLoading: false,
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning('第三方系统不能为空!')
return
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning('产品编码为空!')
return
}
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
}
this.saveLoading = true
this.newProductData.productType = 2
if (this.newType == 1) {
saveNewProduct(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//
this.$emit('closeAddDialog', true)
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
// this.$message.error(error.message);
})
} else if (this.newType == 2) {
addProduct(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
// this.$message.error(error.message);
})
}
},
getBasicThirdSys() {
let query = {
enabled: true
}
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || []
})
.catch(() => {
this.loading = false
this.list = []
})
}
},
created() {
this.getBasicThirdSys()
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,113 @@
<template>
<el-form label-width="120px">
<div v-if="!isImport" style="margin-bottom: 20px">
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-input style="width: 90%" size="small" :disabled="true" v-model="data.thirdSysName"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="药品编码:" prop="code">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="药品名称:" prop="name">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.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="manufactory">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.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" :disabled="true" v-model.trim="data.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="spec">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.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" :disabled="true" v-model.trim="data.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="ylqxzcrbarmc">-->
<!-- <el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.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" :disabled="true" v-model.trim="data.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="tyshxydm">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.tyshxydm"></el-input>
</el-form-item>
</el-col>
<!--<el-col :span="11" class="el-col">-->
<!-- <el-form-item label="产品类别:" prop="cplb">-->
<!-- <el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.cplb"></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<el-col :span="11" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.sptm"></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="ybbm">
<el-input style="width: 90%" size="small" :disabled="true" v-model.trim="data.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
</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" :disabled="true" v-model.trim="data.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</template>
<script>
export default {
name: "thrDrugDetail",
props: {
data: {
type: Object,
required: true,
},
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,224 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
disabled
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入药品编码"
disabled
v-model.trim="newProductData.code"></el-input>
</el-form-item>
</el-col>
<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="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="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="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="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入药品条码" v-model.trim="newProductData.sptm"></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="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 @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import {updateProduct} from "@/api/thrsys/thrProducts";
import {getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
export default {
name: "thrDrugEdit",
props: {
newProductData: {
type: Object,
required: true,
},
closeAddDialog: {
type: Function,
required: true,
},
},
data() {
return {
thirdSys: [],
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false;
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning("第三方系统不能为空!");
return;
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning("药品编码为空!");
return;
}
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;
}
updateProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功");
this.closeAddDialog(true);
} else {
this.$message.error(res.message);
}
}).catch((error) => {
})
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
created() {
this.getBasicThirdSys();
},
}
</script>
<style scoped>
</style>

@ -220,6 +220,7 @@ export default {
return
}
this.saveLoading = true
this.newProductData.productType = 1
if (this.newType == 1) {
saveNewProduct(this.newProductData).then((res) => {
this.saveLoading = false

Loading…
Cancel
Save