From 8b91be08b22f712a7f2f74783b40dd670b0a4215 Mon Sep 17 00:00:00 2001 From: cclu <1106109051@qq.com> Date: Fri, 16 Jun 2023 22:23:13 +0800 Subject: [PATCH] 6.16 22.23 --- pages/commercialBI/formatDetail.vue | 33 ++++-- pages/commercialBI/formatPortrait.vue | 16 +-- pages/commercialBI/shopDetail.vue | 163 ++++++++++++++++---------- 3 files changed, 135 insertions(+), 77 deletions(-) diff --git a/pages/commercialBI/formatDetail.vue b/pages/commercialBI/formatDetail.vue index f2bf349..c7f1776 100644 --- a/pages/commercialBI/formatDetail.vue +++ b/pages/commercialBI/formatDetail.vue @@ -12,7 +12,8 @@
-
+ +
@@ -34,9 +35,10 @@ {{detail.BUSINESSTRADE_NAME}} {{detail.BRAND_TYPENAME}}
-
- {{detail.COMMISSION_RATIO}} - 建议提成比例 +
+ {{detail.MerchantName || ''}} + +
@@ -63,10 +65,13 @@
{{item.SERVERPART_NAME}} -
+
{{item.SERVERPART_TYPE}}
+
+ +
@@ -101,7 +106,7 @@
- {{ item.PROJECT_STARTDATE && item.PROJECT_ENDDATE ?`${item.PROJECT_STARTDATE}-${item.PROJECT_ENDDATE}`:'-' }} + {{ item.PROJECT_STARTDATE || item.PROJECT_ENDDATE ?`${item.PROJECT_STARTDATE || ''}-` + `${item.PROJECT_ENDDATE || ''}`:'-' }}
@@ -121,6 +126,7 @@ export default { data() { return { menu:{}, + status:{}, detail:{},// 详情信息 serviceList:[],// 服务区列表 descTop:0,// 悬浮框的高度 @@ -130,6 +136,9 @@ export default { }, onLoad(query){ this.menu = uni.getMenuButtonBoundingClientRect() + let systemInfo = uni.getSystemInfoSync() + this.status = systemInfo + console.log('this.status',this.status) console.log('query',query) console.log('query',JSON.parse(query.detail)) this.detail = JSON.parse(query.detail) @@ -171,9 +180,11 @@ export default { }, handleShopDetail(item){ console.log('item',item) - uni.navigateTo({ - url:`/pages/commercialBI/shopDetail?id=${item.COOPMERCHANTS_ID}&COOPMERCHANTSID=${item.COOPMERCHANTS_ID_Encrypted}` - }) + if (item.COOPMERCHANTS_ID && item.COOPMERCHANTS_ID!=='-1'){ + uni.navigateTo({ + url:`/pages/commercialBI/shopDetail?id=${item.COOPMERCHANTS_ID}&COOPMERCHANTSID=${item.COOPMERCHANTS_ID_Encrypted}` + }) + } } } @@ -252,6 +263,7 @@ export default { } } .right{ + flex:1; margin-left: 12px; .top{ display: flex; @@ -307,7 +319,7 @@ export default { } } .typeList{ - margin-top: 18px; + margin-top: 4px; border-radius: 2px; .typeItem{ display: inline-block; @@ -322,6 +334,7 @@ export default { } } .suggest{ + min-height: 25px; margin-top: 8px; background: linear-gradient(90deg, rgba(72,119,255,0.15) 0%, rgba(72, 119, 255, 0) 100%); border-radius: 2px; diff --git a/pages/commercialBI/formatPortrait.vue b/pages/commercialBI/formatPortrait.vue index 98f7053..d2b093c 100644 --- a/pages/commercialBI/formatPortrait.vue +++ b/pages/commercialBI/formatPortrait.vue @@ -50,7 +50,7 @@
- +
@@ -64,9 +64,10 @@
{{item.BUSINESSTRADE_NAME}}
{{item.BRAND_TYPENAME}}
-
- {{item.COMMISSION_RATIO || '-'}} - 建议提成比例 +
+ {{item.MerchantName || ''}} + +
@@ -571,11 +572,8 @@ export default { } } .right{ - height: 88px; + flex:1; margin-left: 12px; - display: flex; - flex-direction: column; - justify-content: space-between; .title{ display: inline-block; width: 150px; @@ -600,9 +598,11 @@ export default { } } .suggest{ + min-height: 25px; padding: 0 8px; background: linear-gradient(90deg, RGBA(222, 231, 255, 1) 0%, RGBA(241, 246, 255, 1) 100%); border-radius: 2px; + margin-top: 10px; .value{ font-size: 14px; font-family: DINAlternate-Bold, DINAlternate; diff --git a/pages/commercialBI/shopDetail.vue b/pages/commercialBI/shopDetail.vue index dcb32db..11d42db 100644 --- a/pages/commercialBI/shopDetail.vue +++ b/pages/commercialBI/shopDetail.vue @@ -13,9 +13,9 @@
-
- -
+ + +
{{detail.COOPMERCHANTS_NAME}} @@ -38,9 +38,12 @@
-
- -
+ +
+ + {{subItem.label}} +
+
@@ -77,7 +80,7 @@ 经营项目 ({{`${serviceList.length}`}})
- +
@@ -112,20 +115,34 @@ ( 万元 )
- +
+ {{businessType[item.BUSINESS_TRADE] || '-'}} - - -
- - {{item.SERVERPARTSHOP_NAME || '-'}}
-
- - {{ item.PROJECT_STARTDATE && item.PROJECT_ENDDATE ?`${item.PROJECT_STARTDATE}-${item.PROJECT_ENDDATE}`:'-' }} +
+
+
+ + {{item.SERVERPARTSHOP_NAME || '-'}} +
+ +
+ + {{ item.PROJECT_STARTDATE && item.PROJECT_ENDDATE ?`${item.PROJECT_STARTDATE}-${item.PROJECT_ENDDATE}`:'-' }} +
+
+
+ {{item.progress}} +
+
+ +
+ +
+
@@ -157,6 +174,14 @@ export default { '3000':'C类', '4000':'D类' }, + businessType:{ + // 经营业态 + 1: '主餐饮类', + 2: '面馆小吃类', + 3: '轻饮食、食品类', + 4: '特产、工艺品等其他类', + 5: '汽修类', + }, personList:[] } }, @@ -222,9 +247,20 @@ export default { const data = await request.$webGet(`EShangApiMain/BusinessProject/GetMerchantsReceivables`,req) console.log('list',data) this.serviceList = data.Result_Data.AccountReceivablesList - this.serviceList.forEach(item=>{ - item.SECTIONFLOW_NUM = this.$util.noDecimal(item.SECTIONFLOW_NUM) - }) + if (this.serviceList && this.serviceList.length>0){ + this.serviceList.forEach(item=>{ + const nowDay = new Date().getTime() + const startDay = new Date(item.PROJECT_STARTDATE).getTime() + const endDay = new Date(item.PROJECT_ENDDATE).getTime() + const day = endDay - nowDay + if (day<0){ + item.progress = '100%' + }else{ + item.progress =((((nowDay-startDay) / (1000*60*60*24)) / item.PROJECT_DAYS).toFixed(2) * 100 + '').substr(0,5) + '%' + } + item.SECTIONFLOW_NUM = this.$util.noDecimal(item.SECTIONFLOW_NUM) + }) + } console.log('this.serviceList',this.serviceList) uni.hideLoading() }, @@ -293,6 +329,7 @@ export default { width: 100%; box-sizing: border-box; padding: 0 16px; + min-height: 164px; position: absolute; .box{ width: 100%; @@ -304,21 +341,8 @@ export default { padding: 12px; display: flex; position: relative; - .left{ - width: 72px; - height: 72px; - border-radius: 8px; - background: #fff; - display: flex; - align-items: center; - justify-content: center; - .img{ - width: 40px; - height: 40px; - } - } .right{ - margin-left: 12px; + width: 100%; .top{ display: flex; align-items: center; @@ -383,18 +407,21 @@ export default { width: 100%; display: flex; margin-top: 10px; - .imgBox{ - width: 60px; - height: 60px; - border-radius: 6px; - margin-right: 8px; - overflow: hidden; - .brandItem{ - width: 60px; - height: 60px; + .imgBox{ + display: inline-block; + border-radius: 6px; + margin-right: 8px; + text-align: center; + .brandItem{ + width: 50px; + height: 50px; + border-radius: 4px; + } + .value{ + display: block; + font-size: 12px; + } } - } - } @@ -680,25 +707,43 @@ export default { } } } - .bottomItem{ + .bottom{ display: flex; - align-items: flex-start; - margin-bottom: 4px; - .bottomIcon{ - width: 16px; - height: 16px; - margin-right: 4px; - margin-top: 2px; + align-items: center; + justify-content: space-between; + .bottomItemLeft{ + .bottomItem{ + display: flex; + align-items: flex-start; + margin-bottom: 4px; + .bottomIcon{ + width: 16px; + height: 16px; + margin-right: 4px; + margin-top: 2px; + } + .text{ + flex: 1; + font-size: 14px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #5C5773; + line-height: 22px; + } + } } - .text{ - flex: 1; - font-size: 14px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #5C5773; - line-height: 22px; + .bottomItemRight{ + width: 60px; + height: 60px; + border-radius: 8px; + overflow: hidden; + .icon{ + width: 100%; + height: 100%; + } } } + } } ::-webkit-scrollbar {