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.
udi-cpt-vue/src/views/udi/trace/searchLive/index.vue

1137 lines
42 KiB
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div>
<el-card>
<el-form v-show="showSearch" label-width="125px" size="mini">
<el-row type="flex">
<el-col :span="18">
<el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="filterQuery.udiCode" placeholder="请输入UDI码"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col type="flex" :span="8">
<el-form-item label="当前所在企业:" class="query-form-item">
<el-select
v-model="filterQuery.companyId"
filterable
remote
style="width: 100%"
clearable="true"
reserve-keyword
placeholder="请输入当前所在企业"
:remote-method="geCompanyNameList"
:loading="loading"
>
<el-option
v-for="item in companyNameList"
:key="item.id"
:label="item.companyName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="医疗器械注册人:" class="query-form-item">
<el-select
v-model="filterQuery.ylqxzcrbarmc"
filterable
remote
clearable="true"
style="width: 100%"
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 :span="8">
<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="8">
<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="8">
<el-form-item label="产品DI标识:" class="query-form-item">
<el-select
v-model="filterQuery.nameCode"
filterable
remote
style="width: 100%"
clearable="true"
:disabled="filterQuery.ggxh==null || filterQuery.ggxh=='' ||
filterQuery.cpmctymc==null || filterQuery.cpmctymc=='' ||
filterQuery.ylqxzcrbarmc==null || filterQuery.ylqxzcrbarmc==''"
reserve-keyword
placeholder="请输入产品DI标识"
:remote-method="getNameCodeList"
:loading="loading"
@change="nameCodeChange"
>
<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="8">
<el-form-item label="批次号:" class="query-form-item">
<el-input
v-model="filterQuery.batchNo"
placeholder="请输入批次号"
style="width: 100%"
clearable="true"
:disabled="filterQuery.nameCode==null || filterQuery.nameCode=='' ||
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="getList" size="mini"
>查询
</el-button
>
</el-button-group>
</div>
</el-card>
<el-divider style="margin: 15px"></el-divider>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :limit.sync="filterQuery.limit"-->
<!-- :page.sync="filterQuery.page"-->
<!-- @pagination="getList"-->
<!-- ></pagination>-->
<el-card>
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">生产信息</p>
</template>
<el-table v-loading="manuOrderLoading" :data="listOrder"
style="width: 100%"
@row-click="handleSelectionChange"
highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="上报企业" prop="companyName" width="160"></el-table-column>
<el-table-column label="生产订单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="订单日期" prop="billDate" width="140"></el-table-column>
<el-table-column label="DI标识" prop="nameCode" width="120"></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" width="160"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@click.native="handleViewManuOrder(scope.row,scope.index)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-divider style="margin: 15px"></el-divider>
<el-tabs type="border-card">
<el-tab-pane>
<span slot="label">生产信息 {{ currentRow == null ? '' : currentRow.billNo }}-UDI码关联关系</span>
<el-table v-loading="manuCodeRelLoading" :data="listCodeRel"
style="width: 100%"
highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="UDI码" prop="code" width="180"></el-table-column>
<el-table-column label="父码" prop="pcode" width="180"></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" width="160"></el-table-column>
<el-table-column label="DI标识" prop="nameCode" width="160"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="180"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="produceDate" width="180"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="180"></el-table-column>
<el-table-column label="序列号" prop="serialNo" width="120"></el-table-column>
<el-table-column label="包装层级" prop="bzcj" width="180"></el-table-column>
<el-table-column label="包装状态" prop="packState" width="180"
:formatter="formaterPackState"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@click.native="handleViewCoderel(scope.row,scope.index)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-collapse-item>
</el-collapse>
</el-card>
<el-dialog
title="生产信息-详情"
:visible.sync="openManuOrder"
class="dialog-two"
width="60%"
top="5vh"
>
<el-form :model="manuOrderFormView" :rules="formRules" ref="dataForm" label-width="100px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="生产订单号" prop="billNo">
<el-input v-model="manuOrderFormView.billNo" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="订单日期" prop="billDate">
<el-input v-model="manuOrderFormView.billDate" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品通用名称" prop="cpmctymc">
<el-input v-model="manuOrderFormView.cpmctymc" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="规格型号" prop="ggxh">
<el-input v-model="manuOrderFormView.ggxh" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品描述" prop="cpms">
<el-input v-model="manuOrderFormView.cpms" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册/备案证号" prop="zczbhhzbapzbh">
<el-input v-model="manuOrderFormView.zczbhhzbapzbh" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="DI产品标识" prop="nameCode">
<el-input v-model="manuOrderFormView.nameCode" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="国家库UUID" prop="uuid">
<el-input v-model="manuOrderFormView.uuid" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="批次号" prop="batchNo">
<el-input v-model="manuOrderFormView.batchNo" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="生产企业" prop="manufactory">
<el-input v-model="manuOrderFormView.manufactory" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="更新时间" prop="updateTime">
<el-input v-model="manuOrderFormView.updateTime" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="所属企业" prop="companyName">
<el-input v-model="manuOrderFormView.companyName" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="查询记录号" prop="recordCode">
<el-input v-model="manuOrderFormView.recordCode" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="查询人" prop="createUser">
<el-input v-model="manuOrderFormView.createUser" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="医疗器械注册人" prop="ylqxzcrbarmc">
<el-input v-model="manuOrderFormView.ylqxzcrbarmc" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="查询方式" prop="traceType">
<el-input v-model="this.formateTraceType" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="备注" prop="remark">
<el-input v-model="manuOrderFormView.remark" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="openManuOrder = false" size="small">关闭</el-button>
</div>
</el-dialog>
<el-dialog
title="生产信息关联关系-详情"
:visible.sync="openManuCodeRel"
class="dialog-two"
width="60%"
top="5vh"
>
<el-form :model="manuOrderCodeRelFormView" :rules="formRules" ref="dataForm" label-width="100px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="UDI码" prop="code">
<el-input v-model="manuOrderCodeRelFormView.code" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="父码" prop="pcode">
<el-input v-model="manuOrderCodeRelFormView.pcode" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="批次号" prop="batchNo">
<el-input v-model="manuOrderCodeRelFormView.batchNo" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="序列号" prop="serialNo">
<el-input v-model="manuOrderCodeRelFormView.serialNo" size="small"
style="width: 90%" :disabled="true"
></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="cpmctymc">
<el-input v-model="manuOrderCodeRelFormView.cpmctymc" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="规格型号" prop="ggxh">
<el-input v-model="manuOrderCodeRelFormView.ggxh" size="small" style="width: 90%" :disabled="true"
></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="produceDate">
<el-input v-model="manuOrderCodeRelFormView.produceDate" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="失效日期" prop="expireDate">
<el-input v-model="manuOrderCodeRelFormView.expireDate" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="包装状态" prop="packState">
<el-input v-model="this.formatePackState" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="包装层级" prop="bzcj">
<el-input v-model="manuOrderCodeRelFormView.bzcj" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="DI产品标识" prop="nameCode">
<el-input v-model="manuOrderCodeRelFormView.nameCode" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="openManuCodeRel = false" size="small">关闭</el-button>
</div>
</el-dialog>
<el-card>
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">出入库单据信息</p>
</template>
<el-table v-loading="loading" :data="list"
style="width: 100%"
border highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="上报企业" prop="companyName" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="单据号" prop="billNo" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="单据类型" prop="billType" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="单据日期" prop="billDate" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="发货企业" prop="fromCorp" width="220" show-overflow-tooltip></el-table-column>
<el-table-column label="收货企业" prop="toCorp" width="220" show-overflow-tooltip></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="更新时间" prop="updateTime" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@click.native="handleView(scope.row,scope.index)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</el-card>
<el-dialog
title="单据-详情"
:visible.sync="open"
class="dialog-two"
width="60%"
top="5vh"
>
<el-form :model="formView" :rules="formRules" ref="dataForm" label-width="100px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="单据号" prop="billNo">
<el-input v-model="formView.billNo" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="单据日期" prop="billDate">
<el-input v-model="formView.billDate" size="small"
style="width: 90%" :disabled="true"
></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="billType">
<el-input v-model="formView.billType" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="客户端类型" prop="clientType">
<el-input v-model="formView.clientType" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" class="el-col">
<el-form-item label="所属企业" prop="companyIdFk">
<el-input v-model="this.companyNameDetail" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="发货企业" prop="fromCorp">
<el-input v-model="formView.fromCorp" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="单据创建者" prop="createUser">
<el-input v-model="formView.createUser" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="销毁原因" prop="destoryReason">
<el-input v-model="formView.destoryReason" size="small"
style="width: 90%" :disabled="true"
></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="updateTime">
<el-input v-model="formView.updateTime" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="执行销毁人" prop="excuseUser">
<el-input v-model="formView.excuseUser" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="出入库类型" prop="inOutType">
<el-input v-model="this.formateInOutType" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="退货原因" prop="returnReason">
<el-input v-model="formView.returnReason" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="单据源头类型" prop="sourceType">
<el-input v-model="this.formateSourceType" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="监督人证件号" prop="superviserCode">
<el-input v-model="formView.superviserCode" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="监督人姓名" prop="superviserUser">
<el-input v-model="formView.superviserUser" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="收货企业" prop="toCorp">
<el-input v-model="formView.toCorp" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="上传人" prop="uploadUser">
<el-input v-model="formView.uploadUser" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="使用者信息" prop="toUserInfo">
<el-input v-model="formView.toUserInfo" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品名称" prop="cpmctymc" show-overflow-tooltip>
<el-input v-model="formView.cpmctymc" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="规格型号" prop="ggxh" show-overflow-tooltip>
<el-input v-model="formView.ggxh" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="备案号" prop="cpmctymc" show-overflow-tooltip>
<el-input v-model="formView.zczbhhzbapzbh" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="批次号" prop="ggxh" show-overflow-tooltip>
<el-input v-model="formView.batchNo" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="生产日期" prop="produceDate" show-overflow-tooltip>
<el-input v-model="formView.produceDate" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="失效日期" prop="expireDate" show-overflow-tooltip>
<el-input v-model="formView.expireDate" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip>
<el-input v-model="formView.ylqxzcrbarmc" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="序列号" prop="serialNo" show-overflow-tooltip>
<el-input v-model="formView.serialNo" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" type="flex">
<el-form-item label="当前企业统一社会信用号" prop="companyCertNum">
<el-input v-model="formView.companyCertNum" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="执行销毁人证件号" prop="excuseCode">
<el-input v-model="formView.excuseCode" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" class="el-col">
<el-form-item label="发货企业统一社会信用号" prop="fromCorpCreditNum">
<el-input v-model="formView.fromCorpCreditNum" size="small"
style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="收货企业统一社会信用号" prop="toCorpCreditNum">
<el-input v-model="formView.toCorpCreditNum" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" type="flex">
<el-form-item label="备注" prop="remark">
<el-input v-model="formView.remark" size="small" style="width: 90%" :disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="open = false" size="small"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
filterylqxzcrbarmc, filterCpmctymc, filterGgxh, filterNameCode, sourceSearch, filterCompanyName,
getTraceManuOrderList, getManuCodeRelList, getRecordResult, sceneSearch
} from "@/api/udi/udiTrace";
export default {
data() {
return {
monitorOrder: "", // 接收定时器id便于清除定时器
filterQuery: {
udiCode: null,
ylqxzcrbarmc: null,
cpmctymc: null,
ggxh: null,
nameCode: null,
batchNo: null,
companyName: null,
companyId: null,
page: 1,
limit: 10,
},
manuOrderQuery: {
recordCode: null,
page: 1,
limit: 10,
},
manuCodeRelQuery: {
manuOrderIdFk: null,
page: 1,
limit: 10,
},
total: 0,
loading: false,
manuOrderLoading: false,
manuCodeRelLoading: false,
list: [],
listOrder: [],
listCodeRel: [],
open: false,
openManuOrder: false,
openManuCodeRel: false,
formView: {},
manuOrderFormView: {},
manuOrderCodeRelFormView: {},
showSearch: true,
fromOptions: [],
cpmctymcList: [],
ggxhList: [],
nameCodeList: [],
companyNameList: [],
companyNameDetail: null,
formateInOutType: null,
formateSourceType: null,
searchIng: false,
}
},
methods: {
handleSelectionChange(val) {
this.currentRow = val;
this.getManuCodeRel();
},
getManuCodeRel() {
if (this.currentRow.id == null) {
this.$message.error("请先选择需要查询的单据!")
return;
}
this.manuCodeRelLoading = true;
this.manuCodeRelQuery.manuOrderIdFk = this.currentRow.id;
getManuCodeRelList(this.manuCodeRelQuery).then((res) => {
this.manuCodeRelLoading = false;
if (res.code === 20000) {
this.listCodeRel = res.data.list || [];
this.codeRelTotal = res.data.total || 0;
console.log(this.listCodeRel)
} else {
this.$message.error(res.message);
this.listCodeRel = [];
this.codeRelTotal = 0;
}
}).catch((error) => {
this.manuCodeRelLoading = false;
this.$message.error(error.message);
this.listCodeRel = [];
this.codeRelTotal = 0;
})
},
getManuOrderList() {
//清空校验结果表
this.listCodeRel = null;
this.loading = true;
getTraceManuOrderList(this.manuOrderQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.listOrder = res.data.list || [];
this.total = res.data.total || 0;
console.log(this.listOrder)
} else {
this.$message.error(res.message);
this.listOrder = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.listOrder = [];
this.total = 0;
})
},
getRecordResult() {
//清空校验结果表
this.listCodeRel = null;
this.loading = true;
let query = {
recordCode: this.recordCode,
}
getRecordResult(query).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.listOrder = res.data.traceManuOrderEntities || [];
this.list = res.data.traceOrderEntities || [];
this.total = res.data.total || 0;
} else {
this.$message.error(res.message);
this.listOrder = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.listOrder = [];
this.total = 0;
})
},
orderTimeOut() {
this.filterQuery.page = 1;
this.searchIng = true;
// 使用递归法定时执行定时器
this.getRecordResult()
this.monitorOrder = setTimeout(this.orderTimeOut, 10000);
},
formaterInOutType(row) {
if (row.inOutType == 1) {
this.formateInOutType = "入库"
return "入库"
} else {
this.formateInOutType = "出库"
return "出库"
}
},
formatCompanyName(row) {
this.companyNameList.find(item => {
if (item.id == row.companyIdFk) {
this.companyNameDetail = item.companyName
}
})
},
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;
});
},
nameCodeChange() {
this.filterQuery.batchNo = null
},
ggxhChange() {
this.filterQuery.nameCode = null
this.filterQuery.batchNo = null
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.filterQuery.ggxh = null
this.filterQuery.nameCode = null
this.filterQuery.batchNo = null
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.filterQuery.cpmctymc = null
this.filterQuery.ggxh = null
this.filterQuery.nameCode = null
this.filterQuery.batchNo = null
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,
};
filterylqxzcrbarmc(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
console.log(this.fromOptions)
})
.catch(() => {
this.loading = false;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
handleViewCoderel(row) {
this.listCodeRel.forEach(obj => {
if (row.id == obj.id) {
this.manuOrderCodeRelFormView = obj
}
})
console.log(this.formViewCodeRel)
this.openManuCodeRel = true
},
handleViewManuOrder(row) {
this.listOrder.forEach(obj => {
if (row.id == obj.id) {
this.manuOrderFormView = obj
}
})
console.log(this.formView)
this.openManuOrder = true
},
handleView(row) {
this.list.forEach(obj => {
if (row.id == obj.id) {
this.formView = obj
}
})
console.log(this.formView)
this.open = true
},
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
udiCode: null,
ylqxzcrbarmc: null,
cpmctymc: null,
ggxh: null,
nameCode: null,
batchNo: null,
companyName: "",
page: 1,
limit: 10,
};
this.list = "";
this.listOrder = null;
this.listCodeRel = null;
clearTimeout(this.monitorOrder);
this.monitorOrder = "";
this.searchIng = false;
},
getList() {
this.loading = true;
sceneSearch(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.recordCode = res.data;
this.orderTimeOut();
} else {
this.$message.error(res.message);
this.list = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.list = [];
this.total = 0;
})
},
},
created() {
this.geCompanyNameList();
},
beforeDestroy() {
if (this.monitorOrder) {
clearTimeout(this.monitorOrder)
}
}
}
</script>
<style scoped>
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
.query-form-item {
display: block !important;
margin-bottom: 5px;
}
</style>