分油记录

This commit is contained in:
2023-10-18 13:29:04 +08:00
parent 1c47c1cd47
commit bf2ac62a0e
7 changed files with 528 additions and 11 deletions

View File

@@ -113,6 +113,30 @@
{{quantity}}
</view>
</view>
<view v-if="!routerIndex" @click="jump(4)" class="footer_item">
<view
style=" margin-top: 60rpx; margin-bottom:32rpx; display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view class="iicombody">
<uni-icons custom-prefix="iconfont" type="iconwangdian1" size="30"></uni-icons>
</view>
<view>自营分油记录</view>
</view>
<view style="text-align: center;">
<text>{{totalAmount}}</text>
</view>
</view>
<view v-if="!routerIndex" @click="jump(5)" class="footer_item">
<view
style=" margin-top: 60rpx; margin-bottom:32rpx; display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view class="iicombody">
<uni-icons custom-prefix="iconfont" type="iconwangdian1" size="30"></uni-icons>
</view>
<view>外请分油记录</view>
</view>
<view style="text-align: center;">
<text>{{outTotalAmount}}</text>
</view>
</view>
</view>
</view>
<datePopup style="z-index: 9999999999999;" @datePopupChange='datePopupChange' v-model="isShow.date"></datePopup>
@@ -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'
})
console.log(e)
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
})
}
},
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;
}
},