先进先出
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
</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>
|
||||
<!-- 货物列表 -->
|
||||
<view class="scroll-view-box">
|
||||
<view class="scroll-view-title">出库清单</view>
|
||||
@@ -80,7 +86,11 @@ export default {
|
||||
//工单计划
|
||||
outOrderPlan: [],
|
||||
// 1-仓库扫码 2-货物扫码 3-出货单扫码
|
||||
searchType: 3
|
||||
searchType: 3,
|
||||
|
||||
show: false,
|
||||
columns: [['无物料号']],
|
||||
material_id: '无物料号' //物料号
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
@@ -120,6 +130,17 @@ export default {
|
||||
this.searchType = 2;
|
||||
this.outInfo = data;
|
||||
this.newMaterialList = [];
|
||||
|
||||
let arry=[]
|
||||
this.columns=[];
|
||||
|
||||
this.outInfo.materialList.forEach((item)=>{
|
||||
arry.push(item.partnumber);
|
||||
|
||||
})
|
||||
this.columns.push(arry)
|
||||
this.material_id=this.outInfo.materialList[0].partnumber
|
||||
|
||||
} else if (type === 2) {
|
||||
if (this.newMaterialList.length > 0) {
|
||||
uni.showModal({
|
||||
@@ -132,8 +153,10 @@ export default {
|
||||
}
|
||||
const checkData = {
|
||||
production_packcode: data.originalCode,
|
||||
shipment_num: this.outInfo.shipmentNum
|
||||
shipment_num: this.outInfo.shipmentNum,
|
||||
partnumber:this.material_id
|
||||
};
|
||||
//检查是否可以出货
|
||||
WarehoseApi.checkProductionOut(checkData).then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
this.newMaterialList.push(data);
|
||||
@@ -203,7 +226,8 @@ export default {
|
||||
if (res.confirm) {
|
||||
const data = {
|
||||
shipmentNum: this.outInfo.shipmentNum,
|
||||
patchCode: [this.newMaterialList[0].patchCode]
|
||||
patchCode: [this.newMaterialList[0].patchCode],
|
||||
|
||||
};
|
||||
WarehoseApi.doMaterialOut(data).then((res) => {
|
||||
if (res.code !== 200) {
|
||||
@@ -213,6 +237,22 @@ export default {
|
||||
showCancel: false,
|
||||
confirmText: '确认'
|
||||
});
|
||||
|
||||
if(res.data.item1=100){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '此物料已经出库完成,没有可以出库的了',
|
||||
showCancel: false,
|
||||
confirmText: '确认'
|
||||
});
|
||||
}else if(res.data.item2=100){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '不是此物料最早批次,无法出库',
|
||||
showCancel: false,
|
||||
confirmText: '确认'
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
uni.showModal({
|
||||
@@ -262,6 +302,17 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//取消
|
||||
pick_cancel() {
|
||||
this.show = false;
|
||||
},
|
||||
// 确认
|
||||
pick_confirm(e) {
|
||||
console.log(e.value);
|
||||
this.material_id = e.value[0];
|
||||
console.log(this.material_id);
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user