|
|
@ -3,85 +3,79 @@ |
|
|
|
<page-meta root-font-size="16px"></page-meta> |
|
|
|
<view class=""> |
|
|
|
<view class="top_card"> |
|
|
|
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> |
|
|
|
<com-job-scan-detail :jobContent="datacontent" :isShowAllCountHint="false" :isShowScanHint="false" |
|
|
|
:allCount="allCount" :scanCount="scanCount"> |
|
|
|
</com-job-scan-detail> |
|
|
|
</view> |
|
|
|
<view class="" style="margin-top: 20rpx; margin-left: 20rpx; margin-right: 20rpx;"> |
|
|
|
<button type="primary" @click="showRecommend"> 推荐信息</button> |
|
|
|
</view> |
|
|
|
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|
|
|
class="scroll-detail"> |
|
|
|
<view class="" style="margin-bottom:120rpx"> |
|
|
|
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> |
|
|
|
<uni-swipe-action> |
|
|
|
<uni-swipe-action-item :right-options="options" :auto-close="false" |
|
|
|
@click="swipeClick($event,item,index)" style='background-color: #ffffff;'> |
|
|
|
<view class="detail-content"> |
|
|
|
<view class="choose_main"> |
|
|
|
<view class="ljh_box"> |
|
|
|
<view class="tit_ljh">{{ item.itemCode }}</view> |
|
|
|
<view class="ljh_left desc_ljh"> |
|
|
|
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
|
|
|
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list_form"> |
|
|
|
<view class="uni-container"> |
|
|
|
<uni-table style="overflow-x: hidden;" empty-text=""> |
|
|
|
<uni-tr> |
|
|
|
<uni-th width="50">数量</text></uni-th> |
|
|
|
<uni-th width="0" align="center"> |
|
|
|
</uni-th> |
|
|
|
<uni-th width="270" align="center"> |
|
|
|
<view |
|
|
|
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> |
|
|
|
<com-number-box :ref="'comNumberBox_'+index" |
|
|
|
v-model="item.handledQty" :max="99999" :min="0" |
|
|
|
style='width: 100px;' |
|
|
|
@change="qtyChanged($event,item,index)"> |
|
|
|
</com-number-box> |
|
|
|
<text class="text_black">({{item.uom}})</text> |
|
|
|
</view> |
|
|
|
</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<uni-tr> |
|
|
|
<uni-th width="70">来源库位</uni-th> |
|
|
|
<uni-th width="0" align="center"> |
|
|
|
</uni-th> |
|
|
|
<uni-th width="270"> |
|
|
|
<view class="" |
|
|
|
style="display: flex; width: 100%; align-items: center; justify-content: center;"> |
|
|
|
<view class="text_black"> |
|
|
|
{{ item.handledFromLocationCode }} |
|
|
|
</view> |
|
|
|
<view class="" style="margin-left: 20rpx;"> |
|
|
|
<button size="mini" type="primary" |
|
|
|
@click="showLocation(item)">扫描库位</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> |
|
|
|
<view class="detail-content"> |
|
|
|
<view class="choose_main"> |
|
|
|
<view class="ljh_box"> |
|
|
|
<view class="tit_ljh">{{ item.itemCode }}</view> |
|
|
|
<view class="ljh_left desc_ljh"> |
|
|
|
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
|
|
|
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list_form"> |
|
|
|
<view class="uni-container"> |
|
|
|
<uni-table style="overflow-x: hidden;"> |
|
|
|
<uni-tr> |
|
|
|
<!-- <uni-th width="90"></uni-th> |
|
|
|
<uni-th width="100" align="center">推荐</uni-th> |
|
|
|
<uni-th width="100" align="center">实际</uni-th> --> |
|
|
|
<uni-th width="50"></uni-th> |
|
|
|
<uni-th width="100" align="center">推荐</uni-th> |
|
|
|
<uni-th width="140" align="center">实际</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<uni-tr> |
|
|
|
<uni-th width="70">来源库位</uni-th> |
|
|
|
<uni-th width="100" align="center"> |
|
|
|
<view class="text_black">{{ item.recommendFromLocationCode }}</view> |
|
|
|
</uni-th> |
|
|
|
<uni-th width="140"> |
|
|
|
<view class="" v-if="item.scaned" |
|
|
|
style="display: flex; width: 100%; align-items: center; justify-content: center;"> |
|
|
|
<view class="text_black"> |
|
|
|
{{ item.handledFromLocationCode }} |
|
|
|
</view> |
|
|
|
<view class="" style="margin-left: 20rpx;"> |
|
|
|
<button size="mini" type="primary" |
|
|
|
@click="showLocation(item)">扫描库位</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<uni-tr> |
|
|
|
<uni-th width="50">数量</text></uni-th> |
|
|
|
<uni-th width="100" align="center"> |
|
|
|
<text class="text_black">{{item.recommendQty}}</text> |
|
|
|
<text class="text_black" v-if="item.uom!=''">({{item.uom}})</text> |
|
|
|
</uni-th> |
|
|
|
<uni-th width="140" align="center"> |
|
|
|
<view v-if="item.scaned" |
|
|
|
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> |
|
|
|
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty" |
|
|
|
:max="99999" :min="0" style='width: 100px;' |
|
|
|
@change="qtyChanged($event,item,index)"> |
|
|
|
</com-number-box> |
|
|
|
<text class="text_black" v-if="item.uom!=''">({{item.uom}})</text> |
|
|
|
</view> |
|
|
|
</uni-th> |
|
|
|
</uni-tr> |
|
|
|
|
|
|
|
</uni-table> |
|
|
|
|
|
|
|
</uni-th> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="item.scaned" class="choose_marked_count" |
|
|
|
style="background-color: #5FCB94; opacity: 0.65"> |
|
|
|
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;"> |
|
|
|
; |
|
|
|
</view> |
|
|
|
<!-- <image src="@/static/image_marked.svg"></image> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
</uni-swipe-action-item> |
|
|
|
</uni-swipe-action> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
<view class="uni-flex uni-row new_btn_bot"> |
|
|
|
<button class="new_clear_btn btn_double" @click="clear()">清空</button> |
|
|
@ -95,18 +89,19 @@ |
|
|
|
<winScanLocationCode ref="location" title="库位" @getLocation="getToLocation"></winScanLocationCode> |
|
|
|
<win-scan-by-code ref="scanPopupItem" title='ERP料号' @getScanCode='getScanCode'> |
|
|
|
</win-scan-by-code> |
|
|
|
<recommendList ref="recommendList" title="推荐信息"></recommendList> |
|
|
|
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> |
|
|
|
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" /> |
|
|
|
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" /> |
|
|
|
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' |
|
|
|
@afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage"></com-message> |
|
|
|
@afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage"></com-message> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getUnProducePickDetail, |
|
|
|
takeIssueJob, |
|
|
|
cancelTakeIssueJob, |
|
|
|
takeUnProduceIssueJob, |
|
|
|
cancelTakeUnProduceIssueJob, |
|
|
|
finshUnProducePickJob, |
|
|
|
getitems, |
|
|
|
getItemCodeByLike |
|
|
@ -119,9 +114,12 @@ |
|
|
|
compareDesc, |
|
|
|
compareStr, |
|
|
|
getCurrDateTime, |
|
|
|
getCurrDateTimeAndT, |
|
|
|
navigateBack, |
|
|
|
scanSuccessAudio, |
|
|
|
scanFailedAudio |
|
|
|
scanFailedAudio, |
|
|
|
guid, |
|
|
|
getRemoveOption |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
|
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|
|
@ -135,6 +133,7 @@ |
|
|
|
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|
|
|
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; |
|
|
|
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue' |
|
|
|
import recommendList from '@/mycomponents/popup/recommendList.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -149,7 +148,8 @@ |
|
|
|
comNumberBox, |
|
|
|
winScanByProductCode, |
|
|
|
winScanLocationCode, |
|
|
|
winScanByCode |
|
|
|
winScanByCode, |
|
|
|
recommendList |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -168,7 +168,10 @@ |
|
|
|
names: [], |
|
|
|
values: [], |
|
|
|
origin: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
options: [], |
|
|
|
facDetails: [], |
|
|
|
currentData: null |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
@ -184,14 +187,14 @@ |
|
|
|
}, |
|
|
|
onLoad(param) { |
|
|
|
this.id = param.id; |
|
|
|
// if (param.jobStatus == 1) { |
|
|
|
// this.receive((callback => { |
|
|
|
// this.getDetail(); |
|
|
|
// })); |
|
|
|
// } else { |
|
|
|
// this.getDetail(); |
|
|
|
// } |
|
|
|
this.getDetail(); |
|
|
|
this.options = getRemoveOption(); |
|
|
|
if (param.jobStatus == 1) { |
|
|
|
this.receive((callback => { |
|
|
|
this.getDetail(); |
|
|
|
})); |
|
|
|
} else { |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
}, |
|
|
|
onReady() {}, |
|
|
|
//返回首页 |
|
|
@ -205,7 +208,7 @@ |
|
|
|
//拦截返回按钮事件 |
|
|
|
onBackPress(e) { |
|
|
|
//取消承接任务 |
|
|
|
// cancelTakeIssueJob(this.id) |
|
|
|
// cancelTakeUnProduceIssueJob(this.id) |
|
|
|
// .then(res => {}) |
|
|
|
// .catch(err => { |
|
|
|
// this.showMessage(err.message); |
|
|
@ -222,12 +225,11 @@ |
|
|
|
this.currentItem = item; |
|
|
|
this.$refs.location.openScanPopup() |
|
|
|
}, |
|
|
|
|
|
|
|
getToLocation(locationInfo) { |
|
|
|
if (this.currentItem.recommendFromLocationCode != locationInfo.code) { |
|
|
|
if (this.currentItem.originalLocationCode != locationInfo.code) { |
|
|
|
scanFailedAudio() |
|
|
|
this.showMessage("扫描库位[" + locationInfo.code + "]与推荐来源库位[" + this.currentItem |
|
|
|
.recommendFromLocationCode + "]不一致") |
|
|
|
.originalLocationCode + "]不一致") |
|
|
|
return; |
|
|
|
} |
|
|
|
scanSuccessAudio() |
|
|
@ -236,6 +238,29 @@ |
|
|
|
this.currentItem.handledFromLocationGroup = locationInfo.locationGroupCode |
|
|
|
this.currentItem.handledFromLocationErpCode = locationInfo.erpLocationCode |
|
|
|
this.currentItem.handledFromWarehouseCode = locationInfo.warehouseCode |
|
|
|
|
|
|
|
this.currentItem.recommendFromLocationCode = locationInfo.code; |
|
|
|
this.currentItem.recommendFromLocationArea = locationInfo.areaCode |
|
|
|
this.currentItem.recommendFromLocationGroup = locationInfo.locationGroupCode |
|
|
|
this.currentItem.recommendFromLocationErpCode = locationInfo.erpLocationCode |
|
|
|
this.currentItem.recommendFromWarehouseCode = locationInfo.warehouseCode |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
swipeClick(e, item, index) { |
|
|
|
let { |
|
|
|
content |
|
|
|
} = e; |
|
|
|
if (content.text === '移除') { |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '是否移除选择的行?', |
|
|
|
success: res => { |
|
|
|
if (res.confirm) { |
|
|
|
this.details.splice(index, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
openScanPopup() { |
|
|
@ -248,7 +273,7 @@ |
|
|
|
openItemScanPopup() { |
|
|
|
this.$refs.scanPopupItem.openScanPopup(); |
|
|
|
}, |
|
|
|
queryItemCode(){ |
|
|
|
queryItemCode() { |
|
|
|
this.$refs.wzSelectPopup.open({ |
|
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
|
// dataList:[], //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
@ -265,23 +290,27 @@ |
|
|
|
value: 'code' |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
reqGetList(data) { |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
pageSize: data.pageSize, |
|
|
|
pageIndex: data.pageIndex, |
|
|
|
itemCode: data.searchValue, |
|
|
|
}; |
|
|
|
return getItemCodeByLike(data.searchValue,data.pageIndex,data.pageSize); |
|
|
|
return getItemCodeByLike(data.searchValue, data.pageIndex, data.pageSize); |
|
|
|
}, |
|
|
|
|
|
|
|
selectCheckbox(mode, result) { |
|
|
|
this.getScanResult(result, false) |
|
|
|
}, |
|
|
|
|
|
|
|
selectCheckbox(mode, result){ |
|
|
|
this.getScanResult(result,false) |
|
|
|
|
|
|
|
showRecommend() { |
|
|
|
this.$refs.recommendList.openScanPopup(this.facDetails) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//加载零件信息 |
|
|
|
getDetail() { |
|
|
|
let that = this; |
|
|
@ -300,21 +329,8 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
console.log('item', item); |
|
|
|
that.datacontent = item; |
|
|
|
that.details = item.details; |
|
|
|
if (that.details != null) { |
|
|
|
that.details.forEach( |
|
|
|
r => { |
|
|
|
r.scaned = false; |
|
|
|
r.scanDate = new Date() |
|
|
|
} |
|
|
|
); |
|
|
|
that.ispending = item.jobStatus === 2; |
|
|
|
// if (that.toLocation === '') { |
|
|
|
// that.toLocation = item.details[0].requestLocationCode; |
|
|
|
// } |
|
|
|
this.allCount = that.details.length; |
|
|
|
this.scanCount = 0; |
|
|
|
} |
|
|
|
that.facDetails = item.facDetails |
|
|
|
that.details = []; |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
uni.hideLoading(); |
|
|
@ -330,10 +346,10 @@ |
|
|
|
getitems(code).then((res) => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res) { |
|
|
|
var result ={ |
|
|
|
itemCode:res.code |
|
|
|
var result = { |
|
|
|
itemCode: res.code |
|
|
|
} |
|
|
|
this.getScanResult(result,false) |
|
|
|
this.getScanResult(result, false) |
|
|
|
} else { |
|
|
|
scanFailedAudio() |
|
|
|
this.showMessage('未查找到ERP料号【' + code + '】'); |
|
|
@ -345,52 +361,96 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result,isMesCode=true) { |
|
|
|
getScanResult(result, isMesCode = true) { |
|
|
|
|
|
|
|
// AH240321AM0153 AH240321AM0198 AH240321AM0199 |
|
|
|
let item = this.details.find(r => { |
|
|
|
let item = this.facDetails.find(r => { |
|
|
|
return r.itemCode == result.itemCode |
|
|
|
}); |
|
|
|
|
|
|
|
if (item == undefined) { |
|
|
|
if(isMesCode){ |
|
|
|
scanFailedAudio() |
|
|
|
this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描'); |
|
|
|
}else { |
|
|
|
this.showMessage('在任务详情中,没有找到ERP料号[' + result.itemCode+"]的信息,请重新扫描"); |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
if (item.scaned) { |
|
|
|
if(isMesCode){ |
|
|
|
scanFailedAudio() |
|
|
|
this.showMessage('单件码[' + result.scanCode + "]已经扫描") |
|
|
|
}else { |
|
|
|
this.showMessage('ERP料号[' + result.itemCode + "]已经扫描") |
|
|
|
if (item) { |
|
|
|
this.currentData = item; |
|
|
|
let scanItem = this.details.find(r => r.itemCode === result.itemCode) |
|
|
|
//已经存在 |
|
|
|
if (scanItem) { |
|
|
|
if (isMesCode) { |
|
|
|
this.showMessage('单件码[' + result.scanCode + "]已经扫描") |
|
|
|
} else { |
|
|
|
this.showMessage('ERP料号[' + result.itemCode + "]已经扫描") |
|
|
|
} |
|
|
|
} else { |
|
|
|
scanSuccessAudio() |
|
|
|
var addItem = this.setItemInfo(result, item) |
|
|
|
this.details.unshift(addItem) |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
scanSuccessAudio() |
|
|
|
item.scaned = true; |
|
|
|
item.scanDate = new Date() |
|
|
|
this.details.sort(compareDesc('scanDate')); |
|
|
|
item.handledQty = item.recommendQty; |
|
|
|
this.calcScanCount() |
|
|
|
this.$forceUpdate() |
|
|
|
if (isMesCode) { |
|
|
|
this.showMessage('单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描'); |
|
|
|
} else { |
|
|
|
this.showMessage('没有找到ERP料号[' + result.itemCode + "]的信息,请重新扫描"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
setItemInfo(result, item) { |
|
|
|
var item = { |
|
|
|
id: guid(), |
|
|
|
itemCode: item.itemCode, |
|
|
|
itemName: item.itemName, |
|
|
|
itemDesc1: item.itemDesc1, |
|
|
|
itemDesc2: item.itemDesc2, |
|
|
|
stdPackQty: item.stdPackQty, |
|
|
|
masterID: this.datacontent.id, |
|
|
|
|
|
|
|
recommendContainerCode: "", |
|
|
|
recommendPackingCode: "", |
|
|
|
recommendSupplierBatch: "", |
|
|
|
recommendArriveDate: getCurrDateTimeAndT(), |
|
|
|
recommendProduceDate: getCurrDateTimeAndT(), |
|
|
|
recommendExpireDate: getCurrDateTimeAndT(), |
|
|
|
recommendLot: "", |
|
|
|
originalLocationCode: item.recommendFromLocationCode, |
|
|
|
recommendQty: item.qty, |
|
|
|
uom: item.uom, |
|
|
|
|
|
|
|
handledContainerCode: "", |
|
|
|
handledPackingCode: "", |
|
|
|
handledSupplierBatch: "", |
|
|
|
handledArriveDate: getCurrDateTimeAndT(), |
|
|
|
handledProduceDate: getCurrDateTimeAndT(), |
|
|
|
handledExpireDate: getCurrDateTimeAndT(), |
|
|
|
handledLot: "", |
|
|
|
handledQty: item.recommendQty, |
|
|
|
|
|
|
|
creatorId: guid(), |
|
|
|
creationTime: getCurrDateTimeAndT(), |
|
|
|
tenantId: guid(), |
|
|
|
lastModificationTime: getCurrDateTimeAndT(), |
|
|
|
lastModifierId: guid(), |
|
|
|
number: this.datacontent.number, |
|
|
|
remark: "", |
|
|
|
status: 2, |
|
|
|
reasonCode: "", |
|
|
|
caseCode: "", |
|
|
|
projCapacityCode: "", |
|
|
|
onceBusiCode: "", |
|
|
|
explain: "", |
|
|
|
} |
|
|
|
return item; |
|
|
|
}, |
|
|
|
|
|
|
|
qtyChanged(value, item, index) { |
|
|
|
if (value == 0) { |
|
|
|
this.showMessage('领料数量必须大于0') |
|
|
|
item.handledQty = item.recommendQty |
|
|
|
item.handledQty = this.currentData.recommendQty |
|
|
|
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (value > item.recommendQty) { |
|
|
|
if (value > this.currentData.recommendQty) { |
|
|
|
this.showMessage("实际领料数量不能大于申请数量") |
|
|
|
this.$refs['comNumberBox_' + index][0].setValue(item.recommendQty); |
|
|
|
this.$refs['comNumberBox_' + index][0].setValue(this.currentData.recommendQty); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@ -401,7 +461,7 @@ |
|
|
|
let params = { |
|
|
|
id: this.id |
|
|
|
}; |
|
|
|
takeIssueJob(params) |
|
|
|
takeUnProduceIssueJob(params) |
|
|
|
.then(res => { |
|
|
|
callback(true); |
|
|
|
}) |
|
|
@ -412,17 +472,38 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
submit() { |
|
|
|
if (this.datacontent.details.length === 0) { |
|
|
|
this.showMessage('该任务没有选择的零件'); |
|
|
|
if (this.details.length == 0) { |
|
|
|
this.showMessage('扫描列表为0,请先扫描'); |
|
|
|
return; |
|
|
|
} |
|
|
|
let items = this.details.filter(r => { |
|
|
|
return r.scaned && r.handledQty != 0 && r.handledFromLocationCode != null |
|
|
|
var locationHint = "" |
|
|
|
this.details.forEach(res => { |
|
|
|
if (!res.handledFromLocationCode) { |
|
|
|
locationHint += "物料[" + res.itemCode + "]请扫描来源库位" |
|
|
|
} |
|
|
|
}) |
|
|
|
if (items.length == this.details.length) { |
|
|
|
this.finsh(); |
|
|
|
|
|
|
|
if(locationHint){ |
|
|
|
this.showMessage(locationHint); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
var hint = "" |
|
|
|
this.details.forEach(res => { |
|
|
|
var temp = this.facDetails.find(fac => { |
|
|
|
if (res.itemCode == fac.itemCode) { |
|
|
|
return fac |
|
|
|
} |
|
|
|
}) |
|
|
|
if (temp && temp.recommendQty < res.handledQty) { |
|
|
|
hint += "物料[" + res.itemCode + "]箱码[" + res.handledPackingCode + "]扫描数量[" + res |
|
|
|
.handledQty + "]大于推荐的数量[" + temp.recommendQty + "]" |
|
|
|
} |
|
|
|
}) |
|
|
|
if (hint) { |
|
|
|
this.showMessage(hint); |
|
|
|
} else { |
|
|
|
this.showMessage("还有未扫描的ERP物料或库位") |
|
|
|
this.finsh(); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
@ -434,23 +515,6 @@ |
|
|
|
title: "提交中...", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
that.details.forEach(res => { |
|
|
|
res.recommendContainerCode = "" |
|
|
|
res.handledContainerCode = "" |
|
|
|
res.recommendPackingCode = "" |
|
|
|
res.handledPackingCode = "" |
|
|
|
res.recommendSupplierBatch = "" |
|
|
|
res.recommendArriveDate = res.recommendFromArriveDate |
|
|
|
res.recommendProduceDate = res.recommendFromProduceDate |
|
|
|
res.recommendExpireDate = res.recommendFromExpireDate |
|
|
|
res.recommendLot = "" |
|
|
|
res.handledSupplierBatch = "" |
|
|
|
res.handledArriveDate = res.handledToArriveDate |
|
|
|
res.handledProduceDate = res.handledToProduceDate |
|
|
|
res.handledExpireDate = res.handledToExpireDate |
|
|
|
res.handledLot = "" |
|
|
|
|
|
|
|
}) |
|
|
|
that.datacontent.completeUserId = localStorage.getItem('userId') |
|
|
|
that.datacontent.completeUserName = localStorage.getItem('userName_CN') |
|
|
|
that.datacontent.completeTime = getCurrDateTime(); |
|
|
@ -503,11 +567,6 @@ |
|
|
|
this.$refs.scanPopupItem.getfocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
calcScanCount() { |
|
|
|
this.scanCount = this.details.filter(r => r.scaned === true).length; |
|
|
|
this.closeScanPopup(); |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage() { |
|
|
|
this.$refs.comMessage.showCommitSuccess(); |
|
|
|
}, |
|
|
|