|
|
|
@ -106,7 +106,6 @@
|
|
|
|
|
<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>
|
|
|
|
@ -133,19 +132,13 @@
|
|
|
|
|
</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" fixed="right" width="100">
|
|
|
|
|
<el-table-column label="操作" fixed="right" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="editDrug(scope.row)"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="deleteDrug(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
@click.native.stop="electedDrug(scope.row)"
|
|
|
|
|
>绑定
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -163,6 +156,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
@ -175,6 +169,12 @@ import {
|
|
|
|
|
} from "@/utils/customConfig";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
nameCodes: {
|
|
|
|
|
type: Array,
|
|
|
|
|
required: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
name: 'selectDrugDialog',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -200,9 +200,10 @@ export default {
|
|
|
|
|
filterQuery: {
|
|
|
|
|
productsType: 2,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
limit: 10,
|
|
|
|
|
addType: 1,
|
|
|
|
|
keyWords:""
|
|
|
|
|
keyWords:"",
|
|
|
|
|
filterNameCodes:[]
|
|
|
|
|
},
|
|
|
|
|
addDrugVisible: false,
|
|
|
|
|
chooseDrugVisible: false,
|
|
|
|
@ -267,25 +268,10 @@ export default {
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
addDrug() {
|
|
|
|
|
this.fromName = 'add'
|
|
|
|
|
this.type = 1
|
|
|
|
|
this.rowData = null
|
|
|
|
|
this.addDrugVisible = true
|
|
|
|
|
},
|
|
|
|
|
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() {
|
|
|
|
|
if (this.nameCodes.length > 0){
|
|
|
|
|
this.filterQuery.filterNameCodes = this.nameCodes
|
|
|
|
|
}
|
|
|
|
|
getUdiInfos(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false
|
|
|
|
@ -299,56 +285,12 @@ export default {
|
|
|
|
|
this.total = 0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
deleteDrug(row) {
|
|
|
|
|
this.$confirm("此操作将永久删除该药品信息, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let tquery = {
|
|
|
|
|
id: row.id + "",
|
|
|
|
|
};
|
|
|
|
|
deletetUdiInfos(tquery).then(res => {
|
|
|
|
|
if (res.code != 20000) {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
this.getList()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.success("删除成功!")
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message.error("删除错误")
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
editDrug(row) {
|
|
|
|
|
this.fromName = 'edit'
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
},
|
|
|
|
|
closeUdi() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.addDrugVisible = false;
|
|
|
|
|
this.chooseHouseDrugVisible = false;
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
electedDrug(row){
|
|
|
|
|
this.$emit('selectDrug', row);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
|