This commit is contained in:
cclu 2024-07-29 20:11:10 +08:00
parent cdf65863d9
commit bb6e78f068
3 changed files with 65 additions and 32 deletions

View File

@ -290,8 +290,8 @@
<view class="compareLabel">营业额合计</view> <view class="compareLabel">营业额合计</view>
<view class="beforeItem">{{item.RevenueAmount?numeral($util.getMoney(item.RevenueAmount)).format('0,0.00'):'-'}}</view> <view class="beforeItem">{{item.RevenueAmount?numeral($util.getMoney(item.RevenueAmount)).format('0,0.00'):'-'}}</view>
<view class="afterItem"> <view class="afterItem">
{{yearDataListObj.RevenueAmount?numeral($util.getMoney(yearDataListObj.RevenueAmount)).format('0,0.00'):''}} {{yearDataListObj.RevenueAmountTEXT?yearDataListObj.RevenueAmountTEXT:''}}
<span style="color: red" v-if="item.RevenueAmount && yearDataListObj.RevenueAmount && item.RevenueAmount!==yearDataListObj.RevenueAmount">({{yearDataListObj.RevenueAmount - item.RevenueAmount>0?'+':''}}{{yearDataListObj.RevenueAmount - item.RevenueAmount}})</span> <span style="color: red" v-if="yearDataListObj.CorrectAmount">({{yearDataListObj.CorrectAmount>0?'+':''}}{{yearDataListObj.CorrectAmountTEXT || ''}})</span>
</view> </view>
</view> </view>
@ -590,14 +590,14 @@
<span>发起申请</span> <span>发起申请</span>
</view> </view>
<view class="btnItem" v-if="detailObj.Approvalstate>0 && progressDetail.BUSINESSAPPROVAL_STATE!==9000 && this.isShowBtn" @click="handleShowPop(1)"> <view class="btnItem" v-if="detailObj.Approvalstate>0 && progressDetail.BUSINESSAPPROVAL_STATE!==9000 && isShowBtn && !detailObj.APPLY_PROCCESS" @click="handleShowPop(1)">
<view class="iconBox"> <view class="iconBox">
<image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/sh-btn.png"/> <image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/sh-btn.png"/>
</view> </view>
<span :style="{color: !isShowBtn?'#ADB2BF':''}">审核</span> <span :style="{color: !isShowBtn?'#ADB2BF':''}">审核</span>
</view> </view>
<view class="btnItem" v-if="detailObj.Approvalstate>0 && progressDetail.BUSINESSAPPROVAL_STATE!==9000 && this.isShowBtn" @click="handleShowPop(2)"> <view class="btnItem" v-if="detailObj.Approvalstate>0 && progressDetail.BUSINESSAPPROVAL_STATE!==9000 && isShowBtn && !detailObj.APPLY_PROCCESS" @click="handleShowPop(2)">
<view class="iconBox"> <view class="iconBox">
<image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/bh-btn.png"/> <image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/bh-btn.png"/>
</view> </view>
@ -658,7 +658,7 @@
<view class="detailItem" style="display: flex;align-items: center" v-if="showType===1 && progressObjDetail.NEXT_STATE!==9000"> <view class="detailItem" style="display: flex;align-items: center" v-if="showType===1 && progressObjDetail.NEXT_STATE!==9000">
<span class="label">下一环节审批人</span> <span class="label">下一环节审批人</span>
<picker mode="selector" @change="changeNextPerson" :value="nextPersonIndex" range-key="label" :range="nextPerson"> <picker mode="selector" @change="changeNextPerson" :value="nextPersonIndex" range-key="label" :range="nextPerson">
<view class="uni-ellipsis">{{nextPersonIndex?nextPerson[nextPersonIndex].label:'请选择'}}</view> <view class="uni-ellipsis">{{nextPersonLabel?nextPersonLabel:'请选择'}}</view>
</picker> </picker>
</view> </view>
@ -884,6 +884,7 @@ export default {
approveDesc:'已核对,拟同意!',// approveDesc:'已核对,拟同意!',//
nextPerson:[],// nextPerson:[],//
nextPersonIndex:'',// nextPersonIndex:'',//
nextPersonLabel:'',//
nextPersonValue:'',// nextPersonValue:'',//
showLabel:'',// showLabel:'',//
progressList: [],// progressList: [],//
@ -927,9 +928,10 @@ export default {
this.detailObj = JSON.parse(query.obj) this.detailObj = JSON.parse(query.obj)
} }
} }
console.log('this.detailObj',this.detailObj)
if(query.staticMonth){ if(query.staticMonth){
this.staticMonth = this.$moment(query.staticMonth).format('YYYYMM') this.staticMonth = this.$moment(query.staticMonth ).format('YYYYMM')
console.log('this.staticMonth',this.staticMonth)
} }
// //
await this.handleGetDetailDifference() await this.handleGetDetailDifference()
@ -966,6 +968,7 @@ export default {
this.nextPerson = [] this.nextPerson = []
this.staticMonth = '' this.staticMonth = ''
this.nextPersonIndex = '' this.nextPersonIndex = ''
this.nextPersonLabel = ''
this.showLabel = '' this.showLabel = ''
this.approveDesc = '' this.approveDesc = ''
this.progressList = [] this.progressList = []
@ -993,7 +996,7 @@ export default {
let obj = res.Result_Data let obj = res.Result_Data
const req = { const req = {
BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID, BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID,
StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE).format('YYYYMM') : ''), StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE + (this.detailObj.SETTLEMENT_TYPE===1?'':'/01')).format('YYYYMM') : ''),
ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID, ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID,
MobilePayCorrect: obj.MOBILEPAY_CORRECT || 0, MobilePayCorrect: obj.MOBILEPAY_CORRECT || 0,
CashPayCorrect: obj.CASHPAY_CORRECT || 0 CashPayCorrect: obj.CASHPAY_CORRECT || 0
@ -1041,9 +1044,9 @@ export default {
item.showChildren = false item.showChildren = false
item.CashAmountTEXT = numeral(this.$util.getMoney(item.CashAmount)).format('0,0.00') item.CashAmountTEXT = numeral(this.$util.getMoney(item.CashAmount)).format('0,0.00')
item.MobilePayAmountTEXT = numeral(this.$util.getMoney(item.MobilePayAmount)).format('0,0.00') item.MobilePayAmountTEXT = numeral(this.$util.getMoney(item.MobilePayAmount)).format('0,0.00')
item.RevenueAmountTEXT = item.RevenueAmountTEXT = numeral(this.$util.getMoney(item.RevenueAmount)).format('0,0.00')
numeral(this.$util.getMoney(item.RevenueAmount)).format('0,0.00') + (item.CorrectAmount ? ('(' + (item.CorrectAmount > 0 ? '+' : '') + item.CorrectAmount + ')') : '') // numeral(this.$util.getMoney(item.RevenueAmount)).format('0,0.00') + (item.CorrectAmount ? ('(' + (item.CorrectAmount > 0 ? '+' : '') + item.CorrectAmount + ')') : '')
item.CorrectAmountTEXT = numeral(this.$util.getMoney(item.CorrectAmount)).format('0,0.00')
item.RoyaltyAmountTEXT = numeral(this.$util.getMoney(item.RoyaltyAmount)).format('0,0.00') item.RoyaltyAmountTEXT = numeral(this.$util.getMoney(item.RoyaltyAmount)).format('0,0.00')
item.ReceivableAmountTEXT = numeral(this.$util.getMoney(item.ReceivableAmount)).format('0,0.00') item.ReceivableAmountTEXT = numeral(this.$util.getMoney(item.ReceivableAmount)).format('0,0.00')
item.GuaranteeFeeTEXT = numeral(this.$util.getMoney(item.GuaranteeFee)).format('0,0.00') item.GuaranteeFeeTEXT = numeral(this.$util.getMoney(item.GuaranteeFee)).format('0,0.00')
@ -1077,10 +1080,11 @@ export default {
let obj = { let obj = {
...res, ...res,
Approvalstate: res.SETTLEMENT_STATE === 0 ? 0 : res.SETTLEMENT_STATE === 1 ? 9 : res.SETTLEMENT_STATE === 2 ? 1 : '', Approvalstate: res.SETTLEMENT_STATE === 0 ? 0 : res.SETTLEMENT_STATE === 1 ? 9 : res.SETTLEMENT_STATE === 2 ? 1 : '',
startTime: this.$moment(res.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'), startTime: this.$moment(res.SETTLEMENT_DATE + (res.SETTLEMENT_TYPE === 1 ? '' : '/01')).startOf('months').format('YYYY-MM-DD'),
endTime: this.$moment(res.SETTLEMENT_DATE).endOf('months').format('YYYY-MM-DD') endTime: this.$moment(res.SETTLEMENT_DATE + (res.SETTLEMENT_TYPE === 1 ? '' : '/01')).endOf('months').format('YYYY-MM-DD')
} }
this.detailObj = obj this.detailObj = obj
this.staticMonth = this.$moment(obj.endTime).format('YYYYMM')
console.log('this.detailObj',this.detailObj) console.log('this.detailObj',this.detailObj)
uni.hideLoading() uni.hideLoading()
}, },
@ -1356,7 +1360,7 @@ export default {
console.log('this.CashPayCorrect',this.CashPayCorrect) console.log('this.CashPayCorrect',this.CashPayCorrect)
const req = { const req = {
BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID, BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID,
StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE).format('YYYYMM') : ''), StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE + (this.detailObj.SETTLEMENT_TYPE===1?'':'/01')).format('YYYYMM') : ''),
ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID, ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID,
MobilePayCorrect: this.MobilePayCorrect || 0, MobilePayCorrect: this.MobilePayCorrect || 0,
CashPayCorrect: this.CashPayCorrect || 0, CashPayCorrect: this.CashPayCorrect || 0,
@ -1394,7 +1398,7 @@ export default {
if (res.confirm) { if (res.confirm) {
uni.setStorageSync('handleGetNewMonth','true') uni.setStorageSync('handleGetNewMonth','true')
uni.setStorageSync('handleGetNewMonthObj',_this.detailObj) uni.setStorageSync('handleGetNewMonthObj',_this.detailObj)
uni.setStorageSync('handleGetNewMonthTime',_this.LastSettlementMonth) uni.setStorageSync('handleGetNewMonthTime',_this.LastSettlementMonth + '/01')
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
@ -1443,8 +1447,10 @@ export default {
SERVERPARTSHOP_ID: this.detailObj.SERVERPARTSHOP_ID, SERVERPARTSHOP_ID: this.detailObj.SERVERPARTSHOP_ID,
DataSourceType: 2, DataSourceType: 2,
SERVERPART_ID: this.detailObj.SERVERPART_ID, SERVERPART_ID: this.detailObj.SERVERPART_ID,
STATISTICS_MONTH: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE).format('YYYYMM') : '') STATISTICS_MONTH: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE +(this.detailObj.SETTLEMENT_TYPE===1?'':'/01')).format('YYYYMM') : '')
} }
console.log('this.staticMonth',this.staticMonth)
console.log('req',req)
uni.showLoading({ uni.showLoading({
title: '请求详情数据...' title: '请求详情数据...'
}) })
@ -1462,7 +1468,7 @@ export default {
async handleGetActuaryData(){ async handleGetActuaryData(){
const req = { const req = {
BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID, BusinessProjectId: this.detailObj.BUSINESSPROJECT_ID,
StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE).format('YYYYMM') : ''), StatisticsMonth: this.staticMonth || (this.detailObj.SETTLEMENT_DATE ? this.$moment(this.detailObj.SETTLEMENT_DATE + (this.detailObj.SETTLEMENT_TYPE===1?'':'/01')).format('YYYYMM') : ''),
ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID, ShopRoyaltyId: this.detailObj.SHOPROYALTY_ID,
} }
uni.showLoading({ uni.showLoading({
@ -1499,6 +1505,7 @@ export default {
let value = Number(e.target.value) let value = Number(e.target.value)
this.nextPersonIndex = value this.nextPersonIndex = value
this.nextPersonValue = this.nextPerson[value].value this.nextPersonValue = this.nextPerson[value].value
this.nextPersonLabel = this.nextPerson[value].label
}, },
// //
changeReject(e){ changeReject(e){
@ -1514,6 +1521,7 @@ export default {
this.showType = 0 this.showType = 0
this.approveDesc = '' this.approveDesc = ''
this.nextPersonIndex = '' this.nextPersonIndex = ''
this.nextPersonLabel = ''
this.nextPersonValue = '' this.nextPersonValue = ''
}, },
// 1 2 // 1 2
@ -1695,7 +1703,7 @@ export default {
this.progressDetail = res this.progressDetail = res
console.log('Store.state.userData.UserId',Store.state.userData.UserId) console.log('Store.state.userData.UserId',Store.state.userData.UserId)
console.log('res.APPOVED_IDS',res.APPOVED_IDS) console.log('res.APPOVED_IDS',res.APPOVED_IDS)
if(res.APPOVED_IDS.toString() === Store.state.userData.UserId.toString()){ if(Number(res.APPOVED_IDS) === Number(Store.state.userData.UserId)){
this.isShowBtn = true this.isShowBtn = true
} }
this.progressList = res.approveList this.progressList = res.approveList

View File

@ -128,10 +128,15 @@ import {wrapTreeNode} from "../../util/dateTime";
SettlementType: 0,// SettlementType: 0,//
PageIndex: 1,// PageIndex: 1,//
isEnd: false,// isEnd: false,//
useInfo:{},//
} }
}, },
onLoad(){ onLoad(){
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
this.useInfo = JSON.parse(JSON.stringify(userInfo))
console.log('this.useInfo',this.useInfo)
this.startDate = this.$moment().startOf('year').format('YYYY-MM') this.startDate = this.$moment().startOf('year').format('YYYY-MM')
this.endDate = this.$moment().subtract(1,'months').format('YYYY-MM') this.endDate = this.$moment().subtract(1,'months').format('YYYY-MM')
console.log('Store.state.userData',Store.state.userData) console.log('Store.state.userData',Store.state.userData)
@ -193,11 +198,12 @@ import {wrapTreeNode} from "../../util/dateTime";
} }
}) })
} }
console.log('bigObj',bigObj)
let result = { let result = {
...bigObj, ...bigObj,
Approvalstate: bigObj.SETTLEMENT_STATE === 0 ? 0 : bigObj.SETTLEMENT_STATE === 1 ? 9 : bigObj.SETTLEMENT_STATE === 2 ? 1 : '', Approvalstate: bigObj.SETTLEMENT_STATE === 0 ? 0 : bigObj.SETTLEMENT_STATE === 1 ? 9 : bigObj.SETTLEMENT_STATE === 2 ? 1 : '',
startTime: this.$moment(bigObj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'), startTime: this.$moment(bigObj.SETTLEMENT_DATE + (bigObj.SETTLEMENT_TYPE===1?'':'/01') ).startOf('months').format('YYYY-MM-DD'),
endTime: this.$moment(bigObj.SETTLEMENT_DATE).endOf('months').format('YYYY-MM-DD'), endTime: this.$moment(bigObj.SETTLEMENT_DATE + (bigObj.SETTLEMENT_TYPE===1?'':'/01')).endOf('months').format('YYYY-MM-DD'),
} }
this.$util.toNextRoute('navigateTo', `/pages/settlementApproval/detail?obj=${JSON.stringify(result)}&staticMonth=${time}`) this.$util.toNextRoute('navigateTo', `/pages/settlementApproval/detail?obj=${JSON.stringify(result)}&staticMonth=${time}`)
@ -254,10 +260,10 @@ import {wrapTreeNode} from "../../util/dateTime";
Approvalstate: obj.SETTLEMENT_STATE === 0 ? 0 : obj.SETTLEMENT_STATE === 1 ? 9 : obj.SETTLEMENT_STATE === 2 ? 1 : '', Approvalstate: obj.SETTLEMENT_STATE === 0 ? 0 : obj.SETTLEMENT_STATE === 1 ? 9 : obj.SETTLEMENT_STATE === 2 ? 1 : '',
// startTime: new Date(obj.STARTDATE).getTime() < new Date(obj.SETTLEMENT_DATE).getTime()?this.$moment(obj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'):this.$moment(obj.STARTDATE).format('YYYY-MM-DD'), // startTime: new Date(obj.STARTDATE).getTime() < new Date(obj.SETTLEMENT_DATE).getTime()?this.$moment(obj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'):this.$moment(obj.STARTDATE).format('YYYY-MM-DD'),
// endTime: new Date(obj.ENDDATE).getTime() > new Date(obj.SETTLEMENT_DATE).getTime()?this.$moment(obj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'):this.$moment(obj.STARTDATE).format('YYYY-MM-DD') // endTime: new Date(obj.ENDDATE).getTime() > new Date(obj.SETTLEMENT_DATE).getTime()?this.$moment(obj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'):this.$moment(obj.STARTDATE).format('YYYY-MM-DD')
startTime: this.$moment(obj.SETTLEMENT_DATE).startOf('months').format('YYYY-MM-DD'), startTime: this.$moment(obj.SETTLEMENT_DATE + (obj.SETTLEMENT_TYPE===1?'':'/01')).startOf('month').format('YYYY-MM-DD'),
endTime: this.$moment(obj.SETTLEMENT_DATE).endOf('months').format('YYYY-MM-DD'), endTime: this.$moment(obj.SETTLEMENT_DATE +(obj.SETTLEMENT_TYPE===1?'':'/01')).endOf('month').format('YYYY-MM-DD'),
} }
this.$util.toNextRoute('navigateTo', `/pages/settlementApproval/detail?obj=${JSON.stringify(res)}&staticMonth=${res.SETTLEMENT_DATE}`) this.$util.toNextRoute('navigateTo', `/pages/settlementApproval/detail?obj=${JSON.stringify(res)}&staticMonth=${res.SETTLEMENT_DATE + (obj.SETTLEMENT_TYPE===1?'':'/01')}`)
}, },
async handleGetPageData(){ async handleGetPageData(){
const req = { const req = {
@ -267,7 +273,8 @@ import {wrapTreeNode} from "../../util/dateTime";
StartDate: this.startDate?this.$moment(this.startDate).format('YYYYMM'):'', StartDate: this.startDate?this.$moment(this.startDate).format('YYYYMM'):'',
EndDate: this.endDate?this.$moment(this.endDate).format('YYYYMM'):'', EndDate: this.endDate?this.$moment(this.endDate).format('YYYYMM'):'',
PageIndex: this.PageIndex, PageIndex: this.PageIndex,
PageSize: 10 PageSize: 10,
UserId: this.useInfo.userData.UserId
} }
uni.showLoading({ uni.showLoading({
title: '正在加载...' title: '正在加载...'

View File

@ -532,15 +532,30 @@ export default {
} else { } else {
ShopRoyaltyIdStr = `${item.ShopRoyalty_Id}` ShopRoyaltyIdStr = `${item.ShopRoyalty_Id}`
} }
let stareDate = new Date(item.StartDate.replace('.','/').replace('.','/'))
const startY = stareDate.getFullYear()
console.log('startY',startY)
let startM = stareDate.getMonth() + 1 <10?'0' + (stareDate.getMonth() + 1) : stareDate.getMonth() + 1
let startD = stareDate.getDate() + 1 <10?'0' + stareDate.getDate() : stareDate.getDate()
let stareTime = `${startY}-${startM}-${startD}`
let endDate = new Date(item.EndDate.replace('.','/').replace('.','/'))
const endY = endDate.getFullYear()
let endM = endDate.getMonth() + 1 <10?'0' + (endDate.getMonth() + 1) : endDate.getMonth() + 1
let endD = endDate.getDate() + 1 <10?'0' + endDate.getDate() : endDate.getDate()
let endTimeText = `${endY}-${endM}-${endD}`
console.log('stareTime',stareTime)
console.log('endTimeText',endTimeText)
if (index === 0) { if (index === 0) {
startTime = moment(item.StartDate).format('YYYY-MM-DD') startTime = moment(stareTime).format('YYYY-MM-DD')
endTime = moment(item.EndDate).format('YYYY-MM-DD') endTime = moment(endTimeText).format('YYYY-MM-DD')
} else { } else {
if (new Date(moment(item.StartDate).format('YYYY-MM-DD')).getTime() < new Date(startTime).getTime()) { if (new Date(moment(stareTime).format('YYYY-MM-DD')).getTime() < new Date(startTime).getTime()) {
startTime = moment(item.StartDate).format('YYYY-MM-DD') startTime = moment(stareTime).format('YYYY-MM-DD')
} }
if (new Date(moment(item.EndDate).format('YYYY-MM-DD')).getTime() > new Date(endTime).getTime()) { if (new Date(moment(endTimeText).format('YYYY-MM-DD')).getTime() > new Date(endTime).getTime()) {
endTime = moment(item.EndDate).format('YYYY-MM-DD') endTime = moment(endTimeText).format('YYYY-MM-DD')
} }
} }
}) })
@ -552,6 +567,7 @@ export default {
StartDate: startTime, StartDate: startTime,
EndDate: endTime, EndDate: endTime,
} }
console.log('req',req)
uni.showLoading({ uni.showLoading({
title: '请求数据...' title: '请求数据...'
}) })
@ -705,8 +721,10 @@ export default {
if(childrenList && childrenList.length>0){ if(childrenList && childrenList.length>0){
item.children.forEach(subItem=>{ item.children.forEach(subItem=>{
childrenList.forEach(childrenItem=>{ childrenList.forEach(childrenItem=>{
if(moment(childrenItem.EndDate).format('YYYY-MM-DD') === moment(subItem.EndDate).format('YYYY-MM-DD') && moment(childrenItem.StartDate).format('YYYY-MM-DD') === moment(subItem.StartDate).format('YYYY-MM-DD')){ if(moment(childrenItem.EndDate).format('YYYY-MM-DD') === moment(subItem.EndDate.replace('.','-').replace('.','-')).format('YYYY-MM-DD') && moment(childrenItem.StartDate).format('YYYY-MM-DD') === moment(subItem.StartDate.replace('.','-').replace('.','-')).format('YYYY-MM-DD')){
subItem.RevenueConfirmId = childrenItem.RevenueConfirmId subItem.RevenueConfirmId = childrenItem.RevenueConfirmId
subItem.PeriodIndexStr = childrenItem.PeriodIndexStr
subItem.PeriodIndex = childrenItem.PeriodIndex
} }
}) })
}) })