第三方对接,,,

fengcang
anthonyywj2 3 years ago
parent f3552f79dd
commit 6f3fb8728a

@ -86,6 +86,13 @@
show-overflow-tooltip show-overflow-tooltip
:formatter="formatterThirdSys" :formatter="formatterThirdSys"
></el-table-column> ></el-table-column>
<el-table-column
label="备注"
prop="remark"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
@ -151,294 +158,294 @@
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsImport"; import {filterLog, deleteLog} from "../../api/thrsys/thrCorpsImport";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys"; import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {downloadAll} from "../../api/thrsys/thrCorps"; import {downloadAll} from "../../api/thrsys/thrCorps";
import {selectIp} from "../../api/param/systemParamConfig"; import {selectIp} from "../../api/param/systemParamConfig";
import thrCorpsImportDetail from "./ThrCorpsImportDetail"; import thrCorpsImportDetail from "./ThrCorpsImportDetail";
import thrCorpSelect from "./ThrCorpSelect"; import thrCorpSelect from "./ThrCorpSelect";
import axios from "axios"; import axios from "axios";
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,
thirdSysFk: null, thirdSysFk: null,
},
udiImportDetailVisible: false,
thrCorpSelectVisible: false,
checked: false,
list: [],
fileList:[],
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
currentRow: null,
editQuery: null,
fromStatus: {
0: "产品信息",
1: "库存信息",
2: "异常第三方上传"
},
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
templateDlUrl: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
}, },
getList() { udiImportDetailVisible: false,
this.loading = true; thrCorpSelectVisible: false,
filterLog(this.filterQuery) checked: false,
.then((response) => { list: [],
this.loading = false; fileList: [],
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); currentRow: null,
} editQuery: null,
}) fromStatus: {
.catch(() => { 0: "产品信息",
this.loading = false; 1: "库存信息",
this.list = []; 2: "异常第三方上传"
this.total = 0;
});
}, },
downloadCorps() { status: {
this.selectType = 3; 0: "等待处理",
this.thrCorpSelectVisible = true; 1: "正在处理",
2: "处理异常",
3: "处理完成"
}, },
genInCode() { uploadFileUrl: null,
this.selectBasicUdiVisible = true; uploadData: {
}, thirdSys: "thirdId",
sysChange() {
this.getThirdSysDetail();
}, },
templateDlUrl: null,
};
},
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);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
downloadCorps() {
this.selectType = 3;
this.thrCorpSelectVisible = true;
},
genInCode() {
this.selectBasicUdiVisible = true;
},
sysChange() {
this.getThirdSysDetail();
},
handleDetailClick(row) { handleDetailClick(row) {
this.currentRow = row; this.currentRow = row;
this.udiImportDetailVisible = true; this.udiImportDetailVisible = true;
}
,
cancelDialog(val) {
this.udiImportDetailVisible = false;
this.thrCorpSelectVisible = false;
if (val) {
this.getList();
} }
, }
cancelDialog(val) { ,
this.udiImportDetailVisible = false; handleCurrentChange(val) {
this.thrCorpSelectVisible = false; this.filterQuery.page = val;
if (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(() => {
});
}
,
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList(); this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
// axios.get("./config.json").then(res => {
// //
// let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
//
// });
}
,
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/corp/upload";
} }
} });
, }
handleCurrentChange(val) { ,
this.filterQuery.page = val; handleChange(response, files, fileList) {
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
this.$message.success(response.data);
this.getList(); this.getList();
} }
, this.fileList = [];
deleteDialog(rowId) { }
this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", { ,
confirmButtonText: "确定", statusFilterType(status) {
cancelButtonText: "取消", const statusMap = {
type: "warning", 0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}
,
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "corpUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
}) })
.then(() => { .catch(() => {
let dQuery = { this.loading = false;
id: rowId, this.list = [];
}; });
deleteLog(dQuery) this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
.then((response) => { axios.get("./config.json").then(res => {
this.loading = false; let response = res.data.SERVER_IP;
if (response.code == 20000) { this.templateDlUrl = response + "/第三方往来单位信息导入模板.xlsx";
this.$message.success("删除成功"); });
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
}
,
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
// axios.get("./config.json").then(res => {
// //
// let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
//
// });
} }
, ,
selectSysParam() { jumpDl() {
window.open(this.templateDlUrl, '_blank');
}
,
downloadDatas() {
this.$confirm("此操作从第三方系统下载全部往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let query = { let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk thirdSysFk: this.filterQuery.thirdSysFk
}; };
selectIp(query).then((response) => { downloadAll(query).then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/corp/upload"; this.$message.success(response.data);
} else {
this.$message.error(response.message);
} }
});
}
,
handleChange(response, files, fileList) {
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
this.$message.success(response.data);
this.getList(); this.getList();
}
this.fileList = [];
}
,
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}
,
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "corpUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方往来单位信息导入模板.xlsx";
});
}
,
jumpDl() {
window.open(this.templateDlUrl, '_blank');
}
,
downloadDatas() {
this.$confirm("此操作从第三方系统下载全部往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk
};
downloadAll(query).then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
this.getList();
});
}); });
} });
, }
formatterThirdSys(key) { ,
let data = null; formatterThirdSys(key) {
this.thirdSys.forEach((item, index) => { let data = null;
if (key.thirdSysFk == item.thirdId) { this.thirdSys.forEach((item, index) => {
data = item.thirdName; if (key.thirdSysFk == item.thirdId) {
} data = item.thirdName;
}); }
return data; });
} return data;
, }
}, ,
},
mounted() { mounted() {
}, },
components: {thrCorpsImportDetail, thrCorpSelect}, components: {thrCorpsImportDetail, thrCorpSelect},
created() { created() {
this.getBasicThirdSys(); this.getBasicThirdSys();
// this.getList(); // 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>

@ -98,6 +98,11 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="备注"
prop="remark"
show-overflow-tooltip
></el-table-column>
<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

@ -1,156 +1,162 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.status" placeholder="处理状态"> <el-select v-model="filterQuery.status" placeholder="处理状态">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="处理中" value="0"></el-option> <el-option label="处理中" value="0"></el-option>
<el-option label="已处理" value="1"></el-option> <el-option label="已处理" value="1"></el-option>
<el-option label="异常" value="2"></el-option> <el-option label="异常" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统" @change="sysChange"> <el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统" @change="sysChange">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
:label="item.thirdName" :label="item.thirdName"
:value="item.thirdId"> :value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<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-upload <el-upload
:action="uploadFileUrl" :action="uploadFileUrl"
multiple multiple
:limit="1" :limit="1"
:data="uploadData" :data="uploadData"
:show-file-list="false" :show-file-list="false"
:on-success="handleChange" :on-success="handleChange"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1" v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1"
:file-list="fileList" :file-list="fileList"
> >
<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="jumpDl" <el-button type="primary" icon="search" @click="jumpDl"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1">模板下载 v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1">模板下载
</el-button> </el-button>
<el-button type="primary" icon="search" @click="downloadOrderss" <el-button type="primary" icon="search" @click="downloadOrderss"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3"> v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
下载业务单据 下载业务单据
</el-button> </el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="记录ID" label="记录ID"
prop="genKey" prop="genKey"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="来源" label="来源"
prop="fromType" prop="fromType"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="更新日期" label="更新日期"
prop="updateTime" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="来源系统" label="来源系统"
prop="thirdSysFk" prop="thirdSysFk"
:formatter="formatterThirdSys" :formatter="formatterThirdSys"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type="statusFilterType(scope.row.status)" :type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }} >{{ status[scope.row.status] }}
</el-tag </el-tag
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleDetailClick(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="udiImportDetailVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="udiImportDetailVisible"
>
<thrOrderImportDetail
:currentRow="currentRow"
></thrOrderImportDetail>
</el-dialog>
<el-dialog <el-table-column
title="下载业务单据" label="备注"
:visible.sync="thrOrderSelectVisible" prop="remark"
width="85%" show-overflow-tooltip
:close-on-click-modal="false" ></el-table-column>
:close-on-press-escape="false" <el-table-column label="操作" fixed="right" width="160">
v-if="thrOrderSelectVisible" <template slot-scope="scope">
> <el-button
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" :isDownThrSys="true" type="text"
></thrOrderSelect> size="small"
</el-dialog> @click.native.stop="handleDetailClick(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="udiImportDetailVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="udiImportDetailVisible"
>
<thrOrderImportDetail
:currentRow="currentRow"
></thrOrderImportDetail>
</el-dialog>
<el-dialog
title="下载业务单据"
:visible.sync="thrOrderSelectVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="thrOrderSelectVisible"
>
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" :isDownThrSys="true"
></thrOrderSelect>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit" <el-pagination
@current-change="handleCurrentChange" :page-size="filterQuery.limit"
layout="prev, pager, next" @current-change="handleCurrentChange"
:total="total" layout="prev, pager, next"
></el-pagination> :total="total"
</div> ></el-pagination>
</div>
</template> </template>
<script> <script>
@ -164,298 +170,298 @@ import thrOrderSelect from "./ThrOrderSelect";
import {selectIp} from "../../api/param/systemParamConfig"; import {selectIp} from "../../api/param/systemParamConfig";
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,
thirdSysFk: null, thirdSysFk: null,
}, },
udiImportDetailVisible: false, udiImportDetailVisible: false,
checked: false, checked: false,
list: [], list: [],
fileList: [], fileList: [],
detailList: [], detailList: [],
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
total: 0, total: 0,
currentRow: null, currentRow: null,
editQuery: null, editQuery: null,
fromStatus: { fromStatus: {
0: "产品信息", 0: "产品信息",
1: "库存信息", 1: "库存信息",
2: "异常第三方上传" 2: "异常第三方上传"
}, },
status: { status: {
0: "等待处理", 0: "等待处理",
1: "正在处理", 1: "正在处理",
2: "处理异常", 2: "处理异常",
3: "处理完成" 3: "处理完成"
}, },
uploadFileUrl: null, uploadFileUrl: null,
uploadData: { uploadData: {
thirdSys: "thirdId", thirdSys: "thirdId",
}, },
templateDlUrl: null, templateDlUrl: null,
busTypes: [], busTypes: [],
thrOrderSelectVisible: false, thrOrderSelectVisible: false,
}; };
}, },
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;
});
},
handleDetailClick(row) {
this.currentRow = row;
console.log(this.currentRow.genKey)
this.udiImportDetailVisible = true;
},
sysChange() {
this.getThirdSysDetail();
// console.log( this.thirdSysDetail.thirdId+"\n"+ this.thirdSysDetail.fromType+"\n"+this.thirdSysDetail.enable);
},
cancelDialog(val) {
this.udiImportDetailVisible = false;
this.thrOrderSelectVisible = false;
if (val) { methods: {
this.getList(); onReset() {
} this.$router.push({
}, path: "",
handleCurrentChange(val) { });
this.filterQuery.page = val; this.filterQuery = {
this.getList(); fromType: null,
}, genKey: null,
jumpDl() { status: null,
window.open(this.templateDlUrl, '_blank'); page: 1,
}, limit: 20,
deleteDialog(rowId) { thirdSysFk: null,
this.$confirm("此操作将删除该业务单据信息, 是否继续?", "提示", { };
confirmButtonText: "确定", this.getList();
cancelButtonText: "取消", },
type: "warning", getList() {
}) this.loading = true;
.then(() => { filterLog(this.filterQuery)
let dQuery = { .then((response) => {
id: rowId, if (response.code == 20000) {
}; this.list = response.data.list || [];
deleteLog(dQuery) this.total = response.data.total || 0;
.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(() => {
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
let response2 = res.data.SERVER_IP;
this.templateDlUrl = response2 + "/第三方业务单据导入模板.xlsx";
console.log(res.data.BASE_URL + "\n");
});
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/order/upload";
}
});
},
formatterThirdSys(key) {
let data = null;
this.thirdSys.forEach((item, index) => {
if (key.thirdSysFk == item.thirdId) {
data = item.thirdName;
}
});
return data;
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else { } else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); this.$message.error(response.message);
this.$message.success("文件上传成功,请稍后刷新查看!");
this.getList();
} }
this.fileList = []; this.loading = false;
}, })
statusFilterType(status) { .catch(() => {
const statusMap = { this.loading = false;
0: "warning", this.list = [];
1: "warning", this.total = 0;
2: "danger", });
3: "success", },
};
return statusMap[status];
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
}, handleDetailClick(row) {
downloadOrderss() { this.currentRow = row;
this.selectType = 3; console.log(this.currentRow.genKey)
this.thrOrderSelectVisible = true; this.udiImportDetailVisible = true;
}, },
downloadDatas() { sysChange() {
this.$confirm("此操作从第三方系统下载全部业务单据信息, 是否继续?", "提示", { this.getThirdSysDetail();
confirmButtonText: "确定", // console.log( this.thirdSysDetail.thirdId+"\n"+ this.thirdSysDetail.fromType+"\n"+this.thirdSysDetail.enable);
cancelButtonText: "取消", },
type: "warning",
}).then(() => {
let query = {
billAction: this.filterQuery.billAction,
thirdSysFk: this.filterQuery.thirdSysFk
};
downloadAll(query).then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
});
});
cancelDialog(val) {
this.udiImportDetailVisible = false;
this.thrOrderSelectVisible = false;
}, if (val) {
getBusType() { this.getList();
let query = { }
enabled: true, },
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
jumpDl() {
window.open(this.templateDlUrl, '_blank');
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该业务单据信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
}; };
getBussinessType(query) deleteLog(dQuery)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.loading = false;
this.filterQuery.billAction = this.busTypes[0].action; if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false;
}); });
}, })
formatter(row, index) { .catch(() => {
if (row.isE == true) { });
row.Registrationstate = "已注册" },
} getBasicThirdSys() {
if (row.Registrationstate == false) { let query = {
row.Registrationstate = "未注册" enabled: true,
} };
return row.Registrationstate getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
// this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload";
let response2 = res.data.SERVER_IP;
this.templateDlUrl = response2 + "/第三方业务单据导入模板.xlsx";
console.log(res.data.BASE_URL + "\n");
});
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/order/upload";
} }
});
}, },
mounted() { formatterThirdSys(key) {
let data = null;
this.thirdSys.forEach((item, index) => {
if (key.thirdSysFk == item.thirdId) {
data = item.thirdName;
}
});
return data;
}, },
components: {thrOrderImportDetail, thrOrderSelect}, handleChange(response, files, fileList) {
created() { console.log(response);
this.getBasicThirdSys(); if (response.code != 20000) {
this.getBusType(); this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
this.getList(); this.getList();
}
this.fileList = [];
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
}, },
downloadOrderss() {
this.selectType = 3;
this.thrOrderSelectVisible = true;
},
downloadDatas() {
this.$confirm("此操作从第三方系统下载全部业务单据信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let query = {
billAction: this.filterQuery.billAction,
thirdSysFk: this.filterQuery.thirdSysFk
};
downloadAll(query).then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
});
});
},
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
})
.catch(() => {
});
},
formatter(row, index) {
if (row.isE == true) {
row.Registrationstate = "已注册"
}
if (row.Registrationstate == false) {
row.Registrationstate = "未注册"
}
return row.Registrationstate
}
},
mounted() {
},
components: {thrOrderImportDetail, thrOrderSelect},
created() {
this.getBasicThirdSys();
this.getBusType();
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>

@ -96,6 +96,13 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="备注"
prop="remark"
show-overflow-tooltip
></el-table-column>
<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

Loading…
Cancel
Save