|
@@ -697,50 +697,7 @@
|
|
|
submit(status){
|
|
|
this.info.isSecond=(this.isSecond?1:0)
|
|
|
this.info.applicationMonth= this.thismonth
|
|
|
- if(this.info.applicationType==1){
|
|
|
-
|
|
|
- if(this.detailList==null){
|
|
|
- this.detailList=[];
|
|
|
- }
|
|
|
- var key=-1;
|
|
|
- var obj={};
|
|
|
- for(var i in this.detailList){
|
|
|
- var obj=this.detailList[i]
|
|
|
-
|
|
|
- if(this.info.withdrawalType==0&&obj.itemName=="提成比例(自动生成)"){
|
|
|
- key=i;
|
|
|
- }
|
|
|
- if(this.info.withdrawalType==1&&obj.itemName=="停车费(自动生成)"){
|
|
|
- key=i;
|
|
|
- }
|
|
|
- }
|
|
|
- if(this.info.withdrawalType==0){
|
|
|
- var itemAmount=0;
|
|
|
- if(this.electricityPriceX&&this.info.rewardProportion){
|
|
|
- itemAmount=((this.info.chargingProfitAmount+this.info.monthlyCardIncome-this.electricityPriceX)*this.info.rewardProportion/100).toFixed(2);
|
|
|
- }
|
|
|
- var itemRemark=""
|
|
|
- if(this.info.rewardProportion){
|
|
|
- itemRemark="比例"+this.info.rewardProportion+"%"
|
|
|
- }
|
|
|
- obj={
|
|
|
- itemName:"提成比例(自动生成)",
|
|
|
- itemRemark:itemRemark,
|
|
|
- itemAmount:itemAmount,
|
|
|
- }
|
|
|
- }else{
|
|
|
- obj={
|
|
|
- itemName:"停车费(自动生成)",
|
|
|
- itemRemark:'',
|
|
|
- itemAmount:this.info.parkingFee,
|
|
|
- }
|
|
|
- }
|
|
|
- if(key==-1){
|
|
|
- this.detailList.push(obj)
|
|
|
- }else{
|
|
|
- this.detailList[key]=(obj)
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
|
|
|
if(status==5){
|
|
@@ -887,7 +844,83 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(this.info.applicationType==1){
|
|
|
+
|
|
|
+ if(this.detailList==null){
|
|
|
+ this.detailList=[];
|
|
|
+ }
|
|
|
+ var key=-1;
|
|
|
+ var obj={};
|
|
|
+ for(var i in this.detailList){
|
|
|
+ var obj=this.detailList[i]
|
|
|
+
|
|
|
+ if(this.info.withdrawalType==0&&obj.itemName=="提成比例(自动生成)"){
|
|
|
+ key=i;
|
|
|
+ }
|
|
|
+ if(this.info.withdrawalType==1&&obj.itemName=="停车费(自动生成)"){
|
|
|
+ key=i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.info.withdrawalType==0){
|
|
|
+ var itemAmount=0;
|
|
|
+ if(this.electricityPriceX&&this.info.rewardProportion){
|
|
|
+ itemAmount=((this.info.chargingProfitAmount+this.info.monthlyCardIncome-this.electricityPriceX)*this.info.rewardProportion/100).toFixed(2);
|
|
|
+ }
|
|
|
+ var itemRemark=""
|
|
|
+ if(this.info.rewardProportion){
|
|
|
+ itemRemark="比例"+this.info.rewardProportion+"%"
|
|
|
+ }
|
|
|
+ obj={
|
|
|
+ itemName:"提成比例(自动生成)",
|
|
|
+ itemRemark:itemRemark,
|
|
|
+ itemAmount:itemAmount,
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ obj={
|
|
|
+ itemName:"停车费(自动生成)",
|
|
|
+ itemRemark:'',
|
|
|
+ itemAmount:this.info.parkingFee,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(key==-1){
|
|
|
+ this.detailList.push(obj)
|
|
|
+ }else{
|
|
|
+ this.detailList[key]=(obj)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ if(status==5){
|
|
|
+ for(var i in this.detailList){
|
|
|
+ var obj=this.detailList[i]
|
|
|
+
|
|
|
+ if(!obj.itemName){
|
|
|
+ uni.showToast({
|
|
|
+ title: `请填写提现明细中第${parseInt(i)+1}项的项目名称`
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!obj.itemAmount){
|
|
|
+ uni.showToast({
|
|
|
+ title: `请填写提现明细[${obj.itemName}]项目的金额`
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.detailList&&this.detailList.length){
|
|
|
+
|
|
|
+
|
|
|
+ if(!(this.itemApplicationAmountSum==parseFloat(this.info.applicationAmount))){
|
|
|
+ uni.showToast({
|
|
|
+ title: `[申请提现金额]与[明细金额合计]不相等`
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if(this.info.invoiceRequired!=''){
|
|
|
this.info.invoiceRequired=this.info.invoiceRequired=='1'?true:false
|
|
|
}
|
|
@@ -1012,6 +1045,11 @@
|
|
|
this.isReady=true;
|
|
|
this.info = res.data.record;
|
|
|
this.isSecond= this.info.isSecond
|
|
|
+ for(var i in this.stationList){
|
|
|
+ if(this.stationList[i].id==this.info.stationId){
|
|
|
+ this.stationObj = this.stationList[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
this.id=this.info.id
|
|
|
if(!this.isSecond){
|
|
|
this.info.endTime=this.endTime;
|