feat: 新增入院药品

dev_unify
chenhc 1 year ago
parent 249a6e83f4
commit 1aaf32b96c

@ -0,0 +1,674 @@
<template>
<div>
<el-card>
<div style="
float: left;
text-align: left;
font-weight: bold;
margin-bottom: 8px;
">
<span>产品标识:</span>
</div>
<el-table :data="detailList" style="width: 100%" border key="3" highlight-current-row @current-change="handleDetail">
<el-table-column label="产品最小销售标识" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
<el-table-column label="包装单位" prop="packUnit" show-overflow-tooltip></el-table-column>
</el-table>
</el-card>
<el-card>
<el-form :model="editQuery" :rules="rules" ref="editQuery" label-width="150px" style="margin-top: 20px">
<el-row v-if="editQuery.isAudit!=null && editQuery.isAudit==2" type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px">
<el-button type="primary" @click="checkPass(2)"></el-button>
<el-button type="primary" @click="checkPass(3)"></el-button>
</el-button-group>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="审核意见:">
<el-input style="width: 65%" size="small" :disabled="editQuery.isAudit!=2" splaceholder="请输入审核意见"
v-model="remark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="商品条码:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="医保编码:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容" v-model="editQuery.ybbm"
@input="change($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.measname"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="生产企业:">
<el-input style="width: 65%" size="small" :disabled="true" v-model="editQuery.manufactory"
splaceholder="请输入内容" @input="change($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商品名称:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.spmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品描述:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.cpms"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品价格:">
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容" type="number" step="0.01"
v-model="editQuery.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采购类型">
<el-select
v-model="editQuery.purType"
placeholder="请选择"
clearable
:disabled="true"
style="width: 65%"
>
<el-option label="普通入账产品" :value="1"></el-option>
<el-option label="预验收产品" :value="2"></el-option>
<el-option label="寄售产品" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品属性">
<el-select
v-model="editQuery.attributeType"
placeholder="请选择"
clearable
:disabled="true"
style="width: 65%"
>
<el-option label="设备" :value="1"></el-option>
<el-option label="耗材" :value="2"></el-option>
<el-option label="伴随服务费" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="耗材类别">
<el-select
v-model="editQuery.hcType"
placeholder="请选择"
clearable
:disabled="true"
style="width: 65%"
>
<el-option label="高值耗材" :value="1"></el-option>
<el-option label="普通耗材" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak1"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak2"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable3">
<el-form-item :label="productRemarkSet.remarkTitle3 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak3"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable4">
<el-form-item :label="productRemarkSet.remarkTitle4 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak4"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable5">
<el-form-item :label="productRemarkSet.remarkTitle5 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak5"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable6">
<el-form-item :label="productRemarkSet.remarkTitle6 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak6"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable7">
<el-form-item :label="productRemarkSet.remarkTitle7 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak7"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable8">
<el-form-item :label="productRemarkSet.remarkTitle8">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.basicPrductRemak8"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">产品标识基本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品标识:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.nameCode"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>最小包装单元内包含使用单元数量:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.zxxsbzbhsydysl"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级产品编码:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.bhxjcpbm"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含最小销售包装数量:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.bhzxxsbzsl"></el-input>
</div>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="2">
<template slot="title">
<p class="form-title">产品基本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>物资名称:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.cpmctymc"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>规格型号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.ggxh"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品类别:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.cplb"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>分类编码:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.flbm"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医疗器械注册人:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="ylqxzcrbarmc"
v-model="editQuery.ylqxzcrbarmc"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册人英文名称:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.ylqxzcrbarywmc"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>器械类别:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.qxlb"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>生产企业:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.manufactory"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.sptm"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.ybbm"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>一级分类名称:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.catalogname1"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>二级分类名称:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.catalogname2"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>三级分类名称:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" :disabled="true" splaceholder="请输入内容"
v-model="editQuery.catalogname3"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>耗材材质:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.matrial"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>统一社会信用号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.tyshxydm"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册证/备案号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.zczbhhzbapzbh"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品描述:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="!checked" size="small" splaceholder="请输入内容"
v-model="editQuery.cpms"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品货号或编号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="!checked" size="small" splaceholder="请输入内容"
v-model="editQuery.cphhhbh"></el-input>
</div>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="3">
<template slot="title">
<p class="form-title">生产标识基本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含批号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.scbssfbhph"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含序列号:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" v-model="editQuery.scbssfbhxlh"
splaceholder="请输入内容"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含生产日期:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.scbssfbhscrq"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含失效日期:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" v-model="editQuery.scbssfbhsxrq" size="small"
splaceholder="请输入内容"></el-input>
</div>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="4">
<template slot="title">
<p class="form-title">包装标识信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>上级产品编码:&nbsp;</span>
</div>
<el-input style="width: 65%" :disabled="true" size="small" splaceholder="请输入内容"
v-model="editQuery.sjcpbm"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装级别:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.packLevel"></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装级别:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.bzcj"
:disabled="true"></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级包装数量:&nbsp;</span>
</div>
<el-input style="width: 65%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="editQuery.bhxjsl"></el-input>
</div>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</el-card>
</div>
</template>
<script>
import {updateDiProduct} from '@/api/supplier/supProductsAddDi'
import {finProductSet} from '@/api/param/systemParamConfig'
import {selectOriginuuid} from '@/api/basic/product/udiInfo'
export default {
name: "SelectDIDetailDialog",
props: {
editQuery: {
type: Object,
required: true,
},
close: {
type: Function,
required: true,
},
editDate: {
type: Object,
required: true,
},
remark: {
type: Object,
required: true,
}
},
data() {
return {
activeNames: ['1'],
remark: "",
detailList: [],
pQuery: {},
productRemarkSet: {}
}
},
methods: {
handleDetail(row) {
this.editQuery = {...this.pQuery,...row};
},
checkPass(val) {
let query = {
id: this.editDate.id,
status: val,
uuid: this.editDate.uuid,
customerId: this.editDate.customerId,
remark: this.remark
}
updateDiProduct(query).then((res) => {
if (res.code === 20000) {
this.close();
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.$message.error(error.message)
})
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data
} else {
//
}
})
},
getDetailList(detailQuery) {
selectOriginuuid(detailQuery)
.then((response) => {
this.detailList = response.data || [];
this.editQuery = { ...this.pQuery,...this.detailList[0]};
})
.catch(() => {
this.detailList = [];
});
},
},
created() {
this.findBasicProductSet()
//
let ttquery = {
originUuid: this.editQuery.uuid,
};
this.pQuery = this.editQuery
this.getDetailList(ttquery);
},
};
</script>
<style scoped>
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
.itemTag {
float: left;
text-align: right;
margin-top: 5px;
padding-right: 10px;
width: 35%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.edit-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 0px;
}
/* .el-col {
border-radius: 4px;
flex-wrap: wrap;
} */
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
</style>

@ -0,0 +1,892 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="unionQuery" size="mini" label-width="130px" v-show="showSearch">
<el-row>
<el-col :span="12">
<el-form-item label="UDI码:">
<el-input v-model="unionQuery.udiCode" style="width: 90%" placeholder="请扫描或输入UDI码"
clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="DI:">
<el-input v-model="unionQuery.nameCode" style="width: 90%" clearable="true" size="mini"
placeholder="请输入完整DI"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input
v-model="unionQuery.ggxh" clearable="true"
style="width: 90%"
:disabled="(unionQuery.cpmctymc=='' && unionQuery.nameCode=='' && (unionQuery.ylqxzcrbarmc==null || unionQuery.ylqxzcrbarmc==''))"
placeholder="规格型号"
size="mini"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册证:">
<el-input
v-model="unionQuery.zczbhhzbapzbh" clearable="true"
style="width: 90%"
:disabled="(unionQuery.cpmctymc=='' && unionQuery.nameCode=='' && (unionQuery.ylqxzcrbarmc==null || unionQuery.ylqxzcrbarmc==''))"
placeholder="注册证/备案号"
size="mini"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="医疗器械注册人:">
<el-select
v-model="unionQuery.ylqxzcrbarmc"
filterable
style="width: 90%"
remote
clearable="true"
reserve-keyword
placeholder="医疗器械注册人"
:remote-method="findMethod"
:loading="loading"
@clear="clearAll"
>
<el-option
v-for="item in fromOptions"
:key="item.ylqxzcrbarmc"
:label="item.ylqxzcrbarmc"
:value="item.ylqxzcrbarmc"
>
<span style="float: left">{{ item.ylqxzcrbarmc }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="器械通用名称:">
<el-input
:disabled="unionQuery.ylqxzcrbarmc==null || unionQuery.ylqxzcrbarmc==''"
style="width: 90%"
v-model="unionQuery.cpmctymc" clearable="true"
size="mini"
placeholder="器械通用名称"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<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="searchList" size="mini">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="getSuperSeaech" size="mini">国家同步库查询</el-button>
<el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="checkCombine"
:loading="combineLoading">选入
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table :data="udidlList" style="width: 100%" v-loading="loading" border highlight-current-row="true"
:row-class-name="tableRowClassName" @current-change="handleErpChange" ref="diList">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册证编号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="diDetail(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="unionQuery.limit"
:page.sync="unionQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-card class="el-card">
<el-form :model="editQuery" ref="editQuery" border label-width="100px">
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <H3 style="margin-left: 10px;margin-bottom: 15px">产品信息补齐</H3>-->
<!-- </el-row>-->
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <el-col :span="18" class="el-col">-->
<!-- <el-form-item label="产品编码预上传至第三方系统:" label-width="220px">-->
<!-- <el-checkbox-group v-model="editQuery.selectThirdSys">-->
<!-- <el-checkbox-->
<!-- v-for="item in thirdSys"-->
<!-- :key="item.thirdId"-->
<!-- :label="item.thirdId"-->
<!-- >{{ item.thirdName }}-->
<!-- </el-checkbox-->
<!-- >-->
<!-- </el-checkbox-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-divider>
</el-divider>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="商品条码:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医保编码:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.ybbm"
@input="change($event)"
v-debounce-input:500ms="getYbHcData"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="一级分类名称:">
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.catalogname1"
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="二级分类名称:">
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.catalogname2"
disabled
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="三级分类名称:">
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.catalogname3"
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="耗材材质:">
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.matrial"
disabled
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.measname"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="生产企业:">
<el-input style="width: 65%" size="small" v-model="editQuery.manufactory" splaceholder="请输入内容"
@input="change($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="商品名称:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.spmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品描述:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" v-model="editQuery.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="产品价格:">
<el-input style="width: 65%" size="small" splaceholder="请输入内容" type="number" step="0.01"
v-model="editQuery.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="采购类型">
<el-select
v-model="editQuery.purType"
placeholder="请选择"
clearable
style="width: 65%"
>
<el-option label="普通入账产品" :value="1"></el-option>
<el-option label="预验收产品" :value="2"></el-option>
<el-option label="寄售产品" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品属性">
<el-select
v-model="editQuery.attributeType"
placeholder="请选择"
clearable
style="width: 65%"
>
<el-option label="设备" :value="1"></el-option>
<el-option label="耗材" :value="2"></el-option>
<el-option label="伴随服务费" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="耗材类别">
<el-select
v-model="editQuery.hcType"
placeholder="请选择"
clearable
style="width: 65%"
>
<el-option label="高值耗材" :value="1"></el-option>
<el-option label="普通耗材" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否可集采:"
prop="groupBuy"
class="query-form-item"
>
<el-radio-group v-model="editQuery.groupBuy">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否组套:"
prop="isStack"
class="query-form-item"
>
<el-radio-group v-model="editQuery.isStack">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容"
v-model="editQuery.basicPrductRemak1"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容"
v-model="editQuery.basicPrductRemak2"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable3">
<el-form-item :label="productRemarkSet.remarkTitle3 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容"
v-model="editQuery.basicPrductRemak3"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable4">
<el-form-item :label="productRemarkSet.remarkTitle4 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容"
v-model="editQuery.basicPrductRemak4"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable5">
<el-form-item :label="productRemarkSet.remarkTitle5 ">
<el-input style="width: 65%" size="small" splaceholder="请输入内容"
v-model="editQuery.basicPrductRemak5"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable6">
<el-form-item :label="productRemarkSet.remarkTitle6">
<el-select
v-model="editQuery.basicPrductRemak6"
placeholder="请选择"
clearable
style="width: 65%"
>
<el-option label="扣费" value="1"></el-option>
<el-option label="不扣费" value="0"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable7">
<el-form-item :label="productRemarkSet.remarkTitle7 ">
<el-select
v-model="editQuery.basicPrductRemak7"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择物资类别"
:remote-method="findThrTypeMethod"
style="width: 65%"
>
<el-option
v-for="item in thrTypeOptions"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col"
v-if="productRemarkSet.remarkEnable8==true && editQuery.basicPrductRemak6=='1'">
<el-form-item :label="productRemarkSet.remarkTitle8">
<el-select
v-model="editQuery.basicPrductRemak8"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择物价类别"
:remote-method="findHsflMethod"
:loading="loading"
style="width: 65%"
>
<el-option
v-for="item in hsflOptions"
:key="item.hsbm"
:label="item.hsmc"
:value="item.hsbm"
>
<span style="float: left">{{ item.hsmc }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.hsbm }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-dialog
title="器械信息详情"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="selectDialog"
width="65%"
append-to-body
v-if="selectDialog"
>
<selectDiDetail :editQuery="diDetails"
></selectDiDetail>
</el-dialog>
</div>
</template>
<script>
import {getYbHcflDetail} from '@/api/basic/product/udiRelevance'
import {getUdiInfos, filterCompany, superSearch} from '../../../api/basic/udiInfo'
import {combineUdi} from '../../../api/basic/udiRelevance'
import {addDiProduct} from '@/api/supplier/supProductsAddDi'
import selectDiDetail from './selectDIDetailDialog'
import store from '@/store'
import {getBasicThirdSys} from '@/api/basic/basicThirdSys'
import {finProductSet} from '@/api/param/systemParamConfig'
import {getHslbs, getThrProductType} from "@/api/thrsys/thrHsfl";
export default {
name: 'closeDialog',
props: {
closeDialog: {
type: Function,
required: true
},
relId: {
type: Number,
required: true
},
isImport: {
type: Object,
required: true
},
data: {
type: Object,
required: true
},
thirdId: {
type: Object,
required: true
},
idSpliUdi: {
type: Object,
required: true
}
},
data() {
return {
ybHcflDetail: {},
showSearch: true,
unionQuery: {
page: 1,
limit: 10,
udiCode: null,
nameCode: '',
cpmctymc: '',
ylqxzcrbarmc: null,
ggxh: '',
zczbhhzbapzbh: '',
isCheck: 1
},
combineLoading: false,
combineQuery: {
idSpliUdi: false,
thirdId: '',
relId: '',
erpName: '',
thirdName: null,
keys: []
},
checked: true,
udidlList: [],
erpList: [],
pageTotal: 1,
total: 0,
currentRow: null,
fromOptions: [],
loading: false,
erpLloading: false,
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
editQuery: {
selectThirdSys: [],
spmc: null,
cpms: null,
measname: null,
sptm: null,
uuids: null,
devKeys: [],
customerId: store.getters.customerId,
catalogcode: null,
catalogname1: null,
catalogname2: null,
catalogname3: null,
matrial: null,
},
thirdSys: [],
curSelectDi: null,
selectThirdSys: [],
productRemarkSet: {},
hsflOptions: [],
thrTypeOptions: [],
}
},
methods: {
getYbHcData() {
if (this.editQuery.ybbm == null || this.editQuery.ybbm == '') return;
let query = {
specificationCode: this.editQuery.ybbm
};
getYbHcflDetail(query).then((response) => {
if (response.code == 20000) {
this.ybHcflDetail = response.data
this.editQuery.catalogcode = this.ybHcflDetail.catalogcode
this.editQuery.catalogname1 = this.ybHcflDetail.catalogname1
this.editQuery.catalogname2 = this.ybHcflDetail.catalogname2
this.editQuery.catalogname3 = this.ybHcflDetail.catalogname3
this.editQuery.matrial = this.ybHcflDetail.matrial
this.$forceUpdate();
} else {
this.editQuery.catalogcode = ""
this.editQuery.catalogname1 = ""
this.editQuery.catalogname2 = ""
this.editQuery.catalogname3 = ""
this.editQuery.matrial = ""
this.$forceUpdate();
}
}).catch(() => {
})
},
onClose() {
this.$emit("onClose")
},
change(e) {
this.$forceUpdate(e);
},
onReset() {
this.unionQuery = {
page: 1,
limit: 10,
udiCode: null,
nameCode: '',
cpmctymc: '',
ylqxzcrbarmc: null,
ggxh: '',
zczbhhzbapzbh: '',
isCheck: 1
}
this.udidlList = [];
// this.getList();
},
clearAll() {
this.unionQuery.cpmctymc = null;
this.unionQuery.ggxh = null;
this.unionQuery.zczbhhzbapzbh = null;
},
searchList() {
this.unionQuery.page = 1
this.getList()
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
if (
this.unionQuery.udiCode == '' &&
this.unionQuery.nameCode == '' &&
this.unionQuery.cpmctymc == '' &&
this.unionQuery.ylqxzcrbarmc == '' &&
this.unionQuery.ggxh == '' &&
this.unionQuery.zczbhhzbapzbh == ''
) {
this.$message.warning('请输入查询条件')
return
}
this.loading = true
getUdiInfos(this.unionQuery)
.then((response) => {
this.loading = false
if (response.code == 20000) {
this.udidlList = response.data.list || []
this.total = response.data.total || 0
} else {
this.$message.error(response.message)
}
})
.catch(() => {
this.loading = false
this.udidlList = []
this.total = 0
})
},
getSuperSeaech() {
this.$confirm('此操作将访问国家库查询DI数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
if (this.unionQuery.nameCode == '') {
this.$message.warning('请输入完成DI信息进行查询')
return
}
this.loading = true
superSearch(this.unionQuery)
.then((response) => {
this.loading = false
if (response.code == 20000) {
this.udidlList = response.data.list || []
this.total = response.data.total || 0
} else {
this.$message.error(response.message)
}
})
.catch(() => {
this.loading = false
this.udidlList = []
this.total = 0
})
})
.catch(() => {
})
},
keyup_submit(event) {
this.unionQuery.page = 1
this.getList()
event.target.select()
},
checkSelectable(row) {
return !row.check
},
diDetail(row) {
this.diDetails = row
this.selectDialog = true
},
handleCurrentChange(val) {
this.unionQuery.page = val.page
this.getList()
},
tableRowClassName({row, rowIndex}) {
if (row.check) return 'warning-row'
return ''
},
handleErpChange(val) {
this.editQuery = {
selectThirdSys: [],
spmc: null,
cpms: null,
measname: null,
sptm: null,
uuids: null,
devKeys: [],
customerId: store.getters.customerId,
catalogcode: null,
catalogname1: null,
catalogname2: null,
catalogname3: null,
matrial: null,
}
this.currentRow = val
this.curSelectDi = val
this.multipleUdiSelection.push(val)
this.editQuery.sptm = this.currentRow.sptm;
this.editQuery.ybbm = this.currentRow.ybbm;
this.editQuery.measname = this.currentRow.measname;
this.editQuery.manufactory = this.currentRow.ylqxzcrbarmc;
this.editQuery.spmc = this.currentRow.cpmctymc;
this.editQuery.cpms = this.currentRow.cpms;
//
this.getYbHcData()
},
intentBack() {
this.closeDialog()
},
checkCombine() {
if (this.multipleUdiSelection.length === 0) {
this.$message.warning('请选择需要添加的产品数据')
return
}
let uuids = []
uuids.push(this.curSelectDi.uuid)
let devKeys = []
devKeys.push(this.curSelectDi.deviceRecordKey)
this.editQuery.uuids = uuids
this.editQuery.devKeys = devKeys
this.editQuery.sourceType = 0
addDiProduct(this.editQuery).then((res) => {
if (res.code === 20000) {
this.$message.success('添加成功')
this.$emit('closeUdi', true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
})
},
combine() {
if (this.idSpliUdi) {
this.combineQuery.idSpliUdi = true
this.combineQuery.thirdId = this.thirdId
this.combineQuery.erpName = this.data.thirdName
}
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false
if (response.code == 20000) {
this.$emit('closeUdi', true)
} else {
this.$message.error(response.message)
this.$emit('closeUdi', false)
}
})
.catch(() => {
this.combineLoading = false
this.$emit('closeUdi', false)
})
},
findMethod(query) {
let cQuery = {
ylqxzcrbarmc: query,
page: 1,
limit: 10
}
filterCompany(cQuery)
.then((response) => {
this.loading = false
this.fromOptions = response.data || []
})
.catch(() => {
this.loading = false
this.fromOptions = []
})
},
getBasicThirdSys() {
let query = {
enabled: true
}
getBasicThirdSys(query)
.then((response) => {
if (response.code == 20000) {
this.thirdSys = response.data.list || []
if (this.thirdSys.length > 0) {
this.editQuery.thirdSysFk = this.thirdSys[0].thirdId
}
}
})
.catch(() => {
this.loading = false
this.list = []
})
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data
} else {
//
}
})
},
findHsflMethod(query) {
this.hsflOptions = [];
let cQuery = {
key: query,
page: 1,
limit: 20
};
getHslbs(cQuery)
.then((response) => {
this.loading = false;
this.hsflOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
findThrTypeMethod(query) {
this.thrTypeOptions = [];
let cQuery = {
key: query,
page: 1,
limit: 20
};
getThrProductType(cQuery)
.then((response) => {
this.loading = false;
this.thrTypeOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
},
created() {
this.getBasicThirdSys()
this.findBasicProductSet()
},
components: {
selectDiDetail
},
directives: {
'debounce-input': {
inserted(el, binding) {
let timeout
el.addEventListener('input', () => {
clearTimeout(timeout)
timeout = setTimeout(() => {
binding.value()
}, parseInt(binding.arg) || 300)
})
}
}
}
}
</script>
<style scoped>
.checkitemTag {
float: left;
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;*/
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 6px;
}
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>

@ -0,0 +1,586 @@
<template>
<div>
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px"
v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资编码:">-->
<!-- <el-input v-model="filterQuery.code" placeholder="请输入产品编码/商品条码/医保编码" clearable-->
<!-- style="width: 90%" @keyup.enter.native="keyupErp_submit($event)"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input v-model="filterQuery.name" style="width: 90%" clearable placeholder="请输入物资名称"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input v-model="filterQuery.spec" style="width: 90%" clearable placeholder="请输入规格型号"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="审核状态:">-->
<!-- <el-select v-model="filterQuery.checkStatus" style="width: 90%" placeholder="请选择审核状态">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="已审核" value="2"></el-option>-->
<!-- <el-option label="未审核" value="1"></el-option>-->
<!-- <el-option label="未通过" value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="供应商:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.customerId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- style="width: 90%"-->
<!-- placeholder="请选择供应商"-->
<!-- :remote-method="findCompany"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in companyNames"-->
<!-- :key="item.companyName"-->
<!-- :label="item.companyName"-->
<!-- :value="item.customerId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.companyName }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<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="search"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<!-- <el-table-column label="产品标识" prop="code" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="物资名称" prop="name" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="产品描述" prop="cpms" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="standard" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="注册证编号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="供应商" prop="companyName" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="审核状态" prop="status" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ checkMap[scope.row.status] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="审核意见" prop="remark" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click.native.stop="detailDialog(scope.row,1)">详情</el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
<!-- :disabled="scope.row.status==2">删除-->
<!-- </el-button>-->
<!-- <el-button type="text" size="small" :disabled="scope.row.status==2" @click="detailDialog(scope.row,2)">-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:title=title
:visible.sync="thrProductsDiDetailVisible"
width="60%"
v-if="thrProductsDiDetailVisible"
>
<selectDiDetail
:editQuery="thisData"
:editDate="editDate"
:remark="editDate.remark"
:close="close"
>
</selectDiDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:title=title
:visible.sync="thrProductsDetailVisible"
width="80%"
v-if="thrProductsDetailVisible"
>
<thrProductsDetail
:data="thisDetail"
:close="close"
></thrProductsDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="审核"
:visible.sync="checkVisible"
width="45%"
v-if="checkVisible"
>
<el-form>
<el-form-item>
审核意见
<el-input type="text" v-model="remark" style="width: 50%" placeholder="请输入审核意见"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="checkVisible = false">取消</el-button>
<el-button type="primary" @click="checkPass(2)"></el-button>
<el-button type="primary" @click="checkPass(3)"></el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {
getThrDiProducts,
delThrDiProducts,
getDiProductDetail,
updateDiProduct, gupdateDiProductDetail
} from '@/api/supplier/supProductsAddDi'
import selectDiDetail from '@/views/supplier/products/selectDIDetailDialog'
import ThrProductsAdd from '@/views/supplier/products/supProductsAdd'
import {filterCustomers, filterCustomersOptimize} from '@/api/auth/customer'
import thrProductsDetail from '@/views/supplier/products/supProductsDetail'
import {
getHead, executeFuc
} from "@/utils/customConfig";
export default {
data() {
return {
showSearch: true,
filterQuery: {
code: null,
name: '',
spec: null,
registerNo: null,
manufactory: null,
companyName: null,
supId: null,
page: 1,
limit: 20
},
total: 0,
list: [],
title: null,
editDate: null,
thisDetail: null,
uploadFileUrl: null,
fileList: [],
checkVisible: false,
newType: 1,
tableHeader: [],
queryList: [],
fromList: [],
options: {
findCompany: [],
findMethod: [],
},
thrProductsDetailVisible: false,
thrProductsDiDetailVisible: false,
thisData: null,
loading: false,
checkMap: {
1: '未审核',
2: '已审核',
3: '未通过'
},
companyNames: [],
curRow: null,
remark: null
}
},
methods: {
onReset() {
this.$router.push({
path: ''
})
this.filterQuery = {
code: null,
spec: null,
registerNo: null,
manufactory: null,
name: '',
companyName: null,
page: 1,
limit: 20
}
this.getList()
},
hideSearch() {
this.showSearch = !this.showSearch;
},
checDialog(row) {
this.checkVisible = true
this.remark = ''
this.curRow = row
},
close() {
this.thrProductsDiDetailVisible = false;
this.thrProductsDetailVisible = false;
this.getList();
},
search() {
this.filterQuery.page = 1
this.getList()
},
acts() {
gupdateDiProductDetail().then((res) => {
if (res.code === 20000) {
} else {
this.$message.error('参数错误')
}
})
},
getList() {
this.loading = true
getThrDiProducts(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || []
this.total = response.data.total || 0
} else {
this.$message.error(response.message)
}
this.loading = false
})
.catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
deleteDialog(_this, row) {
_this.$confirm('此操作将永久删除该产品信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let dQuery = {
id: row.id
}
delThrDiProducts(dQuery)
.then((response) => {
_this.loading = false
if (response.code == 20000) {
_this.$message.success('删除成功')
_this.getList()
} else {
_this.$message.success(response.message)
}
})
.catch(() => {
_this.loading = false
})
})
.catch(() => {
})
},
detailDialog(_this, row) {
_this.title = "产品信息详情"
if (row.type == 1) {
let query = {devKey: row.deviceRecordKey}
getDiProductDetail(query).then((res) => {
if (res.code === 20000) {
_this.thisData = res.data
_this.editDate = row
_this.thisData.isAudit = 1
_this.thrProductsDiDetailVisible = true
} else {
_this.$message.error('参数错误')
}
})
} else {
_this.thisDetail = row;
_this.thisDetail.isAudit = 1
_this.thrProductsDetailVisible = true;
}
},
auditDialog(_this, row) {
_this.title = "物资入院审核"
if (row.type == 1) {
let query = {devKey: row.deviceRecordKey}
getDiProductDetail(query).then((res) => {
if (res.code === 20000) {
_this.thisData = res.data
_this.editDate = row
_this.thisData.isAudit = 2
_this.thrProductsDiDetailVisible = true
} else {
_this.$message.error('参数错误')
}
})
} else {
_this.thisDetail = row;
_this.thisDetail.isAudit = 2
_this.thrProductsDetailVisible = true;
}
},
handleCurrentChange(val) {
this.filterQuery.page = val.page
this.getList()
},
closeAddDialog() {
this.addProductVisible = false
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null)
},
checkPass(val) {
let query = {
id: this.curRow.id,
status: val,
uuid: this.curRow.uuid,
customerId: this.curRow.customerId,
remark: this.remark
}
updateDiProduct(query).then((res) => {
if (res.code === 20000) {
this.getList()
this.checkVisible = false
this.$message.success('操作成功')
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.$message.error(error.message)
})
},
findCompany(_this, query) {
_this.companyNames = []
let cQuery = {
key: query
}
filterCustomersOptimize(cQuery).then((res) => {
_this.options.findCompany = res.data.list || []
}).catch((error) => {
_this.options.findCompany = []
})
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
}
},
components: {
ThrProductsAdd, selectDiDetail, thrProductsDetail
},
mounted() {
},
created() {
getHead("supDiProductsCheck", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList()
});
}
}
</script>

@ -0,0 +1,575 @@
<template>
<el-card class="el-card">
<el-form :model="newProductData" size="mini" label-width="150px" :rules="rules">
<div style="margin-bottom: 20px">
<!-- <el-row>-->
<!-- <el-col :span="12" class="el-col">-->
<!-- <el-form-item label="第三方系统:">-->
<!-- <el-select-->
<!-- style="width: 90%"-->
<!-- v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in thirdSys"-->
<!-- :key="item.value"-->
<!-- :label="item.thirdName"-->
<!-- :value="item.thirdId">-->
<!-- <span style="float: left">{{ item.thirdName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{-->
<!-- item.thirdId-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<!-- <el-col :span="12" class="el-col">-->
<!-- <el-form-item label="产品编码:">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入内容"-->
<!-- v-model.trim="newProductData.code"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12" class="el-col">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="规格型号:" prop="spec">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.measname"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.manufactory"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册证号:" prop="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.registerNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品类别:" prop="cplb">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.flbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.ybbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="统一社会信用号:" prop="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="器械类别:" prop="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.qxlb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品价格:" prop="price">
<el-input style="width: 90%" size="small" placeholder="请输入内容"
v-model.trim="newProductData.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采购类型" prop="purType">
<el-select
v-model="newProductData.purType"
placeholder="请选择"
clearable
style="width: 90%"
>
<el-option label="普通入账产品" :value="1"></el-option>
<el-option label="预验收产品" :value="2"></el-option>
<el-option label="寄售产品" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品属性" prop="attributeType">
<el-select
v-model="newProductData.attributeType"
placeholder="请选择"
clearable
style="width: 90%"
>
<el-option label="设备" :value="1"></el-option>
<el-option label="耗材" :value="2"></el-option>
<el-option label="伴随服务费" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="耗材类别" prop="hcType">
<el-select
v-model="newProductData.hcType"
placeholder="请选择"
clearable
style="width: 90%"
>
<el-option label="高值耗材" :value="1"></el-option>
<el-option label="普通耗材" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否组套" prop="isStack">
<el-select
v-model="newProductData.isStack"
placeholder="请选择"
clearable
style="width: 90%"
>
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1+':'" prop="basicPrductRemak1">
<el-input
style="width: 90%"
size="small"
splaceholder="请输入内容"
v-model="newProductData.basicPrductRemak1"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2+':'" prop="basicPrductRemak2">
<el-input
style="width: 90%"
size="small"
splaceholder="请输入内容"
v-model="newProductData.basicPrductRemak2"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable3">
<el-form-item :label="productRemarkSet.remarkTitle3+':'" prop="basicPrductRemak3">
<el-input
style="width: 90%"
size="small"
splaceholder="请输入内容"
v-model="newProductData.basicPrductRemak3"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable4">
<el-form-item :label="productRemarkSet.remarkTitle4+':'" prop="basicPrductRemak4">
<el-input
style="width: 90%"
size="small"
splaceholder="请输入内容"
v-model="newProductData.basicPrductRemak4"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable5">
<el-form-item :label="productRemarkSet.remarkTitle5+':'" prop="basicPrductRemak5">
<el-input
style="width: 90%"
size="small"
splaceholder="请输入内容"
v-model="newProductData.basicPrductRemak5"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable6">
<el-form-item :label="productRemarkSet.remarkTitle6+':'" prop="basicPrductRemak6">
<el-select
v-model="newProductData.basicPrductRemak6"
placeholder="请选择"
clearable
style="width: 90%"
>
<el-option label="扣费" value="1"></el-option>
<el-option label="不扣费" value="0"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable7">
<el-form-item :label="productRemarkSet.remarkTitle7+':'" prop="basicPrductRemak7">
<el-select
v-model="newProductData.basicPrductRemak7"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择物资类别"
:remote-method="findThrTypeMethod"
style="width: 90%"
>
<el-option
v-for="item in thrTypeOptions"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable8">
<el-form-item :label="productRemarkSet.remarkTitle8+':'" prop="basicPrductRemak8">
<el-select
v-model="newProductData.basicPrductRemak8"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择物价类别"
:remote-method="findHsflMethod"
style="width: 90%"
>
<el-option
v-for="item in hsflOptions"
:key="item.hsbm"
:label="item.hsmc"
:value="item.hsbm"
>
<span style="float: left">{{ item.hsmc }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.hsbm }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23" class="el-col" style="margin-top: 12px">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 100%" type="textarea" size="mini" rows="4" placeholder="请输入内容"
v-model.trim="newProductData.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</el-card>
</template>
<script>
import {saveNewProduct} from "@/api/thrsys/thrProducts";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import {addProduct, addThrAddProductsNew} from "@/api/thrsys/thrProductsAdd";
import {getHslbs, getThrProductType} from "@/api/thrsys/thrHsfl";
import {finProductSet} from "@/api/param/systemParamConfig";
export default {
name: "ThrProductsAdd",
props: {
newType: {
type: Object,
required: true,
},
closeAddDialog: {
type: Function,
required: true,
},
},
data() {
return {
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cplx: null,
cpms: null,
thirdSysFk: null,
purType: null,
attributeType: null,
basicPrductRemak6: null,
basicPrductRemak8: null,
basicPrductRemak7: null,
price: null,
},
thirdSys: [],
hsflOptions: [],
thrTypeOptions: [],
productRemarkSet: {
remarkTitle1: "备注字段1",
remarkTitle2: "备注字段2",
remarkTitle3: "备注字段3",
remarkTitle4: "备注字段4",
remarkTitle5: "备注字段5",
remarkTitle6: "备注字段6",
remarkTitle7: "备注字段7",
remarkTitle8: "备注字段8",
},
rules: {
name: [{required: true, message: "请输入产品名称", trigger: 'blur'}],
spec: [
{
required: true,
message: "请输入规格型号",
trigger: "blur"
}
],
measname: [
{
required: true,
message: "请输入计量单位",
trigger: "blur"
}
],
manufactory: [
{
required: true,
message: "请输入生产企业",
trigger: "blur"
}
],
registerNo: [
{
required: true,
message: "请输入注册证号",
trigger: "blur"
}
],
ybbm: [
{
required: true,
message: "请输入医保编码",
trigger: "blur"
}
],
price: [
{
required: true,
message: "请输入产品价格",
trigger: "blur"
}
],
purType: [
{
required: true,
message: "请选择采购类型",
trigger: "change"
}
],
attributeType: [
{
required: true,
message: "请选择产品属性",
trigger: "change"
}
],
basicPrductRemak6: [
{
required: true,
message: "请选择是否收费",
trigger: "change"
}
],
basicPrductRemak7: [
{
required: true,
message: "请选择物资类别",
trigger: "change"
}
],
// basicPrductRemak8: [
// {
// required: this.newProductData!=null && this.newProductData.basicPrductRemak6 != null,
// message: "",
// trigger: "change"
// }
// ]
}
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false;
// if (this.$isBlank(this.newProductData.thirdSysFk)) {
// this.$message.warning("");
// return;
// }
// if (this.$isBlank(this.newProductData.code)) {
// this.$message.warning("");
// return;
// }
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning("产品名称不能为空!");
return;
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning("规格型号不能为空");
return;
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning("计量单位不能为空!");
return;
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning("生产企业不能为空!");
return;
}
// if (this.$isBlank(this.newProductData.registerNo)) {
// this.$message.warning("");
// return;
// }
this.newProductData.sourceType = 1
if (this.newType == 1) {
saveNewProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
this.$emit("closeAddDialog", true);
this.closeAddDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
})
} else if (this.newType == 2) {
// addProduct(this.newProductData).then((res) => {
addThrAddProductsNew(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
this.closeAddDialog(true);
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
})
}
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
findHsflMethod(query) {
this.hsflOptions = [];
let cQuery = {
key: query,
page: 1,
limit: 20
};
getHslbs(cQuery)
.then((response) => {
this.loading = false;
this.hsflOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
findThrTypeMethod(query) {
this.thrTypeOptions = [];
let cQuery = {
key: query,
page: 1,
limit: 20
};
getThrProductType(cQuery)
.then((response) => {
this.loading = false;
this.thrTypeOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data;
}
});
},
},
created() {
this.findBasicProductSet();
this.getBasicThirdSys();
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,641 @@
<template>
<!-- 物资入院申请 -->
<div>
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="DI产品标识:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.code"-->
<!-- style="width: 90%"-->
<!-- placeholder="请输入DI产品标识"-->
<!-- clearable-->
<!-- @keyup.enter.native="keyupErp_submit($event)"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.name"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入物资名称"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.spec"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入规格型号"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="注册证编号:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.registerNo"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入注册证编号"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="审核状态:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.checkStatus"-->
<!-- style="width: 90%"-->
<!-- placeholder="请选择审核状态"-->
<!-- >-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="已审核" value="2"></el-option>-->
<!-- <el-option label="未审核" value="1"></el-option>-->
<!-- <el-option label="未通过" value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item
v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item
v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-autocomplete
class="inline-input"
style="width: 90%"
v-model="queryName"
:fetch-suggestions="queryProductName"
placeholder="请输入内容"
clearable
@select="handleSelect"
@clear="clearQueryProduct"
></el-autocomplete>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
@change="executeFuc($event,'5',item.checkRules)"
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display: flex">
<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="search"
>查询
</el-button
>
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-check"-->
<!-- @click="addDiProductVisible = true"-->
<!-- >选入DI信息-->
<!-- </el-button-->
<!-- >-->
<el-button
type="primary"
icon="el-icon-plus"
@click="addProductVisible = true"
>添加院内药品字典
</el-button
>
<el-upload
:action="uploadFileUrl"
multiple
:limit="1"
:headers="headers"
:data="uploadData"
:show-file-list="false"
accept=".xls,.xlsx"
:on-success="handleChange"
:file-list="fileList"
>
<el-button icon="el-icon-upload2" type="primary">Excel导入</el-button>
</el-upload>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table
:data="list"
style="width: 100%"
v-loading="loading"
border
highlight-current-row="true"
>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column-->
<!-- label="产品标识"-->
<!-- prop="code"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="物资名称"-->
<!-- prop="name"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="规格型号"-->
<!-- prop="spec"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="医疗器械注册人"-->
<!-- prop="ylqxzcrbarmc"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="注册证编号"-->
<!-- prop="registerNo"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column label="审核状态" prop="status" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ checkMap[scope.row.status] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click="detail(scope.row)"-->
<!-- >详情</el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- :disabled="scope.row.status == 2"-->
<!-- @click="deleteProduct(scope.row.id)"-->
<!-- >-->
<!-- 删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
title="选入配送产品"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="addDiProductVisible"
width="85%"
append-to-body
v-if="addDiProductVisible"
>
<thrAddDiProductSelectUdi
:closeDialog="closeDialog"
:relId="relId"
:isImportUdi="isImportUdi"
:data="thisData"
@closeUdi="closeUdi"
>
</thrAddDiProductSelectUdi>
</el-dialog>
<el-dialog
title="新增配送产品"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="addProductVisible"
width="85%"
append-to-body
v-if="addProductVisible"
>
<thrAddProductSelectUdi
:closeAddDialog="closeDialog"
:newType="newType"
@closeUdi="closeUdi"
>
</thrAddProductSelectUdi>
</el-dialog>
<el-dialog
title="器械信息详情"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="detailDialog"
width="60%"
append-to-body
v-if="detailDialog"
>
<selectDiDetail :editQuery="diDetails" :remark="delect.remark">
</selectDiDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="产品信息详情"
:visible.sync="thrProductsDetailVisible"
width="80%"
v-if="thrProductsDetailVisible"
>
<thrProductsDetail :data="thisDetail"></thrProductsDetail>
</el-dialog>
</div>
</template>
<script>
import {
getThrDiProducts,
delThrDiProducts,
getDiProductDetail,
} from "@/api/supplier/supProductsAddDi";
import thrAddDiProductSelectUdi from "@/views/supplier/products/supAddDiProductSelectUdi";
import thrAddProductSelectUdi from "@/views/supplier/products/supProductsAdd";
import selectDiDetail from "./selectDIDetailDialog";
import thrProductsDetail from "@/views/supplier/products/supProductsDetail";
import {
getHead, executeFuc
} from "@/utils/customConfig";
import store from "@/store";
export default {
data() {
return {
showSearch: true,
thisDetail: null,
filterQuery: {
sourceType: 1,
code: null,
name: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
page: 1,
limit: 20,
},
total: 0,
tableHeader: [],
queryList: [],
fromList: [],
tableHeader2: [],
queryList2: [],
fromList2: [],
options: {},
thirdSys: [],
delect: null,
thirdSysDetail: null,
list: [],
addDiProductVisible: false,
addProductVisible: false,
checkVisible: false,
newType: 2,
thrProductsDetailVisible: false,
isImportUdi: false,
relId: null,
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null,
},
loading: false,
checkMap: {
1: "未审核",
2: "已审核",
3: "未通过",
},
curRow: null,
diDetails: null,
detailDialog: false,
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
fileList: [],
headers: {},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
sourceType: 1,
code: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
name: null,
page: 1,
limit: 20,
};
this.getList();
},
search() {
this.filterQuery.page = 1;
this.getList();
},
checDialog(row) {
this.checkVisible = true;
this.curRow = row;
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
getThrDiProducts(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
detail(_this, row) {
if (row.type == 1) {
let query = {devKey: row.deviceRecordKey}
getDiProductDetail(query).then((res) => {
if (res.code === 20000) {
_this.delect = row;
_this.diDetails = res.data;
_this.detailDialog = true;
} else {
_this.$message.error("参数错误");
}
});
} else {
_this.thisDetail = row;
_this.thrProductsDetailVisible = true;
}
},
deleteProduct(_this, row) {
let query = {
id: row.id,
};
delThrDiProducts(query).then((res) => {
if (res.code === 20000) {
_this.$message.success("删除成功");
_this.getList();
} else {
_this.$message.error("删除失败");
}
});
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.addProductVisible = false;
this.getList();
},
closeUdi(val) {
this.addDiProductVisible = false;
if (val) {
this.getList();
}
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
this.$message.success(response.data);
this.getList();
}
},
},
components: {
thrAddDiProductSelectUdi,
selectDiDetail,
thrAddProductSelectUdi,
thrProductsDetail,
},
mounted() {
},
created() {
getHead("supDrugProductsAddDi", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
this.uploadFileUrl = process.env.VUE_APP_BASE_API + "/spms/thrAddDi/excel/upload";
this.headers = {
ADMIN_ID: this.$store.getters.adminId,
ADMIN_TOKEN: this.$store.getters.token,
};
console.log(this.headers);
console.log(this.$store.getters);
console.log(this.uploadFileUrl);
},
};
</script>

@ -0,0 +1,244 @@
<template>
<div>
<el-card class="el-card">
<div v-if="!isImport" style="margin-bottom: 20px">
<el-form :model="data" size="mini" label-width="150px">
<el-row v-if="data.isAudit!=null && data.isAudit==2" type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px">
<el-button type="primary" @click="checkPass(2)"></el-button>
<el-button type="primary" @click="checkPass(3)"></el-button>
</el-button-group>
</el-row>
<div style="margin-bottom: 20px">
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="产品编码:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model="data.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="物资名称:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="规格型号:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.measname"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="生产企业:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.manufactory"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册证号:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.registerNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医疗器械注册人:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册人英文名称:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品类别:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分类编码:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.flbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="商品条码:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医保编码:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.ybbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="统一社会信用号:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="器械类别:">
<el-input style="width: 90%" size="small" :disabled="true" placeholder="请输入内容"
v-model.trim="data.qxlb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品价格:">
<el-input style="width: 90%" size="small" :disabled="true" splaceholder="请输入内容" type="number"
step="0.01"
v-model="data.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak1"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak2"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable3">
<el-form-item :label="productRemarkSet.remarkTitle3 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak3"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable4">
<el-form-item :label="productRemarkSet.remarkTitle4 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak4"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable5">
<el-form-item :label="productRemarkSet.remarkTitle5 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak5"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable6">
<el-form-item :label="productRemarkSet.remarkTitle6 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak6"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable7">
<el-form-item :label="productRemarkSet.remarkTitle7 ">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak7"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" v-if="productRemarkSet.remarkEnable8">
<el-form-item :label="productRemarkSet.remarkTitle8">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" :disabled="true"
v-model="data.basicPrductRemak8"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="data.isAudit==2">
<el-col :span="12">
<el-form-item label="审核意见:">
<el-input style="width: 90%" size="small" splaceholder="请输入审核意见" v-model="remark"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品描述:">
<el-input style="width: 90%" :disabled="true" type="textarea" size="small" rows="1"
placeholder="请输入内容" v-model.trim="data.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
</el-card>
</div>
</template>
<script>
import {updateDiProduct} from '@/api/supplier/supProductsAddDi'
import {finProductSet} from "@/api/param/systemParamConfig";
export default {
name: "ThrProductsDetail",
props: {
data: {
type: Object,
required: true,
},
close: {
type: Function,
required: true,
},
},
data() {
return {
remark: "",
productRemarkSet: {}
}
},
methods: {
checkPass(val) {
let query = {
id: this.data.id,
status: val,
uuid: this.data.uuid,
customerId: this.data.customerId,
remark: this.remark
}
updateDiProduct(query).then((res) => {
if (res.code === 20000) {
this.$message.success("操作成功!")
this.close();
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.$message.error(error.message)
})
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data
} else {
//
}
})
},
},
created() {
this.findBasicProductSet()
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,640 @@
<template>
<!-- 物资入院申请 -->
<div>
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" label-width="100px" v-show="showSearch">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="DI产品标识:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.code"-->
<!-- style="width: 90%"-->
<!-- placeholder="请输入DI产品标识"-->
<!-- clearable-->
<!-- @keyup.enter.native="keyupErp_submit($event)"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.name"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入物资名称"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.spec"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入规格型号"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="注册证编号:">-->
<!-- <el-input-->
<!-- v-model="filterQuery.registerNo"-->
<!-- style="width: 90%"-->
<!-- clearable-->
<!-- placeholder="请输入注册证编号"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="审核状态:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.checkStatus"-->
<!-- style="width: 90%"-->
<!-- placeholder="请选择审核状态"-->
<!-- >-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="已审核" value="2"></el-option>-->
<!-- <el-option label="未审核" value="1"></el-option>-->
<!-- <el-option label="未通过" value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item
v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item
v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-autocomplete
class="inline-input"
style="width: 90%"
v-model="queryName"
:fetch-suggestions="queryProductName"
placeholder="请输入内容"
clearable
@select="handleSelect"
@clear="clearQueryProduct"
></el-autocomplete>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
@change="executeFuc($event,'5',item.checkRules)"
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display: flex">
<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="search"
>查询
</el-button
>
<el-button
type="primary"
icon="el-icon-check"
@click="addDiProductVisible = true"
>选入DI信息
</el-button
>
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- @click="addProductVisible = true"-->
<!-- >添加院内字典-->
<!-- </el-button-->
<!-- >-->
<!-- <el-upload-->
<!-- :action="uploadFileUrl"-->
<!-- multiple-->
<!-- :limit="1"-->
<!-- :headers="headers"-->
<!-- :data="uploadData"-->
<!-- :show-file-list="false"-->
<!-- accept=".xls,.xlsx"-->
<!-- :on-success="handleChange"-->
<!-- :file-list="fileList"-->
<!-- >-->
<!-- <el-button icon="el-icon-upload2" type="primary">Excel导入</el-button>-->
<!-- </el-upload>-->
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table
:data="list"
style="width: 100%"
v-loading="loading"
border
highlight-current-row="true"
>
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column-->
<!-- label="产品标识"-->
<!-- prop="code"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="物资名称"-->
<!-- prop="name"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="规格型号"-->
<!-- prop="spec"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="医疗器械注册人"-->
<!-- prop="ylqxzcrbarmc"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="注册证编号"-->
<!-- prop="registerNo"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column label="审核状态" prop="status" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ checkMap[scope.row.status] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click="detail(scope.row)"-->
<!-- >详情</el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- :disabled="scope.row.status == 2"-->
<!-- @click="deleteProduct(scope.row.id)"-->
<!-- >-->
<!-- 删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
title="选入配送产品"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="addDiProductVisible"
width="85%"
append-to-body
v-if="addDiProductVisible"
>
<thrAddDiProductSelectUdi
:closeDialog="closeDialog"
:relId="relId"
:isImportUdi="isImportUdi"
:data="thisData"
@closeUdi="closeUdi"
>
</thrAddDiProductSelectUdi>
</el-dialog>
<el-dialog
title="新增配送产品"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="addProductVisible"
width="85%"
append-to-body
v-if="addProductVisible"
>
<thrAddProductSelectUdi
:closeAddDialog="closeDialog"
:newType="newType"
@closeUdi="closeUdi"
>
</thrAddProductSelectUdi>
</el-dialog>
<el-dialog
title="器械信息详情"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="detailDialog"
width="60%"
append-to-body
v-if="detailDialog"
>
<selectDiDetail :editQuery="diDetails" :remark="delect.remark">
</selectDiDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="产品信息详情"
:visible.sync="thrProductsDetailVisible"
width="80%"
v-if="thrProductsDetailVisible"
>
<thrProductsDetail :data="thisDetail"></thrProductsDetail>
</el-dialog>
</div>
</template>
<script>
import {
getThrDiProducts,
delThrDiProducts,
getDiProductDetail,
} from "@/api/supplier/supProductsAddDi";
import thrAddDiProductSelectUdi from "@/views/supplier/products/supAddDiProductSelectUdi";
import thrAddProductSelectUdi from "@/views/supplier/products/supProductsAdd";
import selectDiDetail from "./selectDIDetailDialog";
import thrProductsDetail from "@/views/supplier/products/supProductsDetail";
import {
getHead, executeFuc
} from "@/utils/customConfig";
import store from "@/store";
export default {
data() {
return {
showSearch: true,
thisDetail: null,
filterQuery: {
sourceType: 0,
code: null,
name: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
page: 1,
limit: 20,
},
total: 0,
tableHeader: [],
queryList: [],
fromList: [],
tableHeader2: [],
queryList2: [],
fromList2: [],
options: {},
thirdSys: [],
delect: null,
thirdSysDetail: null,
list: [],
addDiProductVisible: false,
addProductVisible: false,
checkVisible: false,
newType: 2,
thrProductsDetailVisible: false,
isImportUdi: false,
relId: null,
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null,
},
loading: false,
checkMap: {
1: "未审核",
2: "已审核",
3: "未通过",
},
curRow: null,
diDetails: null,
detailDialog: false,
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
fileList: [],
headers: {},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
code: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
name: null,
page: 1,
limit: 20,
};
this.getList();
},
search() {
this.filterQuery.page = 1;
this.getList();
},
checDialog(row) {
this.checkVisible = true;
this.curRow = row;
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
getThrDiProducts(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
detail(_this, row) {
if (row.type == 1) {
let query = {devKey: row.deviceRecordKey}
getDiProductDetail(query).then((res) => {
if (res.code === 20000) {
_this.delect = row;
_this.diDetails = res.data;
_this.detailDialog = true;
} else {
_this.$message.error("参数错误");
}
});
} else {
_this.thisDetail = row;
_this.thrProductsDetailVisible = true;
}
},
deleteProduct(_this, row) {
let query = {
id: row.id,
};
delThrDiProducts(query).then((res) => {
if (res.code === 20000) {
_this.$message.success("删除成功");
_this.getList();
} else {
_this.$message.error("删除失败");
}
});
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.addProductVisible = false;
this.getList();
},
closeUdi(val) {
this.addDiProductVisible = false;
if (val) {
this.getList();
}
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
this.$message.success(response.data);
this.getList();
}
},
},
components: {
thrAddDiProductSelectUdi,
selectDiDetail,
thrAddProductSelectUdi,
thrProductsDetail,
},
mounted() {
},
created() {
getHead("supProductsOptinDi", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
this.uploadFileUrl = process.env.VUE_APP_BASE_API + "/spms/thrAddDi/excel/upload";
this.headers = {
ADMIN_ID: this.$store.getters.adminId,
ADMIN_TOKEN: this.$store.getters.token,
};
console.log(this.headers);
console.log(this.$store.getters);
console.log(this.uploadFileUrl);
},
};
</script>

@ -0,0 +1,388 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="产品编码:">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable @keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品名称:">
<el-input v-model="filterQuery.name" style="width: 90%" clearable placeholder="请输入产品名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.spec" style="width: 90%" clearable placeholder="请输入规格型号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册人:">
<el-input v-model="filterQuery.registerNo" clearable style="width: 90%" placeholder="请输入注册/备案号"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="审核状态:">
<el-select v-model="filterQuery.checkStatus" style="width: 90%" placeholder="请选择审核状态">
<el-option label="全部" value=""></el-option>
<el-option label="已审核" value="2"></el-option>
<el-option label="未审核" value="1"></el-option>
<el-option label="未通过" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSys" style="width: 90%" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<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="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="80"></el-table-column>
<el-table-column label="产品编码" prop="code"></el-table-column>
<el-table-column label="产品名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="registerNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="审核状态" prop="checkStatus" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ checkMap[scope.row.checkStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="detailDialog(scope.row)">详情</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="产品信息详情"
:visible.sync="thrProductsDetailVisible"
width="80%"
v-if="thrProductsDetailVisible"
>
<thrProductsDetail
:data="thisData"
></thrProductsDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="审核"
:visible.sync="checkVisible"
width="45%"
v-if="checkVisible">
<el-button @click="checkVisible = false">取消</el-button>
<el-button type="primary" @click="checkPass(2)"></el-button>
<el-button type="primary" @click="checkPass(3)"></el-button>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="手动添加第三方产品信息关联"
:visible.sync="addProductVisible"
width="85%"
v-if="addProductVisible"
@close="closeAddDialog"
>
<ThrProductsAdd
:newType="newType"
:closeAddDialog="closeAddDialog"></ThrProductsAdd>
</el-dialog>
</div>
</template>
<script>
import {getThrProducts, delThrProducts, updateProduct} from "../../../api/thrsys/thrProductsAdd";
import {getBasicThirdSys, filterDetailByKey} from "../../../api/basic/basicThirdSys";
import {selectIp} from "@/api/system/systemParamConfig";
import thrProductsDetail from "./supProductsDetail";
import ThrProductsAdd from "@/views/supplier/products/supProductsAdd";
export default {
data() {
return {
showSearch: true,
filterQuery: {
code: null,
name: "",
spec: null,
registerNo: null,
manufactory: null,
thirdSys: "",
page: 1,
limit: 20,
},
mainThirdSys:'',
total: 0,
thirdSys: [],
thirdSysDetail: null,
list: [],
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
addProductVisible: false,
checkVisible: false,
newType: 2,
thrProductsDetailVisible: false,
thisData: null,
loading: false,
checkMap: {
1: "未审核",
2: "已审核",
3: "未通过",
},
curRow: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
code: null,
spec: null,
registerNo: null,
manufactory: null,
name: "",
thirdSys: null,
page: 1,
limit: 20,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
checDialog(row) {
this.checkVisible = true;
this.curRow = row;
},
getList() {
if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
this.loading = true;
getThrProducts(this.filterQuery)
.then((response) => {
// this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getAllList(){
getThrProducts(this.filterQuery)
.then((response) => {
// this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
delThrProducts(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
detailDialog(row) {
this.thisData = row;
this.thrProductsDetailVisible = true;
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
for(var i=0;i<this.thirdSys.length;i++){
if(this.thirdSys[i].mainSys){
this.filterQuery.thirdSys = this.thirdSys[i].thirdId;
this.mainThirdSys = this.thirdSys[i].thirdId;
}
}
this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail();
this.selectSysParam();
// this.getList();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSys,
key: "piQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSys
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/pi/upload";
}
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getThirdSysDetail();
},
closeAddDialog(val) {
if (val) {
this.getList();
}
this.addProductVisible = false;
},
checkPass(val) {
let query = {
id: this.curRow.id,
checkStatus: val
}
updateProduct(query).then((res) => {
if (res.code == 20000) {
this.getList();
this.checkVisible = false;
} else {
this.$message.error(error.message);
}
}).catch((error) => {
this.$message.error(error.message);
})
},
},
components: {
thrProductsDetail, ThrProductsAdd
},
mounted() {
},
created() {
this.getAllList();
this.getBasicThirdSys();
},
};
</script>
<style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>
Loading…
Cancel
Save