预验收按货位出库,库存查询新增货位,同步相关修改

prod
anthonywj 2 years ago
parent 9ddcd677ab
commit f0d3d119ab

@ -696,9 +696,10 @@ export default {
},
//
findPreInInvList() {
findPreInInvList(val) {
let query = {
advanceType: 2,
code: this.orderFormData.checkPreInInvCode,
}
filterSubAll(query)
.then((response) => {
@ -713,6 +714,7 @@ export default {
let query = {
invStorageCode: val,
status: 1,
code: this.orderFormData.checkPreInSpaceCode,
}
getInvSpaceList(query).then((res) => {
this.curPreInSpaceOptions = res.data.list || [];

@ -58,7 +58,7 @@
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="UDI码"
@ -83,6 +83,12 @@
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="货位"
prop="invSpaceName"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="入库数量"
prop="inCount"

@ -62,6 +62,7 @@
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
@ -73,8 +74,37 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="所属货位:">
<el-select
v-model="filterQuery.invSpaceCode"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" >
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="供应商名称:">
<el-select
v-model="filterQuery.supId"
@ -151,13 +181,13 @@
>详情
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(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>
@ -193,6 +223,7 @@ import {getInvPreProduct, deleteInvPreProduct} from "@/api/inventory/invPreProdu
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil";
import invPreProductsDetail from "@/views/inventory/InvPreProductsDetail.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace";
export default {
name: "InvPreProducts",
@ -208,12 +239,15 @@ export default {
zczbhhzbapzbh: null,
ylqxzcrbarmc: null,
invCode: null,
invSpaceCode: null,
page: 1,
limit: 10,
},
list: [],
total: 0,
invList: [],
invId: null,
spaceList: [],
loading: false,
deleteData: {
id: "",
@ -306,6 +340,7 @@ export default {
.then((response) => {
this.invList = response.data || [];
this.getList();
this.getSpaceList();
})
.catch(() => {
});
@ -371,7 +406,35 @@ export default {
}).catch((error) => {
this.$message.error(error.message);
});
}
},
getSpaceList() {
if (isBlank(this.filterQuery.invCode)) {
return;
}
let params = {
invWarehouseCode: this.filterQuery.invCode,
status: 1
};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
})
},
querySearchAsync(queryString, cb) {
let restaurants = this.spaceList;
restaurants.forEach((item) => {
item.value = item.name;
})
let results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
if (!isBlank(queryString)) {
this.spaceSearchResult = results;
}
cb(results);
},
invChange() {
this.getSpaceList();
},
},
components: {
invPreProductsDetail

@ -58,7 +58,7 @@
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="UDI码"
@ -83,6 +83,12 @@
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="货位"
prop="invSpaceName"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="入库数量"
prop="inCount"

@ -62,6 +62,7 @@
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
@ -73,6 +74,35 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="所属货位:">
<el-select
v-model="filterQuery.invSpaceCode"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="供应商名称:">
<el-select
@ -100,7 +130,6 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
@ -208,6 +237,7 @@ import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil";
import invProductsDetail from "@/views/inventory/InvProductsDetail.vue";
import addInvRemindSetDialog from "@/views/inventory/addInvRemindSetDialog.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace";
export default {
name: "InvProducts",
@ -223,6 +253,7 @@ export default {
zczbhhzbapzbh: null,
ylqxzcrbarmc: null,
invCode: null,
invSpaceCode: null,
page: 1,
limit: 10,
udiCode: null,
@ -252,7 +283,8 @@ export default {
invCode: null
},
addInvRemindSetDialogVisible: false,
invId: null
invId: null,
spaceList: [],
};
},
methods: {
@ -324,6 +356,7 @@ export default {
.then((response) => {
this.invList = response.data || [];
this.getList();
this.getSpaceList();
})
.catch(() => {
});
@ -398,6 +431,34 @@ export default {
this.invId = null;
this.addInvRemindSetDialogVisible = false;
},
getSpaceList() {
if (isBlank(this.filterQuery.invCode)) {
return;
}
let params = {
invWarehouseCode: this.filterQuery.invCode,
status: 1
};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
})
},
querySearchAsync(queryString, cb) {
let restaurants = this.spaceList;
restaurants.forEach((item) => {
item.value = item.name;
})
let results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
if (!isBlank(queryString)) {
this.spaceSearchResult = results;
}
cb(results);
},
invChange() {
this.getSpaceList();
},
},
components: {
invProductsDetail,

@ -81,6 +81,12 @@
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="货位"
prop="invSpaceName"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="入库数量"
prop="inCount"

@ -62,6 +62,7 @@
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
@ -73,7 +74,35 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="所属货位:">
<el-select
v-model="filterQuery.invSpaceCode"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="供应商名称:">
<el-select
@ -187,6 +216,7 @@ import {getInvPreInProduct, deleteInvPreInProduct} from "@/api/inventory/invPreI
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil";
import invPreProductsDetail from "@/views/inventory/InvPreInProductsDetail.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace";
export default {
name: "InvPreProducts",
@ -202,12 +232,14 @@ export default {
zczbhhzbapzbh: null,
ylqxzcrbarmc: null,
invCode: null,
invSpaceCode: null,
page: 1,
limit: 10,
},
list: [],
total: 0,
invList: [],
spaceList: [],
loading: false,
deleteData: {
id: "",
@ -300,6 +332,7 @@ export default {
.then((response) => {
this.invList = response.data || [];
this.getList();
this.getSpaceList();
})
.catch(() => {
});
@ -365,7 +398,35 @@ export default {
}).catch((error) => {
this.$message.error(error.message);
});
}
},
getSpaceList() {
if (isBlank(this.filterQuery.invCode)) {
return;
}
let params = {
invWarehouseCode: this.filterQuery.invCode,
status: 1
};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
})
},
querySearchAsync(queryString, cb) {
let restaurants = this.spaceList;
restaurants.forEach((item) => {
item.value = item.name;
})
let results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
if (!isBlank(queryString)) {
this.spaceSearchResult = results;
}
cb(results);
},
invChange() {
this.getSpaceList();
},
},
components: {
invPreProductsDetail

@ -6,11 +6,12 @@
<el-descriptions class="margin-top" :column="1" :size="100" border>
<template slot="extra">
<el-button type="primary" size="small" @click="saveConfig()"
>保存</el-button
>保存
</el-button
>
</template>
<el-descriptions-item>
<template slot="label"> 同步服务 </template>
<template slot="label"> 同步服务</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="6" class="el-col">
<el-switch
@ -22,7 +23,7 @@
<el-col :span="14" class="el-col">
<div>
<span style="color: red"
>说明:&nbsp;修改同步参数时,请关闭数据同步服务
>说明:&nbsp;修改同步参数时,请关闭数据同步服务
</span>
</div>
</el-col>
@ -30,7 +31,7 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 地址设置 </template>
<template slot="label"> 地址设置</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
@ -50,7 +51,7 @@
style="margin-left: 20px"
:disabled="configQuery.downstreamEnable"
:loading="testLoading"
>连通性测试
>连通性测试
</el-button>
</div>
</el-col>
@ -59,11 +60,11 @@
</el-descriptions>
</el-collapse-item>
<!-- 上传值UDI自助平台基础数据 -->
<el-collapse-item title="上传至UDI自助平台基础数据" name="2">
<el-collapse-item title="基础数据同步" name="2">
<el-descriptions class="margin-top" :column="1" :size="100" border>
<!-- 参数设置 -->
<el-descriptions-item>
<template slot="label"> 参数设置 </template>
<template slot="label"> 参数设置</template>
<el-form
label-positiom="right"
label-width="200px"
@ -101,7 +102,7 @@
</el-descriptions-item>
<!-- 系统设置信息 -->
<el-descriptions-item>
<template slot="label"> 系统设置信息 </template>
<template slot="label"> 系统设置信息</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="系统运行参数">
<el-select v-model="configQuery.systemConfig">
@ -147,7 +148,7 @@
</el-descriptions-item>
<!-- 单据类型 -->
<el-descriptions-item>
<template slot="label"> 单据类型 </template>
<template slot="label"> 单据类型</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="业务单据类型">
<el-select v-model="configQuery.typeBus">
@ -174,7 +175,7 @@
</el-descriptions-item>
<!-- 用户信息 -->
<el-descriptions-item>
<template slot="label"> 用户信息 </template>
<template slot="label"> 用户信息</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="部门信息">
<el-select v-model="configQuery.basicDept">
@ -201,7 +202,7 @@
</el-descriptions-item>
<!-- 基础数据 -->
<el-descriptions-item>
<template slot="label"> 基础数据 </template>
<template slot="label"> 基础数据</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="耗材字典">
<el-select v-model="configQuery.basicProducts">
@ -226,9 +227,30 @@
</el-form-item>
</el-form>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 其他数据</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="UDI码补齐数据">
<el-select v-model="configQuery.udiCodeLost">
<el-option :value="0" label="不同步"></el-option>
<el-option :value="1" label="由内向外"></el-option>
<el-option :value="2" label="由外向内"></el-option>
</el-select>
</el-form-item>
<el-form-item label="UDI关联关系">
<el-select v-model="configQuery.udiCodeRel">
<el-option :value="0" label="不同步"></el-option>
<el-option :value="1" label="由内向外"></el-option>
<el-option :value="2" label="由外向内"></el-option>
</el-select>
</el-form-item>
</el-form>
</el-descriptions-item>
<!-- 第三方基础信息 -->
<el-descriptions-item>
<template slot="label"> 第三方基础信息 </template>
<template slot="label"> 第三方基础信息</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="第三方产品信息">
<el-select v-model="configQuery.basicThirdProducts">
@ -264,7 +286,7 @@
</el-descriptions-item>
<!-- 国家库DI数据 -->
<el-descriptions-item>
<template slot="label"> 国家库DI数据 </template>
<template slot="label"> 国家库DI数据</template>
<el-form label-positiom="right" label-width="200px" :inline="true">
<el-form-item label="DI产品信息">
<el-select v-model="configQuery.dbDiProducts">
@ -299,7 +321,7 @@
border
>
<el-descriptions-item>
<template slot="label"> 参数设置 </template>
<template slot="label"> 参数设置</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
@ -328,7 +350,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click="addToInBusTypeDialog()"
>添加扫码单据类型
>添加扫码单据类型
</el-button>
</div>
<el-table :data="checkedToInBusTypes" border style="width: 100%">
@ -363,7 +385,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click.native="removeToInBus(scope.$index, scope.row)"
>移除
>移除
</el-button>
</template>
</el-table-column>
@ -381,7 +403,7 @@
border
>
<el-descriptions-item>
<template slot="label"> 参数设置 </template>
<template slot="label"> 参数设置</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
@ -397,7 +419,7 @@
></el-input>
<span style="margin-left: 30px"
>单据下载时间间隔(单位:分钟):&nbsp;</span
>单据下载时间间隔(单位:分钟):&nbsp;</span
>
<el-input
style="width: 100px"
@ -422,7 +444,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click="addBusTypeDialog()"
>添加扫码单据类型
>添加扫码单据类型
</el-button>
</div>
<el-table :data="checkedBusTypes" border style="width: 100%">
@ -457,7 +479,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click.native="remveBus(scope.$index, scope.row)"
>移除
>移除
</el-button>
</template>
</el-table-column>
@ -484,7 +506,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click="addChangeBusTypeDialog()"
>添加业务单据类型
>添加业务单据类型
</el-button>
</div>
<el-table :data="checkedChangeBusTypes" border style="width: 100%">
@ -505,9 +527,9 @@
v-model="scope.row.orderStatus"
placeholder="请选择单据状态"
>
<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="1">草稿</el-option>
<el-option label="未审核" :value="2">未审核</el-option>
<el-option label="审核" :value="3">已审核</el-option>
</el-select>
</template>
</el-table-column>
@ -518,7 +540,7 @@
size="small"
:disabled="configQuery.downstreamEnable"
@click.native="removeChangeBus(scope.$index, scope.row)"
>移除
>移除
</el-button>
</template>
</el-table-column>
@ -536,7 +558,8 @@
>
<div style="float: right; margin-bottom: 10px; margin-right: 25px">
<el-button type="primary" size="small" @click="addToInBusType()"
>选入</el-button
>选入
</el-button
>
</div>
<el-table
@ -581,7 +604,8 @@
>
<div style="float: right; margin-bottom: 10px; margin-right: 25px">
<el-button type="primary" size="small" @click="addBusType()"
>选入</el-button
>选入
</el-button
>
</div>
<el-table
@ -627,7 +651,8 @@
>
<div style="float: right; margin-bottom: 10px; margin-right: 25px">
<el-button type="primary" size="small" @click="addChangeBusType()"
>选入</el-button
>选入
</el-button
>
</div>
<el-table
@ -673,8 +698,8 @@ import {
updateConfig,
} from "@/api/sync/spsSyncStatus";
import store from "@/store";
import { getBussinessType } from "@/api/basic/bussinessType";
import { getBusTypeChangeList } from "@/api/basic/busTypeChange";
import {getBussinessType} from "@/api/basic/bussinessType";
import {getBusTypeChangeList} from "@/api/basic/busTypeChange";
export default {
name: "SysUdimsConfig",
@ -720,6 +745,8 @@ export default {
printConfig: null,
scanChangeConfig: null,
busChangeConfig: null,
udiCodeLost: null,
udiCodeRel: null,
},
checkedBusTypes: [],
checkedToInBusTypes: [],
@ -789,7 +816,8 @@ export default {
this.loading = false;
});
})
.catch(() => {});
.catch(() => {
});
},
testConnect() {
@ -822,7 +850,8 @@ export default {
this.busTypes = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {});
.catch(() => {
});
},
addBusTypeDialog() {
@ -887,9 +916,9 @@ export default {
let selectData = this.changeBusTypeSelection;
selectData.forEach((obj) => {
obj.outChange = false;
obj.orderStatus = 7;
obj.orderStatus = 3;
let isPut = true;
for (let i = 0; i < this.checkedBusTypes.length; i++) {
for (let i = 0; i < this.checkedChangeBusTypes.length; i++) {
if (this.checkedChangeBusTypes[i].action == obj.action) {
isPut = false;
}
@ -948,6 +977,7 @@ export default {
/deep/ .el-select {
width: 100px;
}
/deep/ .el-collapse-item__header {
font-size: 18px;
font-weight: bold;

@ -41,7 +41,7 @@
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="任务ID" prop="id" width="140" show-overflow-tooltip></el-table-column>
@ -58,9 +58,8 @@
</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="cacheFilePath" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="同步信息" prop="remark" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="同步文件" prop="cacheFilePath" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">

@ -33,13 +33,13 @@
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<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="type" width="140" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{scope.row.type }}</span>
<span>{{ scope.row.type }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="140" show-overflow-tooltip>
@ -50,19 +50,20 @@
</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="同步文件" prop="cacheFilePath" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<el-popconfirm @confirm="downFile(scope.row)" confirm-button-text='' cancel-button-text='' class="mr10"
icon="el-icon-info" icon-color="blck" title="是否确认要下载文件?" v-if="scope.row.cacheFilePath">
icon="el-icon-info" icon-color="blck" title="是否确认要下载文件?" v-if="scope.row.cacheFilePath">
<el-button type="text" size="small" slot="reference">下载
</el-button>
</el-popconfirm>
<el-popconfirm @confirm="deleteData(scope.row.id)" confirm-button-text='' cancel-button-text=''
icon="el-icon-info" icon-color="red" title="是否确认要删除这条数据?">
icon="el-icon-info" icon-color="red" title="是否确认要删除这条数据?">
<el-button type="text" size="small" slot="reference">删除
</el-button>
</el-popconfirm>
@ -70,12 +71,12 @@
</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>
: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">
:visible.sync="syncVisible">
<span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span>
</el-dialog>
@ -83,223 +84,225 @@
</template>
<script>
import {
filterLog,
deleteLog,
findConfig,
downloadFile
} from "@/api/sync/spsSyncDownload";
import store from "@/store";
import ShowText from "../sync/showText";
import {
downloadNow
} from "@/api/sync/spsSyncDownload";
import {
filterLog,
deleteLog,
findConfig,
downloadFile
} from "@/api/sync/spsSyncDownload";
import store from "@/store";
import ShowText from "../sync/showText";
import {
downloadNow
} from "@/api/sync/spsSyncDownload";
import {infoByStatus} from "@/api/sync/spsSyncStatus";
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,
status: {
1: "处理异常",
2: "处理完成",
},
export default {
data() {
return {
filterQuery: {
taskId: null,
status: null,
page: 1,
limit: 10,
syncTime: null,
},
list: [],
headers: {},
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
currentRow: null,
editQuery: null,
status: {
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,
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,
syncInfo: null,
syncVisible: false
},
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: "",
page: 1,
limit: 20,
};
this.getList();
},
methods: {
onReset() {
this.$router.push({
path: "",
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;
});
this.filterQuery = {
taskId: null,
status: "",
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;
});
},
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;
cancelDialog(val) {
this.udiImportDetailVisible = false;
this.thrCorpSelectVisible = false;
if (val) {
this.getList();
},
}
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
createSchedule(type) {
let query = {
createType: type,
syncTime: this.syncTime,
}
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.$message.warning(response.message);
} 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) {
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 = {
2: "success",
1: "danger",
};
return statusMap[status];
},
detailDialog(id) {
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
}
})
},
downloadNow(type) {
//
let params = {
type: type
};
downloadNow(params).then((res) => {
if (res.code === 20000) {
this.$message.success("同步任务创建成功,稍后请刷新查看下载日志!");
createSchedule(query)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("创建成功!");
} else if (response.code == 501) {
this.$message.warning(response.message);
} else {
this.$message.error(res.message);
this.$message.error(response.message);
}
}).catch((error) => {
this.$message.error(error.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) {
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 = {
2: "success",
1: "danger",
};
return statusMap[status];
},
detailDialog(id) {
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
}
})
},
downloadNow(type) {
//
let params = {
type: type
};
downloadNow(params).then((res) => {
if (res.code === 20000) {
this.$message.success("同步任务创建成功,稍后请刷新查看下载日志!");
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
})
},
downFile(rows) {
downloadFile({
infoByStatus({
'id': rows.id
}).then(res => {
let blob = new Blob([res])
@ -314,49 +317,50 @@
document.body.removeChild(link)
})
},
},
},
mounted() {},
components: {
ShowText
},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getList();
this.getConfig();
},
};
mounted() {
},
components: {
ShowText
},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getList();
this.getConfig();
},
};
</script>
<style scoped>
.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;
}
.syncInfo {
font-size: medium;
font-family: "Microsoft YaHei";
line-height: 25px;
}
.syncInfo {
font-size: medium;
font-family: "Microsoft YaHei";
line-height: 25px;
}
</style>

Loading…
Cancel
Save