UDI查询模块代码修改

master
schry 2 years ago
parent 19f67c6017
commit f6896d6cdb

@ -31,3 +31,35 @@ export function getManuCodeRelList(query) {
params: query params: query
}) })
} }
export function filterCpmctymc(query) {
return axios({
url: "/udi/basic/dict/filterCpmctymc",
method: "get",
params: query
});
}
export function filterGgxh(query) {
return axios({
url: "/udi/basic/dict/filterGgxh",
method: "get",
params: query
});
}
export function filterCompanyName(query) {
return axios({
url: "/udi/auth/user/comapny/filterCompanyName",
method: "get",
params: query
});
}
export function filterBatchNo(query) {
return axios({
url: "/udi/trace/order/filterBatchNo",
method: "get",
params: query
});
}

@ -1,38 +1,199 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form size="mini"> <el-form size="mini" label-width="110px">
<el-row type="flex"> <el-row type="flex">
<el-col type="flex" :span="6" style="width: 300px"> <el-col type="flex" style="width: 300px">
<el-form-item prop="parent" label="查询方式:" class="query-form-item"> <el-form-item prop="parent" label="查询方式:" class="query-form-item">
<el-select v-model="form.parent" @change="onReset" placeholder="请选择查询方式" clearable> <el-select v-model="form.parent"
@change="onReset"
placeholder="请选择查询方式" clearable
style="width: 200px"
>
<el-option v-for="item in options" :key="item.value" <el-option v-for="item in options" :key="item.value"
:label="item.label" :value="item.value" :label="item.label" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-form-item prop="child" v-if="form.parent == 'A'" class="query-form-item">
<el-col type="flex" style="width: 660px">
<el-form-item label="UDI码:">
<el-input v-model="filterQuery.udiCode" placeholder="UDI码查询(源头查询)" style="width: 600px" clearable></el-input>
</el-form-item>
</el-col>
<el-col type="flex" style="width: 100px">
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
</el-button-group>
</el-form-item>
</el-col>
</el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-form size="mini">
<el-form-item prop="child" v-if="form.parent == 'A'">
<el-form v-show="showSearch" label-width="110px" size="mini">
<el-row type="flex">
<el-col type="flex">
<el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="filterQuery.udiCode" placeholder="UDI码查询(源头查询)" style="width: 650px" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col type="flex">
<el-form-item label="医疗器械注册人:" class="query-form-item">
<el-select
v-model="filterQuery.ylqxzcrbarmc"
filterable
remote
style="width: 200px"
clearable="true"
reserve-keyword
placeholder="医疗器械注册人"
:remote-method="getYlqxzcrbarmcList"
:loading="loading"
@change="ylqxzcrbarmcChange"
>
<el-option
v-for="item in fromOptions"
:key="item.ylqxzcrbarmc"
:label="item.ylqxzcrbarmc"
:value="item.ylqxzcrbarmc"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col class="el-col">
<el-form-item label="产品名称:" class="query-form-item">
<el-select
v-model="filterQuery.cpmctymc"
filterable
remote
style="width: 200px"
clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getCpmctymcList"
:loading="loading"
@change="cpmctymcChange"
>
<el-option
v-for="item in cpmctymcList"
:key="item.cpmctymc"
:label="item.cpmctymc"
:value="item.cpmctymc"
>
</el-option>
</el-select>
<!-- <el-input
v-model="filterQuery.cpmctymc"
placeholder="请输入产品名称"
style="width: 200px"
clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
></el-input>-->
</el-form-item>
</el-col>
<el-col class="el-col">
<el-form-item label="规格型号:" class="query-form-item">
<el-select
v-model="filterQuery.ggxh"
filterable
remote
style="width: 200px"
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-input
v-model="filterQuery.ggxh"
placeholder="请输入规格型号"
style="width: 200px"
clearable="true"
:disabled="filterQuery.cpmctymc==null || filterQuery.cpmctymc==''"
></el-input>-->
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col type="flex">
<el-form-item label="DI标识:" class="query-form-item">
<el-input
v-model="filterQuery.nameCode"
placeholder="请输入DI标识"
style="width: 200px"
clearable="true"
></el-input>
</el-form-item>
</el-col>
<el-col type="flex">
<el-form-item label="批次号:" class="query-form-item">
<el-select
v-model="filterQuery.batchNo"
filterable
remote
style="width: 200px"
clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh=='' ||
filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getBatchNoList"
:loading="loading"
>
<el-option
v-for="item in batchNoList"
:key="item.batchNo"
:label="item.batchNo"
:value="item.batchNo"
>
</el-option>
</el-select>
<!-- <el-input
v-model="filterQuery.batchNo"
placeholder="请输入批次号"
style="width: 200px"
clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh==''"
></el-input>-->
</el-form-item>
</el-col>
<el-col type="flex">
</el-col>
</el-row>
</el-form>
<el-divider style="margin: 15px"></el-divider>
<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-form-item>
</el-form>
<el-form size="mini"> <el-form size="mini">
<el-form-item prop="child" v-if="form.parent == 'B'"> <el-form-item prop="child" v-if="form.parent == 'B'">
<el-form v-show="showSearch" label-width="110px" size="mini"> <el-form v-show="showSearch" label-width="110px" size="mini">
<el-row type="flex">
<el-col type="flex">
<el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="filterQuery.udiCode" placeholder="UDI码查询(源头查询)" style="width: 650px" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex"> <el-row type="flex">
<el-col type="flex"> <el-col type="flex">
<el-form-item label="医疗器械注册人:" class="query-form-item"> <el-form-item label="医疗器械注册人:" class="query-form-item">
@ -44,9 +205,9 @@
clearable="true" clearable="true"
reserve-keyword reserve-keyword
placeholder="医疗器械注册人" placeholder="医疗器械注册人"
:remote-method="findMethod" :remote-method="getYlqxzcrbarmcList"
:loading="loading" :loading="loading"
@change="" @change="ylqxzcrbarmcChange"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
@ -61,24 +222,68 @@
</el-col> </el-col>
<el-col class="el-col"> <el-col class="el-col">
<el-form-item label="产品名称:" class="query-form-item"> <el-form-item label="产品名称:" class="query-form-item">
<el-input <el-select
v-model="filterQuery.cpmctymc"
filterable
remote
style="width: 200px"
clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getCpmctymcList"
:loading="loading"
@change="cpmctymcChange"
>
<el-option
v-for="item in cpmctymcList"
:key="item.cpmctymc"
:label="item.cpmctymc"
:value="item.cpmctymc"
>
</el-option>
</el-select>
<!-- <el-input
v-model="filterQuery.cpmctymc" v-model="filterQuery.cpmctymc"
placeholder="请输入产品名称" placeholder="请输入产品名称"
style="width: 200px" style="width: 200px"
clearable="true" clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''" :disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
></el-input> ></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="el-col"> <el-col class="el-col">
<el-form-item label="规格型号:" class="query-form-item"> <el-form-item label="规格型号:" class="query-form-item">
<el-input <el-select
v-model="filterQuery.ggxh"
filterable
remote
style="width: 200px"
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-input
v-model="filterQuery.ggxh" v-model="filterQuery.ggxh"
placeholder="请输入规格型号" placeholder="请输入规格型号"
style="width: 200px" style="width: 200px"
clearable="true" clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''" :disabled="filterQuery.cpmctymc==null || filterQuery.cpmctymc==''"
></el-input> ></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -95,13 +300,35 @@
</el-col> </el-col>
<el-col type="flex"> <el-col type="flex">
<el-form-item label="批次号:" class="query-form-item"> <el-form-item label="批次号:" class="query-form-item">
<el-input <el-select
v-model="filterQuery.batchNo"
filterable
remote
style="width: 200px"
clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh=='' ||
filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="getBatchNoList"
:loading="loading"
>
<el-option
v-for="item in batchNoList"
:key="item.batchNo"
:label="item.batchNo"
:value="item.batchNo"
>
</el-option>
</el-select>
<!-- <el-input
v-model="filterQuery.batchNo" v-model="filterQuery.batchNo"
placeholder="请输入批次号" placeholder="请输入批次号"
style="width: 200px" style="width: 200px"
clearable="true" clearable="true"
:disabled="filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''" :disabled="filterQuery.ggxh==null || filterQuery.ggxh==''"
></el-input> ></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col type="flex"> <el-col type="flex">
@ -323,8 +550,9 @@
<script> <script>
import {getTraceOrderList} from "@/api/udi/udiTrace"; import {getTraceOrderList,filterCpmctymc,filterGgxh,filterBatchNo} from "@/api/udi/udiTrace";
import {getUdiInfos, filterCompany} from "@/api/basic/udiInfo"; import {filterCompany} from "@/api/basic/udiInfo";
import {isBlank} from "@/utils/strUtil";
export default { export default {
data() { data() {
@ -355,11 +583,61 @@ export default {
formView: {}, formView: {},
showSearch: true, showSearch: true,
fromOptions: [], fromOptions: [],
cpmctymcList: [] cpmctymcList: [],
ggxhList: [],
batchNoList: []
} }
}, },
methods: { methods: {
findMethod(query) { ggxhChange(){
this.getBatchNoList()
},
getBatchNoList(query){
let params = {
ylqxzcrbarmc: this.filterQuery.ylqxzcrbarmc,
cpmctymc: this.filterQuery.cpmctymc,
ggxh: this.filterQuery.ggxh,
batchNo: query,
page: 1,
limit: 10,
};
filterBatchNo(params).then((res) => {
this.batchNoList = res.data.list || [];
console.log(this.batchNoList)
})
},
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 = { let cQuery = {
ylqxzcrbarmc: query, ylqxzcrbarmc: query,
page: 1, page: 1,

@ -5,10 +5,29 @@
<el-row type="flex"> <el-row type="flex">
<el-col type="flex" :span="8"> <el-col type="flex" :span="8">
<el-form-item label="当前所在企业:"> <el-form-item label="当前所在企业:">
<el-input v-model="filterQuery.companyName" <el-select
v-model="filterQuery.companyName"
filterable
remote
style="width: 200px"
clearable="true"
reserve-keyword
placeholder="请输入产品名称"
:remote-method="geCompanyNameList"
:loading="loading"
>
<el-option
v-for="item in companyNameList"
:key="item.companyName"
:label="item.companyName"
:value="item.companyName"
>
</el-option>
</el-select>
<!-- <el-input v-model="filterQuery.companyName"
style="width: 200px;" style="width: 200px;"
placeholder="请输入当前所在企业" placeholder="请输入当前所在企业"
@keyup.native="onSubmit"></el-input> @keyup.native="onSubmit"></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col type="flex" :span="16"> <el-col type="flex" :span="16">
@ -230,7 +249,7 @@
<script> <script>
import {getTraceOrderList} from "@/api/udi/udiTrace"; import {getTraceOrderList,filterCompanyName} from "@/api/udi/udiTrace";
export default { export default {
data() { data() {
@ -242,7 +261,7 @@ export default {
ggxh: null, ggxh: null,
nameCode: null, nameCode: null,
batchNo: null, batchNo: null,
companyName: "", companyName: null,
page: 1, page: 1,
limit: 10, limit: 10,
}, },
@ -252,9 +271,26 @@ export default {
open: false, open: false,
formView: {}, formView: {},
showSearch: true, showSearch: true,
companyNameList: []
} }
}, },
methods: { methods: {
geCompanyNameList(query) {
let cQuery = {
companyName: query,
page: 1,
limit: 10,
};
filterCompanyName(cQuery)
.then((response) => {
this.loading = false;
this.companyNameList = response.data.list || [];
console.log(this.companyNameList)
})
.catch(() => {
this.loading = false;
});
},
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },

Loading…
Cancel
Save