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/drugMaintain.vue

400 lines
12 KiB
Vue

12 months ago
<template>
<div>
<el-card>
<el-form :model="filterQuery" v-show="showSearch" label-width="auto">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="药品编码:" class="query-form-item">
<el-input v-model="filterQuery.nameCode"
placeholder="请输入药品编码"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="药品通用名:" class="query-form-item">
<el-input
clearable
v-model="filterQuery.cpmctymc"
placeholder="请输入药品通用名"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="医保编码:" class="query-form-item">
<el-input
clearable
v-model="filterQuery.ybbm"
placeholder="请输入医保编码"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批准文号:" class="query-form-item">
<el-input
clearable
v-model="filterQuery.zczbhhzbapzbh"
placeholder="请输入批准文号"
></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="医疗器械注册人:" class="query-form-item">-->
<!-- <el-input-->
<!-- clearable-->
<!-- v-model="filterQuery.ylqxzcrbarmc"-->
<!-- placeholder="请输入医疗器械注册人"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="生产企业:" class="query-form-item">
<el-input
clearable
v-model="filterQuery.manufactory"
placeholder="请输入生产企业"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="对照条件:" class="query-form-item">
<el-select v-model="filterQuery.filterType" style="width: 100%" placeholder="对照条件" clearable>
<el-option label="全部" :value="0"></el-option>
<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="4"></el-option>
</el-select>
12 months ago
</el-form-item>
</el-col>
<!--<el-col :span="8">-->
<!-- <el-form-item label="是否禁用:" class="query-form-item">-->
<!-- <el-select v-model="filterQuery.isDisable" clearable>-->
<!-- <el-option label="是" :value=true></el-option>-->
<!-- <el-option label="否" :value=false></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-divider/>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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="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>
10 months ago
<!-- <el-button type="primary" icon="el-icon-plus" @click="addDrug"></el-button>-->
12 months ago
</el-button-group>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
>
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column label="药品标识码" prop="nameCode" width="160"></el-table-column>
<!--<el-table-column label="收费项目编码" prop="payFeeCode" width="100"></el-table-column>-->
12 months ago
<el-table-column label="药品通用名称" prop="cpmctymc" width="160"></el-table-column>
12 months ago
<el-table-column label="制剂规格" prop="prepnSpec" width="90"></el-table-column>
<el-table-column label="制剂单位" prop="prepnUnit" width="90"></el-table-column>
11 months ago
<el-table-column label="包装规格" prop="bzgg" width="100"></el-table-column>
<el-table-column label="包装单位" prop="packUnit" width="90"></el-table-column>
11 months ago
<!--<el-table-column label="包装比例" prop="packRatio" width="90"></el-table-column>-->
12 months ago
<el-table-column label="价格" prop="price" width="90"></el-table-column>
12 months ago
<el-table-column label="批准文号" prop="zczbhhzbapzbh" width="90"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="90"></el-table-column>
<el-table-column label="医保编码" prop="ybbm" width="90"></el-table-column>
<el-table-column label="药品状态" prop="majorStatus" width="90">
<template slot-scope="scope">
<el-tag :type="(scope.row.majorStatus) | statusFilterType">
{{ statusMap[scope.row.majorStatus] }}
</el-tag>
</template>
</el-table-column>
12 months ago
<el-table-column label="操作" fixed="right" width="100">
12 months ago
<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)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
10 months ago
<pagination
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
>
</pagination>
12 months ago
<el-dialog
:title="fromMap[fromName]"
:visible.sync="addDrugVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="addDrugVisible"
@close="closeDialog"
12 months ago
>
<drugAdd
:closeDialog="closeDialog"
:rowData="rowData"
:type="type"
:relevanceEdit="relevanceEdit"
:uuid="uuid"
:relId="relId"
:thisData="thisData"
12 months ago
>
</drugAdd>
</el-dialog>
<el-dialog
title="选入-药品信息"
:visible.sync="chooseDrugVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="chooseDrugVisible"
>
<chooseDrug
>
</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"
:mainIds="mainIds"
10 months ago
@closeUdi="closeDialog"
:supEnable="false"
></chooseHouseDrug>
</el-dialog>
12 months ago
</el-card>
</div>
</template>
<script>
import {
getUdiInfos,
deletetUdiInfos,
updatetUdiInfos,
updatetSingleUdiInfo,
updateErpProduct,
uploadSmp,
thirdSysDetail,
removeRl,
sysFilterOptimize,
spcombie,
lockStatus,
removeDiRl,
disableUdi
} 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'
12 months ago
export default {
components: {drugAdd, chooseDrug,chooseHouseDrug},
12 months ago
name: 'drugMaintain',
data() {
return {
showSearch: true,
filterBadInv: true,
query: {},
list: [],
mainIds:[],
12 months ago
filterQuery: {
productsType: 2,
page: 1,
limit: 20,
addType: 1
},
addDrugVisible: false,
chooseDrugVisible: false,
statusMap: {
0: "停用",
1: "在用"
},
fromName: '',
rowData: {},
12 months ago
//1新增2编辑
12 months ago
type: null,
fromMap: {
12 months ago
'add': '新增-药品信息',
'edit': '编辑-药品信息',
12 months ago
},
12 months ago
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,
},
10 months ago
total: 0
12 months ago
12 months ago
}
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
productsType: 2,
page: 1,
limit: 20,
addType: 1
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmit() {
this.filterQuery.page = 1;
this.getList()
},
12 months ago
addDrug() {
12 months ago
this.fromName = 'add'
this.type = 1
this.rowData = null
this.addDrugVisible = true
},
12 months ago
chooseDrug() {
12 months ago
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
12 months ago
},
getList() {
getUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false
this.list = response.data.list || []
this.mainIds = this.list.map(item => item.mainId);
12 months ago
this.total = response.data.total || 0
})
.catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
12 months ago
deleteDrug(row) {
12 months ago
this.$confirm("此操作将永久删除该药品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let tquery = {
id: row.id + "",
};
deletetUdiInfos(tquery).then(res => {
12 months ago
if (res.code != 20000) {
12 months ago
this.$message.error("删除错误")
this.getList()
12 months ago
} else {
12 months ago
this.$message.success("删除成功!")
this.getList()
}
}).catch(() => {
this.$message.error("删除错误")
})
})
},
12 months ago
editDrug(row) {
12 months ago
this.fromName = 'edit'
12 months ago
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
12 months ago
this.addDrugVisible = true;
10 months ago
},
closeUdi(){
12 months ago
},
12 months ago
closeDialog() {
12 months ago
this.addDrugVisible = false;
this.chooseHouseDrugVisible = false;
12 months ago
this.getList()
12 months ago
}
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "info",
1: "success",
};
return statusMap[status];
}
,
},
created() {
this.getList()
}
}
</script>
<style scoped>
</style>