1.调整数据同步页面
parent
92b1c4a312
commit
528a2ed716
@ -0,0 +1,37 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
//上传任务接口
|
||||
export function filterUploadStatus(params) {
|
||||
return axios({
|
||||
url: "/spssync/basic/upload/status/filter",
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteUploadStatus(params) {
|
||||
return axios({
|
||||
url: "/spssync/basic/upload/status/delete",
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//下载任务接口
|
||||
export function filterDownloadStatus(params) {
|
||||
return axios({
|
||||
url: "/spssync/basic/download/status/filter",
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteDownloadStatus(params) {
|
||||
return axios({
|
||||
url: "/spssync/basic/download/status/delete",
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
export function filterStatusList(query) {
|
||||
return axios({
|
||||
url: "/spssync/basic/udiinfo/getStatus",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteLog(query) {
|
||||
return axios({
|
||||
url: "/spssync/basic/udiinfo/deleteByStatus",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
export function filterStatusList(query) {
|
||||
return axios({
|
||||
url: "/spms/inout/order/status",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteLog(query) {
|
||||
return axios({
|
||||
url: "/spms/inout/order/deleteStatus",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
<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.orderId" 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="1"></el-option>-->
|
||||
<!-- <el-option label="已下载" value="2"></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="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%"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="记录Id"
|
||||
prop="id"
|
||||
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="status"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="statusFilterType(scope.row.status)"
|
||||
>{{ type[scope.row.status] }}
|
||||
</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="更新日期"
|
||||
prop="updateTime"
|
||||
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="handleDetailClick(scope.row)"-->
|
||||
<!-- >详情-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {deleteLog, filterStatusList} from "../../api/sync/spBasicStatus";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
orderId: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
checked: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: null,
|
||||
status: {
|
||||
1: "等待下载",
|
||||
2: "已下载",
|
||||
},
|
||||
type: {
|
||||
1: "耗材字典",
|
||||
2: "仓库字典",
|
||||
3: "往来单位",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
orderId: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
filterStatusList(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
deleteDialog(row) {
|
||||
this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let dQuery = {
|
||||
orderId: row.orderId,
|
||||
};
|
||||
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(() => {
|
||||
});
|
||||
},
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
1: "warning",
|
||||
2: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
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>
|
@ -1,205 +0,0 @@
|
||||
<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.orderId" placeholder="订单号"></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="1"></el-option>
|
||||
<el-option label="已下载" value="2"></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="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%"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="订单号"
|
||||
prop="orderId"
|
||||
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="updateTime"
|
||||
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="handleDetailClick(scope.row)"-->
|
||||
<!-- >详情-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {deleteLog, filterStatusList} from "../../api/sync/spOrderStatus";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
orderId: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
checked: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: null,
|
||||
status: {
|
||||
1: "等待下载",
|
||||
2: "已下载",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
orderId: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
filterStatusList(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
deleteDialog(row) {
|
||||
this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let dQuery = {
|
||||
orderId: row.orderId,
|
||||
};
|
||||
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(() => {
|
||||
});
|
||||
},
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
1: "warning",
|
||||
2: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
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,405 @@
|
||||
<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.id" 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="1"></el-option>
|
||||
<el-option label="异常" value="2"></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="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%"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="记录ID"
|
||||
prop="id"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="任务ID"
|
||||
prop="taskId"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="任务类型"
|
||||
prop="idDatas"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ type[scope.row.idDatas] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="status"
|
||||
width="140"
|
||||
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="180"
|
||||
prop="startTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
width="180"
|
||||
prop="endTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="同步信息"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="detailDialog(scope.row.id)"
|
||||
>详情
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@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"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="同步信息"
|
||||
width="25%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:visible.sync="syncVisible"
|
||||
>
|
||||
<span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {filterDownloadStatus, deleteDownloadStatus, createSchedule, updateConfig} from "../../api/sync/dataSyncStatus";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
id: null,
|
||||
status: "0",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
syncTime: null,
|
||||
},
|
||||
list: [],
|
||||
headers: {},
|
||||
detailList: [],
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
total: 0,
|
||||
currentRow: null,
|
||||
editQuery: null,
|
||||
type: {
|
||||
"AutoDownloadOrder": "扫码单据",
|
||||
"AutoDownloadBusType": "单据类型",
|
||||
"AutoDownloadAllData": "基础信息",
|
||||
"AutoDownloadDiProducts": "国家库DI数据"
|
||||
},
|
||||
status: {
|
||||
0: "等待处理",
|
||||
1: "处理完成",
|
||||
2: "处理异常",
|
||||
},
|
||||
|
||||
configQuery: {
|
||||
id: null,
|
||||
typeBus: null,
|
||||
typeScan: null,
|
||||
typeThird: null,
|
||||
basicProducts: null,
|
||||
basicCorp: null,
|
||||
basicInv: null,
|
||||
basicThirdProducts: null,
|
||||
basicThirdCorp: null,
|
||||
basicThirdInv: null,
|
||||
basicThirdBusOrder: null,
|
||||
orderScanFinish: null,
|
||||
dbDiProducts: null,
|
||||
downstreamEnable: null,
|
||||
|
||||
},
|
||||
uploadFileUrl: null,
|
||||
uploadData: {
|
||||
thirdSys: "thirdId",
|
||||
},
|
||||
templateDlUrl: null,
|
||||
checked: false,
|
||||
syncTime: null,
|
||||
configParms: {},
|
||||
syncInfo: null,
|
||||
syncVisible: false
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
id: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.syncTime = null;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
filterDownloadStatus(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;
|
||||
});
|
||||
},
|
||||
|
||||
saveConfig() {
|
||||
updateConfig(this.configQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("更新成功!");
|
||||
this.getConfig();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
cancelDialog(val) {
|
||||
this.udiImportDetailVisible = false;
|
||||
this.thrCorpSelectVisible = false;
|
||||
if (val) {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
,
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
}
|
||||
,
|
||||
|
||||
createScheduleDialog(type) {
|
||||
if (this.$isNotBlank(this.syncTime)) {
|
||||
this.$confirm("此操作将从" + this.syncTime + "开始同步最新数据,是否继续", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.createSchedule(type);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.createSchedule(type);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
createSchedule(type) {
|
||||
let query = {
|
||||
createType: type,
|
||||
syncTime: this.syncTime,
|
||||
}
|
||||
|
||||
createSchedule(query)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("创建成功!");
|
||||
} else if (response.code == 501) {
|
||||
|
||||
this.$alert(response.message, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: "warning",
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let dQuery = {
|
||||
id: rowId,
|
||||
};
|
||||
deleteDownloadStatus(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);
|
||||
this.getList();
|
||||
} else {
|
||||
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
|
||||
this.$message.success(response.data);
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
,
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
0: "warning",
|
||||
1: "success",
|
||||
2: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
detailDialog(id) {
|
||||
this.syncVisible = true;
|
||||
this.list.forEach(item => {
|
||||
if (id === item.id) {
|
||||
this.syncInfo = item.remark;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.headers = {
|
||||
ADMIN_ID: store.getters.adminId,
|
||||
ADMIN_TOKEN: store.getters.token,
|
||||
};
|
||||
this.getList();
|
||||
this.getConfig();
|
||||
},
|
||||
};
|
||||
</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;
|
||||
}
|
||||
|
||||
.syncInfo {
|
||||
font-size: medium;
|
||||
font-family: "Microsoft YaHei";
|
||||
line-height: 25px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,404 @@
|
||||
<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.id" 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="1"></el-option>
|
||||
<el-option label="异常" value="2"></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="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%"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="记录ID"
|
||||
prop="id"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="任务ID"
|
||||
prop="taskId"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="任务类型"
|
||||
prop="idDatas"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ type[scope.row.idDatas] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="status"
|
||||
width="140"
|
||||
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="180"
|
||||
prop="startTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
width="180"
|
||||
prop="endTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="同步信息"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="detailDialog(scope.row.id)"
|
||||
>详情
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@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"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="同步信息"
|
||||
width="25%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:visible.sync="syncVisible"
|
||||
>
|
||||
<span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {filterUploadStatus, deleteUploadStatus, updateConfig} from "../../api/sync/dataSyncStatus";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
id: null,
|
||||
status: "0",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
syncTime: null,
|
||||
},
|
||||
list: [],
|
||||
headers: {},
|
||||
detailList: [],
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
total: 0,
|
||||
currentRow: null,
|
||||
editQuery: null,
|
||||
type: {
|
||||
"AutoDownloadOrder": "扫码单据",
|
||||
"AutoDownloadBusType": "单据类型",
|
||||
"AutoDownloadAllData": "基础信息",
|
||||
"AutoDownloadDiProducts": "国家库DI数据"
|
||||
},
|
||||
status: {
|
||||
0: "等待处理",
|
||||
1: "处理完成",
|
||||
2: "处理异常",
|
||||
},
|
||||
|
||||
configQuery: {
|
||||
id: null,
|
||||
typeBus: null,
|
||||
typeScan: null,
|
||||
typeThird: null,
|
||||
basicProducts: null,
|
||||
basicCorp: null,
|
||||
basicInv: null,
|
||||
basicThirdProducts: null,
|
||||
basicThirdCorp: null,
|
||||
basicThirdInv: null,
|
||||
basicThirdBusOrder: null,
|
||||
orderScanFinish: null,
|
||||
dbDiProducts: null,
|
||||
downstreamEnable: null,
|
||||
|
||||
},
|
||||
uploadFileUrl: null,
|
||||
uploadData: {
|
||||
thirdSys: "thirdId",
|
||||
},
|
||||
templateDlUrl: null,
|
||||
checked: false,
|
||||
syncTime: null,
|
||||
syncInfo: null,
|
||||
syncVisible: false
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
id: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.syncTime = null;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
filterUploadStatus(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;
|
||||
});
|
||||
},
|
||||
|
||||
saveConfig() {
|
||||
|
||||
updateConfig(this.configQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("更新成功!");
|
||||
this.getConfig();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
cancelDialog(val) {
|
||||
this.udiImportDetailVisible = false;
|
||||
this.thrCorpSelectVisible = false;
|
||||
if (val) {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
,
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
}
|
||||
,
|
||||
|
||||
/* createScheduleDialog(type) {
|
||||
if (this.$isNotBlank(this.syncTime)) {
|
||||
this.$confirm("此操作将从" + this.syncTime + "开始同步最新数据,是否继续", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.createSchedule(type);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.createSchedule(type);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
createSchedule(type) {
|
||||
let query = {
|
||||
createType: type,
|
||||
syncTime: this.syncTime,
|
||||
}
|
||||
|
||||
createSchedule(query)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("创建成功!");
|
||||
} else if (response.code == 501) {
|
||||
|
||||
this.$alert(response.message, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: "warning",
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},*/
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let dQuery = {
|
||||
id: rowId,
|
||||
};
|
||||
deleteUploadStatus(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);
|
||||
this.getList();
|
||||
} else {
|
||||
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
|
||||
this.$message.success(response.data);
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
,
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
0: "warning",
|
||||
1: "success",
|
||||
2: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
detailDialog(id) {
|
||||
this.syncVisible = true;
|
||||
this.list.forEach(item => {
|
||||
if (id === item.id) {
|
||||
this.syncInfo = item.remark;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.headers = {
|
||||
ADMIN_ID: store.getters.adminId,
|
||||
ADMIN_TOKEN: store.getters.token,
|
||||
};
|
||||
this.getList();
|
||||
this.getConfig();
|
||||
},
|
||||
};
|
||||
</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;
|
||||
}
|
||||
|
||||
.syncInfo {
|
||||
font-size: medium;
|
||||
font-family: "Microsoft YaHei";
|
||||
line-height: 25px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue