|
@ -3,13 +3,14 @@ |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
:checkedWaitTask="checkedWaitTask"> |
|
|
:checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" |
|
|
|
|
|
@productionLineCode="productionLineCode" |
|
|
|
|
|
:productionline="productionLineList"> |
|
|
</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"> |
|
|
<view v-for="(item, index) in jobList" :key="index"> |
|
|
<view v-for="(item, index) in jobList" :key="index"> |
|
|
<uni-swipe-action-item |
|
|
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" |
|
|
:right-options="item.status=='2'?detailGiveupOptions:detailOptions" |
|
|
|
|
|
@click="swipeClick($event,item)"> |
|
|
@click="swipeClick($event,item)"> |
|
|
<com-production-job-card :dataContent="item" @click='openJobDetail(item)'> |
|
|
<com-production-job-card :dataContent="item" @click='openJobDetail(item)'> |
|
|
</com-production-job-card> |
|
|
</com-production-job-card> |
|
@ -32,7 +33,8 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getProductionReceiptJobList, |
|
|
getProductionReceiptJobList, |
|
|
cancleTakeProductionReceiptJob |
|
|
cancleTakeProductionReceiptJob, |
|
|
|
|
|
getIssueJobByProductionline |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -81,15 +83,18 @@ |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
title: '', |
|
|
title: '', |
|
|
scanMessage:"" |
|
|
scanMessage: "", |
|
|
|
|
|
productionLineList: [], |
|
|
|
|
|
productionLine:"" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
this.title = option.title |
|
|
this.title = option.title |
|
|
|
|
|
this.getIssueJobByProductionline() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getList('refresh'); |
|
|
this.getList('refresh', this.productionLine); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onReady() { |
|
|
onReady() { |
|
@ -102,11 +107,11 @@ |
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.getList("more"); |
|
|
this.getList("more", this.productionLine); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.getList('refresh'); |
|
|
this.getList('refresh', this.productionLine); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//后退按钮 |
|
|
//后退按钮 |
|
@ -129,7 +134,28 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
getList(type) { |
|
|
productionLineCode(productionLineCode) { |
|
|
|
|
|
this.productionLine = productionLineCode |
|
|
|
|
|
this.getList('refresh', this.productionLine) |
|
|
|
|
|
}, |
|
|
|
|
|
getIssueJobByProductionline() { |
|
|
|
|
|
getIssueJobByProductionline().then(res => { |
|
|
|
|
|
console.log('生产线', res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
|
|
|
this.productionLineList = res.data.map(item => ({ |
|
|
|
|
|
value: item.value, |
|
|
|
|
|
text: item.name |
|
|
|
|
|
})) |
|
|
|
|
|
this.productionLineList.unshift({ |
|
|
|
|
|
value: "", |
|
|
|
|
|
text: "全部" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.productionLineList = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getList(type, productionLine = '') { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -161,6 +187,16 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.$store.state.user.id |
|
|
value: this.$store.state.user.id |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (productionLine) { |
|
|
|
|
|
// 生产线 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "productionLineCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: productionLine |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
@ -198,7 +234,8 @@ |
|
|
|
|
|
|
|
|
openJobDetail(item, scanMessage = '') { |
|
|
openJobDetail(item, scanMessage = '') { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + scanMessage +'&title='+this.title |
|
|
url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status + |
|
|
|
|
|
'&scanMessage=' + scanMessage + '&title=' + this.title |
|
|
}); |
|
|
}); |
|
|
this.scanMessage = "" |
|
|
this.scanMessage = "" |
|
|
}, |
|
|
}, |
|
@ -231,7 +268,7 @@ |
|
|
cancleJob(id) { |
|
|
cancleJob(id) { |
|
|
cancleTakeProductionReceiptJob(id).then(res => { |
|
|
cancleTakeProductionReceiptJob(id).then(res => { |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.getList("refresh") |
|
|
this.getList("refresh", this.productionLine) |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "放弃任务成功" |
|
|
title: "放弃任务成功" |
|
|
}) |
|
|
}) |
|
@ -246,13 +283,13 @@ |
|
|
switchChangeToday(state, creationTime) { |
|
|
switchChangeToday(state, creationTime) { |
|
|
this.checkedToday = state; |
|
|
this.checkedToday = state; |
|
|
this.todayTime = creationTime; |
|
|
this.todayTime = creationTime; |
|
|
this.getList("refresh"); |
|
|
this.getList("refresh", this.productionLine); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
switchChangeWait(state, jobStatus) { |
|
|
this.checkedWaitTask = state; |
|
|
this.checkedWaitTask = state; |
|
|
this.status = jobStatus; |
|
|
this.status = jobStatus; |
|
|
this.getList("refresh"); |
|
|
this.getList("refresh"), this.productionLine; |
|
|
}, |
|
|
}, |
|
|
getScanNumber(code) { |
|
|
getScanNumber(code) { |
|
|
this.getDataListByType(code) |
|
|
this.getDataListByType(code) |
|
|