Browse Source

非生产退料线边

pda_nev
李俊城 12 months ago
parent
commit
18c06fb1c3
  1. 67
      fe/PDA/pages/task/unProduceReturnWipDetail.vue

67
fe/PDA/pages/task/unProduceReturnWipDetail.vue

@ -6,8 +6,8 @@
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> <com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail> </com-job-scan-detail>
</view> </view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@scroll="scroll" class="scroll-detail"> class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> <view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-content"> <view class="detail-content">
@ -33,21 +33,21 @@
<uni-tr> <uni-tr>
<uni-th width="50">库位</uni-th> <uni-th width="50">库位</uni-th>
<uni-th width="100" align="center"> <uni-th width="100" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view> <view class="text_black">{{ item.recommendToLocationCode }}</view>
</uni-th> </uni-th>
<uni-th width="140"> <uni-th width="140">
<view class="" v-if="item.scaned" <view class="" v-if="item.scaned"
style="display: flex; width: 100%; align-items: center; justify-content: center;"> style="display: flex; width: 100%; align-items: center; justify-content: center;">
<view class="text_black"> <view class="text_black">
{{ item.handledFromLocationCode }} {{ item.handledToLocationCode }}
</view> </view>
<view class="" style="margin-left: 20rpx;"> <view class="" style="margin-left: 20rpx;">
<button size="mini" type="primary" <button size="mini" type="primary"
@click="showLocation(item)">扫描库位</button> @click="showLocation(item)">扫描库位</button>
</view> </view>
</view> </view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
<uni-tr> <uni-tr>
@ -67,7 +67,7 @@
</view> </view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
</view> </view>
@ -76,7 +76,7 @@
<view v-if="item.scaned" class="choose_marked_count" <view v-if="item.scaned" class="choose_marked_count"
style="background-color: #5FCB94; opacity: 0.65"> style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;"> <view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
; ;
</view> </view>
<!-- <image src="@/static/image_marked.svg"></image> --> <!-- <image src="@/static/image_marked.svg"></image> -->
</view> </view>
@ -204,11 +204,11 @@
}, },
getToLocation(locationInfo) { getToLocation(locationInfo) {
this.currentItem.handledFromLocationCode = locationInfo.code; this.currentItem.handledToLocationCode = locationInfo.code;
this.currentItem.handledFromLocationArea = locationInfo.areaCode this.currentItem.handledToLocationArea = locationInfo.areaCode
this.currentItem.handledFromLocationGroup = locationInfo.locationGroupCode this.currentItem.handledToLocationGroup = locationInfo.locationGroupCode
this.currentItem.handledFromLocationErpCode = locationInfo.erpLocationCode this.currentItem.handledToLocationErpCode = locationInfo.erpLocationCode
this.currentItem.handledFromWarehouseCode = locationInfo.warehouseCode this.currentItem.handledToWarehouseCode = locationInfo.warehouseCode
}, },
openScanPopup() { openScanPopup() {
@ -268,9 +268,9 @@
this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的物料号与任务中的物料号不一致,请重新扫描'); this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的物料号与任务中的物料号不一致,请重新扫描');
return; return;
} }
if(item.scaned){ if (item.scaned) {
this.showMessage('单件码['+result.scanCode+"]已经扫描") this.showMessage('单件码[' + result.scanCode + "]已经扫描")
}else { } else {
item.scaned = true; item.scaned = true;
item.scanDate = new Date() item.scanDate = new Date()
this.details.sort(compareDesc('scanDate')); this.details.sort(compareDesc('scanDate'));
@ -278,12 +278,12 @@
this.calcScanCount() this.calcScanCount()
this.$forceUpdate() this.$forceUpdate()
} }
}, },
qtyChanged(value, item, index) { qtyChanged(value, item, index) {
if (value == 0) { if (value == 0) {
this.showMessage('料数量必须大于0') this.showMessage('退料数量必须大于0')
item.handledQty = item.recommendQty item.handledQty = item.recommendQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return; return;
@ -317,7 +317,7 @@
return; return;
} }
let items = this.details.filter(r => { let items = this.details.filter(r => {
return r.scaned && r.handledQty != 0 && r.handledFromLocationCode != null return r.scaned && r.handledQty != 0 && r.handledToLocationCode != null
}) })
if (items.length == this.details.length) { if (items.length == this.details.length) {
this.finsh(); this.finsh();
@ -335,19 +335,14 @@
mask: true mask: true
}); });
that.details.forEach(res => { that.details.forEach(res => {
res.recommendContainerCode = "" res.recommendContainerCode = ""
res.handledContainerCode = "" res.handledContainerCode = ""
res.recommendPackingCode = "" res.recommendPackingCode = ""
res.handledPackingCode = "" res.handledPackingCode = ""
res.recommendSupplierBatch = "" res.recommendSupplierBatch = ""
res.recommendArriveDate = res.recommendFromArriveDate
res.recommendProduceDate = res.recommendFromProduceDate
res.recommendExpireDate = res.recommendFromExpireDate
res.recommendLot = "" res.recommendLot = ""
res.handledSupplierBatch = "" res.handledSupplierBatch = ""
res.handledArriveDate = res.handledToArriveDate
res.handledProduceDate = res.handledToProduceDate
res.handledExpireDate = res.handledToExpireDate
res.handledLot = "" res.handledLot = ""
}) })
@ -359,17 +354,17 @@
that.datacontent.details = that.details; that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent); let params = JSON.stringify(that.datacontent);
console.log("提交", params); console.log("提交", params);
finshUnProduceReturnJob(that.id, params) finshUnProduceReturnJob(that.id, params)
.then(res => { .then(res => {
uni.hideLoading(); uni.hideLoading();
if (res != null) { if (res != null) {
that.showCommitSuccessMessage(); that.showCommitSuccessMessage();
} }
}) })
.catch(err => { .catch(err => {
that.showMessage(err.message); that.showMessage(err.message);
uni.hideLoading(); uni.hideLoading();
}); });
}, },
// //

Loading…
Cancel
Save