feat(wms): 添加调拨工单审批功能

- 新增调拨工单审批 API 接口
- 实现调拨工单审批的前端页面和逻辑
- 增加审批状态和意见的字段
- 优化父表格的审批按钮显示逻辑
master
zangch@mesnac.com 3 months ago
parent 359fa68474
commit 4d0a0bdfa4

@ -81,6 +81,9 @@ export interface AllocateOrderVO {
*/ */
allocateReason: string; allocateReason: string;
planWarehouseName?: string;
targetWarehouseName?: string;
} }
export interface AllocateOrderForm extends BaseEntity { export interface AllocateOrderForm extends BaseEntity {
@ -166,6 +169,9 @@ export interface AllocateOrderForm extends BaseEntity {
*/ */
allocateReason?: string; allocateReason?: string;
planWarehouseName?: string;
targetWarehouseName?: string;
} }
export interface AllocateOrderQuery extends PageQuery { export interface AllocateOrderQuery extends PageQuery {
@ -252,6 +258,9 @@ export interface AllocateOrderQuery extends PageQuery {
*/ */
allocateReason?: string; allocateReason?: string;
planWarehouseName?: string;
targetWarehouseName?: string;
/** /**
* *
*/ */

@ -29,6 +29,9 @@ export interface AllocateOrderDetailVO {
*/ */
erpSynchronousQty: number; erpSynchronousQty: number;
materialName: string;
} }
export interface AllocateOrderDetailForm extends BaseEntity { export interface AllocateOrderDetailForm extends BaseEntity {
@ -92,6 +95,8 @@ export interface AllocateOrderDetailForm extends BaseEntity {
*/ */
erpSynchronousQty?: number; erpSynchronousQty?: number;
} }
export interface AllocateOrderDetailQuery extends PageQuery { export interface AllocateOrderDetailQuery extends PageQuery {
@ -126,6 +131,8 @@ export interface AllocateOrderDetailQuery extends PageQuery {
*/ */
erpSynchronousQty?: number; erpSynchronousQty?: number;
materialName?: string;
/** /**
* *
*/ */

@ -147,3 +147,12 @@ export const deleteTasksByDetailId = (aoDId) => {
method: 'delete' method: 'delete'
}); });
}; };
// 调拨工单审批
export const approveAllocateOrder = (data) => {
return request({
url: '/wms/allocateOrder/approveAllocateOrder',
method: 'put',
data: data
});
};

@ -85,8 +85,7 @@
<!-- <el-button size="small" @click.stop="parentTableUpdate(scope.row)"> <!-- <el-button size="small" @click.stop="parentTableUpdate(scope.row)">
修改 修改
</el-button>--> </el-button>-->
<el-button size="small" @click.stop="parentTableApprove(scope.row)" v-if="scope.row.auditStatus==0&&scope.row.auditBy!=''"> <el-button size="small" @click.stop="parentTableApprove(scope.row)" v-if="scope.row.auditStatus==0&&scope.row.auditBy!=''">
审批
</el-button> </el-button>
<el-button <el-button
size="small" size="small"
@ -396,6 +395,37 @@
</template> </template>
</el-dialog> </el-dialog>
<el-dialog v-model="parentTableApproveVisible" title="审批" width="40%">
<el-form :model="parentTableApproveForm" label-width="120px">
<el-form-item label="审核状态" prop="auditStatus">
<el-radio-group v-model='parentTableApproveForm.auditStatus'>
<el-radio
v-for='dict in audit_behave'
:key='dict.value'
:value='dict.value'
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" prop="auditComments">
<el-input
v-model='parentTableApproveForm.auditComments'
style="width: 500px"
:autosize="{ minRows: 2, maxRows: 4 }"
type="textarea"
placeholder="Please input"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="parentTableApproveVisible = false">关闭</el-button>
<el-button type="primary" @click="parentTableApproveSubmit">
确定
</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="childrenTableInfoVisible" title="修改子表格" width="40%"> <el-dialog v-model="childrenTableInfoVisible" title="修改子表格" width="40%">
<el-form :model="childrenTableInfoForm" label-width="120px"> <el-form :model="childrenTableInfoForm" label-width="120px">
<!-- <el-form-item label="物料大类" prop="materialCategoryId"> <!-- <el-form-item label="物料大类" prop="materialCategoryId">
@ -587,7 +617,8 @@ import {
triggerPrint, triggerPrint,
recreateAllocateTasks, recreateAllocateTasks,
updateTaskBarcode, updateTaskBarcode,
deleteTasksByDetailId deleteTasksByDetailId,
approveAllocateOrder
} from '@/api/wms/linkage' } from '@/api/wms/linkage'
import MaterialSelectInWMS from "@/views/wms/baseMaterialInfo/addMaterialInWMS.vue"; import MaterialSelectInWMS from "@/views/wms/baseMaterialInfo/addMaterialInWMS.vue";
@ -609,13 +640,14 @@ import { getBaseMaterialCategoryListInWMS } from '@/api/wms/baseMaterialCategory
const {proxy} = getCurrentInstance() as ComponentInternalInstance; const {proxy} = getCurrentInstance() as ComponentInternalInstance;
const { const {
approve_status, approve_status,
audit_behave,
erp_synchronous_status, erp_synchronous_status,
material_mategories, material_mategories,
mes_material_categories, mes_material_categories,
wms_allocate_status, wms_allocate_status,
wms_allocate_create, wms_allocate_create,
wms_allocate_way wms_allocate_way
} = toRefs<any>(proxy?.useDict('approve_status', 'erp_synchronous_status', 'material_mategories', 'mes_material_categories', 'wms_allocate_status', 'wms_allocate_create', 'wms_allocate_way')); } = toRefs<any>(proxy?.useDict('approve_status', 'audit_behave', 'erp_synchronous_status', 'material_mategories', 'mes_material_categories', 'wms_allocate_status', 'wms_allocate_create', 'wms_allocate_way'));
interface User { interface User {
@ -627,6 +659,7 @@ interface User {
const parentTableTotal = ref(0) const parentTableTotal = ref(0)
const dialogVisible = ref(false) const dialogVisible = ref(false)
const parentTableInfoVisible = ref(false) const parentTableInfoVisible = ref(false)
const parentTableApproveVisible = ref(false)
const childrenTableInfoVisible = ref(false) const childrenTableInfoVisible = ref(false)
const showSearch = ref(true) const showSearch = ref(true)
const columns = ref([]) const columns = ref([])
@ -634,6 +667,10 @@ const updateDialog = ref(false)
const dialogTitle = ref('添加') const dialogTitle = ref('添加')
const dialogForm = ref<AllocateOrderForm>({}) const dialogForm = ref<AllocateOrderForm>({})
const parentTableInfoForm = ref<AllocateOrderForm>({}) const parentTableInfoForm = ref<AllocateOrderForm>({})
const parentTableApproveForm = ref<any>({
auditStatus: '',
auditComments: ''
})
const childrenTableInfoForm = ref<AllocateOrderForm>({}) const childrenTableInfoForm = ref<AllocateOrderForm>({})
const queryForm = ref({ const queryForm = ref({
@ -773,6 +810,12 @@ const parentTableAdd = () => {
dialogForm.value = {} dialogForm.value = {}
dialogtable.value = [] dialogtable.value = []
} }
//
const parentTableApprove = async (e) => {
parentTableApproveForm.value = (await viewAllocateOrder(e.aoId)).data
parentTableApproveVisible.value = true
updateDialog.value = true
}
// //
const parentTableUpdate = async (e) => { const parentTableUpdate = async (e) => {
let id = ref(null) let id = ref(null)
@ -881,6 +924,20 @@ const dialogSubmit = () => {
}) })
} }
/**
* 调拨工单审批
*/
const parentTableApproveSubmit = () =>{
approveAllocateOrder(parentTableApproveForm.value).then(e=>{
ElMessage({
type: 'success',
message: '审批完成',
})
parentTableApproveVisible.value = false
getParentTable()
})
}
const parentTableInfoSubmit = () =>{ const parentTableInfoSubmit = () =>{
allocateOrderUpdate(parentTableInfoForm.value).then(e=>{ allocateOrderUpdate(parentTableInfoForm.value).then(e=>{
ElMessage({ ElMessage({
@ -1027,7 +1084,7 @@ const submitInventoryForm = () => {
if (selectType.value === 'material') { if (selectType.value === 'material') {
// //
if (currentRowIndex.value >= 0 && dialogtable.value[currentRowIndex.value]) { if (currentRowIndex.value >= 0 && dialogtable.value[currentRowIndex.value]) {
dialogtable.value[currentRowIndex.value].materialId = Number(selectedInventory.value.materialId); dialogtable.value[currentRowIndex.value].materialId = selectedInventory.value.materialId;
dialogtable.value[currentRowIndex.value].materialName = selectedInventory.value.materialName; dialogtable.value[currentRowIndex.value].materialName = selectedInventory.value.materialName;
dialogtable.value[currentRowIndex.value].materialCode = selectedInventory.value.materialCode; dialogtable.value[currentRowIndex.value].materialCode = selectedInventory.value.materialCode;
dialogtable.value[currentRowIndex.value].batchCode = selectedInventory.value.batchCode; dialogtable.value[currentRowIndex.value].batchCode = selectedInventory.value.batchCode;

Loading…
Cancel
Save