udi版本切换

master
anthonywj 3 years ago
parent 76910d2aca
commit e0fde36e71

@ -22,5 +22,14 @@ export function filterByUuid(query) {
params: query
});
}
export function filterByVersion(query) {
return axios({
url: "/udiwms/syncdi/version",
method: "get",
params: query
});
}

@ -70,6 +70,14 @@ export function combineUdi(query) {
data: query
});
}
export function changeVersion(query) {
return axios({
url: "/udi/udirel/changeVersion",
method: "post",
data: query
});
}
export function combineAllUdi(query) {
return axios({

@ -0,0 +1,27 @@
import axios from "../../utils/axios";
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
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -87,7 +87,7 @@ import thrCorpsExport from "../views/thrsys/ThrCorpsExport.vue";
import thrCorpsImport from "../views/thrsys/ThrCorpsImport.vue";
import receiveOrderNew from "../views/thrsys/ThrOrdedrReceiveAdd.vue";
import receiveOrderSearch from "../views/thrsys/ThrOrdedrReceiveSearch.vue";
import spsSyncData from "../views/thrsys/SysUdimsData.vue";
//库存
import invProducts from "../views/inventory/InvProducts.vue";
@ -356,6 +356,15 @@ export const asyncRouterMap = [
},
]
},
{
path: "spsSyncData",
component: spsSyncData,
name: "数据同步",
icon: "",
meta: {
authRule: ["admin/spsSyncData"]
}
},
// {
// path: "systemPDFTemplate",
// component: systemPDFTemplate,

@ -204,6 +204,7 @@ export default {
defaultUnit: null,
useDyCount: null,
expireTip: true,
prefix: null,
},
enableMap: {
true: "是",
@ -341,7 +342,8 @@ export default {
secCheckBalacne: row.secCheckBalacne,
defaultUnit: row.defaultUnit,
useDyCount: row.useDyCount,
expireTip: row.expireTip
expireTip: row.expireTip,
prefix: row.prefix
};
this.modifyDialogVisible = true;
},

@ -151,6 +151,7 @@ export default {
advanceType: null,
changeEnable: null,
spUse: null,
prefix: null,
},
enableMap: {
true: "是",
@ -241,6 +242,7 @@ export default {
advanceType: row.advanceType,
changeEnable: row.changeEnable,
spUse: row.spUse,
prefix: row.prefix,
};
},
@ -257,6 +259,7 @@ export default {
advanceType: null,
localAction: null,
changeEnable: null,
prefix: null,
};
},

@ -52,6 +52,20 @@
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>单据前缀:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.prefix"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">

@ -173,16 +173,34 @@
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>备注:&nbsp;</span>
<span>单据前缀:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.prefix"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
<div class="text item">
<div class="itemTag">
<span>备注:&nbsp;</span>
</div>
<el-input
style="width: 60%"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.remark"
></el-input>
</div>
@ -209,36 +227,8 @@
</el-col>
</el-row>
<!-- <el-divider></el-divider>-->
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.enable"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.innerOrder"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.genUnit"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-divider></el-divider>
<el-row :gutter="20" class="el-row" type="flex">
<!-- <el-col :span="5" class="el-col">-->
<!-- <span>选择业务单据校验的来源类型</span>-->
<!--&lt;!&ndash; <div class="text item">&ndash;&gt;-->
<!--&lt;!&ndash; <el-checkbox v-model="inputQuery.checkEnable"></el-checkbox>&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!-- </el-col>-->
<!-- @change="oneCheck"-->
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.checkEnable">()</el-checkbox>

@ -71,14 +71,6 @@
>添加产品信息
</el-button
>
<!-- <el-button type="primary" icon="search" @click="lockProducts('3')" v-if="isSpCombine"-->
<!-- >锁定-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button type="primary" icon="search" @click="uploadErpProduct"
>更新下载ERP存货产品</el-button
> -->
</el-button-group>
</el-form-item>
</el-row>
@ -676,6 +668,25 @@
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前版本号:&nbsp;</span>
</div>
<el-input
style="width: 35%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.versionNumber"
></el-input>
<el-button type="text" size="small" @click.native.stop="selectVersion()"
style="margin-left: 5%"
>切换版本
</el-button>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
@ -769,6 +780,24 @@
@closeUdi="closeUdi"
></selectLocalUdi>
</el-dialog>
<el-dialog
title="选择DI版本"
:visible.sync="selectVersionVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectVersionVisible"
>
<selectUdiVersion
:closeDialog="closeDialog"
:relId="relId"
:uuid="uuid"
:originUuid="originUuid"
@closeUdi="closeUdi"
></selectUdiVersion>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
@ -795,6 +824,7 @@ import {filterByUuid} from "../../api/basic/udiInfo";
import selectUdi from "./UdiInfoRelevance.vue";
import selectErp from "./UdiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectUdiVersion from "./UdiinfoSelectVersion";
export default {
data() {
@ -838,6 +868,7 @@ export default {
total: 0,
thirdNo: "",
uuid: "111",
originUuid: null,
thirdId: null,
relId: "",
thisData: {
@ -849,6 +880,7 @@ export default {
editDialogVisible: false, //
selectUdiDialogVisible: false, //
selectErpDialogVisible: false, //ERP
selectVersionVisible: false,
selectLocalVisible: false, //UDI
isUseDyCheck: false,
lockStatusMap: {1: "未提交", 2: "已提交", 3: "已锁定"},
@ -939,6 +971,14 @@ export default {
this.editQuery = row;
console.log(row);
},
selectVersion() {
this.selectVersionVisible = true;
this.uuid = this.editQuery.uuid;
this.originUuid = this.editQuery.originUuid;
this.relId = this.editQuery.id;
},
deleteOrders(data) {
this.loading = true;
let tquery = {
@ -1175,9 +1215,11 @@ export default {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.getThirdSysDetail();
if (val) {
this.getList();
this.cancelDialog();
}
},
getThirdSysDetail() {
@ -1228,16 +1270,18 @@ export default {
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
},
onAddSubmit() {
this.relevanceEdit.isDisable = this.editQuery.isDisable;
this.relevanceEdit.isLock = this.editQuery.isLock;
this.relevanceEdit.isAdavence = this.editQuery.isAdavence;
this.relevanceEdit = this.editQuery;
if (this.checked == true) {
this.relevanceEdit.isUseDy = 1;
} else {
this.relevanceEdit.isUseDy = 0;
}
this.relevanceEdit.isDisable = this.editQuery.isDisable;
this.relevanceEdit.isLock = this.editQuery.isLock;
this.relevanceEdit.isAdavence = this.editQuery.isAdavence;
updatetUdiInfos(this.relevanceEdit)
@ -1303,6 +1347,7 @@ export default {
selectUdi,
selectErp,
selectLocalUdi,
selectUdiVersion,
},
created() {
this.getList();

@ -762,6 +762,21 @@
@closeUdi="closeUdi"
></selectLocalUdi>
</el-dialog>
<el-dialog
title="选择DI版本"
:visible.sync="selectVersionVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectVersionVisible"
>
<selectUdiVersion
:closeDialog="closeDialog"
:uuid="uuid"
:originUuid="originUuid"
@closeUdi="closeUdi"
></selectUdiVersion>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
@ -790,6 +805,7 @@ import {filterCustomers} from "../../api/auth/customer"
import selectUdi from "./UdiInfoRelevance.vue";
import selectErp from "./UdiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectUdiVersion from "./UdiinfoSelectVersion";
export default {
data() {
@ -834,6 +850,7 @@ export default {
total: 0,
thirdNo: "",
uuid: "111",
originUuid: null,
thirdId: null,
relId: "",
thisData: {
@ -846,6 +863,7 @@ export default {
selectUdiDialogVisible: false, //
selectErpDialogVisible: false, //ERP
selectLocalVisible: false, //UDI
selectVersionVisible: false,
isUseDyCheck: false,
lockStatusMap: {"1": "未提交", "2": "已提交", "3": "已锁定"},
loading:false,
@ -1167,10 +1185,15 @@ export default {
.catch(() => {
});
},
selectVersion() {
this.selectVersionVisible = true;
this.uuid = this.editQuery.uuid;
this.originUuid = this.editQuery.originUuid;
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
},
onAddSubmit() {
if (this.checked == true) {

@ -305,7 +305,7 @@
</template>
<script>
import {modifyRel, addErp, addAllErp} from "../../api/basic/udiRelevance";
import {modifyRel, addErp, addAllErp, combineUdi} from "../../api/basic/udiRelevance";
import {getInvbasdoc} from "../../api/basic/getErps";
import {getBasicThirdSys} from "../../api/basic/basicThirdSys";
@ -513,7 +513,7 @@ export default {
})
.then(() => {
this.combineLoading = true;
addErp(this.combineQuery)
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
@ -536,7 +536,7 @@ export default {
this.combineQuery.thirdIds = [];
});
} else {
addErp(this.combineQuery)
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {

@ -0,0 +1,294 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-table
:data="udidlList"
style="width: 100%"
v-loading="loading"
highlight-current-row="true"
:row-class-name="tableRowClassName"
@current-change="handleErpChange"
@selection-change="handleSelectionUdiChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="版本号"
prop="versionNumber"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品标识"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品名称"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="ggxh"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="医疗器械注册人"
prop="ylqxzcrbarmc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册证编号"
prop="zczbhhzbapzbh"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="diDetail(scope.row)"
>详情
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.uuid === originUuid"
@click="checkCombine(scope.row)"
>选入
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="unionQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
<el-dialog
title="器械信息详情"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="selectDialog"
width="65%"
append-to-body
v-if="selectDialog"
>
<selectDiDetail :editQuery="diDetails"
></selectDiDetail>
</el-dialog>
</div>
</template>
<script>
import {filterByVersion, filterCompany,} from "../../api/basic/udiInfo";
import {changeVersion, checkExitUdi} from "../../api/basic/udiRelevance";
import selectDiDetail from "./SelectDIDetailDialog"
export default {
name: "UdiinfoSelectVersion",
props: {
relId: {
type: Object,
required: true,
},
uuid: {
type: Object,
required: true,
},
originUuid: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
unionQuery: {
uuid: null
},
combineLoading: false,
combineQuery: {
idSpliUdi: false,
thirdId: "",
relId: "",
erpName: "",
thirdName: null,
keys: [],
},
checked: true,
udidlList: [],
erpList: [],
pageTotal: 1,
total: 1,
currentRow: null,
fromOptions: [],
loading: false,
erpLloading: false,
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
};
},
methods: {
getList() {
this.loading = true;
filterByVersion(this.unionQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
},
checkSelectable(row) {
return !row.check;
},
diDetail(row) {
this.diDetails = row;
this.selectDialog = true;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
tableRowClassName({row, rowIndex}) {
if (row.check) return "warning-row";
return "";
},
handleErpChange(val) {
console.log(val);
this.currentRow = val;
},
intentBack() {
this.closeDialog();
},
checkCombine(row) {
this.combineQuery.keys = [];
if (this.relId != null) {
this.combineQuery.relId = this.relId;
this.combineQuery.keys.push(row.uuid);
} else
return;
this.combineLoading = true;
checkExitUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.combine();
} else if (response.code == 499) {
this.$confirm(response.message, {type: "warning"})
.then(_ => {
this.combine();
})
.catch(_ => {
this.combineQuery.keys = [];
});
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("closeDialog", false);
});
},
combine() {
changeVersion(this.combineQuery)
.then((response) => {
this.combineLoading = false;
if (response.code == 20000) {
this.$message.success("切换成功!");
this.$emit("closeUdi", true);
} else {
this.$message.error(response.message);
this.$emit("closeUdi", false);
}
})
.catch(() => {
this.combineLoading = false;
this.intentBack();
});
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
},
},
components: {
selectDiDetail,
},
created() {
this.unionQuery.uuid = this.uuid;
this.getList();
},
};
</script>
<style scoped>
.checkitemTag {
float: left;
text-align: left;
margin-top: 5px;
width: 100%;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
.el-card {
margin-right: 20px;
/*transition: all .5s;*/
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
</style>

@ -695,6 +695,24 @@
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前版本号:&nbsp;</span>
</div>
<el-input
style="width: 35%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.versionNumber"
></el-input>
<el-button type="text" size="small" @click.native.stop="selectVersion()"
style="margin-left: 5%"
>切换版本
</el-button>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
@ -1232,6 +1250,23 @@
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前版本号:&nbsp;</span>
</div>
<el-input
style="width: 35%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.versionNumber"
></el-input>
<el-button type="text" size="small" @click.native.stop="selectVersion()"
style="margin-left: 5%"
>切换版本
</el-button>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
@ -1343,7 +1378,22 @@
:closeAddDialog="closeAddDialog"
:newType="newType"></ThrProductsAdd>
</el-dialog>
<el-dialog
title="选择DI版本"
:visible.sync="selectVersionVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectVersionVisible"
>
<selectUdiVersion
:closeDialog="closeDialog"
:relId="relId"
:uuid="uuid"
:originUuid="originUuid"
@closeUdi="closeUdi"
></selectUdiVersion>
</el-dialog>
</el-card>
</div>
</template>
@ -1371,6 +1421,7 @@ import selectErp from "./UdiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectProduct from "./basicCompanyProductsImport";
import ThrProductsAdd from "@/views/thrsys/ThrProductsAdd";
import selectUdiVersion from "./UdiinfoSelectVersion";
export default {
data() {
@ -1393,6 +1444,7 @@ export default {
newType: 2,
selectProductVisible: false,
addProductVisible: false,
selectVersionVisible: false,
editQuery: null,
relevanceEdit: {
id: null,
@ -1418,6 +1470,7 @@ export default {
total: 0,
thirdNo: "",
uuid: "111",
originUuid: null,
thirdId: null,
relId: "",
thisData: {
@ -1803,8 +1856,12 @@ export default {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.getThirdSysDetail();
this.getList();
if (val) {
this.cancelDialog();
}
},
getThirdSysDetail() {
let query = {
@ -1848,11 +1905,18 @@ export default {
.catch(() => {
});
},
selectVersion() {
this.selectVersionVisible = true;
this.uuid = this.editQuery.uuid;
this.originUuid = this.editQuery.originUuid;
this.relId = this.editQuery.rlId;
console.log(this.uuid + "\n" + this.originUuid);
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectProductVisible = false;
console.log("关闭弹窗2");
this.selectVersionVisible = false;
},
onAddSubmit() {
if (this.checked == true) {
@ -1938,7 +2002,8 @@ export default {
selectErp,
selectLocalUdi,
selectProduct,
ThrProductsAdd
ThrProductsAdd,
selectUdiVersion,
}
,
created() {

@ -153,26 +153,26 @@
</div>
</div>
</el-main>
<div
style="
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
"
>
<a
href="http://www.beian.gov.cn/portal/registerSystemInfo"
style="color: #000000; font-size: 12px"
>
技术支持厦门高立新鹏软件科技有限公司&nbsp; &nbsp;闽公网安备35020302034269号&nbsp;
</a>
<a
href="http://beian.miit.gov.cn"
style="color: #000000; font-size: 10px"
>闽ICP备17019234号</a
>
</div>
<!-- <div-->
<!-- style="-->
<!-- position: absolute;-->
<!-- bottom: 0;-->
<!-- left: 50%;-->
<!-- transform: translate(-50%, -50%);-->
<!-- "-->
<!-- >-->
<!-- <a-->
<!-- href="http://www.beian.gov.cn/portal/registerSystemInfo"-->
<!-- style="color: #000000; font-size: 12px"-->
<!-- >-->
<!-- 技术支持厦门高立新鹏软件科技有限公司&nbsp; &nbsp;闽公网安备35020302034269号&nbsp;-->
<!-- </a>-->
<!-- <a-->
<!-- href="http://beian.miit.gov.cn"-->
<!-- style="color: #000000; font-size: 10px"-->
<!-- >闽ICP备17019234号</a-->
<!-- >-->
<!-- </div>-->
</el-container>
</el-container>
</template>

@ -88,9 +88,20 @@
</div>
</el-card>
</el-form>
<div style=" position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%);">
<a href="http://beian.miit.gov.cn" style="color: white; font-size: 10px">闽ICP备17019234号-4</a>
<div style="
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
">
<a target="_blank" href=" " style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
<img src="../../assets/image/gongan.png" style="float:left;"/>
<p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:rgba(255,255,238,0.94);">
闽公网安备 35020302034268&nbsp; &nbsp;闽ICP备17019234号</p>
</a>
</div>
</div>
</template>

@ -0,0 +1,293 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</el-form-item>
<el-form-item 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 type="primary" icon="search" @click="createSchedule(1)"></el-button>
<el-button type="primary" icon="search" @click="createSchedule(2)"></el-button>
<el-button type="primary" icon="search" @click="createSchedule(3)"></el-button>
<el-button type="primary" icon="search" @click="createSchedule(4)">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"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="任务类型"
prop="idDatas"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ type[scope.row.idDatas] }}</span>
</template>
</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="startTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="结束时间"
prop="endTime"
show-overflow-tooltip
:formatter="formatterThirdSys"
></el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<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>
</div>
</template>
<script>
import {filterLog, deleteLog, createSchedule} from "../../api/thrsys/spsSyncStatus";
import store from "@/store";
export default {
data() {
return {
filterQuery: {
id: null,
status: "1",
page: 1,
limit: 20,
},
list: [],
headers: {},
detailList: [],
thirdSys: [],
thirdSysDetail: null,
total: 0,
currentRow: null,
editQuery: null,
type: {
"AutoDownloadOrder": "已完成单据",
"AutoDownloadBusType": "单据类型",
"AutoDownloadAllData": "基础信息",
"AutoDownloadDiProducts": "国家库DI数据"
},
status: {
0: "等待处理",
1: "处理完成",
2: "处理异常",
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
templateDlUrl: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
id: 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;
});
},
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
}
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 = {
0: "warning",
1: "success",
2: "danger",
};
return statusMap[status];
}
,
},
mounted() {
},
components: {},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
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>

@ -914,6 +914,7 @@ export default {
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
console.log("监听掃碼:"+text);
//onInput500ms
if (text.includes("delete")) {
that.formData.code = "";

@ -715,6 +715,7 @@ export default {
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
console.log("监听掃碼:"+text);
//onInput500ms
if (text.includes("delete")) {
that.formData.code = "";

Loading…
Cancel
Save