From b73d5b4f9d70e997690121a04a8e93e40327d10a Mon Sep 17 00:00:00 2001 From: wk Date: 星期二, 13 八月 2024 16:01:19 +0800 Subject: [PATCH] feta:货代改为承运商 --- pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 90 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 71 insertions(+), 19 deletions(-) diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue index a3d43d3..8ac789a 100644 --- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue +++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue @@ -13,6 +13,10 @@ <view class="content-container">{{ totalTon}}</view> <view class="content-num">鍙戣繍鍚ㄦ暟</view> </view> + <view class="content-text"> + <view class="content-container">{{ tmNum}}</view> + <view class="content-num">鍙戣繍浠舵暟</view> + </view> </view> </view> </view> @@ -49,20 +53,25 @@ cur.clean=cur.clean||0 return prev + cur.clean; }, 0)).toFixed(2)}}鍚� + {{Number(item.taskCoalList + .reduce((prev, cur) => { + cur.productQuantity=cur.productQuantity||0 + return prev + cur.productQuantity; + }, 0))}}浠� </view> </view> <view class="card-main" v-for="(value, i) in item.taskCoalList" :key="i" - @click="faYunDetail(value.id)"> + @click="faYunDetail(value.id,value)"> <view class="first-line"> <view class="main-information"> <view class="sign">瑁�</view> <view class="filedname"> <text - v-if="value.orderType == '澶栭攢' || value.orderType == '鍐呴攢' || value.orderType == '杞嚭'">{{ value.deptName || '' }}</text> + v-if="value.orderType == '澶栭攢' || value.orderType == '鍐呴攢' || value.orderType == '澶栭攢閫�' || value.orderType == '杞嚭'">{{ value.deptName || '' }}</text> <text - v-else-if="value.orderType == '澶栬喘' || value.orderType == '鍐呰喘' || value.orderType == '杞叆'">{{ value.customerName || '' }}</text> + v-else-if="value.orderType == '澶栬喘' || value.orderType == '鍐呰喘' || value.orderType == '澶栬喘閫�' || value.orderType == '杞叆'">{{ value.customerName || '' }}</text> </view> </view> <view class="main-divider"></view> @@ -73,15 +82,15 @@ <view class="sign">鍗�</view> <view class="filedname"> <text - v-if="value.orderType == '澶栭攢' || value.orderType == '鍐呴攢' || value.orderType == '杞嚭'">{{ value.customerName || '' }}</text> + v-if="value.orderType == '澶栭攢' || value.orderType == '鍐呴攢' || value.orderType == '澶栭攢閫�' || value.orderType == '杞嚭'">{{ value.customerName || '' }}</text> <text - v-else-if="value.orderType == '澶栬喘' || value.orderType == '鍐呰喘' || value.orderType == '杞叆'">{{ value.deptName || '' }}</text> + v-else-if="value.orderType == '澶栬喘' || value.orderType == '鍐呰喘' || value.orderType == '澶栬喘閫�' || value.orderType == '杞叆'">{{ value.filedName || '' }}</text> </view> </view> </view> <view class="second-line"> <view class="coal-name"> - <view class="">{{ value.coalName }}</view> + <view class="productName">{{ value.productNames || value.productName }}</view> <view class="black-bar"></view> <view class="coal-type" v-if="value.orderType">{{ value.orderType }}</view> @@ -91,7 +100,7 @@ </view> <view class="third-line"> <view class="carnum-icon"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/carNO.png" + <image src="https://wrzs.czjlchem.com:9090/appimg/image/banner/carNO.png" mode="widthFix"></image> </view> <view class="carnum-text">{{ value.carNo || '' }}</view> @@ -134,7 +143,7 @@ </view> </view> <view class="filter-body"> - <view class="condition-name">鐓ょ</view> + <view class="condition-name">浜у搧</view> <view class="filter-name"> <view class="filter-button" v-for="(item, index) in coalList" @@ -186,7 +195,7 @@ </view> <view class="filter-body" v-if="roleType == 1"> - <view class="condition-name">璐т唬</view> + <view class="condition-name">鎵胯繍鍟�</view> <view class="filter-name"> <view class="filter-button" v-for="(item, index) in forwarderList" @@ -223,7 +232,7 @@ </view> --> </view> </view> - <view class="filter-body"> + <view class="filter-body" v-if="false"> <view class="condition-name">鐭垮満</view> <view class="filter-name"> <view class="filter-button" @@ -330,7 +339,7 @@ // 鐐瑰嚮鍙崇澶磋鎯呭脊绐� faYunDetailobj: {}, modalShow: false, - coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', + coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ヤ粨搴�', '鍑轰粨搴�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�', '杩斿洖鍔犲噺鍚�', '瓒呮椂', '鎵撳嵃涓�', '鎵撳嵃涓�', '濉啓' ] }; @@ -482,7 +491,7 @@ } }; let conditionMapping = { - coalName: this.coalList.filter(v => v.active == true).map(item => item.condition), + productName: this.coalList.filter(v => v.active == true).map(item => item.condition), orderType: this.typeList.filter(v => v.active == true).map(item => item.condition), customerName: this.customerList.filter(v => v.active == true).map(item => item.condition), xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition), @@ -492,7 +501,7 @@ }; const mapping = { - coalName: validateFn('coalName'), + productName: validateFn('productName'), orderType: validateFn('orderType'), customerName: validateFn('customerName'), xsUser2Name: validateFn('xsUser2Name'), @@ -636,9 +645,16 @@ } }, // 璺宠浆鍙戣繍璇︽儏 - faYunDetail(takeCoalId) { + faYunDetail(takeCoalId,value) { + console.log(takeCoalId,'tackle') uni.navigateTo({ - url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}` + url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}&orderType=${value.orderType}`, + success(res) { + console.log(res); + }, + fail(err) { + console.log(err,'璺宠浆涓嶈繃鍘�'); + } }); }, // 鎵撳紑绛涢�夋潯浠跺脊绐� @@ -680,7 +696,36 @@ }, carNoTotal() { return this.carNoList.length; - } + }, + //鍙戣繍浠舵暟 + tmNum(){ + console.log(this.filterList,'result') + if( !this.filterList.length){ + return 0 + }else{ + const result = this.filterList.map(v => + v.taskCoalList.reduce((prev, cur) => { + let cleanvalue + if(!cur.isWeight){ + cleanvalue = Number(cur.productQuantity) || 0 + }else{ + cleanvalue = 0; + } + return cleanvalue + prev + }, 0) + ); + if(result.length){ + return result.reduce((x, y) => { + let xx = new BigNumber(x) + let yy = new BigNumber(y) + return xx.plus(yy).toNumber() + }, new BigNumber(0));; + + }else{ + return 0; + } + } + }, }, watch: { dateselect(newV, old) { @@ -845,7 +890,7 @@ padding: 0 vww(5); @include flex .date-text { - width: 330rpx; + width: 360rpx; height: 40rpx; font-size: 28rpx; font-weight: 400; @@ -932,7 +977,7 @@ height: vww(28); line-height: vww(28); text-align: center; - background: url('https://mx.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat; + background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/blueblock.png') no-repeat; background-size: contain; font-size: 30rpx; font-weight: 400; @@ -989,7 +1034,7 @@ // display: flex; // justify-content: center; // align-items: center; - background: url('https://mx.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat; + background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/redblock.png') no-repeat; background-size: contain; font-size: 30rpx; font-weight: 400; @@ -1017,11 +1062,18 @@ flex-grow: 1; height: 30rpx; font-size: 30rpx; + width: 50%; font-weight: 300; color: #515151; position: relative; display: flex; align-items: center; + .productName{ + width: 50%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } .black-bar { width: 2rpx; -- Gitblit v1.9.1