PDA-出库添加出库计划查看功能

This commit is contained in:
2024-04-25 17:35:36 +08:00
parent 86c9a8f82b
commit 9d80c4978a
2 changed files with 101 additions and 16 deletions

View File

@@ -147,6 +147,17 @@ export function generateOutorderplan(params) {
})
}
/**
* 获取出库单的持久化存储出库计划并计算计划批次当前已出库数量
*/
export function getOutOrderPlanAndOutProductionNum(params) {
return request({
url: '/mes/wm/WmOutOrder/getOutOrderPlanAndOutProductionNum',
method: 'get',
params
})
}
/**
* 检查是否可出库 production_packcode扫码结果 shipment_num出库单号
*/

View File

@@ -5,6 +5,7 @@
<!-- <span class="title-text">出库</span> -->
<view class="warehoseInfo-box">
<!-- 扫码 -->
<view>
<view v-if="searchType === 3" class="color1 aciton-box">请扫出库单</view>
<view v-if="searchType === 2" class="color2 aciton-box">请扫箱码</view>
@@ -13,23 +14,77 @@
<PdaScanInput @getInfo="handleGetInfo" :type="searchType"></PdaScanInput>
</view>
</view>
<view>出库单号{{ outInfo.shipmentNum }}</view>
<!-- 出库单信息 -->
<uni-card is-full :title="'出库单号:'+ outInfo.shipmentNum"
:extra="'备注:'+ (outInfo.remarks?outInfo.remarks:'无')">
<!-- <view class="row">
<span class="col">库存货物数{{ quantityTotal }}</span>
<span class="col">库存箱数{{ newMaterialList.length }}</span>
</view> -->
<view class="row">
<span class="col">当前已扫货物数{{ quantityTotal }}</span>
<span class="col">当前已扫箱数{{ newMaterialList.length }}</span>
</view>
</uni-card>
<!-- 选择物料号 -->
<u-input :value="'物料号:'+ material_id" color="#2979ff" fontSize="20px" readonly>
<template slot="suffix">
<u-button type="primary" size="mini" @click="show = true">选择物料号</u-button>
</template>
</u-input>
<u-picker :show="show" :columns="columns" @cancel="pick_cancel" @confirm="pick_confirm"></u-picker>
<!-- 查看出库计划 -->
<u-button type="primary" size="mini" @click="showPopup = true"
:disabled="!outInfo.shipmentNum">出库计划查看</u-button>
<u-popup :customStyle="{padding:'10px'}" mode="center" round closeable safeAreaInsetTop
:show="showPopup" @close="popupClose" @open="popupOpen">
<view>
<u-list width="300px" height="240px">
<u-list-item v-for="(item, index) in outOrderPlanList" :key="index">
<u-cell>
<view slot="title">
<u-row>
<u-col span="9">
<u--text size="40" bold
:text="item.outOrder+' 计划批次号:\n'+item.packageCode"></u--text>
</u-col>
<u-col span="3">
<u-tag v-if="item.isError" text="计划异常" size="mini" type="error"></u-tag>
<u-tag v-if="item.isOver" text="已完成" size="mini" type="success"></u-tag>
<u-tag v-if="!item.isOver" text="未完成" size="mini" type="info"></u-tag>
</u-col>
</u-row>
</view>
<view slot="label">
<u--text size="30" :text="'物料号:'+item.partnumber"></u--text>
<u--text size="30" type="info" :text="'描述:'+item.description"></u--text>
<u--text size="30" type="primary" :text="'需求零件数:' + item.requireNum"></u--text>
<u--text size="30" type="info"
:text="'库存现有箱数:' + item.packageNum + ' 库存现有零件数:' + item.partnumberNum"></u--text>
<u--text size="30" type="warning"
:text="'计划出库箱数:' + item.packagePlanNum + ' 计划出库零件数:' + item.partnumberPlanNum"></u--text>
<u--text size="30" type="success"
:text="'该批次已出箱数:' + item.outPackageNum + ' 该批次已出零件数:' + item.outPartnumberNum"></u--text>
</view>
</u-cell>
</u-list-item>
</u-list>
</view>
</u-popup>
<!-- <view>出库单号{{ outInfo.shipmentNum }}</view>
<view class="row">
<view>备注{{ outInfo.remarks }}</view>
</view>
<view class="row">
<span class="col">已扫货物数{{ quantityTotal }}</span>
<span class="col">已扫箱数{{ newMaterialList.length }}</span>
</view>
</view> -->
</view>
</view>
<!-- 选择物料号 -->
<view style="margin-top: 20px" class="warehoseInfo-box">
<u--text type="primary" :text="material_id" :size="50"></u--text>
<u-button @click="show = true">选择物料号</u-button>
<u-picker :show="show" :columns="columns" @cancel="pick_cancel" @confirm="pick_confirm"></u-picker>
</view>
<!-- 功能切换 -->
<u-subsection :list="subsectionList" :current="subsectionCurrent" @change="subsectionChange"
fontSize="36"></u-subsection>
@@ -81,6 +136,7 @@
data() {
return {
loading: false,
showPopup: false,
// 双击判定
touchNum: 0,
clearData: {},
@@ -112,7 +168,7 @@
newMaterialList: [],
//工单计划
outOrderPlan: [],
outOrderPlanList: [],
// 1-仓库扫码 2-货物扫码 3-出货单扫码
searchType: 3,
subsectionList: ['单箱出库', '多箱出库'],
@@ -121,7 +177,7 @@
columns: [
['无物料号']
],
material_id: '无物料号' //物料号
material_id: '无物料号', //物料号
};
},
watch: {},
@@ -145,13 +201,13 @@
// 初始化,并且清空数据
this.clearData.outInfo = JSON.parse(JSON.stringify(this.outInfo));
this.clearData.newMaterialList = JSON.parse(JSON.stringify(this.newMaterialList));
this.clearData.outOrderPlan = JSON.parse(JSON.stringify(this.outOrderPlan));
this.clearData.outOrderPlanList = JSON.parse(JSON.stringify(this.outOrderPlanList));
this.searchType = 3;
},
clear() {
this.outInfo = JSON.parse(JSON.stringify(this.clearData.outInfo));
this.newMaterialList = JSON.parse(JSON.stringify(this.clearData.newMaterialList));
this.outOrderPlan = JSON.parse(JSON.stringify(this.clearData.outOrderPlan));
this.outOrderPlanList = JSON.parse(JSON.stringify(this.clearData.outOrderPlanList));
this.searchType = 3;
},
// 扫码信息录入
@@ -161,10 +217,8 @@
this.searchType = 2;
this.outInfo = data;
this.newMaterialList = [];
let arry = [];
this.columns = [];
this.outInfo.materialList.forEach((item) => {
arry.push(item.partnumber);
});
@@ -174,6 +228,7 @@
} else {
this.columns.push(['无物料号']);
}
} else if (type === 2) {
if (this.subsectionCurrent === 0 && this.newMaterialList.length > 0) {
uni.showModal({
@@ -448,6 +503,27 @@
return;
}
this.subsectionCurrent = index;
},
// 弹窗打开
popupOpen() {
this.getPlan();
},
// 弹窗关闭
popupClose() {
this.showPopup = false;
},
// 获取计划
getPlan() {
this.outOrderPlanList = [];
const data = {
shipment_num: this.outInfo.shipmentNum,
partnumber: this.material_id
}
WarehoseApi.getOutOrderPlanAndOutProductionNum(data).then(res => {
if (res.code === 200) {
this.outOrderPlanList = res.data;
}
})
}
}
};
@@ -467,8 +543,6 @@
.warehoseInfo-box {
width: 100%;
font-size: 20px;
display: flex;
flex-direction: column;
}
.warehoseInfo-box .row {