|
@ -1,9 +1,16 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
<!-- <job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true" |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true" |
|
|
:checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode"> |
|
|
:checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode"> |
|
|
|
|
|
</job-filter> --> |
|
|
|
|
|
|
|
|
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
|
|
|
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" |
|
|
|
|
|
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" |
|
|
|
|
|
:isShowItemCode="true" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode" |
|
|
|
|
|
@onQuery="getListByFilter"> |
|
|
</job-filter> |
|
|
</job-filter> |
|
|
<view v-if="jobList.length>0"> |
|
|
<view v-if="jobList.length>0"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
@ -95,6 +102,8 @@ |
|
|
scanBalance: {}, |
|
|
scanBalance: {}, |
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
|
|
|
productionLineCode:"", |
|
|
|
|
|
productionlineList:[] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -146,7 +155,7 @@ |
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.businessType = res.businessType; |
|
|
this.businessType = res.businessType; |
|
|
this.fromInventoryStatuses =res.fromInventoryStatuses.split(','); |
|
|
this.fromInventoryStatuses = res.fromInventoryStatuses.split(','); |
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
|
|
// this.openScanPopup(); |
|
|
// this.openScanPopup(); |
|
|
} else { |
|
|
} else { |
|
@ -231,12 +240,86 @@ |
|
|
that.showMessage(error) |
|
|
that.showMessage(error) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getListByFilter(params) { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
var filters = [] |
|
|
|
|
|
if (this.checkedToday) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "create_time", |
|
|
|
|
|
action: "betweeen", |
|
|
|
|
|
value: this.todayTime |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: this.status |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (params.fromLocationCode) { |
|
|
|
|
|
// 来源库位 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "fromLocationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: params.fromLocationCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (params.productionLine) { |
|
|
|
|
|
// 生产线 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "productionLineCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: params.productionLine |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (params.itemCode) { |
|
|
|
|
|
// 生产线 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "like", |
|
|
|
|
|
value: params.itemCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
} |
|
|
|
|
|
getRepleinshJobList(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (res.data.total == 0) { |
|
|
|
|
|
that.showMessage('未查找到补料任务'); |
|
|
|
|
|
} else if (res.data.total == 1) { |
|
|
|
|
|
that.openJobDetail(res.data.list[0]); |
|
|
|
|
|
} else { |
|
|
|
|
|
that.showItemList(res.data.list); |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
|
|
|
|
that.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fromLocationCode(fromLocationCode) { |
|
|
fromLocationCode(fromLocationCode) { |
|
|
console.log('fromLocationCode', fromLocationCode) |
|
|
console.log('fromLocationCode', fromLocationCode) |
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openJobDetail(item, scanMessage='') { |
|
|
openJobDetail(item, scanMessage = '') { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' + |
|
|
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' + |
|
|
scanMessage + '&title=' + this.title |
|
|
scanMessage + '&title=' + this.title |
|
@ -245,7 +328,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
showItemList(itemList) { |
|
|
this.$refs.scanList.openPopup(itemList); |
|
|
this.$refs.jobListPopup.openPopup(itemList); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectedItem(item) { |
|
|
selectedItem(item) { |
|
|