同步扫码单据状态默认未已审核

ywj_dev
anthonywj 2 years ago
parent 06b298d6ed
commit e6c68ecb49

@ -1,243 +1,245 @@
<template> <template>
<el-card> <el-card>
<el-descriptions class="margin-top" title="数据同步设置" :column="1" :size="100" border> <el-descriptions class="margin-top" title="数据同步设置" :column="1" :size="100" border>
<template slot="extra"> <template slot="extra">
<el-button type="primary" size="small" @click="saveConfig()"></el-button> <el-button type="primary" size="small" @click="saveConfig()"></el-button>
</template> </template>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
同步服务 同步服务
</template> </template>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="6" class="el-col"> <el-col :span="6" class="el-col">
<el-switch <el-switch
v-model="configQuery.downstreamEnable" v-model="configQuery.downstreamEnable"
active-text="是否启用数据同步"> active-text="是否启用数据同步">
</el-switch> </el-switch>
</el-col> </el-col>
<el-col :span="14" class="el-col"> <el-col :span="14" class="el-col">
<div> <div>
<span style="color: red;">说明:&nbsp;修改同步参数时,请关闭数据同步服务 </span> <span style="color: red;">说明:&nbsp;修改同步参数时,请关闭数据同步服务 </span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions class="margin-top" title="同步至UDI管理系统基础数据" :column="1" :size="100" style="margin-top: 40px" <el-descriptions class="margin-top" title="同步至UDI管理系统基础数据" :column="1" :size="100" style="margin-top: 40px"
border> border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
轮询时间设置 轮询时间设置
</template> </template>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="8" class="el-col"> <el-col :span="8" class="el-col">
<div> <div>
<span>数据同步轮询时间(单位:分钟):&nbsp;</span> <span>数据同步轮询时间(单位:分钟):&nbsp;</span>
<el-input <el-input
style="width: 100px" style="width: 100px"
size="small" size="small"
type="number" type="number"
v-model="configQuery.syncTime" :disabled="configQuery.downstreamEnable" v-model="configQuery.syncTime" :disabled="configQuery.downstreamEnable"
splaceholder="请输入内容" splaceholder="请输入内容"
></el-input> ></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div> <div>
<span>延迟执行(单位:分钟):&nbsp;</span> <span>延迟执行(单位:分钟):&nbsp;</span>
<el-input <el-input
:disabled="configQuery.downstreamEnable" :disabled="configQuery.downstreamEnable"
style="width: 40%;" style="width: 40%;"
v-model="configQuery.delaySyncTime" v-model="configQuery.delaySyncTime"
> >
</el-input> </el-input>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
运行参数 运行参数
</template> </template>
<el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
单据类型 单据类型
</template> </template>
<el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
基础信息 基础信息
</template> </template>
<el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable"></el-checkbox>
<el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable"></el-checkbox> <el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable"></el-checkbox>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
第三方基础信息 第三方基础信息
</template> </template>
<el-checkbox v-model="configQuery.basicThirdProducts" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicThirdProducts" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.basicThirdCorp" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicThirdCorp" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.basicThirdInv" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicThirdInv" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.basicThirdBusOrder" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.basicThirdBusOrder" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
国家库DI数据 国家库DI数据
</template> </template>
<el-checkbox v-model="configQuery.dbDiProducts" :disabled="configQuery.downstreamEnable">DI <el-checkbox v-model="configQuery.dbDiProducts" :disabled="configQuery.downstreamEnable">DI
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
首营资质证书 首营资质证书
</template> </template>
<el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
<el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable"> <el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable">
</el-checkbox> </el-checkbox>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions class="margin-top" title="同步至UDI管理系统单据" :column="1" :size="100" style="margin-top: 30px" <el-descriptions class="margin-top" title="同步至UDI管理系统单据" :column="1" :size="100" style="margin-top: 30px"
border> border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
轮询时间设置 轮询时间设置
</template> </template>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="8" class="el-col"> <el-col :span="8" class="el-col">
<div> <div>
<span>数据同步轮询时间(单位:分钟):&nbsp;</span> <span>数据同步轮询时间(单位:分钟):&nbsp;</span>
<el-input <el-input
style="width: 100px" style="width: 100px"
size="small" size="small"
type="number" type="number"
v-model="configQuery.orderSyncTime" :disabled="configQuery.downstreamEnable" v-model="configQuery.orderSyncTime" :disabled="configQuery.downstreamEnable"
splaceholder="请输入内容" splaceholder="请输入内容"
></el-input> ></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 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="250" label="单据状态">
<template slot-scope="scope">
<el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态">
<el-option label="待校验" :value=3 >待校验</el-option>
<el-option label="待核对" :value=5>待核对</el-option>
<el-option label="待审核" :value=10>待审核</el-option>
<el-option label="已审核" :value=7>已审核</el-option>
</el-select>
</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> </div>
<el-table </el-col>
:data="busTypes" <!-- <el-col :span="8" class="el-col">-->
border <!-- <div>-->
style="width: 100%" <!-- <span>开始时间:&nbsp;</span>-->
@selection-change="handleCheckedChange" <!-- <el-time-picker-->
> <!-- :disabled="configQuery.downstreamEnable"-->
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column> <!-- v-model="configQuery.orderSyncStart"-->
<el-table-column label="序号" type="index"></el-table-column> <!-- placeholder="开始时间">-->
<el-table-column <!-- </el-time-picker>-->
label="单据类型" <!-- </div>-->
prop="name" <!-- </el-col>-->
show-overflow-tooltip </el-row>
></el-table-column>
<el-table-column </el-descriptions-item>
label="单据类型代码"
prop="action" <el-descriptions-item label="单据(单据类型)" label-style="width: 150px">
show-overflow-tooltip
></el-table-column> <div style="float: right;margin-bottom: 10px;margin-right: 25px">
</el-table> <el-button type="primary" size="small" @click="addBusTypeDialog()"
:disabled="configQuery.downstreamEnable">添加扫码单据类型
<el-pagination </el-button>
:page-size="busQuery.limit" </div>
@current-change="handleCurrentChange" <el-table :data="checkedBusTypes" border style="width: 100%">
layout="prev, pager, next" <el-table-column label="序号" type="index"></el-table-column>
:total="total" <el-table-column label="单据类型" prop="name" show-overflow-tooltip></el-table-column>
:current-page="busQuery.page" <el-table-column label="单据类型代码" prop="action" show-overflow-tooltip></el-table-column>
></el-pagination> <el-table-column width="250" label="单据状态">
<template slot-scope="scope">
</el-dialog> <el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态">
</el-card> <el-option label="待校验" :value=3>待校验</el-option>
<el-option label="待核对" :value=5>待核对</el-option>
<el-option label="待审核" :value=10>待审核</el-option>
<el-option label="已审核" :value=7>已审核</el-option>
</el-select>
</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> </template>
<script> <script>
@ -246,167 +248,168 @@ import store from "@/store";
import {getBussinessType} from "@/api/basic/bussinessType"; import {getBussinessType} from "@/api/basic/bussinessType";
export default { export default {
name: "SysUdimsConfig", name: "SysUdimsConfig",
data() { data() {
return { return {
configQuery: { configQuery: {
id: null, id: null,
typeBus: null, typeBus: null,
typeScan: null, typeScan: null,
typeThird: null, typeThird: null,
basicProducts: null, basicProducts: null,
sysUser: null, sysUser: null,
basicCorp: null, basicCorp: null,
basicInv: null, basicInv: null,
basicThirdProducts: null, basicThirdProducts: null,
basicThirdCorp: null, basicThirdCorp: null,
basicThirdInv: null, basicThirdInv: null,
basicThirdBusOrder: null, basicThirdBusOrder: null,
orderScanFinish: null, orderScanFinish: null,
dbDiProducts: null, dbDiProducts: null,
downstreamEnable: null, downstreamEnable: null,
syncTime: null, syncTime: null,
delaySyncTime: null, delaySyncTime: null,
orderUnCheck: null, orderUnCheck: null,
orderUnReceive: null, orderUnReceive: null,
busTypes: [], busTypes: [],
basicSyncStart: null, basicSyncStart: null,
orderSyncTime: null, orderSyncTime: null,
orderSyncStart: null, orderSyncStart: null,
entrustAction: null, entrustAction: null,
unCheckCert: null, unCheckCert: null,
checkedCert: null, checkedCert: null,
companyCert: null, companyCert: null,
manufacturerCert: null, manufacturerCert: null,
productCert: null, productCert: null,
}, },
checkedBusTypes: [], checkedBusTypes: [],
busQuery: { busQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
}, },
busTypes: [], busTypes: [],
multipleSelection: [], multipleSelection: [],
addBusDialogVisible: false, addBusDialogVisible: false,
total: 0, 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;
obj.orderStatus = 7;
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);
}, },
methods: { checkSelectable(row) {
getConfig() { return !row.isSelect;
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() { handleCurrentChange(val) {
this.headers = { this.busQuery.page = val;
ADMIN_ID: store.getters.adminId, this.getBusType();
ADMIN_TOKEN: store.getters.token,
};
this.getConfig();
this.getBusType();
}, },
},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getConfig();
this.getBusType();
},
} }
</script> </script>

Loading…
Cancel
Save