1
This commit is contained in:
parent
622f507f6a
commit
cb566531c8
|
|
@ -17,6 +17,13 @@ export function getPmsOrderOut(recordId) {
|
|||
})
|
||||
}
|
||||
|
||||
export function selectList(orderWave) {
|
||||
return request({
|
||||
url: '/app/pmsOrderOut/selectList/' + orderWave,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增出库单
|
||||
export function addPmsOrderOut(data) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -68,4 +68,11 @@ export function createWaveRequestByOrders(data){
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//执行波次
|
||||
export function createWaveOutRequest(data){
|
||||
return request({
|
||||
url: '/app/task/createWaveOutRequest',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,14 @@
|
|||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="84px" :size="formSize">
|
||||
<div class="search-form-content" :class="{ 'is-advanced': isAdvanced }">
|
||||
<template v-if="isAdvanced">
|
||||
<el-form-item label="库位编号" prop="locationId">
|
||||
<el-input
|
||||
v-model="queryParams.locationId"
|
||||
placeholder="请输入列"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货架排" prop="wRow">
|
||||
<el-input
|
||||
v-model="queryParams.wRow"
|
||||
|
|
@ -248,6 +256,9 @@
|
|||
<!--<el-form-item label="设备号" prop="equipmentId">-->
|
||||
<!--<el-input v-model="form.equipmentId" placeholder="请输入设备号" />-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="库位编码" prop="locationId">
|
||||
<el-input v-model="form.locationId" placeholder="请输入库位号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排" prop="wRow">
|
||||
<el-input v-model="form.wRow" placeholder="请输入排" />
|
||||
</el-form-item>
|
||||
|
|
@ -257,9 +268,7 @@
|
|||
<el-form-item label="层" prop="wLayer">
|
||||
<el-input v-model="form.wLayer" placeholder="请输入层" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位编码" prop="locationId">
|
||||
<el-input v-model="form.locationId" placeholder="请输入库位号" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
|
|
@ -367,7 +376,8 @@ export default {
|
|||
isLock: null,
|
||||
vehicleId: null,
|
||||
isWorking: null,
|
||||
isEnable: null
|
||||
isEnable: null,
|
||||
locationId: null,
|
||||
},
|
||||
isEnableOptions: [{
|
||||
"label": "启用",
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" prop="customerId" />
|
||||
<el-table-column label="物料号" align="center" prop="goodsId" />
|
||||
<el-table-column label="订单出库数量" align="center" prop="goodsNum" />
|
||||
<el-table-column label="订单数量" align="center" prop="goodsNum" />
|
||||
<el-table-column label="总出库数量" align="center" prop="pickNum" />
|
||||
<el-table-column label="确认出库数量" align="center" prop="trNum" />
|
||||
<el-table-column label="本次出库数量" align="center" prop="shelvesNum" width="200">
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
class="item"
|
||||
v-model="scope.row.shelvesNum"
|
||||
:min="0"
|
||||
:max="scope.row.goodsNum"
|
||||
:max="scope.row.goodsNum - scope.row.pickNum"
|
||||
:disabled="scope.row.sts == 1"
|
||||
></el-input-number>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,8 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否插队" prop="isChad">
|
||||
<el-input
|
||||
v-model="queryParams.isChad"
|
||||
placeholder="请输入是否插队"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单WBS" prop="orderWbs">
|
||||
|
||||
<el-form-item label="订单WBS" prop="orderWbs" label-width="75px">
|
||||
<el-input
|
||||
v-model="queryParams.orderWbs"
|
||||
placeholder="请输入订单WBS"
|
||||
|
|
@ -25,14 +18,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库口" prop="waveDestination">
|
||||
<el-input
|
||||
v-model="queryParams.waveDestination"
|
||||
placeholder="请输入出库口"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
|
@ -42,11 +28,11 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-user-solid"
|
||||
icon="el-icon-remove"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
@click="handleOut"
|
||||
v-hasPermi="['app:wave:add']"
|
||||
>执行出库</el-button>
|
||||
</el-col>
|
||||
|
|
@ -85,7 +71,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="waveList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="waveList" @selection-change="handleSelectionChange" @row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="波次单号" align="center" prop="waveId" />
|
||||
<el-table-column label="出库规则" align="center" prop="outRule" >
|
||||
|
|
@ -100,7 +86,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="waveStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_order_status" :value="scope.row.waveStatus"/>
|
||||
<dict-tag :options="dict.type.wave_status" :value="scope.row.waveStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -130,7 +116,21 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 出库物料明细表格 -->
|
||||
<el-table :data="materialList" class="mt10" border>
|
||||
<el-table-column label="单号" align="center" prop="orderId" width="270"/>
|
||||
<el-table-column label="出库单号" align="center" prop="listId" />
|
||||
<el-table-column label="出库单类型" align="center" prop="orderType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_order_type" :value="scope.row.orderType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料号" align="center" prop="goodsId" />
|
||||
<el-table-column label="订单出库数量" align="center" prop="goodsNum" />
|
||||
<el-table-column label="总出库数量" align="center" prop="pickNum" />
|
||||
<el-table-column label="确认出库数量" align="center" prop="trNum" />
|
||||
<el-table-column label="本次出库数量" align="center" prop="shelvesNum" width="200"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -168,10 +168,11 @@
|
|||
|
||||
<script>
|
||||
import { listWave, getWave, delWave, addWave, updateWave } from "@/api/system/wave";
|
||||
|
||||
import { selectList } from "@/api/system/pmsOrderOut"
|
||||
import { createWaveOutRequest } from "@/api/system/task"
|
||||
export default {
|
||||
name: "Wave",
|
||||
dicts: ["wave_destination", "out_rule", "out_order_status","cut_in_line"],
|
||||
dicts: ["wave_destination", "out_rule", "wave_status","cut_in_line"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -188,6 +189,8 @@ export default {
|
|||
total: 0,
|
||||
// 【请填写功能名称】表格数据
|
||||
waveList: [],
|
||||
materialList: [], // 出库物料明细
|
||||
selectedWaveId: null, // 选中的波次单号
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
|
@ -225,6 +228,66 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleOut(row){
|
||||
const waveIds = row.waveId || this.ids;
|
||||
if (waveIds == "" || waveIds == undefined || waveIds.length == 0) {
|
||||
this.$modal.msgError("请选择要出库的波次单!");
|
||||
return;
|
||||
}
|
||||
if(waveIds.length > 1){
|
||||
this.$modal.msgError("只能选择一个波次单进行出库!");
|
||||
return;
|
||||
}
|
||||
var reqArr = {};
|
||||
var error = false;
|
||||
|
||||
for (var j = 0; j < waveIds.length; j++) {
|
||||
for (var i = 0; i < this.waveList.length; i++) {
|
||||
if (waveIds[j] == this.waveList[i].waveId) {
|
||||
if(this.waveList[i].waveStatus !== 0){
|
||||
this.$modal.msgError("波次号为" + this.waveList[i].waveId + "已执行出库!");
|
||||
error = true;
|
||||
break;
|
||||
}
|
||||
|
||||
reqArr = this.waveList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (error) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$modal
|
||||
.confirm("请确认是否执行该波次?")
|
||||
.then(function () {
|
||||
return createWaveOutRequest(reqArr);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("波次出库任务创建成功");
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgSuccess("波次出库任务创建异常");
|
||||
});
|
||||
},
|
||||
// 处理行点击事件
|
||||
handleRowClick(row) {
|
||||
this.selectedWaveId = row.waveId; // 记录选中的波次单号
|
||||
this.getMaterialList(row.waveId); // 获取物料明细
|
||||
},
|
||||
|
||||
// 获取出库物料明细
|
||||
getMaterialList(waveId) {
|
||||
|
||||
selectList(waveId).then(response => {
|
||||
this.materialList = response.data || [];
|
||||
}).catch(error => {
|
||||
this.$message.error("获取物料明细失败:" + error.message);
|
||||
});
|
||||
},
|
||||
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
<el-table v-loading="loading" :data="waveConstituteList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="波次号" align="center" prop="orderWave" />
|
||||
<el-table-column label="波次行号" align="center" prop="waveLineNum" />
|
||||
<!--<el-table-column label="记录号" align="center" prop="recordId" />-->
|
||||
<el-table-column label="wms订单号" align="center" prop="orderId" />
|
||||
<el-table-column label="物料编码" align="center" prop="goodsId" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user