1.调整单据流转页面

prod
x_z 3 years ago
parent 4b300fa389
commit 556cbf3713

@ -65,3 +65,11 @@ export function filterForThirdSys() {
params: null
})
}
export function getBusTypeListByUser(params) {
return axios({
url: "/udiwms/localBusType/filterByUser",
method: "get",
params: params
});
}

@ -8,6 +8,14 @@ export function getBusTypePreResList(params) {
});
}
export function getBusTypePreResList2(params) {
return axios({
url: "/spms/busTypePre/filterBusTypePreRes",
method: "get",
params: params
});
}
export function getBusTypePreList(params) {
return axios({
url: "/spms/busTypePre/filter",

@ -120,15 +120,7 @@ export default {
false: "禁用",
true: "启用",
},
mainActionMap: {
WareHouseIn: "入库",
WareHouseOut: "出库"
},
fileList: [],
total: 0,
multipleSelection: [],
headers: {},
configParams: {},
loading: false,
typeMap: {
1: "耗材领用",

@ -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) {

@ -3,46 +3,88 @@
<el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="120px" border>
<el-row type="flex">
<el-col :span="11">
<el-form-item label="补单类型名称" prop="originName">
<el-input v-model="inputQuery.originName" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
<el-form-item label="原单据类型" prop="originAction">
<el-select v-model="inputQuery.originAction" placeholder="原单据类型" clearable size="small"
style="width: 90%">
<el-option
v-for="item in originBusTypes"
:key="item.action"
:label="item.name"
:value="item.action">
<span style="float: left"> {{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="补单类型代码" prop="originAction">
<el-input v-model="inputQuery.originAction" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
<el-form-item label="目标单据类型" prop="action">
<el-select v-model="inputQuery.action" placeholder="目标单据类型" clearable size="small" style="width: 90%">
<el-option
v-for="item in targetBusTypes"
:key="item.action"
:label="item.name"
:value="item.action">
<span style="float: left"> {{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11">
<el-form-item label="目标单据类型" prop="targetBusAction">
<el-select v-model="inputQuery.action" placeholder="请选择" clearable size="small" style="width: 90%">
<el-form-item label="目标所在仓库" prop="invCode">
<el-select v-model="inputQuery.invCode" placeholder="目标所在仓库" clearable size="small"
@change="invChange"
style="width: 90%">
<el-option
v-for="item in busTypes"
:key="item.action"
v-for="item in locInvs"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left"> {{item.name}}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{item.action}}</span>
:value="item.code">
<span style="float: left"> {{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="目标往来仓库" prop="defaultInvCode">
<el-select v-model="inputQuery.defaultInvCode" placeholder="目标往来仓库" clearable size="small"
@change="invChange"
style="width: 90%">
<el-option
v-for="item in fromInvs"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left"> {{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11">
<el-form-item label="启用状态" prop="enable">
<el-select v-model="inputQuery.enable"
size="small"
placeholder="启用状态"
style="width: 90%"
clearable
>
<el-option label="启用" :value="false"></el-option>
<el-option label="禁用" :value="true"></el-option>
<el-form-item label="推移时间(小时)" prop="beforeTime">
<el-input style="width: 90%"
size="small"
type="number" placeholder="请输入内容"
v-model="inputQuery.beforeTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="流转方式" prop="supplementAll">
<el-select v-model="inputQuery.supplementAll" placeholder="流转方式" clearable size="small"
style="width: 90%">
<el-option label="全量补单" :value="true"></el-option>
<el-option label="自动补单" :value="false"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -50,9 +92,9 @@
<el-row type="flex">
<el-col :span="23" type="flex">
<el-form-item prop="comments">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="inputQuery.remark" size="small" style="width: 90%" type="textarea"
<el-form-item prop="intro">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="inputQuery.intro" size="small" style="width: 90%" type="textarea"
row="3"></el-input>
</el-form-item>
</el-col>
@ -64,7 +106,8 @@
<script>
import {getBusTypeList} from "@/api/basic/busType";
import {getBusTypeList, getBusTypeListByUser} from "@/api/basic/busType";
import {filterSubByInv, filterSubAll} from "@/api/system/invSubWarehouse";
export default {
name: "BusTypePreModify",
@ -81,34 +124,37 @@ export default {
enabled: true,
isBuType: true,
},
busTypes: [],
originBusTypes: [],
targetBusTypes: [],
locInvs: [],
fromInvs: [],
isAdd: false,
formRules: {
originName: [
originAction: [
{
required: true,
message: "补单类型名称不能为空",
message: "原单据类型不能为空",
trigger: "blur"
}
],
originAction: [
action: [
{
required: true,
message: "补单类型代码不能为空",
message: "目标单据类型不能为空",
trigger: "blur"
}
],
targetBusAction: [
invCode: [
{
required: true,
message: "目标单据类型不能为空",
message: "目标所在仓库不能为空",
trigger: "blur"
}
],
enable: [
defaultInvCode: [
{
required: true,
message: "请选择启用状态",
message: "目标往来仓库不能为空",
trigger: "blur"
}
],
@ -125,14 +171,65 @@ export default {
this.busTypes = res.data.list || [];
}
})
}
},
getOriginBusType() {
let query = {
enable: true
};
getBusTypeList(query).then((res) => {
if (res.code === 20000) {
this.originBusTypes = res.data.list || [];
}
})
},
getTargetBusType() {
let query = {
enable: true
};
getBusTypeListByUser(query).then((res) => {
if (res.code === 20000) {
this.targetBusTypes = res.data.list || [];
}
})
},
getLocInv() {
let params = {};
filterSubAll(params).then((res) => {
if (res.code === 20000){
this.locInvs = res.data.list || [];
}
});
},
getFromInv() {
let params = {
code: this.inputQuery.invCode,
filter: 2
};
filterSubByInv(params).then((res) => {
if (res.code === 20000) {
this.fromInvs = res.data;
}
})
},
invChange() {
this.getFromInv();
this.getTargetBusType();
},
},
created() {
if (this.inputQuery.originAction == null) {
this.isAdd = true;
} else {
this.getTargetBusType();
}
this.getBusType();
this.getOriginBusType();
this.getLocInv();
}
}
</script>

Loading…
Cancel
Save