委托验收相关功能
parent
400a852ab4
commit
0e5acf54e7
@ -0,0 +1,28 @@
|
||||
import axios from '@/utils/request'
|
||||
|
||||
|
||||
export function getAcceptOrder(query) {
|
||||
return axios({
|
||||
url: "/udiwms/stock/order/accept/getOrder",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function acceptClear(query) {
|
||||
return axios({
|
||||
url: "/udiwms/stock/order/acceptClear",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function acceptAddCode(query) {
|
||||
return axios({
|
||||
url: "/udiwms/stock/order/accept/addCode",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import axios from '@/utils/request'
|
||||
|
||||
export function getEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/delete",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function updateEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/update",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function insertEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/add",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function filterNoUseBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/filterAllNoUse",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item" label="单据类型:">
|
||||
<el-input
|
||||
v-model="filterQuery.name"
|
||||
placeholder="单据类型名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group style="margin-left: 10px;display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"
|
||||
:disabled="!configParms.entrustAction"
|
||||
>新增
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" border>
|
||||
<el-table-column label="序号" type="index" width="60" ></el-table-column>
|
||||
<el-table-column label="扫码单据类型" prop="curName" ></el-table-column>
|
||||
<el-table-column label="当前仓库" prop="curInvName" ></el-table-column>
|
||||
<el-table-column label="委托验收仓库" prop="entrustInvName" ></el-table-column>
|
||||
<el-table-column label="委托验收人" prop="employeeName" >
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
:disabled="!configParms.entrustAction"
|
||||
@click.native.stop="handleModifyClick(scope.row)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
:disabled="!configParms.entrustAction"
|
||||
@click.native.stop="deleteDialog(scope.row)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog
|
||||
title="新增委托验收"
|
||||
:visible.sync="addDialogVisible"
|
||||
width="60%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="addDialogVisible"
|
||||
>
|
||||
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
|
||||
>取消
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="编辑委托验收"
|
||||
:visible.sync="modifyDialogVisible"
|
||||
width="70%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="modifyDialogVisible"
|
||||
>
|
||||
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
|
||||
>取消
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:current-page="filterQuery.page"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getEntrustRece,
|
||||
deleteEntrustRece,
|
||||
updateEntrustRece,
|
||||
insertEntrustRece,
|
||||
} from "@/api/system/param/EntrustRece";
|
||||
|
||||
import modifyDialog from "./BasicEntrutsReceModify";
|
||||
import {findConfig} from "@/api/thrsys/spsSyncStatus";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
name: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
loading: false,
|
||||
addDialogVisible: false,
|
||||
modifyDialogVisible: false,
|
||||
list: [],
|
||||
inputQuery: {
|
||||
action: null,
|
||||
name: "",
|
||||
entrustInv: "",
|
||||
entrustUser: "",
|
||||
entrustAction: null,
|
||||
finishRece: false,
|
||||
curInv: "",
|
||||
userId: null,
|
||||
},
|
||||
enableMap: {
|
||||
true: "是",
|
||||
false: "否",
|
||||
},
|
||||
mainActionMap: {
|
||||
WareHouseIn: "入库",
|
||||
WareHouseOut: "出库"
|
||||
},
|
||||
fileList: [],
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
uploadFileUrl: null,
|
||||
headers: {},
|
||||
configParms: {},
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
name: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
cancelDialog() {
|
||||
this.modifyDialogVisible = false;
|
||||
this.addDialogVisible = false;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getEntrustRece(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
onAddSubmit() {
|
||||
insertEntrustRece(this.inputQuery)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
});
|
||||
},
|
||||
|
||||
onModifySubmit() {
|
||||
updateEntrustRece(this.inputQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
});
|
||||
},
|
||||
|
||||
handleAddClick() {
|
||||
this.inputQuery = {};
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
|
||||
handleModifyClick(row) {
|
||||
this.inputQuery = row;
|
||||
this.modifyDialogVisible = true;
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
let tquery = {
|
||||
id: data.id + "",
|
||||
};
|
||||
deleteEntrustRece(tquery)
|
||||
.then((response) => {
|
||||
this.getList();
|
||||
if (response.code == 20000) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getSyncConfig() {
|
||||
findConfig()
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.configParms = response.data;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
modifyDialog,
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getSyncConfig();
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="当前仓库" prop="curInv">
|
||||
<el-select v-model="inputQuery.curInv" placeholder="当前仓库"
|
||||
@change="curInvChange"
|
||||
filterable
|
||||
style="width: 90%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="当前单据类型" prop="action">
|
||||
<el-select v-model="inputQuery.action" placeholder="请选择" clearable
|
||||
style="width: 90%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.action"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="委托仓库" prop="entrustInv">
|
||||
<el-select v-model="inputQuery.entrustInv" placeholder="委托仓库"
|
||||
@change="entrustInvChange"
|
||||
filterable
|
||||
style="width: 90%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in entrustSubInvList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="11">
|
||||
<el-form-item label="委托验收人" prop="entrustUser">
|
||||
<el-select v-model="inputQuery.entrustUser" placeholder="委托验收人" clearable style="width: 90%">
|
||||
<el-option
|
||||
v-for="item in entrustUserArray"
|
||||
:key="item.userid"
|
||||
:label="item.employeeName"
|
||||
:value="item.userid">
|
||||
<span style="float: left">{{ item.employeeName }}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
|
||||
<el-col :span="11">
|
||||
<el-form-item label="生成单据类型" prop="entrustUser">
|
||||
<el-select v-model="inputQuery.entrustAction" placeholder="单据类型"
|
||||
style="width: 90%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in entrustBusArray"
|
||||
:key="item.action"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="11">
|
||||
<div class="text item">
|
||||
<el-checkbox v-model="inputQuery.finishRece">是否直接验收完成
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
getBasicThirdSys,
|
||||
} from "@/api/basic/basicThirdSys";
|
||||
|
||||
import {
|
||||
filterUnUse, findByInvUser
|
||||
} from "@/api/basic/busType";
|
||||
import {filterAll, filterNext, warehouseBussinessTypeList, warehouseUserList} from "@/api/system/invWarehouse";
|
||||
import {filterSubByInv, filterSub, findInvByUser, findByFrom} from "@/api/system/invSubWarehouse";
|
||||
|
||||
|
||||
export default {
|
||||
name: "inputQuery",
|
||||
props: {
|
||||
inputQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
enabled: true,
|
||||
isBuType: true,
|
||||
isFilterBind: true,
|
||||
},
|
||||
storageList: [],
|
||||
invList: [],
|
||||
entrustSubInvList: [],
|
||||
entrustStorageList: [],
|
||||
orderTypeList: [],
|
||||
fromSpecialOptions: [],
|
||||
thirdSys: [],
|
||||
busTypes: [],
|
||||
entrustBusArray: [],
|
||||
entrustUserArray: [],
|
||||
formRules: {
|
||||
action: [
|
||||
{required: true, message: "请输入扫码单据类型", trigger: "blur"}
|
||||
],
|
||||
entrustInv: [
|
||||
{required: true, message: "请输入委托验收人仓库", trigger: "blur"}
|
||||
],
|
||||
entrustUser: [
|
||||
{required: true, message: "请输入委托验收人", trigger: "blur"}
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
//获取当前仓库
|
||||
findCurInvs() {
|
||||
this.invList = [];
|
||||
findInvByUser()
|
||||
.then((response) => {
|
||||
this.invList = response.data || [];
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
//切换当前仓库
|
||||
curInvChange() {
|
||||
this.inputQuery.action = null;
|
||||
this.inputQuery.entrustInv = null;
|
||||
this.inputQuery.entrustUser = null;
|
||||
this.inputQuery.entrustAction = null;
|
||||
this.getOrderType();
|
||||
this.findEntrustInv();
|
||||
},
|
||||
|
||||
//获取当前单据类型
|
||||
getOrderType() {
|
||||
let query = {
|
||||
code: this.inputQuery.curInv
|
||||
}
|
||||
findByInvUser(query).then((response) => {
|
||||
this.busTypes = response.data || [];
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
//获取委托仓库
|
||||
findEntrustInv() {
|
||||
let query = {
|
||||
locInvCode: this.inputQuery.curInv,
|
||||
};
|
||||
findByFrom(query)
|
||||
.then((response) => {
|
||||
this.entrustSubInvList = response.data || [];
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
//切换委托仓库
|
||||
entrustInvChange() {
|
||||
this.inputQuery.entrustUser = null;
|
||||
this.inputQuery.entrustAction = null;
|
||||
this.getUserBus();
|
||||
},
|
||||
|
||||
|
||||
getUserBus() {
|
||||
let query = {
|
||||
code: this.inputQuery.entrustInv,
|
||||
}
|
||||
|
||||
//加载用户数据
|
||||
warehouseUserList(query).then((res) => {
|
||||
|
||||
this.entrustUserArray = [];
|
||||
this.entrustUserArray = res.data.list;
|
||||
}).catch((error) => {
|
||||
this.$message.error("用户数据加载失败")
|
||||
});
|
||||
|
||||
//加载单据类型数据
|
||||
warehouseBussinessTypeList(query).then((res) => {
|
||||
|
||||
this.entrustBusArray = res.data.list;
|
||||
}).catch((error) => {
|
||||
this.$message.error("单据类型数据加载失败")
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
corpType() {
|
||||
return this.inputQuery.corpType;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
this.findCurInvs();
|
||||
|
||||
if (this.inputQuery.action != null) {
|
||||
//编辑----加载候选数据
|
||||
this.getOrderType();
|
||||
this.findEntrustInv();
|
||||
this.getUserBus();
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue