You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-vue/src/views/supplier/products/supProductsAddDi.vue

380 lines
10 KiB
Vue

2 years ago
<template>
2 years ago
<!-- 物资入院申请 -->
2 years ago
<div>
<el-card class="el-card">
2 years ago
<el-form :model="filterQuery" label-width="100px" v-show="showSearch">
2 years ago
<el-row>
<el-col :span="8">
2 years ago
<el-form-item label="DI产品标识:">
2 years ago
<el-input
v-model="filterQuery.code"
style="width: 90%"
placeholder="请输入DI产品标识"
clearable
@keyup.enter.native="keyupErp_submit($event)"
2 years ago
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物资名称:">
2 years ago
<el-input
v-model="filterQuery.name"
style="width: 90%"
clearable
placeholder="请输入物资名称"
></el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="8">
2 years ago
<el-form-item label="规格型号:">
2 years ago
<el-input
v-model="filterQuery.spec"
style="width: 90%"
clearable
placeholder="请输入规格型号"
></el-input>
2 years ago
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
2 years ago
<el-form-item label="注册证编号:">
2 years ago
<el-input
v-model="filterQuery.registerNo"
style="width: 90%"
clearable
placeholder="请输入注册证编号"
></el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="8">
2 years ago
<el-form-item label="审核状态:">
2 years ago
<el-select
v-model="filterQuery.checkStatus"
style="width: 90%"
placeholder="请选择审核状态"
>
2 years ago
<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>
2 years ago
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
2 years ago
<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="addDiProductVisible = true"
>选入DI信息</el-button
>
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- @click="addProductVisible = true"-->
<!-- >添加院内字典</el-button-->
<!-- >-->
2 years ago
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
2 years ago
<el-table
:data="list"
style="width: 100%"
v-loading="loading"
border
highlight-current-row="true"
>
2 years ago
<el-table-column label="序号" type="index"></el-table-column>
2 years ago
<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>
2 years ago
<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">
2 years ago
<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)"
>
2 years ago
删除
</el-button>
2 years ago
</template>
</el-table-column>
</el-table>
<pagination
2 years ago
v-show="total > 0"
2 years ago
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
title="选入配送产品"
2 years ago
: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>
2 years ago
<el-dialog
title="器械信息详情"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="detailDialog"
width="60%"
append-to-body
v-if="detailDialog"
>
2 years ago
<selectDiDetail :editQuery="diDetails" :remark="delect.remark">
2 years ago
</selectDiDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="产品信息详情"
:visible.sync="thrProductsDetailVisible"
width="80%"
v-if="thrProductsDetailVisible"
>
2 years ago
<thrProductsDetail :data="thisDetail"></thrProductsDetail>
</el-dialog>
2 years ago
</div>
</template>
<script>
2 years ago
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";
2 years ago
export default {
data() {
return {
showSearch: true,
2 years ago
thisDetail: null,
2 years ago
filterQuery: {
code: null,
name: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
page: 1,
2 years ago
limit: 20,
2 years ago
},
total: 0,
thirdSys: [],
2 years ago
delect: null,
2 years ago
thirdSysDetail: null,
list: [],
addDiProductVisible: false,
addProductVisible: false,
2 years ago
checkVisible: false,
newType: 2,
thrProductsDetailVisible: false,
isImportUdi: false,
relId: null,
thisData: {
nameCode: null,
cpmctymc: null,
2 years ago
ggxh: null,
2 years ago
},
loading: false,
checkMap: {
2 years ago
1: "未审核",
2: "已审核",
3: "未通过",
2 years ago
},
curRow: null,
diDetails: null,
2 years ago
detailDialog: false,
};
2 years ago
},
methods: {
onReset() {
this.$router.push({
2 years ago
path: "",
});
2 years ago
this.filterQuery = {
code: null,
spec: null,
registerNo: null,
manufactory: null,
checkStatus: null,
name: null,
page: 1,
2 years ago
limit: 20,
};
this.getList();
2 years ago
},
search() {
2 years ago
this.filterQuery.page = 1;
this.getList();
2 years ago
},
checDialog(row) {
2 years ago
this.checkVisible = true;
this.curRow = row;
2 years ago
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
2 years ago
this.loading = true;
2 years ago
getThrDiProducts(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
2 years ago
this.list = response.data.list || [];
this.total = response.data.total || 0;
2 years ago
} else {
2 years ago
this.$message.error(response.message);
2 years ago
}
2 years ago
this.loading = false;
2 years ago
})
.catch(() => {
2 years ago
this.loading = false;
this.list = [];
this.total = 0;
});
2 years ago
},
handleCurrentChange(val) {
2 years ago
this.filterQuery.page = val.page;
this.getList();
2 years ago
},
detail(row) {
2 years ago
if (row.type == 1) {
2 years ago
let query = { uuid: row.uuid };
2 years ago
getDiProductDetail(query).then((res) => {
if (res.code === 20000) {
2 years ago
this.delect = row;
this.diDetails = res.data;
this.detailDialog = true;
2 years ago
} else {
2 years ago
this.$message.error("参数错误");
2 years ago
}
2 years ago
});
2 years ago
} else {
this.thisDetail = row;
this.thrProductsDetailVisible = true;
}
2 years ago
},
deleteProduct(id) {
let query = {
2 years ago
id: id,
};
2 years ago
delThrDiProducts(query).then((res) => {
if (res.code === 20000) {
2 years ago
this.$message.success("删除成功");
this.getList();
2 years ago
} else {
2 years ago
this.$message.error("删除失败");
2 years ago
}
2 years ago
});
2 years ago
},
closeDialog() {
2 years ago
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.addProductVisible = false;
this.getList();
2 years ago
},
closeUdi(val) {
2 years ago
this.addDiProductVisible = false;
2 years ago
if (val) {
2 years ago
this.getList();
2 years ago
}
2 years ago
},
2 years ago
},
components: {
2 years ago
thrAddDiProductSelectUdi,
selectDiDetail,
thrAddProductSelectUdi,
thrProductsDetail,
2 years ago
},
2 years ago
mounted() {},
2 years ago
created() {
2 years ago
this.getList();
},
};
2 years ago
</script>