导入导出bug修复

master
anthonywj 4 years ago
parent 605b52ad27
commit d201af0730

@ -7,3 +7,41 @@ export function postOrder(query) {
data: query
});
}
//往来单位上传
export function corpUpload(query) {
return axios({
url: "/udiwms/corps/importLog/uploadSmp",
method: "post",
data: query
});
}
//产品信息上传
export function udiUpload(query) {
return axios({
url: "/udiwms/products/importLog/uploadSmp",
method: "post",
data: query
});
}
//第三方业务单据上传
export function orderUpload(query) {
return axios({
url: "/udiwms/thrOrder/importLog/uploadSmp",
method: "post",
data: query
});
}
export function thrProductUpload(query) {
return axios({
url: "/udiwms/thrProducts/importLog/uploadSmp",
method: "post",
data: query
});
}

@ -106,6 +106,7 @@
fromType: null,
page: 1,
limit: 20,
type:1,
thirdSysFk: null,
},
selectType: 0,
@ -144,6 +145,7 @@
genKey: null,
status: null,
page: 1,
type:1,
limit: 20,
thirdSysFk: null,
};

@ -49,20 +49,13 @@
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
label="备注"
prop="remark"
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"
@ -105,6 +98,7 @@
genKey: null,
status: null,
fromType: null,
type:2,
page: 1,
limit: 20,
thirdSysFk: null,
@ -145,6 +139,7 @@
genKey: null,
status: null,
page: 1,
type:2,
limit: 20,
thirdSysFk: null,
};
@ -261,7 +256,7 @@
},
components: {corpSelect},
created() {
this.getBasicThirdSys();
// this.getBasicThirdSys();
this.getList();
},
};

@ -195,6 +195,7 @@
basicUnitMaintainSave,
deleteBasicUnitMaintain, getThrsysUnit
} from "../../api/basic/basicUnitMaintain";
import {corpUpload} from "../../api/thrsys/smp"
import {getBasicThirdSys} from "../../api/basic/basicThirdSys";
import {exportExcel} from "../../api/basic/corpExport"
var pinyin = require("pinyin");
@ -441,6 +442,29 @@
});
},
uploadSMP(){
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.query.ids.push(obj.id);
});
this.allUploadSMP();
},
allUploadSMP(){
corpUpload(this.query)
.then((response) => {
if (response.code == 20000) {
this.$message.success("提交成功,后台正在上传!")
} else {
this.$message.error(response.message)
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message.error("上传失败!");
});
},
handleModifyClick(row) {
this.editDialogVisible = true;
this.editQuery = row;

@ -32,7 +32,7 @@
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
<el-button type="primary" icon="search" @click="allUploadSMP"
v-if="selectType==1"
>一键上传
</el-button>
@ -486,10 +486,9 @@
import {
getUdiInfos,
updateErpProduct,
uploadSmp,
thirdSysDetail,
} from "../../api/basic/udiRelevance";
import {udiUpload} from "../../api/thrsys/smp"
import {exportExcel} from "../../api/basic/udiInfoExport"
import {selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterByUuid} from "../../api/basic/udiInfo";
@ -643,14 +642,14 @@
},
uploadSMP() {
var selectData = this.multipleSelection;
var keys = [];
selectData.forEach((obj) => {
keys.push(obj.id);
this.filterQuery.uuids.push(obj.uuid);
});
var tquery = {
keys: keys,
};
uploadSmp(tquery)
this.allUploadSMP();
},
allUploadSMP(){
udiUpload(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
@ -663,12 +662,14 @@
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
this.$emit("cancelDialog", true);
});
},
handleSelectionChange(val) {

@ -79,7 +79,7 @@
width="85%"
v-if="udiImportDetailVisible"
>
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></udiInfoSelect>
</el-dialog>
@ -101,6 +101,7 @@
data() {
return {
filterQuery: {
type: 1,
genKey: null,
status: null,
fromType: null,
@ -140,6 +141,7 @@
path: "",
});
this.filterQuery = {
type: 1,
fromType: null,
genKey: null,
status: null,
@ -176,7 +178,7 @@
let href =
"http://127.0.0.1:9991" +
"/udiwms/products/exportLog/download" +
"?genKey=" +row.genKey;
"?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())

@ -49,20 +49,13 @@
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
label="备注"
prop="remark"
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"
@ -105,6 +98,7 @@
genKey: null,
status: null,
fromType: null,
type:2,
page: 1,
limit: 20,
thirdSysFk: null,
@ -145,6 +139,7 @@
genKey: null,
status: null,
page: 1,
type:2,
limit: 20,
thirdSysFk: null,
};
@ -261,8 +256,8 @@
},
components: {udiInfoSelect},
created() {
this.getBasicThirdSys();
// this.getList();
// this.getBasicThirdSys();
this.getList();
},
};
</script>

@ -100,6 +100,7 @@
data() {
return {
filterQuery: {
type: 1,
genKey: null,
status: null,
fromType: null,
@ -143,6 +144,7 @@
genKey: null,
status: null,
page: 1,
type: 1,
limit: 20,
thirdSysFk: null,
};
@ -155,7 +157,7 @@
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
} else {
this.$message.error(response.message);
}
this.loading = false;
@ -179,7 +181,7 @@
let href =
"http://127.0.0.1:9991" +
"/udiwms/thrOrder/exportLog/download" +
"?genKey=" +row.genKey;
"?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())

@ -106,6 +106,7 @@
fromType: null,
page: 1,
limit: 20,
type:2,
thirdSysFk: null,
},
selectType: 0,
@ -144,6 +145,7 @@
genKey: null,
status: null,
page: 1,
type:2,
limit: 20,
thirdSysFk: null,
};

@ -352,6 +352,15 @@
.catch(() => {
});
},
formatter(row, index) {
if (row.isE == true) {
row.Registrationstate = "已注册"
}
if(row.Registrationstate == false) {
row.Registrationstate = "未注册"
}
return row.Registrationstate
}
},
mounted() {

@ -48,7 +48,7 @@
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
<el-button type="primary" icon="search" @click="allUploadSMP"
v-if="selectType==1"
>一键上传
</el-button>
@ -106,6 +106,7 @@
import {selectIp} from "../../api/param/systemParamConfig";
import {getCloudErp} from "../../api/inout/erpOrder";
import {exportExcel} from "../../api/thrsys/thrOrderExport"
import {orderUpload} from "../../api/thrsys/smp"
export default {
name: "ThrOrderSelect",
@ -212,6 +213,30 @@
});
});
},
uploadSMP(){
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.erpOrderResponses.push(obj);
});
this.allUploadSMP();
},
allUploadSMP(){
orderUpload(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("上传失败!");
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",

@ -101,6 +101,7 @@
data() {
return {
filterQuery: {
type:2,
genKey: null,
status: null,
fromType: null,
@ -140,6 +141,7 @@
path: "",
});
this.filterQuery = {
type:2,
fromType: null,
genKey: null,
status: null,

@ -37,11 +37,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="uploadSmp"
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
<el-button type="primary" icon="search" @click="allUploadSmp"
v-if="selectType==1"
>一键上传
</el-button>
@ -97,6 +97,7 @@
import {selectIp} from "../../api/param/systemParamConfig";
import thrProductsDetail from "./ThrProductsDetail";
import {exportExcel} from "../../api/thrsys/thrProductsExport"
import {thrProductUpload} from "../../api/thrsys/smp"
export default {
name: "thrProductsSelect",
@ -299,6 +300,33 @@
});
},
uploadSmp() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrProductsEntities.push(obj);
});
this.allUploadSmp();
},
allUploadSmp() {
thrProductUpload(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
this.$emit("cancelDialog", true);
} else {
this.$message.error(response.message);
this.$emit("cancelDialog", true);
}
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {

Loading…
Cancel
Save