同步相关功能界面

ywj_dev
anthonywj 2 years ago
parent 4ecb6f8803
commit 34ddcdc0ca

@ -8,8 +8,11 @@ ENV = 'production'
#林纪裕
# VUE_APP_BASE_API = 'http://101.43.77.55:9150/UDI_SPMS_SERVER/'
# 测试服务器
VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_SPMS_SERVER/'
# 平潭
VUE_APP_BASE_API = 'http://121.204.169.96:9150/UDI_SPMS_SERVER/'
# VUE_APP_BASE_API = 'http://121.204.169.96:9150/UDI_SPMS_SERVER/'
# VUE_APP_BASE_API = 'http://192.168.0.62:9150/UDI_SPMS_SERVER/'
# 应用访问路径 例如使用前缀 /admin/

@ -51,6 +51,15 @@ export function auditOrder(data) {
}
export function dealOrder(data) {
return axios({
url: '/purchase/order/dealOrder',
method: 'post',
data: data
})
}
// 修改pur
export function updateOrder(data) {
return axios({

@ -0,0 +1,28 @@
import axios from "@/utils/request";
export function filterLog(query) {
return axios({
url: "/spssync/download/basic/udiinfo/filter",
method: "get",
params: query
});
}
export function deleteLog(query) {
return axios({
url: "/spssync/download/basic/udiinfo/deleteByStatus",
method: "post",
data: query
});
}
export function findConfig(query) {
return axios({
url: "/system/param/syncData/config",
method: "get",
params: query
});
}

@ -0,0 +1,45 @@
import axios from "@/utils/request";
export function filterLog(query) {
return axios({
url: "/spssync/basic/udiinfo/filter",
method: "get",
params: query
});
}
export function deleteLog(query) {
return axios({
url: "/spssync/basic/udiinfo/deleteByStatus",
method: "post",
data: query
});
}
export function createSchedule(query) {
return axios({
url: "/spssync/basic/schedule/create",
method: "post",
data: query
});
}
export function findConfig(query) {
return axios({
url: "/system/param/syncData/config",
method: "get",
params: query
});
}
export function updateConfig(query) {
return axios({
url: "/system/param/syncData/save",
method: "post",
data: query
});
}

@ -1,45 +0,0 @@
import axios from "@/utils/request";
export function filterLog(query) {
return axios({
url: "/spssync/basic/udiinfo/filter",
method: "get",
params: query
});
}
export function deleteLog(query) {
return axios({
url: "/spssync/basic/udiinfo/deleteByStatus",
method: "post",
data: query
});
}
export function createSchedule(query) {
return axios({
url: "/spssync/basic/schedule/create",
method: "post",
data: query
});
}
export function findConfig(query) {
return axios({
url: "/system/param/syncData/config",
method: "get",
params: query
});
}
export function updateConfig(query) {
return axios({
url: "/system/param/syncData/save",
method: "post",
data: query
});
}

@ -156,7 +156,7 @@ import {getBusTypeList, deleteBusType, updateBusType, insertBusType, exportFile}
import modifyDialog from "./bussinessTypeModify";
import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
export default {

@ -94,14 +94,13 @@
</el-select>
</el-form-item>
</el-col>
<!-- :disabled="inputQuery.mainAction!='WareHouseIn' || inputQuery.corpType!=2 "-->
<el-col :span="11" type="flex">
<el-form-item label="采购方式" prop="actionType">
<el-select v-model="inputQuery.actionType"
size="small"
style="width: 90%"
clearable
:disabled="inputQuery.mainAction!='WareHouseIn' || inputQuery.corpType!=2 "
placeholder="请选择入库方式">
<el-option label="无" :value="0"></el-option>
<el-option label="带票" :value="1"></el-option>

@ -204,7 +204,7 @@ import {
import selectUnit from "./corpRelevance";
import selectSingleUnit from "./corpSingleRelevance";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
var pinyin = require("pinyin");

@ -86,14 +86,14 @@
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="供应商" prop="fromCorpName" width="160" v-if="showSup"></el-table-column>
<el-table-column label="出入库单号" prop="orderIdFk" width="160"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="120"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="160"></el-table-column>
<el-table-column label="物资名称" prop="coName" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="spec" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="入库数量" prop="count" width="100"></el-table-column>
<el-table-column label="出库数量" prop="reCount" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="入库数量" prop="inCount" width="100"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productDate" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufacturer" width="160" show-overflow-tooltip></el-table-column>

@ -4,8 +4,9 @@
<el-form :model="formData" :rules="formRules" ref="dataForm" label-width="120px">
<el-row type="flex" justify="end" v-if="editType == 1">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native="saveOrder('3')" :loading="loading">开始配货</el-button>
<el-button type="primary" @click.native="saveOrder('4')" :loading="loading">作废</el-button>
<el-button type="primary" @click.native="saveOrder('1')" :loading="loading" :disabled="showSup">开始配货
</el-button>
<el-button type="primary" @click.native="saveOrder('2')" :loading="loading">作废</el-button>
</el-button-group>
</el-row>
<el-card style="margin-top: -5px;">
@ -49,9 +50,9 @@
<el-col :span="11">
<el-form-item label="处理状态:" prop="dealStatus">
<el-select v-model="formData.dealStatus" style="width: 90%" disabled>
<el-option label="未处理" :value="0"></el-option>
<el-option label="已处理" :value="1"></el-option>
<el-option label="未处理" :value="2"></el-option>
<el-option label="作废" :value="3"></el-option>
<el-option label="已作废" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -156,7 +157,7 @@
<script>
import draggable from "vuedraggable";
import purPlanProducts from "@/views/purchase/purPlan/purOrderSelectProduct";
import {auditOrder, delOrderDetail, listOrderDetail} from "@/api/purchase/purOrder";
import {auditOrder, dealOrder, delOrderDetail, listOrderDetail} from "@/api/purchase/purOrder";
import {filterAllByUser, selectByCode} from "@/api/system/invWarehouse";
import {filterSubByInv} from "@/api/system/invSubWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType";
@ -230,6 +231,7 @@ export default {
subInvList: [],
tarSubList: [],
invQueryData: {},
showSup: false,
};
@ -239,19 +241,48 @@ export default {
purPlanProducts,
},
methods: {
dealOrder(status) {
this.formData.dealStatus = status;
let tQuery = {
purOrderEntity: this.formData,
subErpOrders: this.codeArray,
}
dealOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("处理成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
saveOrder(status) {
let tip = "";
if (status == "3") {
tip = "是否确定通过该采购计划?";
if (status == "1") {
if(this.formData.dealStatus == 1){
tip = "该单据已配货,是否继续配货?";
}else {
tip = "是否确定开始配货?";
}
} else {
tip = "是否确定拒绝该采购计划?";
tip = "是否确定作废采购订单";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
this.dealOrder(status);
}).catch(() => {
this.loading = false;
});
@ -444,6 +475,13 @@ export default {
};
},
created() {
let supId = this.$store.getters.customerId;
if (supId == "110") {
this.showSup = true;
}
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;

@ -37,6 +37,21 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="处理状态:">
<el-select v-model="filterQuery.dealStatus"
placeholder="请选择处理状态"
clearable
style="width: 90%"
>
<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-col>
<el-col :span="8" v-if="showSup">
<el-form-item class="query-form-item" label="供应商:">
<el-select

@ -0,0 +1,441 @@
<template>
<el-card>
<el-descriptions class="margin-top" title="数据同步设置" :column="1" :size="100" border>
<template slot="extra">
<el-button type="primary" size="small" @click="saveConfig()"></el-button>
</template>
<el-descriptions-item>
<template slot="label">
同步服务
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="6" class="el-col">
<el-switch
v-model="configQuery.downstreamEnable"
active-text="是否启用数据同步">
</el-switch>
</el-col>
<el-col :span="14" class="el-col">
<div>
<span style="color: red;">说明:&nbsp;修改同步参数时,请关闭数据同步服务 </span>
</div>
</el-col>
</el-row>
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="同步至UDI管理系统基础数据" :column="1" :size="100" style="margin-top: 40px"
border>
<el-descriptions-item>
<template slot="label">
轮询时间设置
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="8" class="el-col">
<div>
<span>数据同步轮询时间(单位:分钟):&nbsp;</span>
<el-input
style="width: 100px"
size="small"
type="number"
v-model="configQuery.syncTime" :disabled="configQuery.downstreamEnable"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div>
<span>延迟执行(单位:分钟):&nbsp;</span>
<el-input
:disabled="configQuery.downstreamEnable"
style="width: 40%;"
v-model="configQuery.delaySyncTime"
>
</el-input>
</div>
</el-col>
</el-row>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
运行参数
</template>
<el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable">
</el-checkbox>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
单据类型
</template>
<el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable">
</el-checkbox>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
基础信息
</template>
<el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable"></el-checkbox>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
第三方基础信息
</template>
<el-checkbox v-model="configQuery.basicThirdProducts" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.basicThirdCorp" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.basicThirdInv" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.basicThirdBusOrder" :disabled="configQuery.downstreamEnable">
</el-checkbox>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
国家库DI数据
</template>
<el-checkbox v-model="configQuery.dbDiProducts" :disabled="configQuery.downstreamEnable">DI
</el-checkbox>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
首营资质证书
</template>
<el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable">
</el-checkbox>
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="同步至UDI管理系统单据" :column="1" :size="100" style="margin-top: 30px"
border>
<el-descriptions-item>
<template slot="label">
轮询时间设置
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="8" class="el-col">
<div>
<span>数据同步轮询时间(单位:分钟):&nbsp;</span>
<el-input
style="width: 100px"
size="small"
type="number"
v-model="configQuery.orderSyncTime" :disabled="configQuery.downstreamEnable"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
<!-- <el-col :span="8" class="el-col">-->
<!-- <div>-->
<!-- <span>开始时间:&nbsp;</span>-->
<!-- <el-time-picker-->
<!-- :disabled="configQuery.downstreamEnable"-->
<!-- v-model="configQuery.orderSyncStart"-->
<!-- placeholder="开始时间">-->
<!-- </el-time-picker>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
单据(单据状态)
</template>
<el-checkbox v-model="configQuery.orderUnCheck" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.orderUnReceive" :disabled="configQuery.downstreamEnable">
</el-checkbox>
<el-checkbox v-model="configQuery.orderScanFinish" :disabled="configQuery.downstreamEnable">
</el-checkbox>
</el-descriptions-item>
<el-descriptions-item label="单据(单据类型)" label-style="width: 150px">
<div style="float: right;margin-bottom: 10px;margin-right: 25px">
<el-button type="primary" size="small" @click="addBusTypeDialog()"
:disabled="configQuery.downstreamEnable">添加扫码单据类型
</el-button>
</div>
<el-table
:data="checkedBusTypes"
border
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="单据类型"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="单据类型代码"
prop="action"
show-overflow-tooltip
></el-table-column>
<el-table-column width="180" label="允许缺量补单">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.outChange"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="configQuery.downstreamEnable"
@click.native="remveBus(scope.$index, scope.row)"
>移除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-descriptions-item>
</el-descriptions>
<el-dialog
title="添加扫码单据类型"
:visible.sync="addBusDialogVisible"
width="55%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addBusDialogVisible"
>
<div style="float: right;margin-bottom: 10px;margin-right: 25px">
<el-button type="primary" size="small" @click="addBusType()"></el-button>
</div>
<el-table
:data="busTypes"
border
style="width: 100%"
@selection-change="handleCheckedChange"
>
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="单据类型"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="单据类型代码"
prop="action"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-pagination
:page-size="busQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="busQuery.page"
></el-pagination>
</el-dialog>
</el-card>
</template>
<script>
import {findConfig, updateConfig} from "@/api/sync/spsSyncStatus";
import store from "@/store";
import {getBussinessType} from "@/api/basic/bussinessType";
export default {
name: "SysUdimsConfig",
data() {
return {
configQuery: {
id: null,
typeBus: null,
typeScan: null,
typeThird: null,
basicProducts: null,
sysUser: null,
basicCorp: null,
basicInv: null,
basicThirdProducts: null,
basicThirdCorp: null,
basicThirdInv: null,
basicThirdBusOrder: null,
orderScanFinish: null,
dbDiProducts: null,
downstreamEnable: null,
syncTime: null,
delaySyncTime: null,
orderUnCheck: null,
orderUnReceive: null,
busTypes: [],
basicSyncStart: null,
orderSyncTime: null,
orderSyncStart: null,
entrustAction: null,
unCheckCert: null,
checkedCert: null,
companyCert: null,
manufacturerCert: null,
productCert: null,
},
checkedBusTypes: [],
busQuery: {
page: 1,
limit: 10,
},
busTypes: [],
multipleSelection: [],
addBusDialogVisible: false,
total: 0,
}
},
methods: {
getConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configQuery = response.data;
this.checkedBusTypes = this.configQuery.busTypes;
if (this.configQuery.busTypes != null) {
// for (let i = 0; i < this.configQuery.busTypes.length; i++) {
//
// for (let k = 0; k < this.busTypes.length; k++) {
// if (this.busTypes[k].action == this.configQuery.busTypes[i]) {
// this.checkedBusTypes.push(this.busTypes[k]);
// this.busTypes[k].isSelect = true;
// }
// }
// }
}
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
saveConfig() {
this.$confirm('是否确认修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
center: true,
}).then(() => {
if (this.checkedBusTypes != null) {
this.configQuery.busTypes = this.checkedBusTypes;
// for (let i = 0; i < this.checkedBusTypes.length; i++) {
// this.configQuery.busTypes.push(this.checkedBusTypes);
// }
}
updateConfig(this.configQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("修改成功!");
this.getConfig();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
}).catch(() => {
});
},
handleCheckedChange(val) {
this.multipleSelection = val;
},
getBusType() {
getBussinessType(this.busQuery)
.then((response) => {
this.busTypes = response.data.list || [];
this.total = response.data.total || 0;
// this.getConfig();
})
.catch(() => {
});
},
addBusTypeDialog() {
this.addBusDialogVisible = true;
this.multipleSelection = [];
},
addBusType() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
obj.outChange = false;
let isPut = true;
for (let i = 0; i < this.checkedBusTypes.length; i++) {
if (this.checkedBusTypes[i].action == obj.action) {
isPut = false;
}
}
if (isPut)
this.checkedBusTypes.push(obj);
});
this.addBusDialogVisible = false;
},
remveBus(index, row) {
this.checkedBusTypes.splice(index, 1);
},
checkSelectable(row) {
return !row.isSelect;
},
handleCurrentChange(val) {
this.busQuery.page = val;
this.getBusType();
},
},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getConfig();
this.getBusType();
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,488 @@
<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 class="query-form-item">
<el-date-picker
v-model="syncTime"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择同步时间">
</el-date-picker>
</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="createScheduleDialog(1)"
:disabled="!configParms.orderScanFinish&& !configParms.orderUnReceive&& !configParms.orderUnCheck"
>同步单据
</el-button>
<el-button type="primary" icon="search" @click="createScheduleDialog(2)"
:disabled="!configParms.typeBus&& !configParms.typeScan&& !configParms.typeThird">
同步单据类型
</el-button>
<el-button type="primary" icon="search" @click="createScheduleDialog(3)"
:disabled="!configParms.basicProducts&& !configParms.basicCorp&&
!configParms.basicInv&&!configParms.basicThirdProducts&& !configParms.basicThirdCorp&& !configParms.basicThirdInv
&& !configParms.basicThirdBusOrder&& !configParms.sysUser"
>同步基础信息
</el-button>
<el-button type="primary" icon="search" @click="createScheduleDialog(4)"
:disabled="!configParms.dbDiProducts">同步国家库DI数据
</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="任务类型"
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="管理系统状态"
prop="receiveStatus"
width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="wmsFilterType(scope.row.receiveStatus)"
>{{ wmsstatus[scope.row.receiveStatus] }}
</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"
:current-page="filterQuery.page"
></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 {filterLog, deleteLog, createSchedule, findConfig, updateConfig} from "../../api/sync/spsSyncStatus";
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: "处理异常",
},
wmsstatus: {
"处理成功": "处理成功",
"": "未处理",
null: "未处理",
},
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,
status: null,
page: 1,
limit: 20,
};
this.syncTime = null;
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.syncTime = this.syncTime;
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;
});
},
getConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configQuery = response.data;
} 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,
};
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) {
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
this.$message.success(response.data);
this.getList();
}
}
,
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
};
return statusMap[status];
},
wmsFilterType(status) {
const statusMap = {
"未处理": "warning",
"处理成功": "success",
};
return statusMap[status];
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParms = response.data;
}
})
.catch(() => {
});
},
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.getSyncConfig();
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,341 @@
<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.taskId" 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="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"
:current-page="filterQuery.page"
></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 {filterLog, deleteLog, findConfig} from "@/api/sync/spsSyncDownload";
import store from "@/store";
export default {
data() {
return {
filterQuery: {
taskId: null,
status: "1",
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,
syncTime: null,
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
templateDlUrl: null,
checked: false,
syncTime: null,
syncInfo: null,
syncVisible: false
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
taskId: null,
status: "1",
page: 1,
limit: 20,
};
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;
});
},
getConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configQuery = response.data;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
cancelDialog(val) {
this.udiImportDetailVisible = false;
this.thrCorpSelectVisible = false;
if (val) {
this.getList();
}
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: rowId,
};
deleteLog(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
} else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
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;
}
</style>

@ -344,7 +344,7 @@ import {
getSubThrsysDetail, bindThrSubWarehouse, unbindSubThrWarehouse,
} from "@/api/system/invSubWarehouse";
import {getJoinBussinessType} from "@/api/basic/bussinessType";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {selectSysParamByKey} from "@/api/system/param/systemParamConfig";
import invSpaceManage from "@/views/inventory/InvSpaceManage";
import {

@ -112,7 +112,7 @@ import {
} from "@/api/system/param/EntrustRece";
import modifyDialog from "./BasicEntrutsReceModify";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
export default {
data() {

@ -226,7 +226,7 @@ import {
} from "../../../api/auth/authAdmin";
import store from "../../../store/index";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import {listRole} from "@/api/system/role";
import {selectSysParamByKey} from "@/api/system/systemParamConfig";

@ -130,7 +130,7 @@ import {
import modifyDialog from "./busTypeModify";
import axios from "axios";
import {filterDetailByKey, getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
export default {

@ -79,7 +79,7 @@ import {
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
import {ucloudUnit} from "@/api/basic/basicUnitMaintain";
import {selectIp} from "@/api/param/systemParamConfig";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
export default {
data() {

@ -280,7 +280,7 @@ import {
download
} from "@/api/thrsys/thrInvWarehouse";
import {filterDetailByKey, getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import {
filterThridSubAll,

@ -127,7 +127,7 @@ import {getBasicThirdSys, filterDetailByKey} from "@/api/thrsys/basicThirdSys";
import {selectIp} from "@/api/system/systemParamConfig";
import thrProductsDetail from "./thrProductsDetail";
import ThrProductsAdd from "@/views/thirdSys/product/thrProductsAdd";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {findConfig} from "@/api/sync/spsSyncStatus";
export default {
data() {

Loading…
Cancel
Save