diff --git a/api/sy.js b/api/sy.js index 996ee4d..e228179 100644 --- a/api/sy.js +++ b/api/sy.js @@ -106,5 +106,19 @@ export default { method: 'post', data:data }) - } + }, + getDistributeCount (data) { + return request({ + url: `/oil-finance/oilCompanyAccountReverse/getDistributeCount`, + method: 'post', + data:data + }) + }, + distributeGetByPage(data) { + return request({ + url: `/oil-finance/oilCompanyDistributeReverse/getByPage`, + method: 'post', + data: data + }) + } } diff --git a/pages.json b/pages.json index 814f56a..35001f1 100644 --- a/pages.json +++ b/pages.json @@ -132,6 +132,20 @@ "enablePullDownRefresh": false } + }, { + "path": "page/distributeQuantity/distributeQuantity", + "style": { + "navigationBarTitleText": "自营分油记录", + "enablePullDownRefresh": false + } + + }, { + "path": "page/outDistributeQuantity/outDistributeQuantity", + "style": { + "navigationBarTitleText": "外请分油记录", + "enablePullDownRefresh": false + } + }, { "path": "page/index/enterpriseIndex", "style": { diff --git a/salesRanking/page/distributeQuantity/contribution.css b/salesRanking/page/distributeQuantity/contribution.css new file mode 100644 index 0000000..8b0a277 --- /dev/null +++ b/salesRanking/page/distributeQuantity/contribution.css @@ -0,0 +1,64 @@ +.contribution_body{ + padding: 40rpx 0; + display: flex; + flex-direction: column; + flex-wrap: wrap; + height: 100vh; + color: #666666; +} +.list_item{ + display: flex; + padding: 26rpx 30rpx; + align-items: center; + color: #666666; +} +.list_item_tip{ + padding: 11rpx 14rpx; + background-color:#9F43CC; + color: #FFFFFF; + font-size: 16rpx; + width: fit-content; + margin: 0 auto; +} +.samalltext{ + font-size: 24rpx; + color: #BBBBBB; +} +.contribution_header_car{ + height: 270rpx; + background: #FFFFFF; + border-radius: 10px; + /* padding: 0 100rpx; */ + padding-top: 50rpx; + position: relative; + margin: 0 44rpx; +} +.jc{ + justify-content: center; +} +.ac{ + align-items: center; +} +.list_item{ + height: 120rpx; + background: #FFFFFF; + border-radius: 10px; + width: 660rpx; + margin: 0 auto; + /* margin: 0 44rpx; */ + margin-bottom: 10rpx; +} +.contribution_header_car_tip{ + position: absolute; + width: calc(100% - 200rpx); + height:90rpx ; + background-color: #ADCEFF; + color: #FFFFFF; + font-size:28rpx; + bottom: -45rpx; + border-radius: 10px; + left: calc((100% - (100% - 200rpx))/2); +} +.flex{ + display: flex; +} \ No newline at end of file diff --git a/salesRanking/page/distributeQuantity/distributeQuantity.vue b/salesRanking/page/distributeQuantity/distributeQuantity.vue new file mode 100644 index 0000000..16c3f6e --- /dev/null +++ b/salesRanking/page/distributeQuantity/distributeQuantity.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/salesRanking/page/enterpriseDetails/enterpriseDetails.vue b/salesRanking/page/enterpriseDetails/enterpriseDetails.vue index 2f51c4a..5fa87cc 100644 --- a/salesRanking/page/enterpriseDetails/enterpriseDetails.vue +++ b/salesRanking/page/enterpriseDetails/enterpriseDetails.vue @@ -113,6 +113,30 @@ {{quantity}} + + + + + + 自营分油记录 + + + {{totalAmount}}¥ + + + + + + + + 外请分油记录 + + + {{outTotalAmount}}¥ + + @@ -150,11 +174,13 @@ }], chartSeleIndex: 0, Line: {}, - LineTwo: {} + LineTwo: {}, + distributeData:{}, + totalAmount:0, + outTotalAmount:0 } }, onLoad(e) { - console.log(e) let routes = getCurrentPages(); let routerIndex = routes[(routes.length - 2)].$page.fullPath.indexOf('?') != -1 ? @@ -163,11 +189,10 @@ routes[(routes.length - 2)].$page.fullPath.split('/')[routes[(routes.length - 2)].$page .fullPath.split('/').length - 1]; this.routerIndex= routerIndex =='enterpriseIndex'?false:true; - console.log(routerIndex) - console.log(this.routerIndex) if (e.jsData) { this.dedata = JSON.parse(e.jsData); this.getdata(JSON.parse(e.jsData)); + this.getDistributeCount(JSON.parse(e.jsData)) } }, filters:{ @@ -186,16 +211,29 @@ datePopupChange(e) { sy[(this.routerIndex ? 'queryBusinessIncome':'queryEnterpriseIncome')]({ [((this.routerIndex ? 'siteId':'companyId'))]: this.dedata.id, - endTime: e[1], + endTime: e[1].split(' ')[0]+' 23:59:59', startTime: e[0] }).then(res => { this.enterpriseData = res.data this.income = res.data.enterpriseContributionAmount this.quantity = res.data.orderNumber this.dedata.startTime = e[0] - this.dedata.endTime = e[1] + this.dedata.endTime = e[1].split(' ')[0]+' 23:59:59' + }) + if(!this.routerIndex){ + sy.getDistributeCount({ + companyId: this.dedata.id, + endTime: e[1].split(' ')[0]+' 23:59:59', + startTime: e[0] + }).then(res => { + this.distributeData = res.data + this.totalAmount = res.data.totalAmount ==null ? 0 : res.data.totalAmount + this.outTotalAmount = res.data.outTotalAmount ==null ? 0 : res.data.outTotalAmount }) - console.log(e) + } + + + }, ishowFn() { this.isShow.date = true @@ -239,7 +277,6 @@ }] } }).catch(e=>{ - console.log(e,'///') }) sy[(this.routerIndex ? 'queryBusinessIncome':'queryEnterpriseIncome')]({ [((this.routerIndex ? 'siteId':'companyId'))]: e.id, @@ -249,7 +286,17 @@ this.enterpriseData = res.data this.income = res.data.enterpriseContributionAmount this.quantity = res.data.orderNumber - console.log(res, '收入') + }) + }, + getDistributeCount(e){ + sy.getDistributeCount({ + companyId: e.id, + endTime: e.endTime.split(' ')[0]+' 23:59:59', + startTime: e.startTime + }).then(res => { + this.distributeData = res.data + this.totalAmount = res.data.totalAmount ==null ? 0 : res.data.totalAmount + this.outTotalAmount = res.data.outTotalAmount ==null ? 0 : res.data.outTotalAmount }) }, jump(e) { @@ -266,7 +313,6 @@ }) break; case 2: - console.log(this.dedata,'rechargeRecordrechargeRecordrechargeRecordrechargeRecord') uni.navigateTo({ url: '../rechargeRecord/rechargeRecord?jsData=' + JSON.stringify(Object.assign(this .dedata, { @@ -283,6 +329,18 @@ .dedata, this.enterpriseData)) }) break; + case 4: + uni.navigateTo({ + url: '../distributeQuantity/distributeQuantity?jsData=' + JSON.stringify(Object.assign(this + .dedata, this.distributeData)) + }) + break; + case 5: + uni.navigateTo({ + url: '../outDistributeQuantity/outDistributeQuantity?jsData=' + JSON.stringify(Object.assign(this + .dedata, this.distributeData)) + }) + break; } }, diff --git a/salesRanking/page/outDistributeQuantity/contribution.css b/salesRanking/page/outDistributeQuantity/contribution.css new file mode 100644 index 0000000..8b0a277 --- /dev/null +++ b/salesRanking/page/outDistributeQuantity/contribution.css @@ -0,0 +1,64 @@ +.contribution_body{ + padding: 40rpx 0; + display: flex; + flex-direction: column; + flex-wrap: wrap; + height: 100vh; + color: #666666; +} +.list_item{ + display: flex; + padding: 26rpx 30rpx; + align-items: center; + color: #666666; +} +.list_item_tip{ + padding: 11rpx 14rpx; + background-color:#9F43CC; + color: #FFFFFF; + font-size: 16rpx; + width: fit-content; + margin: 0 auto; +} +.samalltext{ + font-size: 24rpx; + color: #BBBBBB; +} +.contribution_header_car{ + height: 270rpx; + background: #FFFFFF; + border-radius: 10px; + /* padding: 0 100rpx; */ + padding-top: 50rpx; + position: relative; + margin: 0 44rpx; +} +.jc{ + justify-content: center; +} +.ac{ + align-items: center; +} +.list_item{ + height: 120rpx; + background: #FFFFFF; + border-radius: 10px; + width: 660rpx; + margin: 0 auto; + /* margin: 0 44rpx; */ + margin-bottom: 10rpx; +} +.contribution_header_car_tip{ + position: absolute; + width: calc(100% - 200rpx); + height:90rpx ; + background-color: #ADCEFF; + color: #FFFFFF; + font-size:28rpx; + bottom: -45rpx; + border-radius: 10px; + left: calc((100% - (100% - 200rpx))/2); +} +.flex{ + display: flex; +} \ No newline at end of file diff --git a/salesRanking/page/outDistributeQuantity/outDistributeQuantity.vue b/salesRanking/page/outDistributeQuantity/outDistributeQuantity.vue new file mode 100644 index 0000000..d0afb20 --- /dev/null +++ b/salesRanking/page/outDistributeQuantity/outDistributeQuantity.vue @@ -0,0 +1,151 @@ + + + + +