基础信息上传供应商

master
anthonywj 4 years ago
parent 0b9bdc65a1
commit 54d3d782a9

@ -14,7 +14,8 @@ import authAdmin from "../views/userManage/admin/authAdmin.vue";
import authRole from "../views/userManage/admin/authRole.vue"; import authRole from "../views/userManage/admin/authRole.vue";
import authPermissionRule from "../views/userManage/admin/authPermissionRule.vue"; import authPermissionRule from "../views/userManage/admin/authPermissionRule.vue";
import systemParamConfig from "../views/userManage/param/systemParamConfig.vue"; import systemParamConfig from "../views/userManage/param/systemParamConfig.vue";
import thirdSysApi from "../views/userManage/param/ThirdSysApi.vue"; import thirdSysApi from "../views/userManage/param/ThirdSysApiUpload.vue";
import thirdSysApiDownload from "../views/userManage/param/ThirdSysApiDownload.vue";
//基础数据维护 //基础数据维护
import BussinessType from "../views/basic/BussinessType.vue"; import BussinessType from "../views/basic/BussinessType.vue";
@ -27,7 +28,7 @@ import udiinfoExport from "../views/basic/UdiinfoExport.vue";
import company from "../views/userManage/param/company.vue"; import company from "../views/userManage/param/company.vue";
import thirdSys from "../views/basic/BasicThirdSys.vue" import thirdSys from "../views/basic/BasicThirdSys.vue"
import UdiInfoSmpUpload from "../views/smp/UdiInfoSmpUpload.vue"; import UdiInfoSmpUpload from "../views/smp/UdiInfoSmpUpload.vue";
import ErpOrderSmpUpload from "../views/smp/ErpOrderSmpUpload.vue"; // import ErpOrderSmpUpload from "../views/smp/ErpOrderSmpUpload.vue";
//出入库管理 //出入库管理
import inout from "../views/inout/IOFinishOrder.vue"; import inout from "../views/inout/IOFinishOrder.vue";
@ -61,6 +62,12 @@ import thrOrderImport from "../views/thrsys/ThrOrderImport.vue";
import ThrCorps from "../views/thrsys/ThrCorps.vue"; import ThrCorps from "../views/thrsys/ThrCorps.vue";
import thrCorpsExport from "../views/thrsys/ThrCorpsExport.vue"; import thrCorpsExport from "../views/thrsys/ThrCorpsExport.vue";
import thrCorpsImport from "../views/thrsys/ThrCorpsImport.vue"; import thrCorpsImport from "../views/thrsys/ThrCorpsImport.vue";
//供应商管理
import corpExportSmp from "../views/basic/CorpExportSmp.vue";
import udiinfoExportSmp from "../views/basic/UdiinfoExportSmp.vue";
import thrOrderExportSmp from "../views/thrsys/ThrOrderExportSmp.vue";
import thrProductsExportSmp from "../views/thrsys/ThrProductsExportSmp.vue";
// Vue.use(VueRouter); // Vue.use(VueRouter);
const err401 = r => const err401 = r =>
@ -521,7 +528,7 @@ export const asyncRouterMap = [
}, },
{ {
path: "/smp", path: "/smp",
redirect: "/smp/udiInfoSmpUpload", redirect: "/smp/udiinfoExportSmp",
component: Home, component: Home,
icon: "tongyong", icon: "tongyong",
name: "供应商平台", name: "供应商平台",
@ -532,28 +539,46 @@ export const asyncRouterMap = [
}, },
children: [ children: [
{ {
path: "udiInfoSmpUpload", path: "udiinfoExportSmp",
name: "产品信息上传", name: "产品信息上传",
component: UdiInfoSmpUpload, component: udiinfoExportSmp,
meta: { meta: {
authRule: ["thrsys/UdiInfoSmpUpload"] authRule: ["thrsys/udiinfoExportSmp"]
}
},
{
path: "corpExportSmp",
name: "往来单位上传",
component: corpExportSmp,
meta: {
authRule: ["thrsys/corpExportSmp"]
}
},
{
path: "thrProductsExportSmp",
name: "第三方产品信息上传",
component: thrProductsExportSmp,
meta: {
authRule: ["thrsys/thrProductsExportSmp"]
} }
}, },
{ {
path: "orderSmpUpload", path: "thrOrderExportSmp",
name: "采购订单上传", name: "第三方业务单据上传",
component: ErpOrderSmpUpload, component: thrOrderExportSmp,
meta: { meta: {
authRule: ["thrsys/ErpOrderSmpUpload"] authRule: ["thrsys/thrOrderExportSmp"]
} }
}, },
{ {
path: "orderSmpDl", path: "orderSmpDl",
name: "送货单下载", name: "送货单下载",
component: UdiInfoSmpUpload, component: UdiInfoSmpUpload,
hidden: true,
meta: { meta: {
authRule: ["thrsys/UdiInfoSmpUpload"] authRule: ["thrsys/UdiInfoSmpUpload"]
} }
@ -622,6 +647,15 @@ export const asyncRouterMap = [
authRule: ["api/thirdSysApi"] authRule: ["api/thirdSysApi"]
} }
}, },
{
path: "thirdSysApiDownload",
name: "基础信息下载",
component: thirdSysApiDownload,
meta: {
authRule: ["api/thirdSysApiDownload"]
}
},
] ]

@ -188,7 +188,6 @@
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
this.detailList = []; this.detailList = [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
}) })

@ -1,5 +1,30 @@
<template> <template>
<div> <div>
<el-row :gutter="20" class="el-row" type="flex" align="middle">
<el-col :span="8" class="el-col">
<div class="text item">
<span>是否启用接口</span>
<el-radio-group v-model="inputDetailQuery.enabled" style="margin-right: 20px;margin-left: 20px">
<el-radio-button :label="true" size="mini">启用</el-radio-button>
<el-radio-button :label="false" size="mini">禁用</el-radio-button>
</el-radio-group>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<el-radio-group v-model="inputDetailQuery.fromType" :disabled="!inputDetailQuery.enabled" style="margin-right: 20px">
<el-radio-button :label="0" size="mini">接口实时获取</el-radio-button>
<el-radio-button :label="2" size="mini">第三方上传</el-radio-button>
<el-radio-button :label="1" size="mini">文件缓存</el-radio-button>
</el-radio-group>
<el-checkbox :disabled="inputDetailQuery.fromType!=0 || !inputDetailQuery.enabled" v-model="inputDetailQuery.itrCache">
</el-checkbox>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" align="middle"> <el-row :gutter="20" class="el-row" type="flex" align="middle">
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<div class="text item"> <div class="text item">
@ -16,16 +41,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<el-radio-group v-model="inputDetailQuery.enabled" style="margin-right: 20px">
<el-radio-button :label="true" size="mini">接口</el-radio-button>
<el-radio-button :label="false" size="mini">文件缓存</el-radio-button>
</el-radio-group>
<el-checkbox :disabled="!inputDetailQuery.enabled" v-model="inputDetailQuery.itrCache">
</el-checkbox>
</div>
</el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="18" class="el-col"> <el-col :span="18" class="el-col">

@ -0,0 +1,292 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</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" icon="search" @click="exportExcel">Excel</el-button>-->
<el-button type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="更新日期"
prop="updateTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="导出往来单位信息"
:visible.sync="corpImportDetailVisible"
width="85%"
v-if="corpImportDetailVisible"
>
<corpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></corpSelect>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import axios from "axios";
import {filterLog, deleteLog} from "../../api/basic/corpExport";
import corpSelect from "./CorpSelect";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
corpImportDetailVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() {
this.selectType = 0;
this.corpImportDetailVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.corpImportDetailVisible = true;
},
downloadExcel(row) {
let href =
"http://127.0.0.1:9991" +
"/udiwms/corps/exportLog/download" +
"?genKey=" +row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
// blob
a.href = URL.createObjectURL(blob);
console.log(a.href);
// a.download = ""; //
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
// a.setAttribute("download", "");
// a.setAttribute("href", href);
// a.click();
// window.open(mOrder.exportFilePath);
},
cancelDialog(val) {
this.corpImportDetailVisible = false;
if (val) {
this.getList();
}
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该内部码信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
};
deleteLog(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
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("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {corpSelect},
created() {
this.getBasicThirdSys();
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,292 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</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" icon="search" @click="exportExcel">Excel</el-button>-->
<el-button type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="更新日期"
prop="updateTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="导出医疗器械产品信息"
:visible.sync="udiImportDetailVisible"
width="85%"
v-if="udiImportDetailVisible"
>
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></udiInfoSelect>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import axios from "axios";
import {filterLog, downloadLog, deleteLog} from "../../api/basic/udiInfoExport";
import udiInfoSelect from "./UdIInfoSelect";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
udiImportDetailVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() {
this.selectType = 0;
this.udiImportDetailVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.udiImportDetailVisible = true;
},
downloadExcel(row) {
let href =
"http://127.0.0.1:9991" +
"/udiwms/products/exportLog/download" +
"?genKey=" +row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
// blob
a.href = URL.createObjectURL(blob);
console.log(a.href);
// a.download = ""; //
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
// a.setAttribute("download", "");
// a.setAttribute("href", href);
// a.click();
// window.open(mOrder.exportFilePath);
},
cancelDialog(val) {
this.udiImportDetailVisible = false;
if (val) {
this.getList();
}
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该内部码信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
};
deleteLog(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
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("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {udiInfoSelect},
created() {
this.getBasicThirdSys();
// this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -131,8 +131,13 @@
ucloudUnit(this.filterQuery) ucloudUnit(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; if (response.code == 20000) {
this.total = response.data.total || 0; this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -36,19 +36,19 @@
v-if="!this.thirdSysDetail.enabled">清空全部 v-if="!this.thirdSysDetail.enabled">清空全部
</el-button> </el-button>
<!--<el-upload--> <!--<el-upload-->
<!--v-if="!this.thirdSysDetail.enabled"--> <!--v-if="!this.thirdSysDetail.enabled"-->
<!--:action="uploadFileUrl"--> <!--:action="uploadFileUrl"-->
<!--multiple--> <!--multiple-->
<!--:limit="3"--> <!--:limit="3"-->
<!--:data="uploadData"--> <!--:data="uploadData"-->
<!--:show-file-list="false"--> <!--:show-file-list="false"-->
<!--:on-success="handleChange"--> <!--:on-success="handleChange"-->
<!--:file-list="fileList"--> <!--:file-list="fileList"-->
<!--&gt;--> <!--&gt;-->
<!--<el-button size="mini" type="primary">导入往来单位</el-button>--> <!--<el-button size="mini" type="primary">导入往来单位</el-button>-->
<!--</el-upload>--> <!--</el-upload>-->
<!--<el-button type="primary" icon="search" @click="downloadDatas"--> <!--<el-button type="primary" icon="search" @click="downloadDatas"-->
<!--v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.itrCache">导入往来单位--> <!--v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.itrCache">导入往来单位-->
<!--</el-button>--> <!--</el-button>-->
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
@ -129,9 +129,13 @@
this.loading = true; this.loading = true;
ucloudUnit(this.filterQuery) ucloudUnit(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -153,9 +153,15 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; if (response.code == 20000) {
this.total = response.data.total || 0; this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -197,8 +197,12 @@
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; if (response.code == 20000) {
this.total = response.data.total || 0; this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -107,9 +107,16 @@
this.filterQuery.genKey = this.currentRow.genKey; this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery) filterDetail(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -129,8 +129,12 @@
getOnhands(this.filterQuery) getOnhands(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; if (response.code == 20000) {
this.total = response.data.total || 0; this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -153,9 +153,15 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -197,9 +197,13 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -108,9 +108,13 @@
this.filterQuery.genKey = this.currentRow.genKey; this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery) filterDetail(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -133,9 +133,13 @@
this.loading = true; this.loading = true;
getOnhands(this.filterQuery) getOnhands(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -153,9 +153,13 @@
this.loading = true; this.loading = true;
getCloudErp(this.filterQuery) getCloudErp(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -153,9 +153,13 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -0,0 +1,295 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</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" icon="search" @click="exportExcel">Excel</el-button>-->
<el-button type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="更新日期"
prop="updateTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="导出业务单据"
:visible.sync="thrOrderSelectVisible"
width="85%"
v-if="thrOrderSelectVisible"
>
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrOrderSelect>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {filterLog, deleteLog} from "../../api/thrsys/thrOrderExport";
import thrOrderSelect from "./ThrOrderSelect";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrOrderSelectVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(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;
});
},
exportExcel() {
this.selectType = 0;
this.thrOrderSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrOrderSelectVisible = true;
},
downloadExcel(row) {
let href =
"http://127.0.0.1:9991" +
"/udiwms/thrOrder/exportLog/download" +
"?genKey=" +row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
// blob
a.href = URL.createObjectURL(blob);
console.log(a.href);
// a.download = ""; //
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
// a.setAttribute("download", "");
// a.setAttribute("href", href);
// a.click();
// window.open(mOrder.exportFilePath);
},
cancelDialog(val) {
if (val) {
this.getList();
}
this.thrOrderSelectVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该内部码信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
};
deleteLog(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
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("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {thrOrderSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -211,9 +211,13 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -104,9 +104,13 @@
this.filterQuery.genKey = this.currentRow.genKey; this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery) filterDetail(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -162,9 +162,13 @@
this.loading = true; this.loading = true;
getCloudErp(this.filterQuery) getCloudErp(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -141,9 +141,13 @@
this.loading = true; this.loading = true;
getInvbasdoc(this.filterQuery) getInvbasdoc(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -153,9 +153,13 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -0,0 +1,289 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</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" icon="search" @click="exportExcel">Excel</el-button>-->
<el-button type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="更新日期"
prop="updateTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="导出产品信息"
:visible.sync="thrProductsSelectVisible"
width="85%"
v-if="thrProductsSelectVisible"
>
<thrProductsSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrProductsSelect>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {filterLog, deleteLog} from "../../api/thrsys/thrProductsExport.js";
import thrProductsSelect from "./ThrProductsSelect";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrProductsSelectVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(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;
});
},
exportExcel() {
this.selectType = 0;
this.thrProductsSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrProductsSelectVisible = true;
},
downloadExcel(row) {
let href =
"http://127.0.0.1:9991" +
"/udiwms/thrProducts/exportLog/download" +
"?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
a.href = URL.createObjectURL(blob);
console.log(a.href);
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
];
document.body.appendChild(a);
a.click();
this.getList();
});
},
cancelDialog(val) {
if (val) {
this.getList();
}
this.thrProductsSelectVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该导出记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
};
deleteLog(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
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("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {thrProductsSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -196,9 +196,13 @@
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -104,9 +104,13 @@
this.filterQuery.genKey = this.currentRow.genKey; this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery) filterDetail(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -150,9 +150,13 @@
this.loading = true; this.loading = true;
getInvbasdoc(this.filterQuery) getInvbasdoc(this.filterQuery)
.then((response) => { .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; this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

@ -29,6 +29,7 @@
data() { data() {
return { return {
filterQuery: { filterQuery: {
type:2,
page: 1, page: 1,
limit: 20, limit: 20,
}, },
@ -52,6 +53,7 @@
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
type:2,
page: 1, page: 1,
limit: 20, limit: 20,
}; };

@ -0,0 +1,129 @@
<template>
<div>
<el-card class="el-card">
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="接口名称" prop="name" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="接口地址" prop="apiUrl" show-overflow-tooltip></el-table-column>
<el-table-column label="说明文档" prop="guideUrl" show-overflow-tooltip></el-table-column>
<el-table-column label="备注" prop="remark" show-overflow-tooltip></el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handlePageChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {findApi} from "../../../api/param/thirdSysApi";
export default {
data() {
return {
filterQuery: {
type:1,
page: 1,
limit: 20,
},
modifyDialogVisible: false,
modifyDetailDialogVisible: false,
list: [],
inputQuery: null,
inputDetailQuery: null,
enableMap: {
true: "是",
false: "否",
},
detailList: null,
total: 0,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
type:1,
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.modifyDetailDialogVisible = false;
},
handleCurrentChange(row) {
this.getDetailList(row);
},
getList() {
this.loading = true;
findApi(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
onModifySubmit() {
updateBasicThirdSys(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
handleModifyClick(row) {
this.modifyDialogVisible = true;
this.inputQuery = row;
},
},
components: {
},
mounted() {
},
created() {
this.getList();
},
};
</script>
<style scoped>
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
}
</style>
Loading…
Cancel
Save