diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index e31e9d53..aa092715 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -103,7 +103,6 @@ return { id: '', receiptJob: {}, - received: false, fromLocationCode: '', isShowPackingCode: true, scanCount: 0, @@ -114,7 +113,8 @@ editInventoryStatus: false, package: {}, //包装 label: {}, //标签 - currentEditItem: {} + currentEditItem: {}, + jobStatus:"" }; }, onLoad(option) { @@ -123,7 +123,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -141,7 +140,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from === 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeCountJob(this.id).then(res => { uni.navigateBack(); @@ -187,6 +186,7 @@ that.showMessage('未获取到详情'); } else { that.jobContent = res.data; + that.jobStatus = res.data.status; that.fromLocationCode = that.jobContent.locationCode; that.subList = res.data.subList; that.detailSource = that.getDataSource(that.subList) diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue index 2c6f06c9..3b282218 100644 --- a/pages/customerReturn/job/returnDetail.vue +++ b/pages/customerReturn/job/returnDetail.vue @@ -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.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) diff --git a/pages/deliver/job/deliverDetail.vue b/pages/deliver/job/deliverDetail.vue index 4781ae03..3bd38488 100644 --- a/pages/deliver/job/deliverDetail.vue +++ b/pages/deliver/job/deliverDetail.vue @@ -104,8 +104,8 @@ detailOptions: [], scanOptions: [], status: "", - received: false, - toLocationCode: "" + toLocationCode: "", + jobStatus:"" }; }, @@ -119,7 +119,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -138,7 +137,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeDeliverJob(this.id).then(res => { uni.navigateBack(); @@ -179,6 +178,8 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status; + that.subList = res.data.subList; that.detailSource = getDataSource(that.detailSource, that.subList) that.toLocationCode = that.subList[0].toLocationCode diff --git a/pages/inspect/job/inspectFullDetail.vue b/pages/inspect/job/inspectFullDetail.vue index 53b517b8..896e6b7c 100644 --- a/pages/inspect/job/inspectFullDetail.vue +++ b/pages/inspect/job/inspectFullDetail.vue @@ -91,7 +91,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -100,6 +99,7 @@ fromInventoryStatuses: "", managementList: [], selectedItem: {}, + jobStatus:"" }; }, onLoad(option) { @@ -108,7 +108,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -127,7 +126,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeInspectJob(this.id).then(res => { uni.navigateBack(); @@ -204,6 +203,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status this.jobContent.failedQty = 0; this.jobContent.crackQty = 0; this.jobContent.notPassedQty = 0; diff --git a/pages/inspect/job/inspectResult.vue b/pages/inspect/job/inspectResult.vue index 7469fd3e..6b2c3548 100644 --- a/pages/inspect/job/inspectResult.vue +++ b/pages/inspect/job/inspectResult.vue @@ -173,7 +173,6 @@ failedReasonArray: [], nextStep: '', submitting: false, - received: false, locations: [], value: ['0'], jobContent: {}, //任务内容 @@ -181,6 +180,7 @@ detailSource: [], //绑定在页面上的数据源 nextActionList: [], nextAction: null, + jobStatus:"" } }, @@ -199,7 +199,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -210,7 +209,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeInspectJob(this.id).then(res => { uni.navigateBack(); @@ -257,6 +256,7 @@ if (res.data.subList.length > 0) { that.jobContent = res.data; that.detailList = res.data.subList; + that.jobStatus = res.data.status that.inspectType = that.jobContent.inspectType; that.jobContent.goodQty = null, //合格数量 that.jobContent.failedQty = null, //不合格数量 diff --git a/pages/inventoryMove/job/inventoryMoveDetail.vue b/pages/inventoryMove/job/inventoryMoveDetail.vue index 56d94ad4..cffccecc 100644 --- a/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -92,7 +92,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -103,7 +102,8 @@ managementList: [], businessTypeCode: '', toLocationCode: '', - toInventoryStatus: '' + toInventoryStatus: '', + jobStatus:"" }; }, props: { @@ -116,7 +116,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -135,7 +134,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeInventoryMoveJob(this.id).then(res => { uni.navigateBack(); @@ -223,6 +222,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) } else { diff --git a/pages/issue/job/issueDetail.vue b/pages/issue/job/issueDetail.vue index a03df905..b0b0c302 100644 --- a/pages/issue/job/issueDetail.vue +++ b/pages/issue/job/issueDetail.vue @@ -95,7 +95,7 @@ detailSource: [], //绑定在页面上的数据源 detailOptions: [], scanOptions: [], - received:false + jobStatus:"" }; }, @@ -109,7 +109,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -128,7 +127,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from === 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeIssueJob(this.id).then(res => { uni.navigateBack(); @@ -192,6 +191,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.detailSource, that.subList) diff --git a/pages/productPutaway/job/productPutawayDetail.vue b/pages/productPutaway/job/productPutawayDetail.vue index b91b5119..48c2a833 100644 --- a/pages/productPutaway/job/productPutawayDetail.vue +++ b/pages/productPutaway/job/productPutawayDetail.vue @@ -102,7 +102,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -112,6 +111,7 @@ toLocationCode: "", toLocationInfo: {}, tolocationTypeList: [], + jobStatus:"" }; }, onLoad(option) { @@ -120,7 +120,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -138,7 +137,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeProductPutawayJob(this.id).then(res => { uni.navigateBack(); @@ -183,6 +182,7 @@ if (res.data.subList.length > 0) { that.jobContent = res.data; that.subList = res.data.subList; + that.jobStatus = res.data.status that.fromLocationCode = that.subList[0].fromLocationCode that.toLocationCode = that.subList[0].toLocationCode that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) diff --git a/pages/productReceipt/job/productReceiptDetail.vue b/pages/productReceipt/job/productReceiptDetail.vue index b4e75298..1d413251 100644 --- a/pages/productReceipt/job/productReceiptDetail.vue +++ b/pages/productReceipt/job/productReceiptDetail.vue @@ -97,7 +97,6 @@ return { id: '', receiptJob: {}, - received: false, toLocationCode: '', isShowPackingCode: true, scanCount: 0, @@ -105,7 +104,8 @@ subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 toLocationTypeList: [], - managementList: [] + managementList: [], + jobStatus:"" }; }, @@ -115,7 +115,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -134,7 +133,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeProductReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -184,6 +183,7 @@ if (res.data.subList.length > 0) { that.jobContent = res.data; that.subList = res.data.subList; + that.jobStatus = res.data.status that.toLocationCode = that.subList[0].toLocationCode that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.detailSource = getDataSource(that.subList) diff --git a/pages/productionReceipt/job/productionReceiptDetail.vue b/pages/productionReceipt/job/productionReceiptDetail.vue index 5d150d08..9bd8015e 100644 --- a/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/pages/productionReceipt/job/productionReceiptDetail.vue @@ -100,7 +100,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -109,6 +108,7 @@ fromLocationCode: "", toLocationCode: "", tolocationTypeList: [], + jobStatus:"" }; }, onLoad(option) { @@ -117,7 +117,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -135,7 +134,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeProductionReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -179,6 +178,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.fromLocationCode = that.subList[0].fromLocationCode that.toLocationCode = that.subList[0].toLocationCode diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue index 2233601c..5542c093 100644 --- a/pages/productionReturn/job/returnDetail.vue +++ b/pages/productionReturn/job/returnDetail.vue @@ -104,7 +104,6 @@ return { id: '', jobContent: {}, - received: false, toLocationCode: '', scanCount: 0, jobContent: {}, //任务内容 @@ -115,7 +114,8 @@ toLocationTypeList: [], toLocationInfo: {}, businessTypeInfo: {}, - titleInfo: "" + titleInfo: "", + jobStatus:"" }; }, onLoad(option) { @@ -124,7 +124,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -142,7 +141,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeProductionReturnJob(this.id).then(res => { uni.navigateBack(); @@ -190,6 +189,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) diff --git a/pages/purchaseReceipt/job/receiptDetail.vue b/pages/purchaseReceipt/job/receiptDetail.vue index abb8f91c..15acf5c7 100644 --- a/pages/purchaseReceipt/job/receiptDetail.vue +++ b/pages/purchaseReceipt/job/receiptDetail.vue @@ -95,7 +95,6 @@ return { id: '', receiptJob: {}, - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -104,7 +103,8 @@ toLocationCode: '', toLocationInfo: {}, businessTypeInfo: {}, - managementList: [] + managementList: [], + jobStatus:"" }; }, onLoad(option) { @@ -113,7 +113,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -131,7 +130,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakePurchaseReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -187,7 +186,8 @@ that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); // that.jobContent.toLocationTypeList = that.toLocationTypeList; that.subList = res.data.subList; - this.toLocationCode = that.subList[0].toLocationCode + that.jobStatus = res.data.status + that.toLocationCode = that.subList[0].toLocationCode that.detailSource = getDataSource(that.subList) } else { that.showMessage('列表数据为0'); diff --git a/pages/purchaseReturn/job/returnDetail.vue b/pages/purchaseReturn/job/returnDetail.vue index dd2b8ca1..fbf9651b 100644 --- a/pages/purchaseReturn/job/returnDetail.vue +++ b/pages/purchaseReturn/job/returnDetail.vue @@ -90,13 +90,13 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 businessTypeInfo: {}, - managementList: [] + managementList: [], + jobStatus:"" }; }, onLoad(option) { @@ -105,7 +105,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -123,7 +122,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakePurchasereturnJob(this.id).then(res => { uni.navigateBack(); @@ -179,6 +178,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.toLocationCode = that.jobContent.toLocationCode that.detailSource = getDataSource(that.subList); diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue index 86b9e627..94086972 100644 --- a/pages/putaway/job/putawayDetail.vue +++ b/pages/putaway/job/putawayDetail.vue @@ -97,7 +97,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -106,6 +105,7 @@ fromLocationCode: "", toLocationCode: "", tolocationTypeList: [], + jobStatus:"" }; }, onLoad(option) { @@ -114,7 +114,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -132,7 +131,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakePutawayJob(this.id).then(res => { uni.navigateBack(); @@ -180,6 +179,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index d87aaee3..10d7b1ea 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -100,7 +100,7 @@ scanOptions: [], toLocationCode: '', tolocationTypeList: [], - received:false, + jobStatus:"" }; }, @@ -114,7 +114,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -133,7 +132,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from === 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeRepleinshJob(this.id).then(res => { uni.navigateBack(); @@ -183,6 +182,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.toLocationCode = that.subList[0].toLocationCode that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) diff --git a/pages/scrap/job/scrapJobDetail.vue b/pages/scrap/job/scrapJobDetail.vue index bedb7caf..f7d26be5 100644 --- a/pages/scrap/job/scrapJobDetail.vue +++ b/pages/scrap/job/scrapJobDetail.vue @@ -86,14 +86,14 @@ return { id: '', receiptJob: {}, - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 toLocationInfo: {}, businessTypeInfo: {}, - managementList: [] + managementList: [], + jobStatus:"" }; }, onLoad(option) { @@ -102,7 +102,6 @@ //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -120,7 +119,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeScrapJob(this.id).then(res => { uni.navigateBack(); @@ -173,6 +172,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) } else { diff --git a/pages/transfer/job/issueDetail.vue b/pages/transfer/job/issueDetail.vue index bd19fe7c..53d1f954 100644 --- a/pages/transfer/job/issueDetail.vue +++ b/pages/transfer/job/issueDetail.vue @@ -92,7 +92,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -100,7 +99,8 @@ toLocationCode: "", businessTypeInfo: {}, managementList: [], - tolocationTypeList:[] + tolocationTypeList:[], + jobStatus:"" }; }, onLoad(option) { @@ -109,7 +109,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -127,7 +126,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeTransferIssueJob(this.id).then(res => { uni.navigateBack(); @@ -182,6 +181,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList =res.data.subList that.detailSource = getDataSource(that.subList) that.fromLocationCode = that.subList[0].fromLocationCode diff --git a/pages/transfer/job/receiptDetail.vue b/pages/transfer/job/receiptDetail.vue index c137c692..ce6ac0d1 100644 --- a/pages/transfer/job/receiptDetail.vue +++ b/pages/transfer/job/receiptDetail.vue @@ -101,7 +101,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -109,7 +108,8 @@ toLocationCode: "", businessTypeInfo: {}, managementList: [], - toLocationTypeList: [] + toLocationTypeList: [], + jobStatus:"" }; }, onLoad(option) { @@ -118,7 +118,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -136,7 +135,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeTransferReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -192,6 +191,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) that.fromLocationCode = that.subList[0].fromLocationCode diff --git a/pages/unPlanned/job/issueJobDetail.vue b/pages/unPlanned/job/issueJobDetail.vue index 1dd2c7a7..5e58f74e 100644 --- a/pages/unPlanned/job/issueJobDetail.vue +++ b/pages/unPlanned/job/issueJobDetail.vue @@ -87,13 +87,13 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 businessTypeInfo: {}, - managementList: [] + managementList: [], + jobStatus:"" }; }, onLoad(option) { @@ -102,7 +102,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -120,7 +119,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeUnPlannedIssueJob(this.id).then(res => { uni.navigateBack(); @@ -167,6 +166,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.subList) } else { diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index a6ef8a8f..91d5c1f4 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -88,7 +88,6 @@ data() { return { id: '', - received: false, scanCount: 0, jobContent: {}, //任务内容 subList: [], //接口返回的任务subList @@ -97,7 +96,8 @@ toLocationCode: '', toLocationInfo: {}, businessTypeInfo: {}, - managementList: [] + managementList: [], + jobStatus:"" }; }, onLoad(option) { @@ -106,7 +106,6 @@ // //新建的任务自动接收 if (option.status == "1") { this.receive((callback => { - this.received = true; this.getDetail(); })); } else { @@ -124,7 +123,7 @@ onBackPress(e) { //已经接收但是没提交任务 if (e.from == 'backbutton') { - if (this.received) { + if (this.jobStatus=="2") { //取消承接任务 cancleTakeUnPlannedReceiptJob(this.id).then(res => { uni.navigateBack(); @@ -167,6 +166,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobStatus = res.data.status that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); that.subList = res.data.subList; this.toLocationCode = that.subList[0].toLocationCode