diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js index 037e14097..9983b715f 100644 --- a/fe/PDA/api/index.js +++ b/fe/PDA/api/index.js @@ -1672,6 +1672,20 @@ export const injectionIssuePlanRequest = (params) => request( data: params, method: "post" }) + +//注塑计划 申请 类别获取详情 +export const injectionIssuePlanRequestItemCategory = (categoryName) => request( + devUrl + "/api/pda/store/injection-plan-request/list/item-category?categoryName="+categoryName, { // + data: {}, + method: "get" + }) + +//注塑计划 申请分类 +export const injectionIssuePlanRequestItemCategoryName = () => request( + devUrl + "/api/pda/store/injection-plan-request/item-category-name", { // + data: {}, + method: "get" + }) //注塑计划任务列表 export const getInjectionPlanJobList = (params) => request( diff --git a/fe/PDA/pages.js b/fe/PDA/pages.js index 452032e98..a3dd5ea14 100644 --- a/fe/PDA/pages.js +++ b/fe/PDA/pages.js @@ -772,21 +772,21 @@ module.exports = () => ({ { "path": "pages/request/injectionPlanRequest", "style": { - "navigationBarTitleText": "注塑计划申请", + "navigationBarTitleText": "涂装上线计划申请", "enablePullDownRefresh": false } }, { "path": "pages/task/injectionPlanJob", "style": { - "navigationBarTitleText": "注塑计划任务", + "navigationBarTitleText": "涂装上线计划任务", "enablePullDownRefresh": false } }, { "path": "pages/task/injectionPlanJobDetail", "style": { - "navigationBarTitleText": "注塑计划任务详情", + "navigationBarTitleText": "涂装上线计划任务详情", "enablePullDownRefresh": false } }, diff --git a/fe/PDA/pages.json b/fe/PDA/pages.json index d9ca0d6ed..c11278241 100644 --- a/fe/PDA/pages.json +++ b/fe/PDA/pages.json @@ -760,21 +760,21 @@ { "path": "pages/request/injectionPlanRequest", "style": { - "navigationBarTitleText": "注塑计划申请", + "navigationBarTitleText": "涂装上线计划申请", "enablePullDownRefresh": false } }, { "path": "pages/task/injectionPlanJob", "style": { - "navigationBarTitleText": "注塑计划任务", + "navigationBarTitleText": "涂装上线计划任务", "enablePullDownRefresh": false } }, { "path": "pages/task/injectionPlanJobDetail", "style": { - "navigationBarTitleText": "注塑计划任务详情", + "navigationBarTitleText": "涂装上线计划任务详情", "enablePullDownRefresh": false } }, diff --git a/fe/PDA/pages/request/assembleIssueRequestList.vue b/fe/PDA/pages/request/assembleIssueRequestList.vue index f018d4961..26f4e5406 100644 --- a/fe/PDA/pages/request/assembleIssueRequestList.vue +++ b/fe/PDA/pages/request/assembleIssueRequestList.vue @@ -118,8 +118,11 @@ }) var isHaveNewJob = await isAssembleHasNewJob(item.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - this.getList('refresh') + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + this.getList('refresh') + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/assembleIssueRequestListDetail.vue b/fe/PDA/pages/request/assembleIssueRequestListDetail.vue index 9af1e1ce4..43322f660 100644 --- a/fe/PDA/pages/request/assembleIssueRequestListDetail.vue +++ b/fe/PDA/pages/request/assembleIssueRequestListDetail.vue @@ -193,8 +193,12 @@ }) var isHaveNewJob = await isAssembleHasNewJob(this.datacontent.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - navigateBack(1) + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + navigateBack(1) + } + }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/coatingIssueRequestList.vue b/fe/PDA/pages/request/coatingIssueRequestList.vue index d2c71be78..25147c613 100644 --- a/fe/PDA/pages/request/coatingIssueRequestList.vue +++ b/fe/PDA/pages/request/coatingIssueRequestList.vue @@ -117,8 +117,11 @@ }) var isHaveNewJob = await isCoatingHasNewJob(item.number, isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - this.getList('refresh') + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + this.getList('refresh') + } } catch (error) { uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/coatingIssueRequestListDetail.vue b/fe/PDA/pages/request/coatingIssueRequestListDetail.vue index 2f12f79c0..0b93ac8f5 100644 --- a/fe/PDA/pages/request/coatingIssueRequestListDetail.vue +++ b/fe/PDA/pages/request/coatingIssueRequestListDetail.vue @@ -193,8 +193,11 @@ }) var isHaveNewJob = await isCoatingHasNewJob(this.datacontent.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - navigateBack(1) + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + navigateBack(1) + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/injectionIssueRequestList.vue b/fe/PDA/pages/request/injectionIssueRequestList.vue index 5da72237d..765949b53 100644 --- a/fe/PDA/pages/request/injectionIssueRequestList.vue +++ b/fe/PDA/pages/request/injectionIssueRequestList.vue @@ -118,8 +118,11 @@ }) var isHaveNewJob = await isInjectionHasNewJob(item.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - this.getList('refresh') + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + this.getList('refresh') + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/injectionIssueRequestListDetail.vue b/fe/PDA/pages/request/injectionIssueRequestListDetail.vue index 0b0731ec5..6f3f5662e 100644 --- a/fe/PDA/pages/request/injectionIssueRequestListDetail.vue +++ b/fe/PDA/pages/request/injectionIssueRequestListDetail.vue @@ -193,8 +193,11 @@ }) var isHaveNewJob = await isInjectionHasNewJob(this.datacontent.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - navigateBack(1) + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + navigateBack(1) + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/injectionPlanRequest.vue b/fe/PDA/pages/request/injectionPlanRequest.vue index 2178e13b3..dc0710153 100644 --- a/fe/PDA/pages/request/injectionPlanRequest.vue +++ b/fe/PDA/pages/request/injectionPlanRequest.vue @@ -3,9 +3,18 @@ - - + + + + + {{item}} + + + + + @@ -15,8 +24,8 @@ - + @@ -41,6 +50,8 @@ import { injectionIssuePlanRequest, getItemCategoryList, + injectionIssuePlanRequestItemCategoryName, + injectionIssuePlanRequestItemCategory, locations } from '@/api/index.js'; @@ -65,14 +76,14 @@ }, data() { return { - items: ['保险杠', '轮眉', '车门装饰板'], + tabs: [], current: 0, pageSize: this.modelConfig, pageIndex: 1, loadingType: "nomore", - dataList: [], showList: [], - toLocationInfo: null + toLocationInfo: null, + tabIndex:0 }; }, filters: { @@ -83,23 +94,7 @@ onShow() {}, onLoad() { - uni.showLoading({ - title:"加载中", - mask:true - }) - getItemCategoryList().then(res => { - uni.hideLoading() - this.dataList = res; - this.dataList.forEach(res => { - res.checked = true; - }) - this.onClickItem({ - currentIndex: 0 - }) - }).catch(error => { - uni.hideLoading() - this.showMessage("获取分类信息失败"+error) - }) + this.getCategoryListName(); }, onReachBottom() {}, onPullDownRefresh() {}, @@ -120,6 +115,41 @@ } }, methods: { + getCategoryListName(){ + uni.showLoading({ + title: "加载中", + mask: true + }) + injectionIssuePlanRequestItemCategoryName().then(res => { + uni.hideLoading() + if(res.length==0){ + this.showMessage("获取分类信息失败,请在字典中维护") + }else { + this.tabs = res; + this.getCategoryList(this.tabs[0]) + } + this.tabIndex=0 + + }).catch(error => { + uni.hideLoading() + this.showMessage("获取分类信息失败" + error) + }) + }, + getCategoryList(categoryName){ + injectionIssuePlanRequestItemCategory(categoryName).then(res => { + uni.hideLoading() + if(res.length==0){ + this.showMessage("获取["+categoryName+"]信息失败,请在字典中维护") + }else { + this.showList = res; + } + + }).catch(error => { + uni.hideLoading() + this.showMessage("获取["+categoryName+"]信息失败,"+error) + }) + }, + clearDefaultLocation() { this.toLocationInfo = null }, @@ -151,18 +181,6 @@ item.checked = true; this.$forceUpdate() }, - onClickItem(item) { - if (item.currentIndex == 0) { - this.showList = this.dataList.filter(res => res.category == "保险杠") - } else if (item.currentIndex == 1) { - this.showList = this.dataList.filter(res => res.category == "轮眉") - } else if (item.currentIndex == 2) { - this.showList = this.dataList.filter(res => res.category == "车门装饰板") - } - this.showList.forEach(res => { - res.checked = false; - }) - }, //查询发货任务 showMessage(message) { @@ -172,22 +190,25 @@ this.$refs.comMessage.showCommitSuccess(); }, clearData() { - this.onClickItem({ - currentIndex: 0 - }) + this.tabs=[] + this.current=0 + this.showList= [] + this.toLocationInfo = null, + this.tabIndex = 0 + }, submit(item) { - var checked = this.showList.filter(r=>r.checked) - if (checked.length==0) { + var checked = this.showList.filter(r => r.checked) + if (checked.length == 0) { this.showMessage("请选择零件") return; - } - + } + if (this.toLocationInfo == null) { this.showMessage("请先扫描目标库位") return; } - + uni.showLoading({ title: "提交中...", @@ -206,8 +227,8 @@ remark: "", itemCode: checked[0].code, itemName: checked[0].name, - itemDesc1: checked[0].desc1, - itemDesc2: checked[0].desc2, + itemDesc1: checked[0].desc1, + itemDesc2: checked[0].desc2, uom: checked[0].basicUom, qty: 1, stdPackQty: checked[0].stdPackQty, @@ -222,13 +243,14 @@ } params.details.push(item) console.log("测试", JSON.stringify(params)); - injectionIssuePlanRequest( params) + injectionIssuePlanRequest(params) .then(res => { uni.hideLoading(); if (res) { this.showCommitSuccessMessage(); this.clearData(); - }else { + this.getCategoryListName(); + } else { this.showMessage("提交失败"); } }) @@ -237,6 +259,58 @@ uni.hideLoading(); }); }, + ontabtap(e){ + let index = e.target.dataset.current || e.currentTarget.dataset.current; + if (this.tabIndex == index) { + return; + } + this.tabIndex = index; + this.getCategoryList(this.tabs[index]) + } } }; - \ No newline at end of file + + \ No newline at end of file diff --git a/fe/PDA/pages/request/kittingIssueRequestList.vue b/fe/PDA/pages/request/kittingIssueRequestList.vue index 48fe8dd7e..b6ad1a3bc 100644 --- a/fe/PDA/pages/request/kittingIssueRequestList.vue +++ b/fe/PDA/pages/request/kittingIssueRequestList.vue @@ -118,8 +118,11 @@ }) var isHaveNewJob = await iskittingHasNewJob(item.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - this.getList('refresh') + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + this.getList('refresh') + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/kittingIssueRequestListDetail.vue b/fe/PDA/pages/request/kittingIssueRequestListDetail.vue index 97e6f9d36..01d37a3f5 100644 --- a/fe/PDA/pages/request/kittingIssueRequestListDetail.vue +++ b/fe/PDA/pages/request/kittingIssueRequestListDetail.vue @@ -193,8 +193,11 @@ }) var isHaveNewJob = await iskittingHasNewJob(this.datacontent.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - navigateBack(1) + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + navigateBack(1) + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/sparePartIssueRequestList.vue b/fe/PDA/pages/request/sparePartIssueRequestList.vue index 4460a924b..28788e19c 100644 --- a/fe/PDA/pages/request/sparePartIssueRequestList.vue +++ b/fe/PDA/pages/request/sparePartIssueRequestList.vue @@ -118,8 +118,11 @@ }) var isHaveNewJob = await isSparePartHasNewJob(item.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - this.getList('refresh') + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + this.getList('refresh') + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/request/sparePartIssueRequestListDetail.vue b/fe/PDA/pages/request/sparePartIssueRequestListDetail.vue index 0d0272644..87e7fe43d 100644 --- a/fe/PDA/pages/request/sparePartIssueRequestListDetail.vue +++ b/fe/PDA/pages/request/sparePartIssueRequestListDetail.vue @@ -193,8 +193,11 @@ }) var isHaveNewJob = await isSparePartHasNewJob(this.datacontent.number,isHaveNewJobList) uni.hideLoading() - this.showMessage(isHaveNewJob) - navigateBack(1); + if(isHaveNewJob.includes("无任务")){ + this.showMessage(isHaveNewJob) + }else { + navigateBack(1) + } }catch(error){ uni.hideLoading() this.showMessage(error) diff --git a/fe/PDA/pages/task/assembleIssueJobDetail.vue b/fe/PDA/pages/task/assembleIssueJobDetail.vue index 886039572..8f1037785 100644 --- a/fe/PDA/pages/task/assembleIssueJobDetail.vue +++ b/fe/PDA/pages/task/assembleIssueJobDetail.vue @@ -372,26 +372,33 @@ }); }, - setReceived(){ + setReceived() { //是否承接 //已经承接 - if(this.datacontent.isClaims){ + if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 - if(this.datacontent.claimsUserId==localStorage.getItem('userId')) { - this.showBtn=true - }else { - this.showBtn=false + if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { + this.showBtn = true + } else { + this.showBtn = false } - - }else { + } else { //未承接,调用承接接口,承接成功后显示按钮 - this.receive((callback => { - if(callback){ - this.showBtn=true - }else { - this.showBtn=false - } - })); + this.receive((callback => { + if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 + this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') + } else { + this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" + } + })); } }, diff --git a/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue b/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue index b8f912437..c37fa7364 100644 --- a/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue +++ b/fe/PDA/pages/task/assembleIssueJobDetailByQty.vue @@ -350,20 +350,27 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true } else { this.showBtn = false } - } else { //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/coatingIssuleJobDetail.vue b/fe/PDA/pages/task/coatingIssuleJobDetail.vue index 39f7f4a4d..d2d5c6e48 100644 --- a/fe/PDA/pages/task/coatingIssuleJobDetail.vue +++ b/fe/PDA/pages/task/coatingIssuleJobDetail.vue @@ -375,26 +375,33 @@ }); }, - setReceived(){ + setReceived() { //是否承接 //已经承接 - if(this.datacontent.isClaims){ + if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 - if(this.datacontent.claimsUserId==localStorage.getItem('userId')) { - this.showBtn=true - }else { - this.showBtn=false + if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { + this.showBtn = true + } else { + this.showBtn = false } - - }else { + } else { //未承接,调用承接接口,承接成功后显示按钮 - this.receive((callback => { - if(callback){ - this.showBtn=true - }else { - this.showBtn=false - } - })); + this.receive((callback => { + if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 + this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') + } else { + this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" + } + })); } }, diff --git a/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue b/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue index 45c249049..40675fd65 100644 --- a/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue +++ b/fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue @@ -359,26 +359,33 @@ }); }, - setReceived(){ + setReceived() { //是否承接 //已经承接 - if(this.datacontent.isClaims){ + if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 - if(this.datacontent.claimsUserId==localStorage.getItem('userId')) { - this.showBtn=true - }else { - this.showBtn=false + if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { + this.showBtn = true + } else { + this.showBtn = false } - - }else { + } else { //未承接,调用承接接口,承接成功后显示按钮 - this.receive((callback => { - if(callback){ - this.showBtn=true - }else { - this.showBtn=false - } - })); + this.receive((callback => { + if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 + this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') + } else { + this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" + } + })); } }, getScanResult(result) { diff --git a/fe/PDA/pages/task/injectionIssueJobDetail.vue b/fe/PDA/pages/task/injectionIssueJobDetail.vue index 510d85ad6..2b257c58b 100644 --- a/fe/PDA/pages/task/injectionIssueJobDetail.vue +++ b/fe/PDA/pages/task/injectionIssueJobDetail.vue @@ -381,6 +381,7 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus = 2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true @@ -392,9 +393,16 @@ //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/injectionIssueJobDetailByQty.vue b/fe/PDA/pages/task/injectionIssueJobDetailByQty.vue index e6141d16a..4f8d58242 100644 --- a/fe/PDA/pages/task/injectionIssueJobDetailByQty.vue +++ b/fe/PDA/pages/task/injectionIssueJobDetailByQty.vue @@ -346,6 +346,7 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus = 2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true @@ -356,9 +357,16 @@ //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/kittingIssueJobDetail.vue b/fe/PDA/pages/task/kittingIssueJobDetail.vue index cf12cfd4d..a71f3616e 100644 --- a/fe/PDA/pages/task/kittingIssueJobDetail.vue +++ b/fe/PDA/pages/task/kittingIssueJobDetail.vue @@ -375,20 +375,27 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true } else { this.showBtn = false } - } else { //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue b/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue index 7a392ae58..62804bfbe 100644 --- a/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue +++ b/fe/PDA/pages/task/kittingIssueJobDetailByQty.vue @@ -348,20 +348,27 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true } else { this.showBtn = false } - } else { //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/sparePartIssueJobDetail.vue b/fe/PDA/pages/task/sparePartIssueJobDetail.vue index c2c6f7032..cb925aeca 100644 --- a/fe/PDA/pages/task/sparePartIssueJobDetail.vue +++ b/fe/PDA/pages/task/sparePartIssueJobDetail.vue @@ -375,20 +375,27 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true } else { this.showBtn = false } - } else { //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); } diff --git a/fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue b/fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue index 0331609e6..ef6efc0e8 100644 --- a/fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue +++ b/fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue @@ -346,20 +346,27 @@ //是否承接 //已经承接 if (this.datacontent.isClaims) { + this.datacontent.jobStatus =2 //承接并且承接人是自己显示,不是自己隐藏 if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { this.showBtn = true } else { this.showBtn = false } - } else { //未承接,调用承接接口,承接成功后显示按钮 this.receive((callback => { if (callback) { + this.datacontent.isClaims = true; + this.datacontent.jobStatus = 2 this.showBtn = true + this.datacontent.claimsUserName = localStorage.getItem('userName') + this.datacontent.claimsUserId = localStorage.getItem('userId') } else { this.showBtn = false + this.datacontent.isClaims = false; + this.datacontent.jobStatus = 1 + this.datacontent.claimsUserId = "" } })); }