中继服务,同步服务

master
anthonyywj2 3 years ago
parent d9efb4b86b
commit f900c5ee3d

@ -31,6 +31,7 @@ export function stockOrderDetail(query) {
}
)
}
export function stockOrderDetail2(query) {
return axios(
{
@ -40,6 +41,7 @@ export function stockOrderDetail2(query) {
}
)
}
export function stockOrderDetailTemp(query) {
return axios(
{
@ -67,6 +69,7 @@ export function deleteStockOrderById(query) {
data: query
});
}
export function deleteErrorStockOrderById(query) {
return axios({
url: "/udiwms/stock/order/error/delete",
@ -74,6 +77,7 @@ export function deleteErrorStockOrderById(query) {
data: query
});
}
export function deleteStockOrderDetailById(query) {
return axios({
url: "/udiwms/stock/order/detail/delete",
@ -81,6 +85,7 @@ export function deleteStockOrderDetailById(query) {
data: query
});
}
export function deleteStockOrderDetailTempById(query) {
return axios({
url: "/udiwms/stock/order/detail/temp/delete",
@ -97,6 +102,17 @@ export function submitStockOrder(query) {
params: query
});
}
export function updateStockOrder(query) {
return axios({
url: "/udiwms/stock/order/update",
method: "post",
data: query
});
}
export function submitNewStockOrder(query) {
return axios({
url: "/udiwms/stock/order/new/submit",
@ -104,6 +120,7 @@ export function submitNewStockOrder(query) {
params: query
});
}
export function repealSubmitNewStockOrder(query) {
return axios({
url: "/udiwms/stock/order/new/repealSubmit",
@ -111,6 +128,7 @@ export function repealSubmitNewStockOrder(query) {
params: query
});
}
export function submitStockOrderError(query) {
return axios({
url: "/udiwms/stock/order/error/submit",
@ -118,6 +136,7 @@ export function submitStockOrderError(query) {
params: query
});
}
export function uploadStockOrderDetailCount(query) {
return axios(
{
@ -127,6 +146,7 @@ export function uploadStockOrderDetailCount(query) {
}
)
}
export function getStockOrderDetailInstrument(query) {
return axios(
{
@ -136,6 +156,7 @@ export function getStockOrderDetailInstrument(query) {
}
)
}
export function getStockOrderDetailInstrumentById(query) {
return axios(
{
@ -145,6 +166,7 @@ export function getStockOrderDetailInstrumentById(query) {
}
)
}
export function addStockOrderDetailFromCode(query) {
return axios(
{
@ -154,6 +176,7 @@ export function addStockOrderDetailFromCode(query) {
}
)
}
export function addStockOrderDetailFromCodeById(query) {
return axios(
{
@ -163,6 +186,7 @@ export function addStockOrderDetailFromCodeById(query) {
}
)
}
export function stockOrderDetailQueryProduct(query) {
return axios(
{
@ -172,6 +196,7 @@ export function stockOrderDetailQueryProduct(query) {
}
)
}
export function stockOrderDetailFilterProduct(query) {
return axios(
{
@ -181,6 +206,7 @@ export function stockOrderDetailFilterProduct(query) {
}
)
}
export function uploadStockOrderDetail(query) {
return axios(
{
@ -190,6 +216,7 @@ export function uploadStockOrderDetail(query) {
}
)
}
export function copyStockOrderDetail(query) {
return axios(
{

@ -8,6 +8,7 @@ export function filterLog(query) {
params: query
});
}
export function deleteLog(query) {
return axios({
url: "/udiwms/thrCorp/exportLog/deleteLog",
@ -23,6 +24,7 @@ export function downloadLog(query) {
params: query
});
}
export function exportExcel(query) {
return axios({
url: "/udiwms/thrCorp/importLog/export",
@ -31,3 +33,11 @@ export function exportExcel(query) {
});
}
export function uploadSmp(query) {
return axios({
url: "/udiwms/thrCorp/importLog/upload",
method: "post",
data: query
});
}

@ -93,6 +93,9 @@ import udiinfoExportSmp from "../views/basic/UdiinfoExportSmp.vue";
import UdiInfoDonwloadSmp from "../views/basic/UdiInfoDonwloadSmp.vue";
import thrOrderExportSmp from "../views/thrsys/ThrOrderExportSmp.vue";
import thrProductsExportSmp from "../views/thrsys/ThrProductsExportSmp.vue";
import thrCorpsExportSmp from "../views/thrsys/ThrCorpsExportSmp.vue";
import thrInvWarehouse from "@/views/thrsys/ThrInvWarehouse";
// Vue.use(VueRouter);
@ -513,10 +516,18 @@ export const asyncRouterMap = [
authRule: ["basic"]
},
children: [
{
path: "company",
name: "本机构信息",
component: company,
meta: {
authRule: ["product/company"]
}
},
{
path: "invWarehouse",
component: invWarehouse,
name: "仓库信息",
name: "仓库字典",
icon: "",
meta: {
authRule: ["basicProduct/invWarehouse"]
@ -525,7 +536,7 @@ export const asyncRouterMap = [
{
path: "/udiinfo",
redirect: "/udiinfo/udiinfomg",
name: "医疗器械信息",
name: "耗材字典",
component: Empty,
meta: {
authRule: ["basic/products"]
@ -533,7 +544,7 @@ export const asyncRouterMap = [
children: [
{
path: "udiinfomg",
name: "医疗器械信息维护",
name: "耗材字典维护",
component: UdiInfoManage,
meta: {
authRule: ["basic/products/modify"]
@ -541,7 +552,7 @@ export const asyncRouterMap = [
},
{
path: "udiImport",
name: "医疗器械信息导入",
name: "耗材字典导入",
component: UdiInfoImport,
meta: {
authRule: ["basic/products/import"]
@ -549,7 +560,7 @@ export const asyncRouterMap = [
},
{
path: "udiinfoExport",
name: "医疗器械信息导出",
name: "耗材字典导出",
component: udiinfoExport,
meta: {
authRule: ["basic/products/export"]
@ -592,14 +603,6 @@ export const asyncRouterMap = [
},]
},
{
path: "company",
name: "本机构信息",
component: company,
meta: {
authRule: ["product/company"]
}
},
{
path: "/udidb",
@ -809,7 +812,7 @@ export const asyncRouterMap = [
redirect: "/smp/udiinfoExportSmp",
component: Home,
icon: "tongyong",
name: "供应商平台",
name: "同步自助平台",
hidden: false,
noDropdown: false,
meta: {
@ -818,7 +821,7 @@ export const asyncRouterMap = [
children: [
{
path: "udiinfoExportSmp",
name: "器械信息上传",
name: "耗材字典",
component: udiinfoExportSmp,
meta: {
@ -829,35 +832,63 @@ export const asyncRouterMap = [
path: "UdiInfoDonwloadSmp",
name: "器械信息下载",
component: UdiInfoDonwloadSmp,
hidden: true,
meta: {
authRule: ["thrsys/UdiInfoDonwloadSmp"]
}
},
{
path: "corpExportSmp",
name: "往来单位上传",
name: "往来单位信息",
component: corpExportSmp,
meta: {
authRule: ["thrsys/corpExportSmp"]
}
},
{
path: "thrProductsExportSmp",
name: "第三方产品信息上传",
component: thrProductsExportSmp,
meta: {
authRule: ["thrsys/thrProductsExportSmp"]
}
},
{
path: "thrOrderExportSmp",
name: "第三方业务单据上传",
component: thrOrderExportSmp,
path: "/thirdsysSmp",
redirect: "/thirdsysSmp/thrProductsExportSmp",
name: "第三方数据",
component: Empty,
meta: {
authRule: ["thrsys/thrOrderExportSmp"]
}
authRule: ["thirdsysSmp/thirdsysSmp"]
},
children: [
{
path: "thrInvExportSmp",
name: "仓库信息",
component: thrProductsExportSmp,
meta: {
authRule: ["thrsys/thrProductsExportSmp"]
}
},
{
path: "thrProductsExportSmp",
name: "产品信息",
component: thrProductsExportSmp,
meta: {
authRule: ["thrsys/thrProductsExportSmp"]
}
},
{
path: "thrCorpsExportSmp",
name: "往来单位",
component: thrCorpsExportSmp,
meta: {
authRule: ["thrsys/thrProductsExportSmp"]
}
},
{
path: "thrOrderExportSmp",
name: "业务单据",
component: thrOrderExportSmp,
meta: {
authRule: ["thrsys/thrOrderExportSmp"]
}
},
]
},
{
path: "orderSmpDl",
name: "送货单下载",

@ -10,7 +10,7 @@
<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 type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>

@ -10,7 +10,7 @@
<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 type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>

@ -38,7 +38,7 @@
<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="postSmpOrder"></el-button>
<el-button type="primary" icon="search" @click="postSmpOrder"></el-button>
</el-button-group>
</el-form-item>

@ -38,11 +38,11 @@
<el-button type="primary" icon="search" @click="allExport" v-if="selectType==0"
>结果全部导出
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
<el-button type="primary" icon="search" @click="selectUpload"
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
<el-button type="primary" icon="search" @click="allUpload"
v-if="selectType==1"
>一键上传
</el-button>
@ -79,213 +79,244 @@
</template>
<script>
import {corpsDlAll} from "../../api/thrsys/thrCorps";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {ucloudUnit} from "../../api/basic/basicUnitMaintain";
import {selectIp} from "../../api/param/systemParamConfig";
import {exportExcel} from "../../api/thrsys/thrCorpsExport"
import {corpsDlAll} from "../../api/thrsys/thrCorps";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {ucloudUnit} from "../../api/basic/basicUnitMaintain";
import {selectIp} from "../../api/param/systemParamConfig";
import {exportExcel, uploadSmp} from "../../api/thrsys/thrCorpsExport"
export default {
export default {
name: "ThrCorpSelect",
props: {
selectType: {
type: Object,
required: true,
},
isDownThrSys: {
type: Object,
required: true,
},
name: "ThrCorpSelect",
props: {
selectType: {
type: Object,
required: true,
},
data() {
return {
filterQuery: {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys:null,
},
total: 0,
list: [],
thirdSys: [],
thirdSysDetail: null,
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
};
isDownThrSys: {
type: Object,
required: true,
},
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys:null,
};
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.isDownThrSys = this.isDownThrSys;
ucloudUnit(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);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
data() {
return {
filterQuery: {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys: null,
},
handleSelectionChange(val) {
this.multipleSelection = val;
total: 0,
list: [],
thirdSys: [],
thirdSysDetail: null,
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
};
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
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 = [];
});
},
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) => {
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys: null,
};
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.isDownThrSys = this.isDownThrSys;
ucloudUnit(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/corp/upload";
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSys,
key: "corpUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
downloadErp(){
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
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 = [];
});
this.downloadAllErp();
},
},
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/corp/upload";
}
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSys,
key: "corpUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
downloadAllErp(){
corpsDlAll(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("提交成功,后台正在下载!")
} else {
this.$message.error(response.message)
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message.error("下载失败!");
});
},
downloadErp() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.downloadAllErp();
},
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
downloadAllErp() {
corpsDlAll(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("提交成功,后台正在下载!")
} else {
this.$message.error(response.message)
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message.error("下载失败!");
});
this.allExport();
},
allExport() {
exportExcel(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "导出成功后台正在生成Json文件请稍后刷新查看",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
},
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.allExport();
},
allExport() {
exportExcel(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "导出成功后台正在生成Json文件请稍后刷新查看",
});
} else {
this.$message({
type: "error",
message: "上传失败",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
},
});
},
components: {},
mounted() {
selectUpload() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.allUpload();
},
created() {
// this.getList();
this.getBasicThirdSys();
allUpload() {
uploadSmp(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
};
},
components: {},
mounted() {
},
created() {
// this.getList();
this.getBasicThirdSys();
},
};
</script>

@ -95,198 +95,199 @@
</template>
<script>
import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsExport.js";
import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrCorpSelectVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsExport.js";
import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrCorpSelectVisible: 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) => {
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;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
exportExcel() {
this.selectType = 0;
this.thrCorpSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrCorpSelectVisible = true;
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/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();
});
},
});
},
exportExcel() {
this.selectType = 0;
this.thrCorpSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrCorpSelectVisible = true;
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/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();
cancelDialog(val) {
if (val) {
this.getList();
}
this.thrCorpSelectVisible = 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;
});
});
},
cancelDialog(val) {
if (val) {
this.getList();
}
this.thrCorpSelectVisible = 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];
},
.catch(() => {
});
},
mounted() {
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("文件上传成功,请稍后刷新查看!");
}
},
components: {thrCorpSelect},
created() {
// this.getBasicThirdSys();
this.getList();
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
};
},
mounted() {
},
components: {thrCorpSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
.el-row {
display: flex;
flex-wrap: wrap;
}
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -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="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)"
>下载
</el-button
>
<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="thrCorpSelectVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="thrCorpSelectVisible"
>
<thrCorpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrCorpSelect>
</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/thrCorpsExport.js";
import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
type: 2,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrCorpSelectVisible: 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,
type: 2,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(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);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() {
this.selectType = 0;
this.thrCorpSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrCorpSelectVisible = true;
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/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.thrCorpSelectVisible = 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: {thrCorpSelect},
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>

@ -10,7 +10,7 @@
<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 type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
@ -57,9 +57,9 @@
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
@ -96,204 +96,205 @@
</template>
<script>
import {filterLog, deleteLog} from "../../api/thrsys/thrOrderExport";
import thrOrderSelect from "./ThrOrderSelect";
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,
type:2,
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,
type:2,
limit: 20,
thirdSysFk: null,
};
this.getList();
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
type: 2,
thirdSysFk: null,
},
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;
});
loading: false,
selectType: 0,
thrOrderSelectVisible: false,
list: [],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
exportExcel() {
this.selectType = 0;
this.thrOrderSelectVisible = true;
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadSmp() {
this.selectType = 1;
this.thrOrderSelectVisible = true;
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
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);
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
type: 2,
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;
});
},
cancelDialog(val) {
if (val) {
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();
}
this.thrOrderSelectVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
});
// a.setAttribute("download", "");
// a.setAttribute("href", href);
// a.click();
// window.open(mOrder.exportFilePath);
},
cancelDialog(val) {
if (val) {
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
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;
});
})
.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];
},
.catch(() => {
});
},
mounted() {
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("文件上传成功,请稍后刷新查看!");
}
},
components: {thrOrderSelect},
created() {
// this.getBasicThirdSys();
this.getList();
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;
}
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
.el-row {
display: flex;
flex-wrap: wrap;
}
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -10,7 +10,7 @@
<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 type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>

Loading…
Cancel
Save