第三方产品信息新增,审核等;手持终端登记审核;
parent
0ec45b5064
commit
a6d85f5dba
@ -1,4 +1,4 @@
|
||||
{
|
||||
"BASE_URL": "http://127.0.0.1:9996",
|
||||
"SERVER_IP": "http://127.0.0.1:9996"
|
||||
"BASE_URL": "http://192.168.0.109:9996",
|
||||
"SERVER_IP": "http://192.168.0.109:9996"
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
export function getThrProducts(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/getThrAddProducts",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function delThrProducts(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/delThrAddProducts",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function updateProduct(data) {
|
||||
return axios({
|
||||
url: '/udiwms/thrsys/updateThrAddProducts',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function addProduct(data) {
|
||||
return axios({
|
||||
url: '/udiwms/thrsys/addThrAddProducts',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -0,0 +1,360 @@
|
||||
<template>
|
||||
<el-card class="el-card">
|
||||
<el-form :inline="true" :model="newProductData" size="mini">
|
||||
<div style="margin-bottom: 20px">
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>第三方系统: </span>
|
||||
</div>
|
||||
<el-select
|
||||
style="width: 60%"
|
||||
v-model="newProductData.thirdSys" 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>
|
||||
</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>产品名称: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.name"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>产品标识: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.code"
|
||||
></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>注册证号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.registerNo"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>生产厂家: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.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>规格型号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.spec"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>计量单位: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.measname"
|
||||
></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>医疗器械注册人: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.ylqxzcrbarmc"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>注册人英文名称: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.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>产品类别: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.cplb"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>分类编码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.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>商品条码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.sptm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>医保编码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.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>统一社会信用号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.tyshxydm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>器械类别: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
size="small"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.qxlb"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="20" class="el-col" style="margin-top: 12px">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>产品描述: </span>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
style="width: 85%"
|
||||
type="textarea"
|
||||
size="mini"
|
||||
rows="4"
|
||||
placeholder="请输入内容"
|
||||
v-model="newProductData.cpms"
|
||||
></el-input>
|
||||
</div>
|
||||
</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} from "@/api/thrsys/thrProductsAdd";
|
||||
|
||||
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,
|
||||
cpms: null
|
||||
},
|
||||
thirdSys: [],
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
saveNewProduct() {
|
||||
this.addProductVisible = false;
|
||||
if (this.newType == 1) {
|
||||
saveNewProduct(this.newProductData).then((res) => {
|
||||
if (res.code == 20000) {
|
||||
this.$message.success("添加成功");
|
||||
//清空弹窗数据
|
||||
this.$emit("closeAddDialog", true);
|
||||
this.closeAddDialog();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$message.error(error.message);
|
||||
})
|
||||
} else if (this.newType == 2) {
|
||||
addProduct(this.newProductData).then((res) => {
|
||||
if (res.code == 20000) {
|
||||
this.$message.success("添加成功");
|
||||
//清空弹窗数据
|
||||
this.closeAddDialog(true);
|
||||
}
|
||||
}).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 = [];
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getBasicThirdSys();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.code"
|
||||
placeholder="产品编码/商品条码/医保编码" clearable
|
||||
@keyup.enter.native="keyupErp_submit($event)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.name" clearable
|
||||
placeholder="产品名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.spec" clearable
|
||||
placeholder="规格型号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.registerNo" clearable
|
||||
placeholder="注册/备案凭证"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.checkStatus" 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-form-item class="query-form-item">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="filterQuery.manufactory" clearable-->
|
||||
<!-- placeholder="生产厂家"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.thirdSys" 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-form-item>
|
||||
<el-button-group style="display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
||||
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<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="操作" fixed="right">
|
||||
<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>
|
||||
|
||||
<el-button type="text" size="small"
|
||||
@click="checDialog(scope.row)"
|
||||
|
||||
>审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
title="产品信息详情"
|
||||
:visible.sync="thrProductsDetailVisible"
|
||||
width="85%"
|
||||
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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getThrProducts, delThrProducts, updateProduct} from "../../api/thrsys/thrProductsAdd";
|
||||
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
|
||||
import {selectIp} from "../../api/param/systemParamConfig";
|
||||
import thrProductsDetail from "./ThrProductsDetail";
|
||||
import ThrProductsAdd from "@/views/thrsys/ThrProductsAdd";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
code: null,
|
||||
name: "",
|
||||
spec: null,
|
||||
registerNo: null,
|
||||
manufactory: null,
|
||||
thirdSys: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
total: 0,
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
list: [],
|
||||
uploadFileUrl: null,
|
||||
fileList: [],
|
||||
uploadData: {
|
||||
thirdSys: "thirdId",
|
||||
},
|
||||
checkVisible: false,
|
||||
newType: 1,
|
||||
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();
|
||||
},
|
||||
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;
|
||||
});
|
||||
},
|
||||
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 || [];
|
||||
this.filterQuery.thirdSys = this.thirdSys[0].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;
|
||||
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.thirdSys;
|
||||
this.getThirdSysDetail();
|
||||
},
|
||||
closeAddDialog() {
|
||||
this.addProductVisible = false;
|
||||
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
|
||||
},
|
||||
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.getBasicThirdSys();
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,345 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.code"
|
||||
placeholder="产品编码/商品条码/医保编码" clearable
|
||||
@keyup.enter.native="keyupErp_submit($event)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.name" clearable
|
||||
placeholder="产品名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.spec" clearable
|
||||
placeholder="规格型号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.registerNo" clearable
|
||||
placeholder="注册/备案凭证"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.checkStatus" 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-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.thirdSys" 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-form-item>
|
||||
<el-button-group style="display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
||||
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
||||
<el-button type="primary" @click="addProductVisible=true">新增</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<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="操作" fixed="right">
|
||||
<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>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
title="产品信息详情"
|
||||
:visible.sync="thrProductsDetailVisible"
|
||||
width="85%"
|
||||
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/param/systemParamConfig";
|
||||
import thrProductsDetail from "./ThrProductsDetail";
|
||||
import ThrProductsAdd from "@/views/thrsys/ThrProductsAdd";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
code: null,
|
||||
name: "",
|
||||
spec: null,
|
||||
registerNo: null,
|
||||
manufactory: null,
|
||||
thirdSys: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
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();
|
||||
},
|
||||
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;
|
||||
});
|
||||
},
|
||||
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 || [];
|
||||
this.filterQuery.thirdSys = this.thirdSys[0].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;
|
||||
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.thirdSys;
|
||||
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.getBasicThirdSys();
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue