完善成品出库单分拣页面
This commit is contained in:
parent
db202e16e1
commit
d8febf4f05
@ -82,7 +82,7 @@ namespace HHWMS.Web.Controllers
|
||||
CompletedQty = shipmentDetail?.CompletedQty ?? 0,
|
||||
AllocatedQty = taskDetail.Qty ?? 0,
|
||||
Qty = inventory?.Qty ?? 0,
|
||||
ActualQty = taskDetail.Qty ?? 0
|
||||
ActualQty = (decimal?)null
|
||||
};
|
||||
}).ToList();
|
||||
return true;
|
||||
|
||||
@ -1,3 +1,17 @@
|
||||
<style>
|
||||
#receiptin .shipment-compact-table .arco-table-th,
|
||||
#receiptin .shipment-compact-table .arco-table-td {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#receiptin .shipment-compact-table .arco-table-cell,
|
||||
#receiptin .shipment-compact-table .arco-table-cell-wrap-value {
|
||||
padding: 6px 5px;
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
</style>
|
||||
<div id="receiptin">
|
||||
<a-space direction="vertical" fill>
|
||||
<a-form :model="formData" layout="horizontal" :label-col="{ style: { width: '100px' } }" :wrapper-col="{ style: { width: '220px' } }">
|
||||
@ -10,7 +24,7 @@
|
||||
@@blur="validateContainer"
|
||||
ref="containerInput"/>
|
||||
</a-form-item>
|
||||
<a-form-item field="materialCode" label="物料信息">
|
||||
<a-form-item v-if="!isShipment" field="materialCode" label="物料信息">
|
||||
<a-auto-complete
|
||||
v-model="formData.materialCode"
|
||||
:data="materialOptions"
|
||||
@ -20,10 +34,10 @@
|
||||
ref="materialInput">
|
||||
</a-auto-complete>
|
||||
</a-form-item>
|
||||
<a-form-item field="materialName" label="图号">
|
||||
<a-form-item v-if="!isShipment" field="materialName" label="图号">
|
||||
<a-input v-model="formData.materialName"/>
|
||||
</a-form-item>
|
||||
<a-form-item field="batch" label="部件名称">
|
||||
<a-form-item v-if="!isShipment" field="batch" label="部件名称">
|
||||
<a-auto-complete v-model="formData.batch"
|
||||
ref="batchInput"
|
||||
:data="batchTips"
|
||||
@ -33,7 +47,7 @@
|
||||
$refs.sourceCodeSelect.focus();
|
||||
})"/>/>
|
||||
</a-form-item>
|
||||
<a-form-item field="sourceCode" label="生产订单">
|
||||
<a-form-item v-if="!isShipment" field="sourceCode" label="生产订单">
|
||||
<a-select
|
||||
v-model="formData.sourceCode"
|
||||
:options="orderOptions"
|
||||
@ -44,11 +58,11 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="客户单号" field="billCode">
|
||||
<a-form-item v-if="!isShipment" label="客户单号" field="billCode">
|
||||
<a-input v-model="formData.billCode" placeholder="请输入客户单号"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item field="companyCode" label="公司">
|
||||
<a-form-item v-if="!isShipment" field="companyCode" label="公司">
|
||||
<a-auto-complete
|
||||
v-model="formData.companyCode"
|
||||
:data="companyOptions"
|
||||
@ -58,7 +72,7 @@
|
||||
ref="companyCodeInput">
|
||||
</a-auto-complete>
|
||||
</a-form-item>
|
||||
<a-form-item field="qty" label="数量">
|
||||
<a-form-item v-if="!isShipment" field="qty" label="数量">
|
||||
<a-input-number
|
||||
v-model="formData.qty"
|
||||
:min="0"
|
||||
@ -68,10 +82,10 @@
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button @@click="handleBind" type="primary">绑定</a-button>
|
||||
<a-button @@click="handleClick" :loading="loading1" type="primary">入库</a-button>
|
||||
<a-button @@click="emptyIn" :loading="loading1" type="success">空托入库</a-button>
|
||||
<a-button @@click="outClick" :loading="loading1" type="primary">呼叫出库</a-button>
|
||||
<a-button v-if="!isShipment" @@click="handleBind" type="primary">绑定</a-button>
|
||||
<a-button v-if="!isShipment" @@click="handleClick" :loading="loading1" type="primary">入库</a-button>
|
||||
<a-button v-if="!isShipment" @@click="emptyIn" :loading="loading1" type="success">空托入库</a-button>
|
||||
<a-button v-if="!isShipment" @@click="outClick" :loading="loading1" type="primary">呼叫出库</a-button>
|
||||
<a-button v-if="isShipment" @@click="confirmShipment" :loading="shipmentLoading"
|
||||
type="primary" status="success">确认发货</a-button>
|
||||
</a-space>
|
||||
@ -82,7 +96,8 @@
|
||||
当前托盘来自ERP发货任务。请逐条填写实际出库数量(可以为0),确认后系统一次完成库存扣减、释放分配并回传ERP。
|
||||
</a-alert>
|
||||
|
||||
<a-table :data="bindList" :columns="displayColumns" :pagination="false"
|
||||
<a-table class="shipment-compact-table" size="small" :scroll="{ x: 1600 }"
|
||||
:data="bindList" :columns="displayColumns" :pagination="false"
|
||||
:row-key="record => isShipment ? record.TaskDetailId : record.Id">
|
||||
<template #operations="{ record }">
|
||||
<a-space v-if="!isShipment">
|
||||
@ -94,7 +109,7 @@
|
||||
<template #qty="{ record }">
|
||||
{{ Math.floor(record.Qty) }}
|
||||
</template>
|
||||
<template #actualQty="{ record }">
|
||||
<template #actualqty="{ record }">
|
||||
<a-input-number v-if="isShipment" v-model="record.ActualQty" :min="0"
|
||||
:precision="4" style="width: 130px" />
|
||||
</template>
|
||||
@ -241,7 +256,7 @@
|
||||
{
|
||||
title: '实际出库',
|
||||
dataIndex: 'ActualQty',
|
||||
slotName: 'actualQty',
|
||||
slotName: 'actualqty',
|
||||
shipmentOnly: true,
|
||||
width: 150
|
||||
},
|
||||
|
||||
@ -342,6 +342,7 @@ namespace HHWMS.Web.Controllers
|
||||
x.InventoryId.HasValue
|
||||
&& inventoryIds.Contains(x.InventoryId.Value)
|
||||
&& x.Status != TaskStatusEnum.完成)
|
||||
.AsNoTracking()
|
||||
.ToList()
|
||||
.GroupBy(x => x.InventoryId.Value)
|
||||
.ToDictionary(x => x.Key, x => x.Sum(y => y.Qty ?? 0));
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
<a-space>
|
||||
<span>托盘:{{ task.ContainerCode }};状态:{{ task.Status }}</span>
|
||||
<a-select v-if="task.CanDispatch" v-model="task.SelectedOutPort"
|
||||
popup-container="#shipment-allocate-@Model.Entity.ID"
|
||||
placeholder="选择出库口" style="width: 150px">
|
||||
<a-option v-for="port in outPorts" :key="port.Value" :value="port.Value">
|
||||
{{ port.Label }}
|
||||
@ -68,7 +69,8 @@
|
||||
</a-card>
|
||||
|
||||
<a-modal v-model:visible="inventoryVisible" title="选择库存并填写分配数量"
|
||||
width="1000px" :ok-loading="saving" @@before-ok="saveAllocation">
|
||||
width="1000px" :ok-loading="saving" :style="{ zIndex: inventoryModalZIndex }"
|
||||
@@before-ok="saveAllocation">
|
||||
<a-alert type="warning" style="margin-bottom: 12px">
|
||||
本明细剩余可分配 {{ currentDetail.RemainingQty || 0 }}。同一库存可以分给多个明细,但累计不能超过库存数量。
|
||||
</a-alert>
|
||||
@ -112,7 +114,8 @@
|
||||
inventoryVisible: false,
|
||||
inventories: [],
|
||||
currentDetail: {},
|
||||
saving: false
|
||||
saving: false,
|
||||
inventoryModalZIndex: 2000
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -120,7 +123,21 @@
|
||||
},
|
||||
methods: {
|
||||
notifyError(message) {
|
||||
const zIndex = this.getInventoryModalZIndex() + 2;
|
||||
this.$notification.error({ content: message || '操作失败', duration: 5000, closable: true });
|
||||
this.$nextTick(() => {
|
||||
document.querySelectorAll('.arco-notification-list').forEach(element => {
|
||||
element.style.zIndex = String(zIndex);
|
||||
});
|
||||
});
|
||||
},
|
||||
getInventoryModalZIndex() {
|
||||
const root = document.getElementById(`shipment-allocate-${this.headerId}`);
|
||||
const hostLayer = root ? root.closest('.layui-layer') : null;
|
||||
const hostZIndex = hostLayer
|
||||
? Number.parseInt(window.getComputedStyle(hostLayer).zIndex, 10)
|
||||
: 0;
|
||||
return hostZIndex > 0 ? hostZIndex + 2 : 2000;
|
||||
},
|
||||
loadData() {
|
||||
axios.get('/shipment/ShipmentHeader/GetAllocationData', { params: { headerId: this.headerId } })
|
||||
@ -155,6 +172,7 @@
|
||||
Selected: false,
|
||||
AllocationQty: 0
|
||||
}));
|
||||
this.inventoryModalZIndex = this.getInventoryModalZIndex();
|
||||
this.inventoryVisible = true;
|
||||
})
|
||||
.catch(error => this.notifyError(error.message));
|
||||
|
||||
@ -24,12 +24,12 @@
|
||||
"Connections": [
|
||||
{
|
||||
"Key": "default",
|
||||
"Value": "Server=127.0.0.1;Port=3306;Database=WMS2;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
"Value": "Server=127.0.0.1;Port=3306;Database=wms_yongfeng_cp;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
"DBType": "mysql"
|
||||
},
|
||||
{
|
||||
"Key": "cp",
|
||||
"Value": "Server=127.0.0.1;Port=3306;Database=wms3;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
"Value": "Server=127.0.0.1;Port=3306;Database=wms_yongfeng_cp;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
"DBType": "mysql"
|
||||
}
|
||||
],
|
||||
@ -100,6 +100,9 @@
|
||||
"WCS": {
|
||||
"Address": "http://192.168.30.220:65533/api/WCS/"
|
||||
},
|
||||
"WCSCP": {
|
||||
"Address": "http://127.0.0.1:65534/api/WCS/"
|
||||
},
|
||||
"ERP": {
|
||||
"Address": "http://127.0.0.1:4523/m1/1364541-1434451-default/"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user