From ce114e1f7e349559c1abd106b83d7595d8646393 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123 <819527061@qq.com>
Date: 星期五, 29 七月 2022 11:17:28 +0800
Subject: [PATCH] '日计划'
---
pages/edit-my-application/edit-my-application.vue | 86 +++++++++++++++++++++++--------------------
1 files changed, 46 insertions(+), 40 deletions(-)
diff --git a/pages/edit-my-application/edit-my-application.vue b/pages/edit-my-application/edit-my-application.vue
index dd12d24..2a88362 100644
--- a/pages/edit-my-application/edit-my-application.vue
+++ b/pages/edit-my-application/edit-my-application.vue
@@ -566,9 +566,9 @@
<text style="color: #FFA500;;">瀹㈡埛璐︽埛鐜版眹浣欓:{{ accountDetails.balanceTotal }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text>
</view>
<u-swipe-action>
- <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index">
+ <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="item.id">
<view class="cardList">
- <view class="" class="cardListIcon" @click="editApplicationClick(index)">
+ <view class="" class="cardListIcon" @click="editApplicationClick(item,index)">
<u-icon name="edit-pen" color="#2979ff" size="35"></u-icon>
</view>
<view class="cardList-container">
@@ -872,9 +872,26 @@
},
computed: {
afterPrice() {
- console.log(this.currentCoal,'this.currentCoal---computed')
- let temp = this.currentCoal;
- console.log(temp,'temp======================')
+ let temp = {
+ coalName: "",
+ cokingPrice: 0,
+ modifyId: 0,
+ modifyInfoId: 0,
+ noImportantPrice: 0,
+ quotePrice: 0,
+ steelMillPrice: 0,
+ type: null
+ }
+ temp = Object.assign({},this.currentCoal);
+ // temp.coalName = this.currentCoal.coalName
+ // temp.cokingPrice = this.currentCoal.cokingPrice
+ // temp.modifyId = this.currentCoal.modifyId
+ // temp.modifyInfoId = this.currentCoal.modifyInfoId
+ // temp.noImportantPrice = this.currentCoal.noImportantPrice
+ // temp.quotePrice = this.currentCoal.quotePrice
+ // temp.steelMillPrice = this.currentCoal.steelMillPrice
+ // temp.type = this.currentCoal.type
+
let favouredpolicyIds = '';
if (this.favouredpolicyList.length > 0) {
this.multipleSelection.forEach(e => {
@@ -891,7 +908,7 @@
this.addContractFormdata.favouredpolicyIds = favouredpolicyIds;
}
}
- console.log(temp,'quotePrice1111111111111111======111111111111111111111111')
+ console.log(temp,'after-------temp')
return temp;
},
showPrice() {
@@ -927,15 +944,14 @@
return true;
},
async currentRowComputed() {
- console.log('杩涘叆璁$畻锛宑urrentRowComputed');
- console.log('璺繍-------------杩涙潵',this.addContractFormdata,'this.addContractFormdata-----');
+ // return true
+ console.log('currentRowComputed-------------杩涙潵',this.addContractFormdata,'this.addContractFormdata-----');
//鍙樹环鏍肩敤鐨�
this.changePriceMode(this.addContractFormdata.priceMode);
//鍙樿鍗曢噺
if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
- console.log('璺繍-------------杩涙潵',this.addContractFormdata,'this.addContractFormdata-----222222222222222222222');
let price = this.addContractFormdata.price;
if (this.addContractFormdata.trainType == 1) {
console.log('鍦伴攢');
@@ -943,22 +959,18 @@
this.addContractFormdata.quant = q.toFixed(2);
this.addContractFormdata.cost1 = null; //杩愯垂
this.addContractFormdata.cost2 = null; //鎶戝皹璐�
- } else if (this.addContractFormdata.trainType == 2) {
+ } else if (this.addContractFormdata.trainType == 2&& (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
console.log('璺繍',this.addContractFormdata,'this.addContractFormdata-----');
//濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂
let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
- console.log('杩愯垂',cost1Price);
price += cost1Price;
- console.log(price,'price======')
price += this.dust;
- console.log(this.addContractFormdata.quant,'this.addContractFormdata.quant===')
this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //杩愯垂
this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //鎶戝皹璐�
let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
- console.log('閲戦',amount,price,Number(price * this.addContractFormdata.quant),Number(this.addContractFormdata.cost1),Number(this.addContractFormdata.cost2));
- console.log('quant:'+this.addContractFormdata.quant,'cost1:'+this.addContractFormdata.cost1,'cost2:'+this.addContractFormdata.cost2);
this.addContractFormdata.amount = amount.toFixed(2);
+
}
} else {
this.addContractFormdata.quant = null;
@@ -1044,20 +1056,21 @@
},
editApplicationFormData(){
this.$reqGet('formData',{},this.editApplicationTableId).then(res=>{
- console.log('鏁翠綋璇︽儏',res.data);
this.newFormData = res.data;
+ console.log(this.newFormData.contractOrders,'鍒濆鍖栧垪琛�-----------newFormData----------鍒濆鍖�')
this.timeDataStr = this.newFormData.startDate;
})
},
- editApplicationClick(index){
+ editApplicationClick(item,index){
+ console.log(item,'item=========')
this.applicationOrderIndex = index;// 寰呬慨鏀硅鍗昳ndex
- this.addContractFormdata = this.newFormData.contractOrders[index];
- console.log('淇敼鐨勮鍗曡鎯�1',this.addContractFormdata,index,this.newFormData.contractOrders);
- this.addContractFormdata.priceMode = this.newFormData.contractOrders[this.applicationOrderIndex].priceMode.toString();
+ this.addContractFormdata = item;
+ console.log(this.addContractFormdata,'this.addContractFormdata=============鐐瑰嚮杩涙潵鐨勬煇鍒�')
+ this.addContractFormdata.priceMode = item.priceMode.toString();
// 淇敼璁㈠崟浼樻儬鍒濆鍖�
- if(this.newFormData.contractOrders[index].favouredpolicyIds){
- this.newFormData.contractOrders[index].favouredpolicyIds.split(',').map(item=>{
- this.selectOKfavouredpolicyValue.push(Number(item));
+ if(item.favouredpolicyIds){
+ item.favouredpolicyIds.split(',').map(e=>{
+ this.selectOKfavouredpolicyValue.push(Number(e));
});
}
@@ -1100,11 +1113,12 @@
// 鑾峰彇鍚堝悓璇︽儏锛岀叅绉�
this.getContractDetails();
+ this.changePriceMode(this.addContractFormdata.priceMode);
+
this.$nextTick(()=>{
this.addContractShow = true;
})
- console.log('淇敼鐨勮鍗曡鎯�',this.addContractFormdata);
},
getContractDetails(){
uni.showLoading({
@@ -1573,34 +1587,28 @@
// console.log('鍗曢�夋灏忕粍', e);
},
changePriceMode(e) {
- console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===111');
+ console.log(e,'e==========')
+ console.log(this.currentCoal,'this.currentCoal==========')
if (!this.currentCoal) return;
- console.log('鍗曢�夋鏁板瓧',e,this.addContractFormdata.priceMode);
- console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===2222');
if(e){
this.addContractFormdata.priceMode = e;
- console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===3333');
- console.log(typeof this.addContractFormdata.priceMode,this.addContractFormdata.priceMode,'this.addContractFormdata.priceMode=======瀛楃涓�')
}
- console.log(this.afterPrice,'this.afterPrice.quotePrice=======afterPrice222222');
- console.log(this.afterPrice.cokingPrice,'this.afterPrice.quotePrice=======afterPrice222222------------');
- console.log(this.afterPrice.quotePrice,'this.afterPrice.quotePrice=======afterPrice222222------------')
this.addContractFormdata.price = this.afterPrice.quotePrice;
- console.log(this.addContractFormdata.price,'this.addContractFormdata.price=====afterPrice333333333333')
+ console.log(this.addContractFormdata.price,'this.currentCoal.price=====afterPrice333333333333')
switch (this.addContractFormdata.priceMode) {
case '0':
console.log('浠锋牸',this.afterPrice.steelMillPrice);
- this.addContractFormdata.price = this.afterPrice.steelMillPrice;
+ this.addContractFormdata.price = this.currentCoal.steelMillPrice;
break;
case '1':
- this.addContractFormdata.price = this.afterPrice.cokingPrice;
+ this.addContractFormdata.price = this.currentCoal.cokingPrice;
break;
case '2':
- this.addContractFormdata.price = this.afterPrice.noImportantPrice;
+ this.addContractFormdata.price = this.currentCoal.noImportantPrice;
break;
case '3':
- this.addContractFormdata.price = this.afterPrice.quotePrice;
- console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===444');
+ this.addContractFormdata.price = this.currentCoal.quotePrice;
+ console.log('杩涘叆鍗曢�夋',this.currentCoal,'this.addContractFormdata===444');
break;
}
},
@@ -1815,13 +1823,11 @@
this.newFormData.contractOrders.splice(e, 1);
},
xswaybill() {
- console.log('鏂板缓鍙戣繍鐢宠', this.newFormData);
uni.showLoading({
title: '鍔犺浇涓�...'
});
this.$reqPost('xswaybill', this.newFormData).then(res => {
uni.hideLoading();
- console.log('鏂板缓鍙戣繍鐢宠', res);
if (res.code == 0) {
uni.showToast({
title: '娣诲姞鎴愬姛锛�',
--
Gitblit v1.9.1