16 changed files with 2479 additions and 88 deletions
@ -0,0 +1,68 @@ |
|||
<!--发料任务卡片--> |
|||
<template> |
|||
<view class="device-detail"> |
|||
<view class="card_task nopad"> |
|||
<com-job-top-info :jobContent="dataContent"></com-job-top-info> |
|||
</view> |
|||
<view class="margin_xs_bottom"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> |
|||
<text>{{dataContent.requestNumber}}</text> |
|||
<!-- <text>申请单:{{dataContent.deliverRequestNumber}}</text> --> |
|||
</view> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image> |
|||
<text>{{dataContent.worker}}</text> |
|||
<!-- <text>客户:{{dataContent.customerCode}}</text> --> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row receipt_bot"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg"> |
|||
</image> |
|||
<text |
|||
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getJobStatuStyle, |
|||
getJobStatuDesc, |
|||
dateFormat |
|||
} from '@/common/basic.js'; |
|||
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' |
|||
export default { |
|||
name: "comDeliver", |
|||
components: { |
|||
comJobTopInfo |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
filters: { |
|||
statusStyle: function(val) { |
|||
return getJobStatuStyle(val); |
|||
}, |
|||
statusColor: function(val) { |
|||
return getJobStatuDesc(val); |
|||
}, |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,68 @@ |
|||
<!--发料任务卡片--> |
|||
<template> |
|||
<view class="device-detail"> |
|||
<view class="card_task nopad"> |
|||
<com-job-top-info :jobContent="dataContent"></com-job-top-info> |
|||
</view> |
|||
<view class="margin_xs_bottom"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> |
|||
<text>{{dataContent.requestNumber}}</text> |
|||
<!-- <text>申请单:{{dataContent.deliverRequestNumber}}</text> --> |
|||
</view> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image> |
|||
<text>{{dataContent.worker}}</text> |
|||
<!-- <text>客户:{{dataContent.customerCode}}</text> --> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row receipt_bot"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg"> |
|||
</image> |
|||
<text |
|||
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getJobStatuStyle, |
|||
getJobStatuDesc, |
|||
dateFormat |
|||
} from '@/common/basic.js'; |
|||
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' |
|||
export default { |
|||
name: "comDeliver", |
|||
components: { |
|||
comJobTopInfo |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
filters: { |
|||
statusStyle: function(val) { |
|||
return getJobStatuStyle(val); |
|||
}, |
|||
statusColor: function(val) { |
|||
return getJobStatuDesc(val); |
|||
}, |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,463 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view> |
|||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper" |
|||
@scrolltolower="lower" @scroll="scroll" style="padding-bottom:150px"> |
|||
<view class="detail-list " v-for="(item, index) in itemList" :key="index"> |
|||
<view class="detail-content"> |
|||
<view class="" style=""> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<view class="" style="margin-top: 20rpx; margin-left: 10rpx; font-weight: bold;"> |
|||
({{index+1}}). |
|||
</view> |
|||
<comItemCode :itemData="item"></comItemCode> |
|||
</view> |
|||
|
|||
<uni-table border stripe style=""> |
|||
<!-- <uni-tr> |
|||
<uni-td align="center">物品代码</uni-td> |
|||
<uni-td>{{item.itemCode}}</uni-td> |
|||
</uni-tr> --> |
|||
<uni-tr> |
|||
<uni-td align="center">单位</uni-td> |
|||
<uni-td>{{item.uom}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td align="center">标包数</uni-td> |
|||
<uni-td>{{item.stdPackQty}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td align="center">来源库位</uni-td> |
|||
<uni-td> |
|||
<view class="uni-flex uni-row space-between u-col-center" style="align-items: center;"> |
|||
<view class=""> |
|||
{{item.fromLocationCode}} |
|||
</view> |
|||
<view class=""> |
|||
<button type="primary" size="mini" style="margin-left: 0rpx;" |
|||
@click="openScanFromLocationPopup(item)">修改</button> |
|||
</view> |
|||
|
|||
</view> |
|||
</uni-td> |
|||
|
|||
</uni-tr> |
|||
|
|||
<uni-tr> |
|||
<uni-td align="center">数量</uni-td> |
|||
<uni-td> |
|||
<view class="uni-flex uni-row"> |
|||
<view class="uni-flex uni-row space-between" style="width: 100%;"> |
|||
<view class=""> |
|||
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty" |
|||
:max="99999" :min="0" @change="qtyChanged($event,item,index)"> |
|||
</com-number-box> |
|||
</view> |
|||
|
|||
<view class=""> |
|||
<button type="primary" size="mini" style="margin-left: 30rpx;" |
|||
@click="remove(item,index)">移除</button> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</uni-td> |
|||
</uni-tr> |
|||
</uni-table> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<div class="new_bot_box" v-show="itemList.length>0"> |
|||
<win-collapse-location ref="location" @getLocationCode='getToLocation' @clear='clear'> |
|||
</win-collapse-location> |
|||
<view class="new_btn_bot bot_pos uni-flex"> |
|||
<button class="new_clear_btn btn_double" @click="cancel()">清空</button> |
|||
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|||
</view> |
|||
</div> |
|||
<win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> |
|||
<winScanByProductCode ref="scanPackPopup" title="产品编码" @getScanResult='getScanResult'></winScanByProductCode> |
|||
<win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code> |
|||
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> |
|||
|
|||
<com-message ref="comMessage" @afterClose='afterCloseMessagg'></com-message> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
locations, |
|||
getBalancesByFilter, |
|||
completeInvenTransfer |
|||
} from '@/api/index.js'; |
|||
|
|||
import { |
|||
showConfirmMsg, |
|||
goHome, |
|||
getRemoveOption |
|||
} from '@/common/basic.js'; |
|||
|
|||
import winBlankView from '@/mycomponents/wincom/winBlankView.vue' |
|||
import comBalanceItem from '@/mycomponents/comItem/comBalanceItem.vue' |
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
import comBalance from '@/mycomponents/common/comBalance.vue' |
|||
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue' |
|||
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|||
import comItemCode from '@/mycomponents/comItem/comItemCode.vue' |
|||
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; |
|||
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue' |
|||
|
|||
export default { |
|||
name: 'comtransfer', |
|||
components: { |
|||
winBlankView, |
|||
comBalanceItem, |
|||
comMessage, |
|||
winScanButton, |
|||
comBalance, |
|||
winCollapseLocation, |
|||
winScanByProductCode, |
|||
comItemCode, |
|||
comNumberBox, |
|||
winScanByCode |
|||
}, |
|||
data() { |
|||
return { |
|||
options: [], |
|||
itemList: [], |
|||
fromLocationCode: '', |
|||
fromLocationInfo: {}, |
|||
toLocationCode: '', |
|||
scrollTop: 0, |
|||
old: { |
|||
scrollTop: 0 |
|||
}, |
|||
inventoryStatus: -1, |
|||
inventoryStatusArray: [], |
|||
isClearPackCode: false, //清除箱码 |
|||
isClearContainerCode: false, //清除托码 |
|||
isClearLot: false, //清除批次, |
|||
locationErpCode: '', |
|||
toLocationErpCode: '', |
|||
locationGotFocus: false, |
|||
transferType:"Transfer_Coating", |
|||
fromLocationItem:"" |
|||
}; |
|||
}, |
|||
props: { |
|||
// locationTypes: { |
|||
// type: [Array, String, Number], |
|||
// value: '' |
|||
// }, |
|||
byLocation: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
}, |
|||
|
|||
watch: {}, |
|||
mounted: function() { |
|||
this.openScanPopup(); |
|||
this.options = getRemoveOption(); |
|||
|
|||
}, |
|||
|
|||
|
|||
methods: { |
|||
openScanFromLocationPopup(item) { |
|||
this.fromLocationItem = item; |
|||
this.$refs.scanFromLocationPopup.openScanPopup() |
|||
}, |
|||
|
|||
closeScanFromLocationPopup() { |
|||
this.$refs.scanFromLocationPopup.closeScanPopup(); |
|||
}, |
|||
//扫描源库位 |
|||
scanFromLocation(code) { |
|||
let that = this; |
|||
if (code == '') return; |
|||
uni.showLoading({ |
|||
title: '扫描中...', |
|||
mask: true |
|||
}); |
|||
locations(code).then(res => { |
|||
uni.hideLoading(); |
|||
if(res){ |
|||
|
|||
// this.fromLocationCode = res.code; |
|||
// this.fromLocationArea = res.areaCode; |
|||
this.fromLocationItem.locationCode = res.code;; |
|||
this.closeScanFromLocationPopup(); |
|||
// if(res.type == 3||res.type == 4){ |
|||
// this.fromLocationCode = res.code; |
|||
// this.fromLocationArea = res.areaCode; |
|||
// this.openPackLabel(); |
|||
// this.closeScanFromLocationPopup(); |
|||
// }else { |
|||
// this.showMessage('扫描的库位【' + code + '】不是【半成品库】或【成品库位】'); |
|||
// } |
|||
}else { |
|||
this.showMessage('未查询到库位【' + code + '】'); |
|||
} |
|||
|
|||
}).catch(err => { |
|||
this.fromLocationCode = ""; |
|||
this.fromLocationArea = ""; |
|||
uni.hideLoading(); |
|||
that.showMessage(err.message); |
|||
}); |
|||
}, |
|||
openScanPopup() { |
|||
this.$refs.scanPackPopup.openScanPopup() |
|||
}, |
|||
//提示是否移除选择的行? |
|||
swipeClick(e, index) { |
|||
let { |
|||
content |
|||
} = e; |
|||
if (content.text === '移除') { |
|||
uni.showModal({ |
|||
title: '提示', |
|||
content: '是否移除选择的行?', |
|||
success: res => { |
|||
if (res.confirm) { |
|||
this.itemList.splice(index, 1); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
getScanResult(result) { |
|||
let that = this; |
|||
let code = result.itemCode; |
|||
let datas = that.itemList.filter(r => { |
|||
return r.itemCode == code |
|||
}) |
|||
|
|||
if (datas.length > 0) { |
|||
showConfirmMsg('物料【' + code + '】已经存在,是否要重新扫描?', confirm => { |
|||
if (confirm) { |
|||
that.itemList.forEach((r, i) => { |
|||
if (r.packingCode == code) { |
|||
that.itemList.splice(i, 1); |
|||
return; |
|||
} |
|||
}); |
|||
// that.getBalance(code); |
|||
} |
|||
}); |
|||
} else { |
|||
var item = { |
|||
itemCode: result.itemCode, |
|||
itemName: result.itemName, |
|||
itemDesc1: result.itemDesc1, |
|||
stdPackQty: result.stdPackQty, |
|||
uom: result.uom, |
|||
qty: result.stdPackQty, |
|||
fromLocationCode: "ZPCP1", |
|||
fromStatus: 2, |
|||
toStatus:2 |
|||
} |
|||
|
|||
this.itemList.unshift(item); |
|||
this.$refs.scanPackPopup.closeScanPopup() |
|||
} |
|||
}, |
|||
|
|||
qtyChanged(value, item, index) { |
|||
if (value <= 0) { |
|||
this.showMessage('退货数量必须大于0') |
|||
item.handledQty = item.qty |
|||
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); |
|||
} |
|||
}, |
|||
getFromLocation(code, callBack) { |
|||
locations(code).then(res => { |
|||
if (res) { |
|||
this.fromLocationInfo = res; |
|||
callBack(true) |
|||
} |
|||
}).catch(err => { |
|||
callBack(false) |
|||
}) |
|||
}, |
|||
|
|||
getToLocation(code) { |
|||
if (code == '') { |
|||
this.showMessage('目标库位不能为空'); |
|||
return; |
|||
} |
|||
uni.showLoading({ |
|||
title: "扫描中", |
|||
mask: true |
|||
}); |
|||
let that = this; |
|||
locations(code).then(res => { |
|||
if (res == null) { |
|||
that.toLocationCode = '' |
|||
that.showMessage('目标库位【' + code + '】不存在'); |
|||
this.$refs.location.clearLocation() |
|||
this.locationGotFocus = true; |
|||
} else { |
|||
that.toLocationCode = code; |
|||
that.toLocationErpCode = res.erpLocationCode; |
|||
} |
|||
uni.hideLoading(); |
|||
}).catch(err => { |
|||
that.toLocationCode = '' |
|||
this.locationGotFocus = true; |
|||
that.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
}) |
|||
}, |
|||
|
|||
clear() { |
|||
this.location = null; |
|||
this.toLocationCode = ""; |
|||
}, |
|||
|
|||
submit() { |
|||
let that = this; |
|||
if (that.itemList.length === 0) { |
|||
this.showMessage('请选择要提交的零件'); |
|||
return; |
|||
} |
|||
if (that.toLocationCode === '') { |
|||
this.showMessage('请扫描目标库位'); |
|||
return; |
|||
} |
|||
this.getFromLocation(this.itemList[0].fromLocationCode, res => { |
|||
if (res) { |
|||
uni.showLoading({ |
|||
title: "提交中....", |
|||
mask: true |
|||
}); |
|||
let item = { |
|||
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage |
|||
.userName_CN, |
|||
warehouseCode: localStorage.warehouseCode, |
|||
jobNumber: "", |
|||
supplierCode: "", |
|||
company: localStorage.company, |
|||
number: "", |
|||
type: this.transferType, |
|||
details: [] |
|||
} |
|||
|
|||
this.itemList.forEach(r => { |
|||
r.toLocationCode = that.toLocationCode; |
|||
r.toLocationErpCode = this.toLocationErpCode |
|||
r.fromLot =""; |
|||
r.fromLocationArea = this.fromLocationInfo.areaCode; |
|||
r.fromLocationGroup = this.fromLocationInfo.locationGroupCode; |
|||
r.fromLocationErpCode = this.fromLocationInfo.erpLocationCode; |
|||
r.fromWarehouseCode = localStorage.warehouseCode; |
|||
|
|||
r.toLot =""; |
|||
r.fromPackingCode=""; |
|||
r.toPackingCode = ""; |
|||
|
|||
r.toWarehouseCode =localStorage.warehouseCode; |
|||
r.worker = localStorage.userName_CN == "" ? localStorage.userName : |
|||
localStorage.userName_CN |
|||
item.details.push(r); |
|||
}) |
|||
|
|||
let params = JSON.stringify(item); |
|||
console.log('params', params); |
|||
completeInvenTransfer(params) |
|||
.then(res => { |
|||
that.showCommitSuccess(); |
|||
that.clearInfo(); |
|||
uni.hideLoading(); |
|||
}) |
|||
.catch(err => { |
|||
that.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
}); |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
cancel() { |
|||
let that = this; |
|||
showConfirmMsg('是否要清空已扫描的零件和目标库位信息?', confirm => { |
|||
if (confirm) { |
|||
that.clearInfo(); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
clearInfo() { |
|||
let that = this; |
|||
that.itemList = []; |
|||
that.toLocationCode = ''; |
|||
that.inventoryStatus = -1; |
|||
that.$refs.location.clearLocation() |
|||
}, |
|||
|
|||
afterCloseMessagg() { |
|||
if (this.locationGotFocus) { |
|||
this.$refs.location.gotFocus(); |
|||
} |
|||
}, |
|||
|
|||
clearPackCode() { |
|||
this.isClearPackCode = !this.isClearPackCode; |
|||
}, |
|||
|
|||
clearContainerCode() { |
|||
this.isClearContainerCode = !this.isClearContainerCode; |
|||
}, |
|||
|
|||
clearLot() { |
|||
this.isClearLot = !this.isClearLot; |
|||
}, |
|||
|
|||
upper: function(e) { |
|||
// console.log(e) |
|||
}, |
|||
lower: function(e) { |
|||
// console.log(e) |
|||
}, |
|||
scroll: function(e) { |
|||
// console.log(e) |
|||
this.old.scrollTop = e.detail.scrollTop; |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
showCommitSuccess() { |
|||
this.$refs.comMessage.showCommitSuccess(); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
/deep/ .input-value { |
|||
font-size: 16px; |
|||
} |
|||
|
|||
/deep/ .uni-collapse-item__title-text { |
|||
font-size: 16px; |
|||
} |
|||
|
|||
/deep/ .uni-collapse-item--border { |
|||
border-bottom-width: 0px; |
|||
border-bottom-color: #ebeef5; |
|||
} |
|||
|
|||
/deep/ .uni-collapse-item--border { |
|||
border-bottom-width: 1px; |
|||
border-bottom-color: #ebeef5; |
|||
} |
|||
</style> |
@ -0,0 +1,156 @@ |
|||
<template> |
|||
|
|||
<view class="page-wraper"> |
|||
|
|||
<view class="page-header"> |
|||
<view class="" style="margin: 10rpx;"> |
|||
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" |
|||
activeColor="#007AFF"></uni-segmented-control> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
<view class="page-main"> |
|||
<scroll-view scroll-y="true" class="page-main-scroll"> |
|||
<view class="uni-flex uni-row" style="flex-wrap: wrap;"> |
|||
<view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; " |
|||
v-for="(item, index) in dataList" :key="index"> |
|||
<uni-tag :inverted="!item.checked" :circle="false" :text="item.itemCode" type="primary" |
|||
@click="setContainerModel(item)" |
|||
/> |
|||
</view> |
|||
|
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
|
|||
<view class="page-footer"> |
|||
<view class="uni-flex u-col-center space-between padding_10" |
|||
style="background-color:ghostwhite; width: 100%; "> |
|||
<view class=""> |
|||
</view> |
|||
<view class="new_btn_bot count_shadow"> |
|||
<button type="primary" class="new_save_btn" @click="submit()">提交</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<com-message ref="comMessage"></com-message> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import { |
|||
injectIssueRequest |
|||
} from '@/api/index.js'; |
|||
import { |
|||
goHome, |
|||
dateFormat, |
|||
getContainerTypeName, |
|||
showConfirmMsg |
|||
} from '@/common/basic.js'; |
|||
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' |
|||
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
export default { |
|||
components: { |
|||
winEmptyView, |
|||
comJobTopInfo, |
|||
comMessage |
|||
}, |
|||
data() { |
|||
return { |
|||
items: ['保险杠', '轮眉','车门装饰板'], |
|||
current: 0, |
|||
pageSize: this.modelConfig, |
|||
pageIndex: 1, |
|||
loadingType: "nomore", |
|||
dataList: [{itemCode:"THILDD0A542AG5",checked:false}, |
|||
{itemCode:"THILDD0A542AG5",checked:false}, |
|||
{itemCode:"THILDD0A542AG5",checked:false}, |
|||
{itemCode:"THILDD0A542AG4",checked:false}, |
|||
{itemCode:"THILDD0A542AG4",checked:false}, |
|||
{itemCode:"THILDD0A542AG4",checked:false}, |
|||
{itemCode:"123456",checked:false}, |
|||
{itemCode:"1234888",checked:false}, |
|||
{itemCode:"12349528",checked:false} |
|||
|
|||
], |
|||
isFinished:false |
|||
}; |
|||
}, |
|||
filters: { |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
}, |
|||
}, |
|||
|
|||
onShow() { |
|||
}, |
|||
onReachBottom() { |
|||
}, |
|||
onPullDownRefresh() { |
|||
}, |
|||
//后退按钮 |
|||
onBackPress(options) { |
|||
if (options.from === 'navigateBack') { |
|||
return false; |
|||
} |
|||
goHome(); |
|||
return true; |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
} else if (e.index === 1) { |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
methods: { |
|||
setContainerModel(item) { |
|||
this.dataList.forEach(res => { |
|||
res.checked = false |
|||
}) |
|||
item.checked = true; |
|||
}, |
|||
onClickItem(item) { |
|||
this.current = item.currentIndex; |
|||
console.log("点击", this.current) |
|||
if(this.current==0){ |
|||
this.isFinished =false; |
|||
}else { |
|||
this.isFinished =true; |
|||
} |
|||
}, |
|||
|
|||
//查询发货任务 |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
showCommitSuccessMessage() { |
|||
this.$refs.comMessage.showCommitSuccess(); |
|||
}, |
|||
submit(item) { |
|||
uni.showLoading({ |
|||
title: "提交中...", |
|||
mask:true |
|||
}); |
|||
|
|||
console.log("测试",JSON.stringify(params)); |
|||
injectIssueRequest(item.id, params) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (res != null) { |
|||
this.showCommitSuccessMessage(); |
|||
this.getList("refresh") |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
}); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
@ -0,0 +1,167 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<win-empty-view v-if="deliverList.length==0"></win-empty-view> |
|||
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id" |
|||
@click="openDetail(item)"> |
|||
<comThird :dataContent="item"></comThird> |
|||
</view> |
|||
<uni-load-more :status="loadingType" v-if="deliverList.length>0" /> |
|||
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> |
|||
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> |
|||
</win-mulit-scan> --> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInjectIssueJobList, |
|||
} from '@/api/index.js'; |
|||
|
|||
import { |
|||
goHome |
|||
} from '@/common/basic.js'; |
|||
|
|||
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' |
|||
import comThird from '@/mycomponents/coms/task/comThird.vue'; |
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
export default { |
|||
name: 'deliver', |
|||
components: { |
|||
winEmptyView, |
|||
winScanButton, |
|||
winMulitScan, |
|||
comThird, |
|||
comMessage |
|||
}, |
|||
data() { |
|||
return { |
|||
deliverList: [], |
|||
reload: false, |
|||
status: '', |
|||
contentText: { |
|||
contentdown: '上拉加载更多', |
|||
contentrefresh: '加载中', |
|||
contentnomore: '没有更多' |
|||
}, |
|||
pageSize: this.modelConfig, |
|||
pageIndex: 1, |
|||
isTimeWindowSorting: false, |
|||
isToday: true, |
|||
titleArray: ['任务编号'], |
|||
loadingType: "nomore" |
|||
|
|||
}; |
|||
}, |
|||
props: { |
|||
datacontent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
onShow: function() { |
|||
this.getList('refresh'); |
|||
}, |
|||
onReachBottom() { |
|||
//避免多次触发 |
|||
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|||
return; |
|||
} |
|||
this.getList("more"); |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.getList('refresh'); |
|||
}, |
|||
//后退按钮 |
|||
onBackPress(options) { |
|||
if (options.from === 'navigateBack') { |
|||
return false; |
|||
} |
|||
goHome(); |
|||
return true; |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
}else if(e.index === 1){ |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
methods: { |
|||
openScanPopup() { |
|||
this.$refs.scanPopup.openScanPopup(); |
|||
}, |
|||
//按时间窗口排序 |
|||
timeSortingChange: function(e) { |
|||
this.isTimeWindowSorting = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//只看当天到货 |
|||
isTodayChange: function(e) { |
|||
this.isToday = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//查询发货任务 |
|||
getList(type) { |
|||
let that = this; |
|||
uni.showLoading({ |
|||
title: "加载中....", |
|||
mask: true |
|||
}); |
|||
this.loadingType = "loading"; |
|||
if (type === "refresh") { |
|||
this.pageIndex = 1; |
|||
this.deliverList = []; |
|||
} |
|||
let params = { |
|||
pageSize: that.pageSize, |
|||
pageIndex: that.pageIndex, |
|||
// isCreationTimeSorting: that.isTimeWindowSorting, |
|||
// isToday: that.isToday |
|||
}; |
|||
getInjectIssueJobList(params) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
var list = res.items; |
|||
this.loadingType = "loadmore"; |
|||
if (list == null || list.length == 0) { |
|||
//没数据了 |
|||
this.loadingType = "nomore"; |
|||
return; |
|||
} |
|||
// that.deliverList = [...that.deliverList, ...list]; |
|||
that.deliverList = type === "refresh" ? list : this.deliverList.concat(list); |
|||
that.pageIndex++; |
|||
}) |
|||
.catch(err => { |
|||
this.loadingType = ""; |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
openDetail(item) { |
|||
uni.navigateTo({ |
|||
url: './injectionIssueJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus |
|||
}); |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
</style> |
@ -0,0 +1,405 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<view class="top_card"> |
|||
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> |
|||
</com-job-scan-detail> |
|||
</view> |
|||
|
|||
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|||
class="scroll-detail"> |
|||
<view class="" v-for="(item, index) in details" :key="index"> |
|||
<view class="detail-list margin_top"> |
|||
<!-- 单选卡片 --> |
|||
<view class="detail-content"> |
|||
<view class="choose_main"> |
|||
<view class="ljh_box"> |
|||
<view class="tit_ljh">{{ item.itemCode }}</view> |
|||
<view class="ljh_left"> |
|||
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
|||
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
|||
</view> |
|||
</view> |
|||
<view class="list_form hold_form"> |
|||
<view class="uni-container"> |
|||
<uni-table style="overflow-x: hidden;"> |
|||
<uni-tr> |
|||
<uni-th width="70"></uni-th> |
|||
<uni-th width="120" align="center">推荐</uni-th> |
|||
<uni-th width="120" align="center">实际</uni-th> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-th width="70">数量</uni-th> |
|||
<uni-th width="120" align="center"> |
|||
<view class="text_black">{{item.recommendQty}}({{item.uom}})</text> |
|||
</view> |
|||
</uni-th> |
|||
<!-- --> |
|||
<uni-th width="120" align="center"> |
|||
<view class="" v-if="item.scaned"> |
|||
<com-number-box :ref="'comNumberBox_'+index" |
|||
v-model="item.handledQty" :max="99999" :min="0" |
|||
@change="qtyChanged($event,item,index)"> |
|||
</com-number-box> |
|||
</view> |
|||
<!-- <view v-if="dataContent.scaned" class="text_black"> |
|||
{{dataContent.handledQty}}({{dataContent.uom}}) |
|||
</view> --> |
|||
</uni-th> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-th width="70">来源库位</uni-th> |
|||
<uni-th width="120" align="center"> |
|||
<view class="text_black">{{ item.fromLocationCode }}</view> |
|||
</uni-th> |
|||
<uni-th width="120" align="center"> |
|||
<view class=""> |
|||
<button v-if="item.scaned" type="primary" size="mini" |
|||
style="margin-left: 30rpx;" |
|||
@click="remove(dataContent,index)">移除</button> |
|||
</view> |
|||
</uni-th> |
|||
</uni-tr> |
|||
</uni-table> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="choose_marked" v-if="item.scaned"> |
|||
<image src="@/static/image_marked.svg"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</scroll-view> |
|||
|
|||
<div class="new_bot_box"> |
|||
<win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation' |
|||
@clear='clearDefaultLocation'> |
|||
</win-collapse-location> |
|||
<view class="new_btn_bot bot_pos uni-flex"> |
|||
<button class="new_clear_btn btn_double" @click="cancel()">清空</button> |
|||
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|||
</view> |
|||
</div> |
|||
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|||
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode> |
|||
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInjectIssueDetail, |
|||
takeInjectIssueJob, |
|||
cancelTakeInjectIssueJob, |
|||
finshInjectIssueJob, |
|||
locations |
|||
} from '@/api/index.js'; |
|||
import { |
|||
showConfirmMsg, |
|||
goHome, |
|||
navigateBack |
|||
} from '@/common/basic.js'; |
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|||
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' |
|||
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue' |
|||
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|||
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; |
|||
import comProductCode from '@/mycomponents/coms/task/comProductCode.vue'; |
|||
|
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
winScanButton, |
|||
winMulitScan, |
|||
winScanByPack, |
|||
comMessage, |
|||
comJobScanDetail, |
|||
winCollapseLocation, |
|||
winScanByProductCode, |
|||
comNumberBox, |
|||
comProductCode |
|||
}, |
|||
data() { |
|||
return { |
|||
type: '', |
|||
id: "", |
|||
datacontent: {}, |
|||
details: [], |
|||
toLocation: '', |
|||
scrollTop: 0, |
|||
old: { |
|||
scrollTop: 0 |
|||
}, |
|||
ispending: false, |
|||
balancesItem: {}, |
|||
titleArray: ['箱标签', '目标库位'], |
|||
allCount: 0, |
|||
scanCount: 0, |
|||
jobStatus: "", |
|||
toLocationInfo: null |
|||
} |
|||
}, |
|||
onLoad(param) { |
|||
this.id = param.id; |
|||
if (param.jobStatus == 1) { |
|||
this.receive((callback => { |
|||
this.getDetail(); |
|||
})); |
|||
} else { |
|||
this.getDetail(); |
|||
} |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
} else if (e.index === 1) { |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
//拦截返回按钮事件 |
|||
onBackPress(e) { |
|||
//已经接收但是没提交任务 |
|||
if (e.from == 'backbutton') { |
|||
if (this.jobStatus == 2) { |
|||
//取消承接任务 |
|||
cancelTakeInjectIssueJob(this.id).then(res => { |
|||
uni.navigateBack(); |
|||
}).catch(error => { |
|||
uni.navigateBack(); |
|||
}) |
|||
} else { |
|||
uni.navigateBack(); |
|||
} |
|||
return true; |
|||
} |
|||
}, |
|||
mounted() { |
|||
uni.setNavigationBarColor({ |
|||
frontColor: '#ffffff', |
|||
backgroundColor: "#5A7CF3 !important" |
|||
}) |
|||
}, |
|||
methods: { |
|||
//扫描默认目标库位 |
|||
getDefaultToLocation(locationCode) { |
|||
uni.showLoading({ |
|||
title: "扫描中", |
|||
mask: true |
|||
}); |
|||
locations(locationCode).then(res => { |
|||
uni.hideLoading(); |
|||
if (res) { |
|||
this.toLocationInfo = res |
|||
} else { |
|||
this.showMessage('目标库位【' + locationCode + '】不存在'); |
|||
} |
|||
|
|||
}).catch(err => { |
|||
uni.hideLoading(); |
|||
this.toLocationInfo = null |
|||
this.showMessage(err.message); |
|||
|
|||
}) |
|||
}, |
|||
|
|||
clearDefaultLocation() { |
|||
this.toLocationInfo = null |
|||
}, |
|||
remove(item, index) { |
|||
showConfirmMsg("是否移除当前【" + item.itemCode + "】扫描信息", res => { |
|||
if (res) { |
|||
item.scaned = false; |
|||
item.handledQty = null; |
|||
this.getScanCount() |
|||
} |
|||
}) |
|||
}, |
|||
qtyChanged(value, item, index) { |
|||
if (value <= 0) { |
|||
this.showMessage('收货货数量必须大于0') |
|||
item.qty = item.handledQty |
|||
this.$refs['comNumberBox_' + index][0].setValue(item.qty); |
|||
} |
|||
}, |
|||
openScanPopup() { |
|||
this.$refs.scanPackPopup.openScanPopup(); |
|||
}, |
|||
//加载零件信息 |
|||
getDetail() { |
|||
let that = this; |
|||
let params = { |
|||
id: that.id, |
|||
}; |
|||
getInjectIssueDetail(params) |
|||
.then(item => { |
|||
console.log('item', item); |
|||
that.datacontent = item; |
|||
that.jobStatus = item.jobStatus |
|||
that.details = item.details; |
|||
that.details.forEach(res => { |
|||
res.scaned = false; |
|||
}) |
|||
that.ispending = item.jobStatus === 2; |
|||
that.allCount = item.details.length; |
|||
// that.toLocation = item.details[0].recommendLocationCode; |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage('未查找到详细信息') |
|||
}); |
|||
}, |
|||
//扫描箱标签 |
|||
getScanResult(result) { |
|||
let item = this.details.find(r => { |
|||
return r.itemCode == result.itemCode |
|||
}); |
|||
|
|||
if (item === undefined) { |
|||
this.showMessage('在任务详情中,未找到物料号【' + result.itemCode + '】'); |
|||
return; |
|||
} else { |
|||
if (item.scaned) { |
|||
this.showMessage('物料号【' + result.itemCode + '】已经扫描,请扫描下一箱零件'); |
|||
return; |
|||
} else { |
|||
item.scaned = true; |
|||
item.handledQty = item.recommendQty; |
|||
this.getScanCount() |
|||
setTimeout(res => { |
|||
this.$forceUpdate() |
|||
}, 1000) |
|||
|
|||
} |
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
getScanCount() { |
|||
this.scanCount = this.datacontent.details.filter(r => r.scaned).length; |
|||
}, |
|||
|
|||
closeScanPopup() { |
|||
if (this.allCount == this.scanCount) { |
|||
this.$refs.scanPopup.closeScanPopup(); |
|||
} |
|||
}, |
|||
|
|||
cancel() { |
|||
showConfirmMsg("是否清除已经扫描的数据?", res => { |
|||
if (res) { |
|||
this.getDetail(); |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
|
|||
//接收 |
|||
receive(callback) { |
|||
let params = { |
|||
id: this.id |
|||
}; |
|||
takeInjectIssueJob(params) |
|||
.then(res => { |
|||
callback(true); |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage(err.message); |
|||
callback(false); |
|||
}); |
|||
}, |
|||
|
|||
submit() { |
|||
let that = this; |
|||
if (that.datacontent.details.length === 0) { |
|||
this.showMessage('该任务没有要收货的零件'); |
|||
return; |
|||
} |
|||
|
|||
let items = that.datacontent.details.filter(r => r.scaned); |
|||
if (items.length === 0) { |
|||
this.showMessage('请扫描要收货的零件'); |
|||
return; |
|||
} else if (items.length < that.datacontent.details.length) { |
|||
this.showMessage('还有未扫描的零件,不可以收货货'); |
|||
return; |
|||
} else { |
|||
if (this.toLocationInfo == null) { |
|||
this.showMessage('请扫描目标库位'); |
|||
return; |
|||
} |
|||
|
|||
that.finsh(); |
|||
} |
|||
}, |
|||
|
|||
finsh() { |
|||
uni.showLoading({ |
|||
title: "提交中..." |
|||
}); |
|||
this.setParams(); |
|||
let params = JSON.stringify(this.datacontent); |
|||
console.log("提交", params); |
|||
finshInjectIssueJob(this.id, params) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (res != null) { |
|||
this.showCommitSuccessMessage(); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
}); |
|||
}, |
|||
setParams() { |
|||
this.datacontent.details.forEach(res => { |
|||
// res.handledFromLocationCode = res.recommendFromLocationCode; |
|||
// res.handledFromLocationA rea = res.recommendFromLocationArea; |
|||
// res.handledFromLocationGroup = res.recommendFromLocationGroup; |
|||
// res.handledFromLocationErpCode = res.recommendFromLocationErpCode |
|||
// res.handledFromWarehouseCode = res.recommendFromWarehouseCode; |
|||
|
|||
res.toLocationCode = this.toLocationInfo.code; |
|||
res.toLocationArea = this.toLocationInfo.areaCode; |
|||
// res.toLocationGroup = this.toLocationInfo.locationGroupCode; |
|||
// res.toLocationErpCode = this.toLocationInfo.erpLocationCode; |
|||
|
|||
}) |
|||
|
|||
}, |
|||
|
|||
showCommitSuccessMessage() { |
|||
this.$refs.comMessage.showCommitSuccess(); |
|||
}, |
|||
|
|||
closeCommitMessage() { |
|||
navigateBack(1); //点关闭直接返回列表 |
|||
uni.hideLoading(); |
|||
}, |
|||
|
|||
|
|||
clearScanLocation() { |
|||
// this.$refs.scanLocation.getfocus(); |
|||
// this.$refs.scanLocation.clear(); |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
|
|||
scroll: function(e) { |
|||
this.old.scrollTop = e.detail.scrollTop; |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
@ -0,0 +1,168 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<win-empty-view v-if="deliverList.length==0"></win-empty-view> |
|||
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id" |
|||
@click="openDetail(item)"> |
|||
<comInventyMove :dataContent="item"></comInventyMove> |
|||
</view> |
|||
<uni-load-more :status="loadingType" v-if="deliverList.length>0" /> |
|||
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> |
|||
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> |
|||
</win-mulit-scan> --> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInventoryMoveList, |
|||
} from '@/api/index.js'; |
|||
|
|||
import { |
|||
goHome |
|||
} from '@/common/basic.js'; |
|||
|
|||
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' |
|||
import comInventyMove from '@/mycomponents/coms/task/comInventyMove.vue'; |
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
export default { |
|||
name: 'deliver', |
|||
components: { |
|||
winEmptyView, |
|||
winScanButton, |
|||
winMulitScan, |
|||
comInventyMove, |
|||
comMessage |
|||
}, |
|||
data() { |
|||
return { |
|||
deliverList: [], |
|||
reload: false, |
|||
status: '', |
|||
contentText: { |
|||
contentdown: '上拉加载更多', |
|||
contentrefresh: '加载中', |
|||
contentnomore: '没有更多' |
|||
}, |
|||
pageSize: this.modelConfig, |
|||
pageIndex: 1, |
|||
isTimeWindowSorting: false, |
|||
isToday: true, |
|||
titleArray: ['任务编号'], |
|||
loadingType: "nomore" |
|||
|
|||
}; |
|||
}, |
|||
props: { |
|||
datacontent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
onShow: function() { |
|||
this.getList('refresh'); |
|||
}, |
|||
onReachBottom() { |
|||
//避免多次触发 |
|||
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|||
return; |
|||
} |
|||
this.getList("more"); |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.getList('refresh'); |
|||
}, |
|||
//后退按钮 |
|||
onBackPress(options) { |
|||
if (options.from === 'navigateBack') { |
|||
return false; |
|||
} |
|||
goHome(); |
|||
return true; |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
}else if(e.index === 1){ |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
methods: { |
|||
openScanPopup() { |
|||
this.$refs.scanPopup.openScanPopup(); |
|||
}, |
|||
//按时间窗口排序 |
|||
timeSortingChange: function(e) { |
|||
this.isTimeWindowSorting = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//只看当天到货 |
|||
isTodayChange: function(e) { |
|||
this.isToday = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//查询发货任务 |
|||
getList(type) { |
|||
let that = this; |
|||
uni.showLoading({ |
|||
title: "加载中....", |
|||
mask: true |
|||
}); |
|||
this.loadingType = "loading"; |
|||
if (type === "refresh") { |
|||
this.pageIndex = 1; |
|||
this.deliverList = []; |
|||
} |
|||
let params = { |
|||
pageSize: that.pageSize, |
|||
pageIndex: that.pageIndex, |
|||
// isCreationTimeSorting: that.isTimeWindowSorting, |
|||
// isToday: that.isToday |
|||
}; |
|||
getInventoryMoveList(params) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
var list = res.items; |
|||
this.loadingType = "loadmore"; |
|||
if (list == null || list.length == 0) { |
|||
//没数据了 |
|||
this.loadingType = "nomore"; |
|||
return; |
|||
} |
|||
// that.deliverList = [...that.deliverList, ...list]; |
|||
that.deliverList = type === "refresh" ? list : this.deliverList.concat(list); |
|||
that.pageIndex++; |
|||
}) |
|||
.catch(err => { |
|||
this.loadingType = ""; |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
|
|||
openDetail(item) { |
|||
uni.navigateTo({ |
|||
url: './inventoryMoveJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus |
|||
}); |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
</style> |
@ -0,0 +1,607 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<view class="top_card"> |
|||
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> |
|||
</com-job-scan-detail> |
|||
</view> |
|||
|
|||
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|||
class="scroll-detail"> |
|||
<view class="" v-for="(item, index) in details" :key="index"> |
|||
<view class="detail-list margin_top"> |
|||
<!-- 单选卡片 --> |
|||
<view class="detail-content"> |
|||
<view class="choose_main"> |
|||
<view class="ljh_box"> |
|||
<view class="tit_ljh">{{ item.itemCode }}</view> |
|||
<view class="ljh_left"> |
|||
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
|||
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="list_form hold_form"> |
|||
<view class="uni-container"> |
|||
<uni-table style=""> |
|||
<uni-tr> |
|||
<uni-th width="100" align="center">推荐 </uni-th> |
|||
<uni-th width="120" align="center">来源</uni-th> |
|||
<uni-th width="120" align="center">目标</uni-th> |
|||
</uni-tr> |
|||
|
|||
<uni-tr> |
|||
<uni-td width="100" align="center">箱码</uni-td> |
|||
<uni-td width="120" align="center"> |
|||
{{item.recommendFromPackingCode}}</uni-td> |
|||
<uni-td width="120" align="center"> {{item.recommendToPackingCode}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">批次</uni-td> |
|||
<uni-td width="120" align="center">{{item.recommendFromLot}}</uni-td> |
|||
<uni-td width="120" align="center">{{item.recommendToLot}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">库位</uni-td> |
|||
<uni-td width="120" align="center"> |
|||
{{item.recommendFromLocationCode}}</uni-td> |
|||
<uni-td width="120" align="center"> |
|||
{{item.recommendToLocationCode}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">数量({{item.uom}})</uni-td> |
|||
<uni-td width="120" align="center">{{item.recommendFromQty}}</uni-td> |
|||
<uni-td width="120" align="center">{{item.recommendToQty}}</uni-td> |
|||
</uni-tr> |
|||
|
|||
</uni-table> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="list_form hold_form"> |
|||
<view class="uni-container"> |
|||
<uni-table style=""> |
|||
<uni-tr> |
|||
<uni-th width="100" align="center">实际</uni-th> |
|||
<uni-th width="120" align="center">来源</uni-th> |
|||
<uni-th width="120" align="center">目标</uni-th> |
|||
</uni-tr> |
|||
|
|||
<uni-tr> |
|||
<uni-td width="100" align="center">箱码</uni-td> |
|||
<uni-td width="120" align="center"> {{item.handledFromPackingCode}}</uni-td> |
|||
<uni-td width="120" align="center"> {{item.handledToPackingCode}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">批次</uni-td> |
|||
<uni-td width="120" align="center">{{item.handledFromLot}}</uni-td> |
|||
<uni-td width="120" align="center">{{item.handledToLot}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">库位</uni-td> |
|||
<uni-td width="120" align="center"> |
|||
{{item.handledFromLocationCode}}</uni-td> |
|||
<uni-td width="120" align="center"> {{item.handledToLocationCode}}</uni-td> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-td width="100" align="center">数量({{item.uom}})</uni-td> |
|||
<uni-td width="120" align="center">{{item.handledFromQty}}</uni-td> |
|||
<uni-td width="120" align="center">{{item.handledToQty}}</uni-td> |
|||
</uni-tr> |
|||
|
|||
</uni-table> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="choose_marked" v-if="item.scaned"> |
|||
<image src="@/static/image_marked.svg"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <view class=""> |
|||
<view class="" style="padding-left: 50rpx; padding-right: 50rpx;"> |
|||
<button type="default" @click="openFromLocation"> 来源库位</button> |
|||
</view> |
|||
<view class="" style="padding-left: 50rpx; padding-right: 50rpx;margin-top: 20rpx;"> |
|||
<button type="default"> 箱码</button> |
|||
</view> |
|||
<view class="" style="padding-left: 50rpx; padding-right: 50rpx; margin-top: 20rpx;"> |
|||
<button type="default" @click="openToLocation"> 目标库位</button> |
|||
</view> |
|||
|
|||
</view> --> |
|||
|
|||
</scroll-view> |
|||
|
|||
|
|||
<div class="new_bot_box"> |
|||
<!-- <win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation' |
|||
@clear='clearDefaultLocation'> |
|||
</win-collapse-location> --> |
|||
<view class="new_btn_bot bot_pos uni-flex"> |
|||
<button class="new_clear_btn btn_double" @click="cancel()">清空</button> |
|||
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|||
</view> |
|||
</div> |
|||
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> --> |
|||
<uni-fab ref="fab" class="fab" :pattern="pattern" :content="content" :horizontal="horizontal" |
|||
:vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab> |
|||
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> |
|||
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="getFromLocation"></winScanLocationCode> |
|||
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="getToLocation"></winScanLocationCode> |
|||
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInventoryMoveDetail, |
|||
takeInventoryMoveJob, |
|||
cancelTakeInventoryMoveJob, |
|||
finshInventoryMoveJob, |
|||
locations, |
|||
getBalancesByFilterAsync |
|||
} from '@/api/index.js'; |
|||
import { |
|||
showConfirmMsg, |
|||
goHome, |
|||
navigateBack |
|||
} from '@/common/basic.js'; |
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|||
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' |
|||
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue' |
|||
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|||
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; |
|||
import comProductCode from '@/mycomponents/coms/task/comProductCode.vue'; |
|||
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; |
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
winScanButton, |
|||
winMulitScan, |
|||
winScanByPack, |
|||
comMessage, |
|||
comJobScanDetail, |
|||
winCollapseLocation, |
|||
winScanByProductCode, |
|||
comNumberBox, |
|||
comProductCode, |
|||
winScanLocationCode |
|||
}, |
|||
data() { |
|||
return { |
|||
type: '', |
|||
id: "", |
|||
datacontent: {}, |
|||
details: [], |
|||
toLocation: '', |
|||
scrollTop: 0, |
|||
old: { |
|||
scrollTop: 0 |
|||
}, |
|||
balancesItem: {}, |
|||
titleArray: ['箱标签', '目标库位'], |
|||
allCount: 0, |
|||
scanCount: 0, |
|||
jobStatus: "", |
|||
toLocationInfo: null, |
|||
fromLocationInfo: null, |
|||
pattern: { |
|||
color: '#7A7E83', |
|||
backgroundColor: '#fff', |
|||
selectedColor: '#007AFF', |
|||
buttonColor: '#5A7CF3', |
|||
iconColor: '#fff' |
|||
}, |
|||
directionStr: '垂直', |
|||
horizontal: 'right', |
|||
vertical: 'bottom', |
|||
direction: 'horizontal', |
|||
content: [{ |
|||
iconPath: '/static/icons_ui/icons_common_sjadd.svg', |
|||
selectedIconPath: '/static/icons_ui/icons_common_sjadd.svg', |
|||
text: '来源库位', |
|||
active: false |
|||
}, |
|||
|
|||
{ |
|||
iconPath: '/static/icons_ui/icon_num.svg', |
|||
selectedIconPath: '/static/icons_ui/icon_num.svg', |
|||
text: '箱码', |
|||
active: false |
|||
}, |
|||
{ |
|||
iconPath: '/static/icons_ui/icon_erp.svg', |
|||
selectedIconPath: '/static/icons_ui/icon_erp.svg', |
|||
text: '目标库位', |
|||
active: false |
|||
}, |
|||
] |
|||
|
|||
} |
|||
}, |
|||
onLoad(param) { |
|||
this.id = param.id; |
|||
if (param.jobStatus == 1) { |
|||
this.receive((callback => { |
|||
this.getDetail(); |
|||
})); |
|||
} else { |
|||
this.getDetail(); |
|||
} |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
} else if (e.index === 1) { |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
//拦截返回按钮事件 |
|||
onBackPress(e) { |
|||
//已经接收但是没提交任务 |
|||
if (e.from == 'backbutton') { |
|||
if (this.jobStatus == 2) { |
|||
//取消承接任务 |
|||
cancelTakeInventoryMoveJob(this.id).then(res => { |
|||
uni.navigateBack(); |
|||
}).catch(error => { |
|||
uni.navigateBack(); |
|||
}) |
|||
} else { |
|||
uni.navigateBack(); |
|||
} |
|||
return true; |
|||
} |
|||
}, |
|||
mounted() { |
|||
uni.setNavigationBarColor({ |
|||
frontColor: '#ffffff', |
|||
backgroundColor: "#5A7CF3 !important" |
|||
}) |
|||
}, |
|||
methods: { |
|||
//扫描默认目标库位 |
|||
getDefaultToLocation(locationCode) { |
|||
uni.showLoading({ |
|||
title: "扫描中", |
|||
mask: true |
|||
}); |
|||
locations(locationCode).then(res => { |
|||
uni.hideLoading(); |
|||
if (res) { |
|||
this.toLocationInfo = res |
|||
} else { |
|||
this.showMessage('目标库位【' + locationCode + '】不存在'); |
|||
} |
|||
|
|||
}).catch(err => { |
|||
uni.hideLoading(); |
|||
this.toLocationInfo = null |
|||
this.showMessage(err.message); |
|||
|
|||
}) |
|||
}, |
|||
|
|||
clearDefaultLocation() { |
|||
this.toLocationInfo = null |
|||
}, |
|||
remove(item, index) { |
|||
showConfirmMsg("是否移除当前【" + item.itemCode + "】扫描信息", res => { |
|||
if (res) { |
|||
item.scaned = false; |
|||
item.handledQty = null; |
|||
this.getScanCount() |
|||
} |
|||
}) |
|||
}, |
|||
qtyChanged(value, item, index) { |
|||
if (value <= 0) { |
|||
this.showMessage('收货货数量必须大于0') |
|||
item.qty = item.handledQty |
|||
this.$refs['comNumberBox_' + index][0].setValue(item.qty); |
|||
} |
|||
}, |
|||
openScanPopup() { |
|||
this.$refs.scanPopup.openScanPopup(); |
|||
}, |
|||
//加载零件信息 |
|||
getDetail() { |
|||
let that = this; |
|||
let params = { |
|||
id: that.id, |
|||
}; |
|||
|
|||
getInventoryMoveDetail(params) |
|||
.then(item => { |
|||
console.log('item', item); |
|||
|
|||
that.datacontent = item; |
|||
that.jobStatus = item.jobStatus |
|||
that.details = item.details; |
|||
that.toLocationInfo = null |
|||
that.fromLocationInfo = null |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage('未查找到详细信息') |
|||
}); |
|||
}, |
|||
//扫描箱标签 |
|||
async getScanResult(result) { |
|||
var packingCode = result.data.code; |
|||
var itemFrom = this.details[0]; |
|||
|
|||
uni.showLoading({ |
|||
title: '加载中', |
|||
mask: true |
|||
}) |
|||
var params = { |
|||
pageIndex: 1, |
|||
pageSize: 100, |
|||
packingCode: packingCode |
|||
}; |
|||
let balanceRes = await getBalancesByFilterAsync(params); |
|||
uni.hideLoading(); |
|||
if (balanceRes.totalCount === 0) { |
|||
this.showMessage('箱码【' + packingCode + '】未查询到库存余额') |
|||
return; |
|||
} |
|||
var balanceData = balanceRes.items[0]; |
|||
var itemCode = balanceData.itemCode; |
|||
var lot = balanceData.lot; |
|||
var locationCode = balanceData.locationCode; |
|||
var status = balanceData.status; |
|||
var qty = balanceData.qty; |
|||
|
|||
//箱码校验 |
|||
if (itemFrom.isPackingCodeFrom || itemFrom.isPackingCodeTo) { |
|||
if (packingCode != itemFrom.isPackingCodeFrom) { |
|||
this.showMessage("任务中不允许修改来源箱码, 扫描箱码[" + packingCode + "]与推荐箱码[" + itemFrom.packingCode + |
|||
"]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
//零件号校验 |
|||
if (itemFrom.isItemCodeFrom || itemFrom.isItemCodeTo) { |
|||
if (itemCode != itemFrom.itemCode) { |
|||
this.showMessage("任务中不允许修改来源零件, 扫描箱码[" + packingCode + "]的零件[" + itemCode + "]与推荐零件[" + |
|||
itemFrom.itemCode + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
//批次校验 |
|||
if (itemFrom.isLotFrom || itemFrom.isLotTo) { |
|||
if (lot != itemFrom.recommendFromLot) { |
|||
this.showMessage("任务中不允许修改来源批次, 扫描箱码[" + packingCode + "]的批次是[" + lot + "]与推荐批次[" + itemFrom |
|||
.lot + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
//库位校验 |
|||
if (itemFrom.isLocationCodeFrom) { |
|||
if (locationCode != itemFrom.recommendFromLocationCode) { |
|||
this.showMessage("任务中不允许修改来源库位, 扫描箱码[" + packingCode + "]的库位是[" + locationCode + "]与推荐库位[" + |
|||
itemFrom.recommendFromLocationCode + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
|
|||
//状态校验 |
|||
if (itemFrom.isStatusFrom || itemFrom.isStatusTo) { |
|||
if (status != itemFrom.status) { |
|||
this.showMessage("任务中不允许修改来源状态, 扫描箱码[" + packingCode + "]的状态是[" + status + "]与推荐状态[" + itemFrom |
|||
.status + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
|
|||
if (itemFrom.isQtyFrom || itemFrom.isQtyTo) { |
|||
if (qty != itemFrom.recommendFromQty) { |
|||
this.showMessage("任务中不允许修改来源数量, 扫描箱码[" + packingCode + "]的数量是[" + qty + "]与推荐数量[" + itemFrom |
|||
.recommendFromQty + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
|
|||
itemFrom.handledFromPackingCode = packingCode; |
|||
itemFrom.handledFromLot = lot; |
|||
// itemFrom.handledFromLocationCode = locationCode; |
|||
// itemFrom.handledFromLocationArea = balanceData.locationArea; |
|||
// itemFrom.handledFromLocationGroup = balanceData.locationGroup; |
|||
// itemFrom.handledFromLocationErpCode = balanceData.locationErpCode; |
|||
itemFrom.handledFromContainerCode = balanceData.containerCode; |
|||
itemFrom.handledFromSupplierBatch = balanceData.supplierBatch; |
|||
itemFrom.handledFromArriveDate = balanceData.arriveDate; |
|||
itemFrom.handledFromProduceDate = balanceData.produceDate; |
|||
itemFrom.handledFromExpireDate = balanceData.expireDate; |
|||
itemFrom.handledFromWarehouseCode = balanceData.warehouseCode; |
|||
itemFrom.handledFromQty = balanceData.qty; |
|||
|
|||
|
|||
itemFrom.handledToContainerCode = itemFrom.handledFromContainerCode; |
|||
itemFrom.handledToPackingCode = itemFrom.handledFromPackingCode; |
|||
itemFrom.handledToSupplierBatch = itemFrom.handledFromSupplierBatch; |
|||
itemFrom.handledToArriveDate = itemFrom.handledFromArriveDate; |
|||
itemFrom.handledToProduceDate = itemFrom.handledFromProduceDate; |
|||
itemFrom.handledToExpireDate = itemFrom.handledFromExpireDate; |
|||
itemFrom.handledToWarehouseCode = itemFrom.handledFromWarehouseCode; |
|||
itemFrom.handledToLot = itemFrom.handledFromLot; |
|||
itemFrom.handledToQty = itemFrom.handledFromQty; |
|||
|
|||
}, |
|||
|
|||
|
|||
getScanCount() { |
|||
this.scanCount = this.datacontent.details.filter(r => r.scaned).length; |
|||
}, |
|||
|
|||
closeScanPopup() { |
|||
if (this.allCount == this.scanCount) { |
|||
this.$refs.scanPopup.closeScanPopup(); |
|||
} |
|||
}, |
|||
|
|||
cancel() { |
|||
showConfirmMsg("是否清除已经扫描的数据?", res => { |
|||
if (res) { |
|||
this.getDetail(); |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
|
|||
//接收 |
|||
receive(callback) { |
|||
let params = { |
|||
id: this.id |
|||
}; |
|||
takeInventoryMoveJob(params) |
|||
.then(res => { |
|||
callback(true); |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage(err.message); |
|||
callback(false); |
|||
}); |
|||
}, |
|||
|
|||
submit() { |
|||
|
|||
if (this.fromLocationInfo == null) { |
|||
this.showMessage('请扫描来源库位'); |
|||
return; |
|||
} |
|||
if (this.toLocationInfo == null) { |
|||
this.showMessage('请扫描目标库位'); |
|||
return; |
|||
} |
|||
|
|||
if (!this.details[0].handledFromPackingCode) { |
|||
this.showMessage('请扫描箱码'); |
|||
return; |
|||
} |
|||
this.finsh(); |
|||
}, |
|||
|
|||
finsh() { |
|||
uni.showLoading({ |
|||
title: "提交中..." |
|||
}); |
|||
this.setParams(); |
|||
let params = JSON.stringify(this.datacontent); |
|||
console.log("提交", params); |
|||
finshInventoryMoveJob(this.id, params) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (res != null) { |
|||
this.showCommitSuccessMessage(); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
}); |
|||
}, |
|||
setParams() { |
|||
this.details.forEach(res => { |
|||
|
|||
res.handledFromLocationCode = this.fromLocationInfo.code; |
|||
res.handledFromLocationArea =this.fromLocationInfo.areaCode; |
|||
res.handledFromLocationGroup =this.fromLocationInfo.locationGroup; |
|||
res.handledFromLocationErpCode = this.fromLocationInfo.locationErpCode; |
|||
|
|||
res.handledToLocationCode = this.toLocationInfo.code; |
|||
res.handledToLocationArea =this.toLocationInfo.areaCode; |
|||
res.handledToLocationGroup = this.toLocationInfo.locationGroup; |
|||
res.handledToLocationErpCode = this.toLocationInfo.locationErpCode; |
|||
|
|||
|
|||
|
|||
}) |
|||
|
|||
}, |
|||
|
|||
showCommitSuccessMessage() { |
|||
this.$refs.comMessage.showCommitSuccess(); |
|||
}, |
|||
|
|||
closeCommitMessage() { |
|||
navigateBack(1); //点关闭直接返回列表 |
|||
uni.hideLoading(); |
|||
}, |
|||
|
|||
|
|||
clearScanLocation() { |
|||
// this.$refs.scanLocation.getfocus(); |
|||
// this.$refs.scanLocation.clear(); |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
|
|||
scroll: function(e) { |
|||
this.old.scrollTop = e.detail.scrollTop; |
|||
}, |
|||
openFromLocation() { |
|||
this.$refs.locationFrom.openScanPopup() |
|||
}, |
|||
openToLocation() { |
|||
this.$refs.locationTo.openScanPopup() |
|||
}, |
|||
getFromLocation(locationInfo) { |
|||
if (this.details[0].isLocationCodeFrom) { |
|||
if (locationInfo.code != this.details[0].recommendFromLocationCode) { |
|||
this.showMessage("任务中不允许修改来源库位, 扫描来源库位[" + locationInfo.code + "]与推荐库位[" + this.details[0] |
|||
.recommendFromLocationCode + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
this.fromLocationInfo = locationInfo |
|||
this.details[0].handledFromLocationCode=locationInfo.code |
|||
}, |
|||
getToLocation(locationInfo) { |
|||
if (this.details[0].isLocationCodeTo) { |
|||
if (locationInfo.code != this.details[0].recommendToLocationCode) { |
|||
this.showMessage("任务中不允许修改目标库位, 扫描目标库位[" + locationInfo.code + "]与推荐库位[" + this.details[0] |
|||
.recommendToLocationCode + "]不一致,请重新扫描") |
|||
return; |
|||
} |
|||
} |
|||
this.toLocationInfo = locationInfo |
|||
this.details[0].handledToLocationCode=locationInfo.code |
|||
}, |
|||
trigger(e) { |
|||
if (e.item.text == "来源库位") { |
|||
this.openFromLocation() |
|||
} else if (e.item.text == "目标库位") { |
|||
this.openToLocation(); |
|||
|
|||
} else if (e.item.text == "箱码") { |
|||
this.openScanPopup() |
|||
} |
|||
// this.$refs.fab.close(); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="less"> |
|||
.fab { |
|||
::v-deep.uni-icons.uniui-plusempty.fab-circle-icon { |
|||
font-size: 0 !important; |
|||
} |
|||
|
|||
::v-deep.uniui-plusempty:before { |
|||
content: "扫描" !important; |
|||
font-size: 30rpx; |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue