UDI查询模块代码修改

master
schry 2 years ago
parent 1167bb217f
commit 64294be217

@ -56,9 +56,9 @@ export function filterCompanyName(query) {
}); });
} }
export function filterBatchNo(query) { export function filterNameCode(query) {
return axios({ return axios({
url: "/udi/trace/order/filterBatchNo", url: "/udi/basic/dict/filterNameCode",
method: "get", method: "get",
params: query params: query
}); });

@ -1,8 +1,6 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form size="mini">
<el-form-item prop="child">
<el-form v-show="showSearch" label-width="125px" size="mini"> <el-form v-show="showSearch" label-width="125px" size="mini">
<el-row type="flex"> <el-row type="flex">
<el-col :span="18"> <el-col :span="18">
@ -88,25 +86,31 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-input
v-model="filterQuery.ggxh"
placeholder="请输入规格型号"
style="width: 200px"
clearable="true"
:disabled="filterQuery.cpmctymc==null || filterQuery.cpmctymc==''"
></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="DI标识:" class="query-form-item"> <el-form-item label="DI标识:" class="query-form-item">
<el-input <el-select
style="width: 100%"
v-model="filterQuery.nameCode" v-model="filterQuery.nameCode"
placeholder="请输入DI标识" filterable
remote
style="width: 100%"
clearable="true" clearable="true"
></el-input> reserve-keyword
placeholder="请输入DI"
:remote-method="getNameCodeList"
:loading="loading"
>
<el-option
v-for="item in nameCodeList"
:key="item.nameCode"
:label="item.nameCode"
:value="item.nameCode"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -116,7 +120,9 @@
placeholder="请输入批次号" placeholder="请输入批次号"
style="width: 100%" style="width: 100%"
clearable="true" clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh==''" :disabled="filterQuery.ggxh==null || filterQuery.ggxh=='' ||
filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -124,7 +130,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-divider style="margin: 15px"></el-divider>
<div class="top-right-btn" style="display:flex;"> <div class="top-right-btn" style="display:flex;">
<el-button-group> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/ <el-button icon="el-icon-view" type="primary" @click="hideSearch">/
@ -136,8 +142,7 @@
> >
</el-button-group> </el-button-group>
</div> </div>
</el-form-item> <el-divider style="margin: 15px"></el-divider>
</el-form>
<el-table v-loading="loading" :data="list" <el-table v-loading="loading" :data="list"
style="width: 100%" style="width: 100%"
border highlight-current-row> border highlight-current-row>
@ -338,9 +343,8 @@
<script> <script>
import {getTraceOrderList, filterCpmctymc, filterGgxh, filterBatchNo, sourceSearch} from "@/api/udi/udiTrace"; import {filterCpmctymc, filterGgxh, filterNameCode, sourceSearch} from "@/api/udi/udiTrace";
import {filterCompany} from "@/api/basic/udiInfo"; import {filterCompany} from "@/api/basic/udiInfo";
import {isBlank} from "@/utils/strUtil";
export default { export default {
data() { data() {
@ -356,14 +360,6 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
}, },
options: [
{value: 'A', label: 'UDI码查询(源头查询)'},
{value: 'B', label: '按产品信息组合查询'},
],
form: {
parent: '',
child: '',
},
total: 0, total: 0,
loading: false, loading: false,
list: [], list: [],
@ -373,25 +369,25 @@ export default {
fromOptions: [], fromOptions: [],
cpmctymcList: [], cpmctymcList: [],
ggxhList: [], ggxhList: [],
batchNoList: [] nameCodeList: []
} }
}, },
methods: { methods: {
ggxhChange() { ggxhChange() {
this.getBatchNoList() this.getNameCodeList()
}, },
getBatchNoList(query) { getNameCodeList(query) {
let params = { let params = {
ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc, ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc,
cpmctymc: this.filterQuery.cpmctymc, cpmctymc: this.filterQuery.cpmctymc,
ggxh: this.filterQuery.ggxh, ggxh: this.filterQuery.ggxh,
batchNo: query, nameCode: query,
page: 1, page: 1,
limit: 10, limit: 10,
}; };
filterBatchNo(params).then((res) => { filterNameCode(params).then((res) => {
this.batchNoList = res.data.list || []; this.nameCodeList = res.data.list || [];
console.log(this.batchNoList) console.log(this.nameCodeList)
}) })
}, },
cpmctymcChange() { cpmctymcChange() {
@ -480,7 +476,7 @@ export default {
sourceSearch(this.filterQuery).then((res) => { sourceSearch(this.filterQuery).then((res) => {
this.loading = false; this.loading = false;
if (res.code === 20000) { if (res.code === 20000) {
this.list = res.data.list || []; this.list = res.data || [];
this.total = res.data.total || 0; this.total = res.data.total || 0;
console.log(this.list) console.log(this.list)
} else { } else {

@ -1,54 +1,171 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form> <el-form v-show="showSearch" label-width="125px" size="mini">
<el-row type="flex"> <el-row type="flex">
<el-col type="flex" :span="8"> <el-col :span="18">
<el-form-item label="当前所在企业:"> <el-form-item label="UDI码:" class="query-form-item">
<el-select <el-input v-model="filterQuery.udiCode" placeholder="UDI码查询"
v-model="filterQuery.companyName" clearable></el-input>
filterable </el-form-item>
remote </el-col>
style="width: 200px" </el-row>
clearable="true" <el-row type="flex">
reserve-keyword <el-col type="flex" :span="6">
placeholder="请输入产品名称" <el-form-item label="当前所在企业:" class="query-form-item">
:remote-method="geCompanyNameList" <el-select
:loading="loading" v-model="filterQuery.companyName"
> filterable
<el-option remote
v-for="item in companyNameList" style="width: 100%"
:key="item.companyName" clearable="true"
:label="item.companyName" reserve-keyword
:value="item.companyName" placeholder="请输入产品名称"
> :remote-method="geCompanyNameList"
</el-option> :loading="loading"
</el-select> >
<!-- <el-input v-model="filterQuery.companyName" <el-option
style="width: 200px;" v-for="item in companyNameList"
placeholder="请输入当前所在企业" :key="item.companyName"
@keyup.native="onSubmit"></el-input>--> :label="item.companyName"
</el-form-item> :value="item.companyName"
</el-col> >
<el-col type="flex" :span="16"> </el-option>
<el-form-item label="UDI码查询:"> </el-select>
<el-input v-model="filterQuery.udiCode" placeholder="UDI码查询(源头查询)" </el-form-item>
style="width: 600px;" clearable></el-input> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item label="医疗器械注册人:" class="query-form-item">
<el-col type="flex" :span="8"> <el-select
<el-form-item> v-model="filterQuery.ylqxzcrbarmc"
<el-button-group style="display:flex;"> filterable
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> remote
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> clearable="true"
</el-button-group> style="width: 100%"
</el-form-item> reserve-keyword
</el-col> placeholder="医疗器械注册人"
</el-row> :remote-method="getYlqxzcrbarmcList"
:loading="loading"
@change="ylqxzcrbarmcChange"
>
<el-option
v-for="item in fromOptions"
:key="item.ylqxzcrbarmc"
:label="item.ylqxzcrbarmc"
:value="item.ylqxzcrbarmc"
>
</el-form> </el-option>
<el-divider style="margin: 15px"></el-divider> </el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品名称:" class="query-form-item">
<el-select
v-model="filterQuery.cpmctymc"
filterable
remote
clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getCpmctymcList"
:loading="loading"
style="width: 100%"
@change="cpmctymcChange"
>
<el-option
v-for="item in cpmctymcList"
:key="item.cpmctymc"
:label="item.cpmctymc"
:value="item.cpmctymc"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="规格型号:" class="query-form-item">
<el-select
v-model="filterQuery.ggxh"
filterable
remote
style="width: 100%"
clearable="true"
:disabled="filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getGgxhList"
:loading="loading"
@change="ggxhChange"
>
<el-option
v-for="item in ggxhList"
:key="item.ggxh"
:label="item.ggxh"
:value="item.ggxh"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="DI标识:" class="query-form-item">
<el-select
v-model="filterQuery.nameCode"
filterable
remote
style="width: 100%"
clearable="true"
reserve-keyword
placeholder="请输入DI"
:remote-method="getNameCodeList"
:loading="loading"
>
<el-option
v-for="item in nameCodeList"
:key="item.nameCode"
:label="item.nameCode"
:value="item.nameCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="批次号:" class="query-form-item">
<el-input
v-model="filterQuery.batchNo"
placeholder="请输入批次号"
style="width: 100%"
clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh=='' ||
filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
></el-input>
</el-form-item>
</el-col>
<el-col type="flex">
</el-col>
</el-row>
</el-form>
<div class="top-right-btn" style="display:flex;">
<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" size="mini"
>查询
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" <el-table v-loading="loading" :data="list"
style="width: 100%" style="width: 100%"
border highlight-current-row> border highlight-current-row>
@ -249,7 +366,8 @@
<script> <script>
import {getTraceOrderList,filterCompanyName} from "@/api/udi/udiTrace"; import {filterCpmctymc, filterGgxh, filterNameCode, sourceSearch,filterCompanyName} from "@/api/udi/udiTrace";
import {filterCompany} from "@/api/basic/udiInfo";
export default { export default {
data() { data() {
@ -261,7 +379,7 @@ export default {
ggxh: null, ggxh: null,
nameCode: null, nameCode: null,
batchNo: null, batchNo: null,
companyName: null, companyName: "",
page: 1, page: 1,
limit: 10, limit: 10,
}, },
@ -271,6 +389,10 @@ export default {
open: false, open: false,
formView: {}, formView: {},
showSearch: true, showSearch: true,
fromOptions: [],
cpmctymcList: [],
ggxhList: [],
nameCodeList: [],
companyNameList: [] companyNameList: []
} }
}, },
@ -291,10 +413,74 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
ggxhChange() {
this.getNameCodeList()
},
getNameCodeList(query) {
let params = {
ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc,
cpmctymc: this.filterQuery.cpmctymc,
ggxh: this.filterQuery.ggxh,
nameCode: query,
page: 1,
limit: 10,
};
filterNameCode(params).then((res) => {
this.nameCodeList = res.data.list || [];
console.log(this.nameCodeList)
})
},
cpmctymcChange() {
this.getGgxhList()
},
getGgxhList(query) {
let params = {
ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc,
cpmctymc: this.filterQuery.cpmctymc,
ggxh: query,
page: 1,
limit: 10,
};
filterGgxh(params).then((res) => {
this.ggxhList = res.data.list || [];
console.log(this.ggxhList)
})
},
ylqxzcrbarmcChange() {
this.getCpmctymcList()
},
getCpmctymcList(query) {
let params = {
ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc,
cpmctymc: query,
page: 1,
limit: 10,
};
filterCpmctymc(params).then((res) => {
this.cpmctymcList = res.data.list || [];
console.log(this.cpmctymcList)
})
},
getYlqxzcrbarmcList(query) {
let cQuery = {
ylqxzcrbarmc: query,
page: 1,
limit: 10,
};
filterCompany(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data || [];
console.log(this.fromOptions)
})
.catch(() => {
this.loading = false;
});
},
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
handleView(row){ handleView(row) {
this.list.forEach(obj => { this.list.forEach(obj => {
if (row.id == obj.id) { if (row.id == obj.id) {
this.formView = obj this.formView = obj
@ -303,7 +489,7 @@ export default {
console.log(this.formView) console.log(this.formView)
this.open = true this.open = true
}, },
onReset(){ onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
@ -314,24 +500,23 @@ export default {
ggxh: null, ggxh: null,
nameCode: null, nameCode: null,
batchNo: null, batchNo: null,
companyName: null, companyName: "",
page: 1, page: 1,
limit: 10, limit: 10,
}; };
//this.list = null //this.list = null
//this.total = 0 //this.total = 0
this.getList()
}, },
onSubmit(){ onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList() this.getList()
}, },
getList() { getList() {
this.loading = true; this.loading = true;
getTraceOrderList(this.filterQuery).then((res) => { sourceSearch(this.filterQuery).then((res) => {
this.loading = false; this.loading = false;
if (res.code === 20000) { if (res.code === 20000) {
this.list = res.data.list || []; this.list = res.data || [];
this.total = res.data.total || 0; this.total = res.data.total || 0;
console.log(this.list) console.log(this.list)
} else { } else {
@ -348,20 +533,33 @@ export default {
}, },
}, },
created() { created() {
this.getList()
} }
} }
</script> </script>
<style scoped> <style scoped>
.el-col { .checkitemTag {
border-radius: 4px; float: left;
flex-wrap: wrap; text-align: left;
margin-top: 5px;
width: 100%;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
} }
div /deep/ .el-table .success-row {
background: #ffffff;
}
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
}
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
</style> </style>

Loading…
Cancel
Save