|
|
@ -82,7 +82,6 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
id: '', |
|
|
|
received: false, |
|
|
|
scanCount: 0, |
|
|
|
jobContent: {}, //任务内容 |
|
|
|
subList: [], //接口返回的任务subList |
|
|
@ -92,6 +91,7 @@ |
|
|
|
toLocationCode: "", |
|
|
|
toLocationInfo: {}, |
|
|
|
tolocationTypeList: [], |
|
|
|
jobStatus:"" |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -100,7 +100,6 @@ |
|
|
|
//新建的任务自动接收 |
|
|
|
if (option.status == "1") { |
|
|
|
this.receive((callback => { |
|
|
|
this.received = true; |
|
|
|
this.getDetail(); |
|
|
|
})); |
|
|
|
} else { |
|
|
@ -118,7 +117,7 @@ |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
|
if (e.from == 'backbutton') { |
|
|
|
if (this.received) { |
|
|
|
if (this.jobStatus=="2") { |
|
|
|
//取消承接任务 |
|
|
|
cancleTakeCustomerReturnJob(this.id).then(res => { |
|
|
|
uni.navigateBack(); |
|
|
@ -167,8 +166,9 @@ |
|
|
|
if (res.data.subList.length > 0) { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.subList = res.data.subList; |
|
|
|
that.detailSource = getDataSource(that.subList) |
|
|
|
that.jobStatus = res.data.status |
|
|
|
|
|
|
|
that.detailSource = getDataSource(that.subList) |
|
|
|
that.fromLocationCode = that.subList[0].fromLocationCode |
|
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
|
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
|