|
|
|
@ -25,25 +25,17 @@
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
|
|
|
|
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
|
|
|
|
<el-table-column label="单据类型名称" prop="originName"></el-table-column>
|
|
|
|
|
<el-table-column label="单据类型代码" prop="originAction"></el-table-column>
|
|
|
|
|
<el-table-column label="目标单据类型" prop="targetBusName"></el-table-column>
|
|
|
|
|
<el-table-column label="类型" prop="type">
|
|
|
|
|
<el-table-column label="原单据类型" prop="originName"></el-table-column>
|
|
|
|
|
<el-table-column label="目标单据类型" prop="targetName"></el-table-column>
|
|
|
|
|
<el-table-column label="目标当前仓库" prop="locSubInvName"></el-table-column>
|
|
|
|
|
<el-table-column label="目标往来仓库" prop="defautSubInvName"></el-table-column>
|
|
|
|
|
<el-table-column label="时间推移(小时)" prop="beforeTime"></el-table-column>
|
|
|
|
|
<el-table-column label="补单方式" prop="supplementAll">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ typeMap[scope.row.type] }}</span>
|
|
|
|
|
<span>{{ enableMap[scope.row.supplementAll] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态" prop="enable">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ enableMap[scope.row.enable] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="是否启用" prop="enable">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ enableMap[scope.row.enable] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
|
<el-table-column label="说明" prop="intro"></el-table-column>
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
@ -65,10 +57,10 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:visible.sync="addDialogVisible"
|
|
|
|
|
:visible.sync="modifyDialogVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
v-if="addDialogVisible"
|
|
|
|
|
v-if="modifyDialogVisible"
|
|
|
|
|
class="dialog-two"
|
|
|
|
|
width="60%"
|
|
|
|
|
top="5vh"
|
|
|
|
@ -100,11 +92,10 @@
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import modifyDialog from "@/views/system/param/busTypePreModify.vue";
|
|
|
|
|
import {
|
|
|
|
|
getBusTypePreResList,
|
|
|
|
|
getBusTypePreResList2,
|
|
|
|
|
addBusTypePre,
|
|
|
|
|
updateBusTypePre,
|
|
|
|
|
deleteBusTypePre,
|
|
|
|
|
removeBusTypePre
|
|
|
|
|
deleteBusTypePre, getBusTypePreList
|
|
|
|
|
} from "@/api/basic/busTypePre";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -116,40 +107,28 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
},
|
|
|
|
|
addDialogVisible: false,
|
|
|
|
|
modifyDialogVisible: false,
|
|
|
|
|
list: [],
|
|
|
|
|
inputQuery: {
|
|
|
|
|
id: null,
|
|
|
|
|
originName: null,
|
|
|
|
|
originAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
name: null,
|
|
|
|
|
enable: null,
|
|
|
|
|
invCode: null,
|
|
|
|
|
defaultInvCode: null,
|
|
|
|
|
beforeTime: null,
|
|
|
|
|
supplementAll: null,
|
|
|
|
|
intro: null,
|
|
|
|
|
remark: null
|
|
|
|
|
},
|
|
|
|
|
enableMap: {
|
|
|
|
|
true: "禁用",
|
|
|
|
|
false: "启用",
|
|
|
|
|
},
|
|
|
|
|
mainActionMap: {
|
|
|
|
|
WareHouseIn: "入库",
|
|
|
|
|
WareHouseOut: "出库"
|
|
|
|
|
true: "全量补单",
|
|
|
|
|
false: "自动补单",
|
|
|
|
|
},
|
|
|
|
|
fileList: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
headers: {},
|
|
|
|
|
configParams: {},
|
|
|
|
|
loading: false,
|
|
|
|
|
typeMap: {
|
|
|
|
|
1: "耗材领用",
|
|
|
|
|
2: "产品申购",
|
|
|
|
|
3: "采购计划",
|
|
|
|
|
},
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增补单设置",
|
|
|
|
|
edit: "编辑补单设置",
|
|
|
|
|
add: "新增单据流转设置",
|
|
|
|
|
update: "编辑单据流转设置",
|
|
|
|
|
},
|
|
|
|
|
formName: null,
|
|
|
|
|
|
|
|
|
@ -171,7 +150,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
cancelDialog() {
|
|
|
|
|
this.modifyDialogVisible = false;
|
|
|
|
|
this.addDialogVisible = false;
|
|
|
|
|
},
|
|
|
|
|
search() {
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
@ -179,7 +157,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getBusTypePreResList(this.filterQuery)
|
|
|
|
|
getBusTypePreResList2(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
@ -201,21 +179,20 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onAddSubmit() {
|
|
|
|
|
this.inputQuery.enable = 1;
|
|
|
|
|
if (isBlank(this.inputQuery.originName)) {
|
|
|
|
|
this.$message.error("补单类型名称不能为空!")
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.inputQuery.originAction)) {
|
|
|
|
|
this.$message.error("补单类型代码不能为空!");
|
|
|
|
|
this.$message.error("原单据类型不能为空!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.inputQuery.action)) {
|
|
|
|
|
this.$message.error("目标单据类型不能为空!")
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.inputQuery.enable)) {
|
|
|
|
|
this.$message.error("请选择启用状态!")
|
|
|
|
|
if (isBlank(this.inputQuery.invCode)) {
|
|
|
|
|
this.$message.error("目标所在仓库不能为空!")
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.inputQuery.defaultInvCode)) {
|
|
|
|
|
this.$message.error("目标往来仓库不能为空");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -226,7 +203,6 @@ export default {
|
|
|
|
|
this.$message.error("单据类型名称不得为纯数字类型!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.inputQuery.type = 1; //默认类型为耗材领用
|
|
|
|
|
|
|
|
|
|
addBusTypePre(this.inputQuery).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
@ -260,8 +236,18 @@ export default {
|
|
|
|
|
|
|
|
|
|
handleAddClick() {
|
|
|
|
|
this.formName = 'add';
|
|
|
|
|
this.inputQuery = {enable: false, expireTip: true};
|
|
|
|
|
this.addDialogVisible = true;
|
|
|
|
|
this.inputQuery = {
|
|
|
|
|
id: null,
|
|
|
|
|
originAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
invCode: null,
|
|
|
|
|
defaultInvCode: null,
|
|
|
|
|
beforeTime: null,
|
|
|
|
|
supplementAll: null,
|
|
|
|
|
intro: null,
|
|
|
|
|
remark: null
|
|
|
|
|
};
|
|
|
|
|
this.modifyDialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|