|
|
@ -1,9 +1,10 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
|
<job-filter ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" |
|
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
|
:checkedWaitTask="checkedWaitTask"> |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" ref="filter" otherTitle="" |
|
|
|
@switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" |
|
|
|
:checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" |
|
|
|
@fromLocationCode="fromLocationCode"> |
|
|
|
</job-filter> |
|
|
|
<view v-if="jobList.length>0"> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
@ -110,7 +111,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getList(type) { |
|
|
|
getList(type, fromLocationCode = '', productionLineCode = '') { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -137,6 +138,23 @@ |
|
|
|
value: this.status |
|
|
|
}) |
|
|
|
|
|
|
|
if (fromLocationCode != '') { |
|
|
|
// 来源库位 |
|
|
|
filters.push({ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: fromLocationCode |
|
|
|
}) |
|
|
|
} |
|
|
|
if (productionLineCode != '') { |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
|
column: "productionLineCode", |
|
|
|
action: "==", |
|
|
|
value: productionLineCode |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: this.pageNo, |
|
|
@ -169,7 +187,14 @@ |
|
|
|
that.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
fromLocationCode(fromLocationCode) { |
|
|
|
console.log('fromLocationCode', fromLocationCode) |
|
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
|
}, |
|
|
|
productionLineCode(productionLineCode) { |
|
|
|
console.log('productionLineCode', productionLineCode) |
|
|
|
this.getList('refresh', '', productionLineCode) |
|
|
|
}, |
|
|
|
getByAsnNumber(code) { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
@ -229,12 +254,12 @@ |
|
|
|
|
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
|
if(res.data){ |
|
|
|
if (res.data) { |
|
|
|
this.getList("refresh") |
|
|
|
uni.showToast({ |
|
|
|
title:"放弃任务成功" |
|
|
|
title: "放弃任务成功" |
|
|
|
}) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.showMessage("放弃任务失败") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|