From 0eab6dcc163bec041d44bc27c9c89ef9c6ec988d Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 26 九月 2024 17:17:39 +0800 Subject: [PATCH] feat:确认装卸bug提交 --- pages/login/userPassword.vue | 23 +++++++++++ pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue | 2 pages/loadUnload-page/historyOrder/index.vue | 16 +++++++- pages/loadUnload-page/selectTarget/selectTarget.vue | 42 ++++++++++++--------- pages/tabbar-page/index-tabbar/index-tabbar.vue | 4 +- pages/loadUnload-page/orderPlanList/index.vue | 3 - 6 files changed, 64 insertions(+), 26 deletions(-) diff --git a/pages/loadUnload-page/historyOrder/index.vue b/pages/loadUnload-page/historyOrder/index.vue index 9600088..9e034e6 100644 --- a/pages/loadUnload-page/historyOrder/index.vue +++ b/pages/loadUnload-page/historyOrder/index.vue @@ -392,13 +392,25 @@ uni.showLoading({ title: '鍔犺浇涓�' }); - this.$reqGet('getHistoryTaskCoalList', { startTime: this.first, endTime: this.last,bunkerIds:this.bunkerIds,userId:this.userId }).then(res => { + this.$reqGet('getHistoryTaskCoalList', { startTime: this.first, endTime: this.last,bunkerIds:this.bunkerIds,userId:this.userId,productIds:uni.getStorageSync('productIds') }).then(res => { console.log(res.data,'res.data'); - this.filterList = this.taskList = res.data; + this.filterList = this.taskList = res.data.map(item=>{ + if(!item.carNum){ + item.carNum = 0; + } + if(!item.weight){ + item.weight = 0; + } + if(!item.number){ + item.number = 0; + } + return item; + }); // this.totalLength = res.data.carNum; // this.totalTon = res.data.weight; // this.tmNum = res.data.number; if (this.filterList.length != 0) { + console.log(this.filterList,'fis') this.totalLength = this.filterList.reduce((x, y) => x + y.carNum,0); this.totalTon = this.filterList.reduce((x, y) => new BigNumber(x).plus( y.weight),0).toFixed(2); this.tmNum = this.filterList.reduce((x, y) => x + y.number,0); diff --git a/pages/loadUnload-page/orderPlanList/index.vue b/pages/loadUnload-page/orderPlanList/index.vue index b0f2da2..8f335fd 100644 --- a/pages/loadUnload-page/orderPlanList/index.vue +++ b/pages/loadUnload-page/orderPlanList/index.vue @@ -168,7 +168,7 @@ init(){ console.log('init',localStorage.getItem('bunkerIds')) uni.showLoading({ title: '鍔犺浇涓�...' }) - this.$reqGet('getMyPlanListByBunkerId',{bunkerIds:localStorage.getItem('bunkerIds'),isYuyue:this.isYuyue}).then((res) => { + this.$reqGet('getMyPlanListByBunkerId',{bunkerIds:localStorage.getItem('bunkerIds'),isYuyue:this.isYuyue,productIds:uni.getStorageSync('productIds') }).then((res) => { console.log(res,'res') this.orderPlanList = res.data; uni.hideLoading(); @@ -253,7 +253,6 @@ flex-direction: column; .collection-form-item{ width: 95%; - height: 400rpx; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); margin: 20rpx 0; .formTop{ diff --git a/pages/loadUnload-page/selectTarget/selectTarget.vue b/pages/loadUnload-page/selectTarget/selectTarget.vue index 71c98ac..5f92bde 100644 --- a/pages/loadUnload-page/selectTarget/selectTarget.vue +++ b/pages/loadUnload-page/selectTarget/selectTarget.vue @@ -519,7 +519,7 @@ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�', '杩斿洖鍔犲噺鍚�', '瓒呮椂', '鎵撳嵃涓�', '鎵撳嵃涓�', '濉啓', '鏀剧┖纭涓�', '瓒呮渶澶ф瘺閲嶇‘璁や腑','琛ユ墦','鍏ュ満妫�鏌�','璐ㄦ涓�', '绂诲満妫�鏌�','宸叉墦鍗�','瑁呭嵏','杩斿洖鍔犲噺鍚ㄧ‘璁や腑' ], - isCleanFlag:'0', + isCleanFlag:'1', dataForm: { firstClass: "", secondClass: "", @@ -597,7 +597,7 @@ }, //鑾峰彇宸茶鍗告敹鍙戝崟 getTodayOrder(){ - this.$reqGet('getTodayConfirmedTaskCoalList',{ bunkerIds:this.dataForm.bunkerIds }).then(res=>{ + this.$reqGet('getTodayConfirmedTaskCoalList',{ bunkerIds:this.dataForm.bunkerIds,productIds:uni.getStorageSync('productIds')}).then(res=>{ if(res.code === 0){ this.historyData = res.data; }else{ @@ -654,7 +654,7 @@ uni.showLoading({ title:'鍔犺浇涓�' }) - this.$reqGet('getTaskCoalListByBunkerId', { bunkerIds:this.dataForm.bunkerIds }).then(res => { + this.$reqGet('getTaskCoalListByBunkerId', { bunkerIds:this.dataForm.bunkerIds, productIds:uni.getStorageSync('productIds')}).then(res => { uni.hideLoading(); if (res.code === 0) { this.detailData = res.data.map(item=>{ @@ -742,11 +742,8 @@ this.isClean = true; this.isNumOk = false; this.isFlagNum = false; - }else{ - this.isNumOk = false; - this.isClean = false; - this.isFlagNum = false; } + //鑱氭隘涔欑儻鏍戣剛 if(parintItem.orderType ==='澶栭攢' && (/鑱氭隘涔欑儻鏍戣剛/.test(item.productName) || item.productName === 'PVC') && (item.packingType === 3 || item.packingType === 4)){ this.isNumOk = false; @@ -763,22 +760,31 @@ } // //pvc澶у寘鑷姩璁$畻鎶樺惃 - if((/鑱氭隘涔欑儻鏍戣剛/.test(item.productName) || item.productName === 'PVC') && item.packingType === 5){ - this.isNumOk = false; - this.isClean = false; - this.isFlagNum = true; - } + if(parintItem.orderType === '澶栬喘'){ this.isEmptyCar = '1'; }else if(parintItem.orderType === '澶栭攢' || parintItem.orderType === '澶栬喘閫�'){ this.isEmptyCar = '0'; } - - //澶栭攢涓嶇敤 杈撳叆鎶樺惃 - if(parintItem.orderType ==='澶栭攢'){ - this.isClean = false; - + if(item.isWeight === 1){ + this.isNumOk = false; + this.isClean = true; + this.isFlagNum = false; + }else{ + this.isNumOk = true; + this.isClean = false; + this.isFlagNum = false; } + if((/鑱氭隘涔欑儻鏍戣剛/.test(item.productName) || item.productName === 'PVC') && item.packingType === 5){ + this.isNumOk = false; + this.isClean = false; + this.isFlagNum = true; + } + //澶栭攢涓嶇敤 杈撳叆鎶樺惃 + // if(parintItem.orderType ==='澶栭攢'){ + // this.isClean = false; + + // } this.enterZx = true; }, @@ -798,7 +804,7 @@ }); console.log(this.activeObj,this.activeObj.productName ==='浜屾隘涔欑兎(EDC)' && this.activeObj.checkStatus !== 7,'12313') if(this.activeObj.productName ==='浜屾隘涔欑兎(EDC)' && this.activeObj.checkStatus !== 7){ - console.log('瑙﹀彂锛屸��13131') + this.enterZx = false; this.$u.toast(`璇锋鏌ュ綋鍓嶄簩姘箼鐑�(EDC)DC璁㈠崟璐ㄦ鐘舵�佸悗鍦ㄧ‘璁よ鍗�!`); diff --git a/pages/login/userPassword.vue b/pages/login/userPassword.vue index 10e4ed9..99bd0ca 100644 --- a/pages/login/userPassword.vue +++ b/pages/login/userPassword.vue @@ -106,7 +106,9 @@ remember: true, inpType:true, baseUrl: '', - submitLoading: false + submitLoading: false, + weXinisLoginFlag:[1,2,3], //寰俊 + H5IsLoginFlag:[5,6], //h5 }; }, methods: { @@ -151,6 +153,8 @@ if (this.btnText == 0) { this.submitLoading = false if (res.code != 1) { + + // 鐧婚檰鎴愬姛锛屽瓨鍌ㄧ浉鍏充俊鎭� setToken(res.access_token); setRefreshToken(res.refresh_token); @@ -159,6 +163,22 @@ this.$reqGet('getUserEntity') .then(res => { console.log(res,'鐧诲綍淇℃伅----------') + //#ifdef MP-WEIXIN + if(this.H5IsLoginFlag.includes(res.data.type)) { + this.$u.toast('褰撳墠瑙掕壊璇峰墠寰�h5椤甸潰鐧诲綍') + return ; + + } + //#endif + // #ifdef H5 + if(this.weXinisLoginFlag.includes(res.data.type)) { + console.log('瑙﹀彂鐧诲綍瑙掕壊') + this.$u.toast('褰撳墠瑙掕壊璇峰墠寰�灏忕▼搴忕櫥褰�') + return ; + + } + //#endif + this.$u.toast('鐧诲綍鎴愬姛'); if(this.isJizhu.length){ //璁颁綇瀵嗙爜 uni.setStorageSync('remberPassWord',{ @@ -172,6 +192,7 @@ }); } this.setUserTabbar(res.data.type); + uni.setStorageSync('productIds',res.data.productIds) uni.setStorageSync('roleType', res.data.type); uni.setStorageSync("userId", res.data.userId) uni.setStorageSync("carNo", res.data.carNo) diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue index 4d84c44..245e23d 100644 --- a/pages/tabbar-page/index-tabbar/index-tabbar.vue +++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue @@ -356,9 +356,9 @@ }); }, getDetailData(){ - this.$reqGet('getTaskCoalListByBunkerId', { bunkerIds:uni.getStorageSync('bunkerIds')}).then(res => { + this.$reqGet('getTaskCoalListByBunkerId', { bunkerIds:uni.getStorageSync('bunkerIds'),productIds:uni.getStorageSync('productIds')}).then(res => { if (res.code === 0) { - this.detailData = res.data.map(item=>{ + this.detailData = res.data.map(item=>{ item.tmTaskCoalList.map(el=>{ el.flag = el.isPretendDischar ? false : true return el diff --git a/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue b/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue index c487d07..46b134d 100644 --- a/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue +++ b/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue @@ -12,7 +12,7 @@ v-if="roleType == 6"></doorkeeper-mypage> <quality-mypage ref="QualityMypageRef" v-if="roleType == 7"></quality-mypage> - <tab-bar :current="2"></tab-bar> + <tab-bar :current="roleType == 5 ?3 : 2"></tab-bar> </view> </template> -- Gitblit v1.9.1