中继服务,同步服务

master
anthonyywj2 3 years ago
parent d9efb4b86b
commit f900c5ee3d

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

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

@ -10,7 +10,7 @@
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <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="getList"></el-button>
<!--<el-button type="primary" icon="search" @click="exportExcel">Excel</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-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>

@ -10,7 +10,7 @@
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <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="getList"></el-button>
<!--<el-button type="primary" icon="search" @click="exportExcel">Excel</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-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>

@ -38,7 +38,7 @@
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <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="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-button-group>
</el-form-item> </el-form-item>

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

@ -95,198 +95,199 @@
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsExport.js"; import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsExport.js";
import thrCorpSelect from "./ThrCorpSelect"; import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios"; import axios from "axios";
export default {
data() { export default {
return { data() {
filterQuery: { return {
genKey: null, filterQuery: {
status: null, genKey: null,
fromType: null, status: null,
page: 1, fromType: null,
limit: 20, page: 1,
thirdSysFk: null, limit: 20,
}, thirdSysFk: null,
selectType: 0, },
thrCorpSelectVisible: false, selectType: 0,
list: [], thrCorpSelectVisible: false,
detailList: [], list: [],
thirdSys: [], detailList: [],
thirdSysDetail: null, thirdSys: [],
total: 0, thirdSysDetail: null,
editQuery: null, total: 0,
fromStatus: { editQuery: null,
0: "产品信息", fromStatus: {
1: "库存信息", 0: "产品信息",
2: "异常第三方上传" 1: "库存信息",
}, 2: "异常第三方上传"
status: { },
0: "等待处理", status: {
1: "正在处理", 0: "等待处理",
2: "处理异常", 1: "正在处理",
3: "处理完成" 2: "处理异常",
}, 3: "处理完成"
uploadFileUrl: null, },
uploadData: { uploadFileUrl: null,
thirdSys: "thirdId", 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: { this.loading = false;
onReset() { if (response.code == 20000) {
this.$router.push({ this.list = response.data.list || [];
path: "", this.total = response.data.total || 0;
}); } else {
this.filterQuery = { this.$message.error(response.message);
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) { .catch(() => {
this.list = response.data.list || []; this.loading = false;
this.total = response.data.total || 0; this.list = [];
} else { this.total = 0;
this.$message.error(response.message); });
} },
}) exportExcel() {
.catch(() => { this.selectType = 0;
this.loading = false; this.thrCorpSelectVisible = true;
this.list = []; },
this.total = 0; 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() { cancelDialog(val) {
this.selectType = 0; if (val) {
this.thrCorpSelectVisible = true; this.getList();
}, }
uploadSmp() { this.thrCorpSelectVisible = false;
this.selectType = 1; },
this.thrCorpSelectVisible = true; handleCurrentChange(val) {
}, this.filterQuery.page = val;
downloadExcel(row) { this.getList();
axios.get("./config.json").then(res => { },
let baseUrl = res.data.BASE_URL; deleteDialog(rowId) {
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" + this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", {
"?genKey=" + row.genKey; confirmButtonText: "确定",
let a = document.createElement("a"); cancelButtonText: "取消",
fetch(href) type: "warning",
.then((res) => res.blob()) })
.then((blob) => { .then(() => {
a.href = URL.createObjectURL(blob); let dQuery = {
console.log(a.href); id: rowId,
a.download = };
row.filePath.split("/")[ deleteLog(dQuery)
row.filePath.split("/").length - 1 .then((response) => {
]; // // this.loading = false;
document.body.appendChild(a); if (response.code == 20000) {
a.click(); this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList(); 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(() => { .catch(() => {
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() { 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}, statusFilterType(status) {
created() { const statusMap = {
// this.getBasicThirdSys(); 0: "warning",
this.getList(); 1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}, },
}; },
mounted() {
},
components: {thrCorpSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </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="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></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="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-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -57,9 +57,9 @@
<el-table-column label="操作" fixed="right" width="160"> <el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<!--<el-button--> <!--<el-button-->
<!--type="text"--> <!--type="text"-->
<!--size="small"--> <!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"--> <!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载--> <!--&gt;下载-->
<!--</el-button--> <!--</el-button-->
<!--&gt;--> <!--&gt;-->
@ -96,204 +96,205 @@
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "../../api/thrsys/thrOrderExport"; import {filterLog, deleteLog} from "../../api/thrsys/thrOrderExport";
import thrOrderSelect from "./ThrOrderSelect"; import thrOrderSelect from "./ThrOrderSelect";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
genKey: null, genKey: null,
status: null, status: null,
fromType: null, fromType: null,
page: 1, page: 1,
limit: 20, limit: 20,
type:2, type: 2,
thirdSysFk: null, 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();
}, },
getList() { loading: false,
this.loading = true; selectType: 0,
filterLog(this.filterQuery) thrOrderSelectVisible: false,
.then((response) => { list: [],
if (response.code == 20000) { detailList: [],
this.list = response.data.list || []; thirdSys: [],
this.total = response.data.total || 0; thirdSysDetail: null,
}else { total: 0,
this.$message.error(response.message); editQuery: null,
} fromStatus: {
this.loading = false; 0: "产品信息",
}) 1: "库存信息",
.catch(() => { 2: "异常第三方上传"
this.loading = false;
this.list = [];
this.total = 0;
});
}, },
status: {
exportExcel() { 0: "等待处理",
this.selectType = 0; 1: "正在处理",
this.thrOrderSelectVisible = true; 2: "处理异常",
3: "处理完成"
}, },
uploadSmp() { uploadFileUrl: null,
this.selectType = 1; uploadData: {
this.thrOrderSelectVisible = true; 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", ""); methods: {
// a.setAttribute("href", href); onReset() {
// a.click(); this.$router.push({
// window.open(mOrder.exportFilePath); 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) { exportExcel() {
if (val) { 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.getList();
} });
this.thrOrderSelectVisible = false;
}, // a.setAttribute("download", "");
handleCurrentChange(val) { // a.setAttribute("href", href);
this.filterQuery.page = val; // a.click();
// window.open(mOrder.exportFilePath);
},
cancelDialog(val) {
if (val) {
this.getList(); this.getList();
}, }
deleteDialog(rowId) { this.thrOrderSelectVisible = false;
this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", { },
confirmButtonText: "确定", handleCurrentChange(val) {
cancelButtonText: "取消", this.filterQuery.page = val;
type: "warning", 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(() => { .catch(() => {
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() { 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}, statusFilterType(status) {
created() { const statusMap = {
// this.getBasicThirdSys(); 0: "warning",
this.getList(); 1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}, },
}; },
mounted() {
},
components: {thrOrderSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -10,7 +10,7 @@
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <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="getList"></el-button>
<!--<el-button type="primary" icon="search" @click="exportExcel">Excel</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-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>

Loading…
Cancel
Save