第三方往来单位界面样式修改

prod
郑明梁 3 years ago
parent 45e65f25ca
commit 6f44066cf1

@ -1,83 +1,97 @@
<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="el-icon-upload2" @click="selectExport" v-if="selectType==0"
>选中导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" @click="allExport" v-if="selectType==0"
>结果全部导出
</el-button>
<el-button type="primary" icon="search" @click="selectUpload"
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="allUpload"
v-if="selectType==1"
>一键上传
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadErp" v-if="selectType==3"
>选中下载
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadAllErp" v-if="selectType==3"
>结果全部下载
</el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
border highlight-current-row>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="60"></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>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="单位编码:">
<el-input
v-model="filterQuery.unitId"
placeholder="请输入往来单位编码"
style="width: 90%"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="往来单位:">
<el-input
v-model="filterQuery.name"
placeholder="请输入往来单位"
style="width: 90%"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" style="width: 90%"
@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-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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="selectExport" v-if="selectType==0"
>选中导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" @click="allExport" v-if="selectType==0"
>结果全部导出
</el-button>
<el-button type="primary" icon="el-icon-top-upload" @click="selectUpload"
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="el-icon-top-upload" @click="allUpload"
v-if="selectType==1"
>一键上传
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadErp" v-if="selectType==3"
>选中下载
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadAllErp" v-if="selectType==3"
>结果全部下载
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
border highlight-current-row>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="60"></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>
@ -89,231 +103,234 @@ import {exportExcel, uploadSmp} from "@/api/thrsys/thrCorpsExport"
export default {
name: "ThrCorpSelect",
props: {
selectType: {
type: Object,
required: true,
},
isDownThrSys: {
type: Object,
required: true,
},
name: "ThrCorpSelect",
props: {
selectType: {
type: Object,
required: true,
},
data() {
return {
filterQuery: {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys: null,
},
total: 0,
list: [],
thirdSys: [],
thirdSysDetail: null,
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
loading:false,
};
isDownThrSys: {
type: Object,
required: true,
},
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys: null,
};
this.getList();
},
data() {
return {
showSearch: 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",
},
loading: false,
};
},
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);
}
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thrCorpEntities: [],
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
isDownThrSys: null,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
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) {
this.multipleSelection = val;
},
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 = [];
});
},
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
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 = [];
});
},
downloadErp() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.downloadAllErp();
},
downloadErp() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.downloadAllErp();
},
downloadAllErp() {
corpsDlAll(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("提交成功,后台正在下载!")
} else {
this.$message.error(response.message)
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message.error("下载失败!");
});
},
downloadAllErp() {
corpsDlAll(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message.success("提交成功,后台正在下载!")
} else {
this.$message.error(response.message)
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message.error("下载失败!");
});
},
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.allExport();
},
allExport() {
exportExcel(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "导出成功后台正在生成Json文件请稍后刷新查看",
});
this.allExport();
},
allExport() {
exportExcel(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "导出成功后台正在生成Json文件请稍后刷新查看",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
selectUpload() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
} else {
this.$message({
type: "error",
message: response.message,
});
this.allUpload();
},
allUpload() {
uploadSmp(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
components: {},
mounted() {
selectUpload() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.thrCorpEntities.push(obj);
});
this.allUpload();
},
created() {
// this.getList();
this.getBasicThirdSys();
allUpload() {
uploadSmp(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
},
components: {},
mounted() {
},
created() {
// this.getList();
this.getBasicThirdSys();
},
};

@ -1,75 +1,90 @@
<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"
<div>
<el-card class="el-card">
<el-form size="mini" :model="filterQuery" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="单位编码:">
<el-input
v-model="filterQuery.unitId"
placeholder="请输入往来单位编码"
style="width: 90%"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="往来单位:">
<el-input
v-model="filterQuery.name"
placeholder="请输入往来单位"
style="width: 90%"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSys" style="width: 90%" 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-col>
</el-row>
</el-form>
></pagination>
</el-card>
</div>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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-delete-solid" @click="clearAll"
v-if="!this.thirdSysDetail.enabled">清空全部
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<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="60">
<template slot-scope="scope">
<el-button type="text" @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
getCorps, delCorps, delAll, downloadAll
} from "@/api/thrsys/thrCorps";
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
import {ucloudUnit} from "@/api/basic/basicUnitMaintain";
@ -77,210 +92,214 @@ 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",
},
};
data() {
return {
showSearch: true,
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();
},
methods: {
onReset() {
// this.$router.push({
// path: "",
// });
this.filterQuery = {
unitId: null,
name: null,
thirdSys: null,
page: 1,
limit: 20,
};
this.getList();
},
getList() {
getList() {
if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
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;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
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",
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);
}
})
.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(() => {
this.loading = false;
});
})
.catch(() => {
});
},
})
.catch(() => {
});
},
clearAll() {
this.$confirm("此操作将清空所有往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
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);
}
})
.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";
}
.catch(() => {
this.loading = false;
});
},
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);
}
});
})
.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 = [];
});
},
},
components: {},
mounted() {
getConFig() {
findConfig().then((response) => {
if (response.code == 20000) {
this.delFalg = response.data.basicThirdCorp;
} else {
this.$message.error(response.message);
}
});
},
created() {
this.getConFig();
this.getBasicThirdSys();
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();
},
};

@ -1,91 +1,93 @@
<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-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="记录ID:">
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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>
</div>
<el-divider style="margin: 15px"></el-divider>
<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
>
<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>
<el-table-column
<el-table-column
label="更新日期"
prop="updateTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
>{{ 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
>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="downloadExcel(scope.row)"
>下载
</el-button
>
<el-button
>下载
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
<el-dialog
title="导出往来单位信息"
:visible.sync="thrCorpSelectVisible"
width="85%"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="thrCorpSelectVisible"
>
<thrCorpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrCorpSelect>
</el-dialog>
>
<thrCorpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrCorpSelect>
</el-dialog>
<pagination
v-show="total>0"
@ -107,6 +109,7 @@ import {formatDate} from "@/utils/date";
export default {
data() {
return {
showSearch: true,
filterQuery: {
genKey: null,
status: null,
@ -156,25 +159,28 @@ export default {
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() {
@ -189,19 +195,19 @@ export default {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrCorp/exportLog/download" +
"?genKey=" + row.genKey;
"?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();
});
.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();
});
});
},
@ -217,26 +223,26 @@ export default {
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(() => {
});
.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);

@ -1,98 +1,100 @@
<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>
<div>
<el-form :inline="true" :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="记录ID:">
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
</el-form-item>
</el-col>
</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>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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-share" @click="uploadSmp"></el-button>
</el-button-group>
</div>
<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-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="120">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="downloadExcel(scope.row)"
>下载
</el-button
>
<el-button
type="text"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</div>
<el-dialog
title="导出往来单位信息"
:visible.sync="thrCorpSelectVisible"
width="80%"
: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>
@ -101,196 +103,200 @@ 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",
},
};
},
data() {
return {
showSearch: true,
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);
}
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
fromType: null,
genKey: null,
status: null,
page: 1,
type: 2,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
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();
});
});
},
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
cancelDialog(val) {
if (val) {
this.getList();
}
this.thrCorpSelectVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
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();
},
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) {
});
});
},
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);
} 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];
},
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
mounted() {
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
components: {thrCorpSelect},
created() {
// this.getBasicThirdSys();
this.getList();
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {thrCorpSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -1,163 +1,168 @@
<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>
<div>
<el-card>
<el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="记录ID:">
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理状态:">
<el-select v-model="filterQuery.status" style="width: 90%" 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-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSysFk" style="width: 90%" 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-col>
</el-row>
</el-form>
<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>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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>
</div>
<el-divider style="margin: 15px"></el-divider>
<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-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="来源"
prop="fromType"
show-overflow-tooltip
>
<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>
<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="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"
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
>
<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 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="120">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="handleDetailClick(scope.row)"
>详情
</el-button
>
<el-button
type="text"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="导入往来单位详情"
:visible.sync="udiImportDetailVisible"
width="80%"
: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="80%"
: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>
@ -170,279 +175,285 @@ 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,
};
data() {
return {
showSearch: true,
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();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
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();
},
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;
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) {
}
,
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();
} 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";
}
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";
}
,
jumpDl() {
window.open(this.templateDlUrl, '_blank');
}
,
downloadDatas() {
this.$confirm("此操作从第三方系统下载全部往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk
};
downloadAll(query).then((response) => {
});
}
,
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";
});
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;
}
,
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();
},
mounted() {
},
components: {thrCorpsImportDetail, thrCorpSelect},
created() {
this.getBasicThirdSys();
// this.getList();
},
};
</script>
<style>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -1,168 +1,179 @@
<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>
<div>
<el-card>
<el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="往来单位编码:">
<el-input
v-model="filterQuery.unitId"
style="width: 90%"
placeholder="请输入往来单位编码"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="往来单位:">
<el-input
v-model="filterQuery.name"
style="width: 90%"
placeholder="请输入往来单位"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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>
</div>
<el-divider style="margin: 15px"></el-divider>
<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";
import {
filterDetail,
} from "@/api/thrsys/thrCorpsImport";
export default {
name: "ThrCorpsImportDetail",
props: {
currentRow: {
type: Object,
required: true,
},
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: "处理成功"
},
};
},
},
data() {
return {
showSearch: true,
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) => {
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
genKey: null,
unitId: null,
name: null,
status: null,
page: 1,
limit: 10,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
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);
}
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
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: {},
};
})
.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;
}
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
.el-row {
display: flex;
flex-wrap: wrap;
}
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

Loading…
Cancel
Save