|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper"> |
|
|
<view class="page-wraper"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
<view class="page-main"> |
|
|
<view class="page-main"> |
|
@ -29,10 +29,12 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> |
|
|
<win-scan-location ref="scanLocationPopup" title="库位" @getLocation="getFromLocation" |
|
|
|
|
|
:locationTypeList="fromlocationTypeList"></win-scan-location> |
|
|
|
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> |
|
|
|
|
|
<!-- <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> --> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
<com-message ref="comMessage"></com-message> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -55,6 +57,8 @@ |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
|
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|
|
|
|
|
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' |
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
@ -66,12 +70,15 @@ |
|
|
components: { |
|
|
components: { |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
winScanPack, |
|
|
winScanPack, |
|
|
|
|
|
winScanLocation, |
|
|
|
|
|
winScanPackAndLocation, |
|
|
recordComDetailCard, |
|
|
recordComDetailCard, |
|
|
requiredLocation, |
|
|
requiredLocation, |
|
|
comBlankView, |
|
|
comBlankView, |
|
|
comMessage, |
|
|
comMessage, |
|
|
targetContainer, |
|
|
targetContainer, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
id: '', |
|
|
id: '', |
|
@ -80,11 +87,27 @@ |
|
|
subList: [], //接口返回的任务subList |
|
|
subList: [], //接口返回的任务subList |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
containerCode: "", |
|
|
containerCode: "", |
|
|
|
|
|
businessType: {}, |
|
|
|
|
|
fromlocationCode: '', |
|
|
|
|
|
fromlocationTypeList: [], |
|
|
|
|
|
tolocationTypeList: [] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onLoad(option) { |
|
|
|
|
|
var typeCode = "ContainerBind" |
|
|
|
|
|
getBusinessType(typeCode, res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.businessType = res.businessType; |
|
|
|
|
|
this.fromlocationTypeList = res.fromlocationTypeList; |
|
|
|
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
|
|
|
this.showFromLocationPopup(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$refs.comMessage.showBreakMessage(res.message); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
|
if (e.index === 0) { |
|
|
if (e.index === 0) { |
|
@ -97,9 +120,26 @@ |
|
|
onPullDownRefresh() {}, |
|
|
onPullDownRefresh() {}, |
|
|
|
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
|
this.openScanPopup(); |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
showFromLocationPopup() { |
|
|
|
|
|
this.$nextTick(r => { |
|
|
|
|
|
this.$refs.scanLocationPopup.openScanPopup(); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getFromLocation(location) { |
|
|
|
|
|
if (location != null) { |
|
|
|
|
|
this.fromLocationCode = location.code; |
|
|
|
|
|
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
var packingNumber = result.label.packingNumber; |
|
|
var packingNumber = result.label.packingNumber; |
|
|
var batch = result.label.batch; |
|
|
var batch = result.label.batch; |
|
@ -142,6 +182,7 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
calcHandleQty() { |
|
|
calcHandleQty(this.detailSource) |
|
|
calcHandleQty(this.detailSource) |
|
|
this.$forceUpdate(); |
|
|
this.$forceUpdate(); |
|
@ -150,6 +191,7 @@ |
|
|
updateData() { |
|
|
updateData() { |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
removeItem(index, item) { |
|
|
removeItem(index, item) { |
|
|
this.detailSource.splice(index, 1) |
|
|
this.detailSource.splice(index, 1) |
|
|
}, |
|
|
}, |
|
@ -164,14 +206,6 @@ |
|
|
this.updateData(); |
|
|
this.updateData(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
scanPopupGetFocus() { |
|
|
this.$refs.scanPopup.getfocus(); |
|
|
this.$refs.scanPopup.getfocus(); |
|
|
}, |
|
|
}, |
|
@ -180,7 +214,6 @@ |
|
|
this.$refs.scanPopup.losefocus(); |
|
|
this.$refs.scanPopup.losefocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
if (this.containerCode == "") { |
|
|
if (this.containerCode == "") { |
|
|
this.showMessage("请先选择托码") |
|
|
this.showMessage("请先选择托码") |
|
|