第三方往来信息功能代码提交
parent
c8726b4f5a
commit
9a767c2299
@ -0,0 +1,104 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
export function getBasicThirdSys(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function updateBasicThirdSys(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/update",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getDetailBasicThirdSys(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/filterDetail",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function filterDetailByKey(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/filterDetailByKey",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function updateDetailBasicThirdSys(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/saveDetail",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function filterBusTypeDetail(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/filterBusTypeDetail",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function saveBusTypeDetail(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/saveBusTypeDetail",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function saveBusTypes(data) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/saveBusTypes",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteThirdSysBusType(params) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/delete",
|
||||
method: "get",
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
export function updateInterfaceStatus(data) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/updateInterfaceStatus",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function testThirdService(data) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/testThirdService",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function testThirdInter(data) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/testThirdInter",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,91 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
export function getBasicUnitMaintains(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
export function getCorpFilter(query) {
|
||||
return axios({
|
||||
url: "/sale/info/company/product/corp/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function getBasicUnitMaintains2(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/filter2",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function basicUnitMaintainSave(data, formName, method = "post") {
|
||||
let url =
|
||||
formName === "add" ? "/udiwms/basic/unit/maintain/save" : "/udiwms/basic/unit/maintain/update";
|
||||
return axios({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function combine(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/combine",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function combineAll(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/combineAll",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function combineSingle(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/combineSingle",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
export function deleteBasicUnitMaintain(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/unit/maintain/delete",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
export function ucloudUnit(query) {
|
||||
return axios({
|
||||
url: "/udiwms/unitMaintain/filterErp",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function getThrsysUnit(query) {
|
||||
return axios({
|
||||
url: "/udiwms/unitMaintain/thirdSys/detail",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
export function removeRl(query) {
|
||||
return axios({
|
||||
url: "/udiwms/unit/thirdSys/removeRl",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
export function getBaseUrl() {
|
||||
axios.get("./config.json").then(res => {
|
||||
// 基础地址
|
||||
console.log(res.data.BASE_URL + "\n")
|
||||
return res.data.BASE_URL;
|
||||
});
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Created by lk on 17/6/4.
|
||||
*/
|
||||
import axios from "@/utils/request";
|
||||
|
||||
// 获取列表
|
||||
export function systemPDFTemplateList(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/template/list",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
export function systemPDFModuleList(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/module/list",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function getSystemPDFModules(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/module/pdfModules",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function getSystemPDFTemplates(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/template/pdfTemplates",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function systemPDFTemplateSave(data, formName, method = "post") {
|
||||
let url = formName === "add" ? "/system/pdf/template/save" : "/system/pdf/template/update";
|
||||
return axios({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function systemPDFModuleSave(data, formName, method = "post") {
|
||||
let url = formName === "add" ? "/system/pdf/module/save" : "/system/pdf/module/update";
|
||||
return axios({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function systemPDFTemplateDeleteById(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/template/delete",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function moduleDetail(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/module/detail",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function updateDetailRel(query) {
|
||||
return axios({
|
||||
url: "/system/pdf/module/updateRl",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Created by lk on 17/6/4.
|
||||
*/
|
||||
import axios from "@/utils/request";
|
||||
|
||||
// 获取列表
|
||||
export function systemParamConfigList(query) {
|
||||
return axios({
|
||||
url: "/system/param/config/list",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 保存
|
||||
export function systemParamConfigSave(data, formName, method = "post") {
|
||||
let url =
|
||||
formName === "add" ? "/system/param/config/save" : "/system/param/config/update";
|
||||
return axios({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
//获取配置
|
||||
export function selectSysParamByKey(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sys/config/selectByKey",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function selectIp(query) {
|
||||
return axios({
|
||||
url: "/udiwms/basic/thirdsys/selectIp",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
//获取产品信息设置
|
||||
export function finProductSet(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sys/config/selectByBasic",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
export function findApi(query) {
|
||||
return axios({
|
||||
url: "/sys/api/findAll",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
export function getCorps(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/getCorps",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function delCorps(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/delCorps",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function delAll(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/corp/delAll",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
export function downloadAll(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/corp/downloadAll",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function corpsDlAll(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrsys/corp/corpsDlAll",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
|
||||
export function filterLog(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/exportLog/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteLog(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/exportLog/deleteLog",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function downloadLog(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/exportLog/download",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function exportExcel(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/importLog/export",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function uploadSmp(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/importLog/upload",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
import axios from "@/utils/request";
|
||||
|
||||
|
||||
export function filterLog(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/importLog/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function filterDetail(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/importLog/filterDetail",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteLog(query) {
|
||||
return axios({
|
||||
url: "/udiwms/thrCorp/importLog/deleteLog",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.unitId"
|
||||
placeholder="请输入往来单位编码"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.name"
|
||||
placeholder="请输入往来单位"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
|
||||
<el-option
|
||||
v-for="item in thirdSys"
|
||||
:key="item.value"
|
||||
:label="item.thirdName"
|
||||
:value="item.thirdId">
|
||||
<span style="float: left">{{ item.thirdName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-button type="primary" icon="search" @click="clearAll"
|
||||
v-if="!this.thirdSysDetail.enabled">清空全部
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="往来单位ID" prop="id" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="往来单位" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="拼音简写" prop="spell" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="地址" prop="addr" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="社会信用号" prop="creditNo" width="140" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="联系人" prop="contact" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" v-if="thirdSysDetail.fromType!=0" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" :disabled="!delFalg"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
|
||||
></pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCorps, delCorps, delAll, downloadAll
|
||||
} from "@/api/thrsys/thrCorps";
|
||||
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
|
||||
import {ucloudUnit} from "@/api/basic/basicUnitMaintain";
|
||||
import {selectIp} from "@/api/param/systemParamConfig";
|
||||
import {findConfig} from "@/api/thrsys/spsSyncStatus";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
unitId: null,
|
||||
name: null,
|
||||
thirdSys: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
total: 0,
|
||||
list: [],
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
delFalg:true,
|
||||
uploadFileUrl: null,
|
||||
fileList: [],
|
||||
uploadData: {
|
||||
thirdSys: "thirdId",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
// this.$router.push({
|
||||
// path: "",
|
||||
// });
|
||||
this.filterQuery = {
|
||||
unitId: null,
|
||||
name: null,
|
||||
thirdSys: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
|
||||
getList() {
|
||||
|
||||
|
||||
if (this.filterQuery.thirdSys == null) {
|
||||
this.$message.warning("请先选择第三方系统!")
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
ucloudUnit(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;
|
||||
});
|
||||
},
|
||||
deleteDialog(row) {
|
||||
this.$confirm("此操作将永久删除该往来单位信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
let dQuery = {
|
||||
id: row.id,
|
||||
};
|
||||
delCorps(dQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
clearAll() {
|
||||
this.$confirm("此操作将清空所有往来单位信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delAll()
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.success(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
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) => {
|
||||
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 = [];
|
||||
});
|
||||
|
||||
},
|
||||
getConFig(){
|
||||
findConfig().then((response) =>{
|
||||
if (response.code == 20000) {
|
||||
this.delFalg=response.data.basicThirdCorp;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
downloadDatas() {
|
||||
let query = {
|
||||
thirdSysFk: this.filterQuery.thirdSys
|
||||
};
|
||||
downloadAll(query).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.$message.success(response.data);
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getConFig();
|
||||
this.getBasicThirdSys();
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<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="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-upload2" @click="exportExcel">导出往来单位信息</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"
|
||||
border highlight-current-row
|
||||
>
|
||||
<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="操作" 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>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {filterLog, deleteLog} from "@/api/thrsys/thrCorpsExport.js";
|
||||
import thrCorpSelect from "./thrCorpSelect";
|
||||
import axios from "axios";
|
||||
import {formatDate} from "@/utils/date";
|
||||
|
||||
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) => {
|
||||
|
||||
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");
|
||||
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
|
||||
fetch(href)
|
||||
.then((res) => res.blob())
|
||||
.then((blob) => {
|
||||
a.href = URL.createObjectURL(blob);
|
||||
console.log(a.href);
|
||||
a.download = "ThirdCorp_" + timestamp + ".UpperIn";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
cancelDialog(val) {
|
||||
if (val) {
|
||||
this.getList();
|
||||
}
|
||||
this.thrCorpSelectVisible = false;
|
||||
},
|
||||
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>
|
@ -0,0 +1,296 @@
|
||||
<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"
|
||||
:current-page="filterQuery.page"
|
||||
></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>
|
@ -0,0 +1,448 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<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 class="query-form-item">
|
||||
<el-select v-model="filterQuery.status" placeholder="请选择处理状态">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="正在处理" value="0"></el-option>
|
||||
<el-option label="处理完成" value="3"></el-option>
|
||||
<el-option label="处理异常" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统" @change="sysChange">
|
||||
<el-option
|
||||
v-for="item in thirdSys"
|
||||
:key="item.value"
|
||||
:label="item.thirdName"
|
||||
:value="item.thirdId">
|
||||
<span style="float: left">{{ item.thirdName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-upload
|
||||
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1"
|
||||
:action="uploadFileUrl"
|
||||
multiple
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:show-file-list="false"
|
||||
:on-success="handleChange"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button size="mini" icon="el-icon-bottom-right" type="primary">导入往来单位</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" icon="el-icon-download" @click="jumpDl"
|
||||
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1">模板下载
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="downloadCorps"
|
||||
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
|
||||
下载往来单位
|
||||
</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"
|
||||
border highlight-current-row
|
||||
>
|
||||
<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="fromType"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="更新日期"
|
||||
prop="updateTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="来源系统"
|
||||
prop="thirdSysFk"
|
||||
show-overflow-tooltip
|
||||
:formatter="formatterThirdSys"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="remark"
|
||||
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="操作" 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"
|
||||
>
|
||||
<thrCorpsImportDetail
|
||||
:currentRow="currentRow"
|
||||
></thrCorpsImportDetail>
|
||||
</el-dialog>
|
||||
<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" :isDownThrSys="true"
|
||||
></thrCorpSelect>
|
||||
</el-dialog>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {filterLog, deleteLog} from "@/api/thrsys/thrCorpsImport";
|
||||
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
|
||||
import {downloadAll} from "@/api/thrsys/thrCorps";
|
||||
import {selectIp} from "@/api/param/systemParamConfig";
|
||||
import thrCorpsImportDetail from "./thrCorpsImportDetail";
|
||||
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,
|
||||
},
|
||||
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() {
|
||||
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) {
|
||||
this.currentRow = row;
|
||||
this.udiImportDetailVisible = true;
|
||||
|
||||
}
|
||||
,
|
||||
cancelDialog(val) {
|
||||
this.udiImportDetailVisible = false;
|
||||
this.thrCorpSelectVisible = false;
|
||||
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.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";
|
||||
}
|
||||
});
|
||||
}
|
||||
,
|
||||
handleChange(response, files, fileList) {
|
||||
if (response.code != 20000) {
|
||||
this.$message.error(response.message);
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.success(response.data);
|
||||
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;
|
||||
this.thirdSys.forEach((item, index) => {
|
||||
if (key.thirdSysFk == item.thirdId) {
|
||||
data = item.thirdName;
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
components: {thrCorpsImportDetail, 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>
|
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="query" size="mini">
|
||||
<el-row>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.unitId"
|
||||
placeholder="请输入往来单位编码"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.name"
|
||||
placeholder="请输入往来单位"
|
||||
clearable
|
||||
></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="el-icon-search" @click="getList">查询</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
border highlight-current-row
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="往来单位ID" prop="unitId" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="往来单位" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="拼音简写" prop="spell" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="地址" prop="addr" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="社会信用号" prop="creditNo" width="140" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="联系人" prop="contact" width="100" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
filterDetail,
|
||||
} from "@/api/thrsys/thrCorpsImport";
|
||||
|
||||
export default {
|
||||
name: "ThrCorpsImportDetail",
|
||||
props: {
|
||||
currentRow: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
genKey: null,
|
||||
unitId: null,
|
||||
name: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
list: [],
|
||||
detailList: [],
|
||||
total: 0,
|
||||
status: {
|
||||
0: "未处理",
|
||||
1: "处理失败",
|
||||
2: "处理成功"
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
genKey: null,
|
||||
unitId: null,
|
||||
name: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
console.log(" this.genKey = " + this.currentRow)
|
||||
this.filterQuery.genKey = this.currentRow.genKey;
|
||||
filterDetail(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;
|
||||
});
|
||||
},
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
0: "warning",
|
||||
1: "danger",
|
||||
2: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
filters: {},
|
||||
};
|
||||
</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>
|
Loading…
Reference in New Issue