Browse Source

修改直接发料

wms3.0_pda
niexiting 11 months ago
parent
commit
2e607f5dca
  1. 9
      pages/issue/coms/comIssueRequestPopup.vue
  2. 117
      pages/issue/record/issueRecord.vue

9
pages/issue/coms/comIssueRequestPopup.vue

@ -14,7 +14,7 @@
<view class="uni-flex uni-column" style="background-color: white; ">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row padding title u-col-center">
<text>位置 : </text>
<text>位置</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;">
{{positionInfo}}
@ -22,11 +22,9 @@
<u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select>
</view>
</view>
<u-line />
<view class="title padding" style="display: flex;">
<text style=" flex-shrink: 0;">物料</text>
<view class="" style="width: 100% ;">
@ -37,20 +35,17 @@
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="itemCodeClick">
</image>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center">
<text>数量 : </text>
<text>数量 </text>
<view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;">
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;'
:focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box>
<uom :uom="uom"></uom>
</view>
</view>
<u-line />

117
pages/issue/record/issueRecord.vue

@ -16,9 +16,7 @@
</com-issue-detail-card>
</view>
</scroll-view>
<!-- <comIssueRequestCreator ref="issueRequest" :dataContent="detailSource">
</comIssueRequestCreator> -->
<!-- <button class="btn_add" @click="goScan(false)">+去添加</button> -->
<button class="btn_add" @click="goScan(true)">+去添加</button>
</view>
<div class="btn_bottom">
@ -88,7 +86,8 @@
scanOptions: [],
workShopCode: "",
fromInventoryStatuses: "",
toInventoryStatuses: ""
toInventoryStatuses: "",
requestList: [],
}
},
mounted() {
@ -128,6 +127,31 @@
//
requestConfirm(action, item) {
if (item.itemCode == '' || item.itemCode == null) return;
let that = this;
let request = that.requestList.find(r => r.itemCode == item.itemCode);
if (request == undefined) {
that.requestList.push(item);
this.getRecommendInfo(item);
} else {
this.$refs.comMessage.showQuestionMessage('已经存在零件[' + item.itemCode + ']的需求信息,是否要修改?', res => {
if (res) {
that.detailSource.forEach(detail => {
let index = detail.Items.findIndex(r => {
r.itemCode == item.itemCode
})
detail.Items.splice(index, 1);
})
this.getRecommendInfo(item);
}
});
}
},
getRecommendInfo(item) {
let that = this;
uni.showLoading({
title: '加载中...',
@ -137,8 +161,9 @@
if (res.data == null) {
that.showMessage('未获取到推荐信息');
} else {
if (res.data.length > 0) {
this.workShopCode = item.workshopCode;
that.workShopCode = item.workshopCode;
res.data.forEach(r => {
r.toLocationCode = item.rawLocationCode;
r.productionLineCode = item.productionLineCode;
@ -149,12 +174,14 @@
})
that.detailSource = getDataSource(that.detailSource, that.subList)
//
that.detailSource.forEach(item => {
//
that.detailSource.forEach(detail => {
detail.Items.forEach(i => {
let request = that.requestList.find(r => r
.itemCode == i
.itemCode);
i.qty = request.qty;
})
})
that.resizeCollapse();
} else {
that.showMessage('列表数据为0');
@ -163,66 +190,8 @@
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
that.showErrorMessage(error)
})
// if (this.detailSource.subList.length == 0) {
// this.detailSource = {
// workshopCode: item.workshopCode,
// workShopName: item.workShopName,
// totalQty: 0,
// subList: []
// }
// var subItem = {
// productionLineCode: item.productionLineCode,
// productionLineName: item.productionLineName,
// workStationCode: item.workStationCode,
// workStationName: item.workStationName, //
// itemCode: item.itemCode,
// itemName: item.itemName,
// qty: item.qty,
// uom: item.uom
// }
// this.detailSource.subList.push(subItem)
// } else {
// var result = this.detailSource.subList.filter(res => {
// if (res.itemCode == item.itemCode &&
// res.productionLineCode == item.productionLineCode &&
// res.workStationCode == item.workStationCode) {
// return res
// }
// })
// //
// if (result.length == 0) {
// var subItem = {
// productionLineCode: item.productionLineCode,
// productionLineName: item.productionLineName,
// workStationCode: item.workStationCode,
// workStationName: item.workStationName, //
// itemCode: item.itemCode,
// itemName: item.itemName,
// qty: item.qty,
// uom: item.uom
// }
// this.detailSource.subList.push(subItem)
// } else {
// //
// result[0].qty += item.qty
// }
// }
// this.caclcQty();
// if (this.$refs.issueRequest != undefined) {
// this.$refs.issueRequest.update()
// }
},
@ -320,6 +289,16 @@
if (res) {}
});
},
showQuestionMessage(message) {
},
// this.$refs.comMessage.showQuestionMessage('?', res => {
// if (res) {
// that.clearInfo();
// }
// });
}
}
</script>

Loading…
Cancel
Save