From 910f2ef56d0d49a4ce24b2f33860dce4d739b1b4 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期三, 03 八月 2022 16:58:06 +0800
Subject: [PATCH] 项目整体细节,新增主页煤仓剩余量图表。
---
pages/edit-my-application/edit-my-application.vue | 382 ++++++++++++++++++++++++++---------------------------
1 files changed, 188 insertions(+), 194 deletions(-)
diff --git a/pages/edit-my-application/edit-my-application.vue b/pages/edit-my-application/edit-my-application.vue
index 3225f38..d1c2892 100644
--- a/pages/edit-my-application/edit-my-application.vue
+++ b/pages/edit-my-application/edit-my-application.vue
@@ -27,7 +27,7 @@
</u-form-item>
<u-form-item @click="timeShow = true" labelWidth="20%" label="鏃ユ湡" borderBottom
ref="timeDataRef">
- <u--input v-model="timeDataStr" border="none" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
+ <u--input v-model="timeDataStr" disabled disabledColor="#ffffff" border="none" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="缂栧彿" borderBottom>
@@ -268,7 +268,7 @@
<u--input v-model="addContractFormdata.coalName" disabled disabledColor="#ffffff"></u--input>
</u-form-item>
<template>
- <!-- 浠锋牸鍗$墖 -->
+ <!-- 浠锋牸鍗$墖 -->
<view class="priceList" v-if="showPrice && favouredpolicyListcomputed">
<view class="currentPriceContainer">
<u-divider text="褰撳墠浠锋牸"></u-divider>
@@ -383,7 +383,7 @@
</view>
</template>
<u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1">
- <u--input v-model="addContractTransport"></u--input>
+ <u--input v-model="addContractTransport" disabled disabledColor="#ffffff"></u--input>
</u-form-item>
</view>
<view class="formDownCard">
@@ -482,10 +482,10 @@
@click="searchCustomerForm.compName = ''"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
- <u--input v-model="selectCustomerData.customerName" border="none"
+ <u--input v-model="selectCustomerData.customerFullName" border="none"
placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''"
- @click="selectCustomerData.customerName = ''"></u-icon>
+ <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerFullName != ''"
+ @click="selectCustomerData.customerFullName = ''"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
<u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText"
@@ -503,24 +503,24 @@
<view class="searchResultList">
<u-cell-group :right-icon="false">
<u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false">
- <text slot="value" class="u-slot-value">
+ <view slot="value" class="u-slot-value">
<button
class="mini-btn"
type="default"
size="mini"
style="background: #007aff;
- color: #ffffff;
- margin: auto 0;
- height: 20px;
- line-height:20px;
- width: 43px;
- font-size: 10px;
- padding: 0;"
+ color: #ffffff;
+ margin: auto 0;
+ height: 20px;
+ line-height:20px;
+ width: 43px;
+ font-size: 10px;
+ padding: 0;"
@click="addContractConsigneeConfirm(item)"
>
閫夋嫨
</button>
- </text>
+ </view>
</u-cell>
</u-cell-group>
</view>
@@ -604,8 +604,8 @@
<view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0">
<text style="color: #FFA500;;">瀹㈡埛璐︽埛鐜版眹浣欓:{{
- accountDetails.balanceTotal
- }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : customerChengdui }}
+ accountDetails.balance == null ? 0 : accountDetails.balance
+ }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : accountDetails.balance2 }}
</text>
</view>
<u-swipe-action>
@@ -761,7 +761,7 @@
// 閫夋嫨瀹㈡埛
selectCustomerData: {
compIds: '',
- customerName: '',
+ customerFullName: '',
level: '',
current: 1,
size: 10
@@ -789,14 +789,14 @@
// 閫夋嫨鍚堝悓
// selectContractShow: false,
// searchContractForm: {
- // current: 1,
- // size: 10,
- // num: '',
- // startDate: '',
- // endDate: '',
- // result: 2,
- // type: '',
- // customerName: ''
+ // current: 1,
+ // size: 10,
+ // num: '',
+ // startDate: '',
+ // endDate: '',
+ // result: 2,
+ // type: '',
+ // customerName: ''
// },
// contractData: [],
// 绫诲瀷
@@ -916,7 +916,6 @@
},
onLoad(options) {
this.editApplicationTableId = JSON.parse(options.index);
-
},
onShow() {
if (this.menuShow == true) {
@@ -989,23 +988,26 @@
//鍙樿鍗曢噺
if (this.addContractFormdata.id != null) {
+ console.log('杩涘叆璁$畻涔嬪墠',this.addContractFormdata);
if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
+ // console.log('杩涘叆绫诲瀷鍓嶈绠�');
let price = this.addContractFormdata.price;
if (this.addContractFormdata.trainType == 1) {
let q = this.addContractFormdata.amount / price;
this.addContractFormdata.quant = q.toFixed(2);
+ console.log('杈撳叆閲戦',this.addContractFormdata.quant);
this.addContractFormdata.cost1 = null; //杩愯垂
this.addContractFormdata.cost2 = null; //鎶戝皹璐�
} else if (this.addContractFormdata.trainType == 2) {
- //濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂
- let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
- price += cost1Price;
- price += this.dust;
- this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //杩愯垂
- this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //鎶戝皹璐�
+ //濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂
+ let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
+ price += cost1Price;
+ price += this.dust;
+ 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);
- this.addContractFormdata.amount = amount.toFixed(2);
+ let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
+ this.addContractFormdata.amount = amount.toFixed(2);
}
}
} else {
@@ -1014,29 +1016,29 @@
return true;
}
// accountMsg() {
- // this.accountMsgType = 'error';
- // if (this.accountDetails) {
- // if (this.accountDetails.balanceType == '璐�') {
- // return '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒';
- // } else {
- // let amount = 0;
- // this.newFormData.contractOrders.forEach(e => {
- // amount += Number(e.amount);
- // });
- // if (this.newFormData.payType == '0') {
- // if (this.accountDetails.balance < amount) {
- // return '瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛岀幇姹囦綑棰�:' + this.accountDetails.balance;
- // }
- // } else {
- // if (this.accountDetails.balance2 < amount) {
- // return '瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + this.accountDetails.balance2;
- // }
- // }
- // }
- // this.accountMsgType = 'warning';
- // return '瀹㈡埛璐︽埛鐜版眹浣欓:' + this.accountDetails.balance + '锛屾壙鍏戜綑棰�:' + (this.accountDetails.balance2 ? this.accountDetails.balance2 : 0);
- // }
- // return null;
+ // this.accountMsgType = 'error';
+ // if (this.accountDetails) {
+ // if (this.accountDetails.balanceType == '璐�') {
+ // return '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒';
+ // } else {
+ // let amount = 0;
+ // this.newFormData.contractOrders.forEach(e => {
+ // amount += Number(e.amount);
+ // });
+ // if (this.newFormData.payType == '0') {
+ // if (this.accountDetails.balance < amount) {
+ // return '瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛岀幇姹囦綑棰�:' + this.accountDetails.balance;
+ // }
+ // } else {
+ // if (this.accountDetails.balance2 < amount) {
+ // return '瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + this.accountDetails.balance2;
+ // }
+ // }
+ // }
+ // this.accountMsgType = 'warning';
+ // return '瀹㈡埛璐︽埛鐜版眹浣欓:' + this.accountDetails.balance + '锛屾壙鍏戜綑棰�:' + (this.accountDetails.balance2 ? this.accountDetails.balance2 : 0);
+ // }
+ // return null;
// }
},
watch: {
@@ -1223,11 +1225,11 @@
},
// 瀹㈡埛閫夋嫨寮规鎵撳紑浜�
// selectCustomerOpen() {
- // // this.spanStyle = 'overflow:hidden'; //褰撹挋灞傚脊璧锋椂锛屽浐瀹氱晫闈㈢姝㈡粴鍔紝褰撹挋灞傚叧闂椂锛屽厑璁告粴鍔�
+ // // this.spanStyle = 'overflow:hidden'; //褰撹挋灞傚脊璧锋椂锛屽浐瀹氱晫闈㈢姝㈡粴鍔紝褰撹挋灞傚叧闂椂锛屽厑璁告粴鍔�
// },
// selectCustomerClose() {
- // // this.spanStyle = 'overflow:auto'; // 璁﹉tml鐨刡ody鍙粦鍔�
- // // this.selectCustomerShow = false;
+ // // this.spanStyle = 'overflow:auto'; // 璁﹉tml鐨刡ody鍙粦鍔�
+ // // this.selectCustomerShow = false;
// },
// 鑾峰彇鍗曚綅鏍�
fetchCompTree() {
@@ -1270,7 +1272,7 @@
// 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟
selectCustomerResetFields() {
this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉
- this.selectCustomerData.customerName = '';
+ this.selectCustomerData.customerFullName = '';
this.searchCustomerForm.compName = '';
this.searchCustomerForm.levelText = '';
this.selectCustomer();
@@ -1316,123 +1318,123 @@
// 閫夋嫨鍚堝悓
// selectContract() {
- // if (this.newFormData.customerName != '') {
- // if (this.newFormData.contractOrders != []) {
- // uni.showToast({
- // title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�',
- // icon: 'error',
- // duration: 2000
- // });
- // }
- // this.selectContractShow = true;
- // } else {
- // this.$refs.formRef
- // .validate()
- // .then(res => {
- // uni.$u.toast('鏍¢獙鎴愬姛');
- // })
- // .catch(err => {
- // uni.$u.toast('璇烽�夋嫨缁撶畻瀹㈡埛');
- // });
- // }
+ // if (this.newFormData.customerName != '') {
+ // if (this.newFormData.contractOrders != []) {
+ // uni.showToast({
+ // title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�',
+ // icon: 'error',
+ // duration: 2000
+ // });
+ // }
+ // this.selectContractShow = true;
+ // } else {
+ // this.$refs.formRef
+ // .validate()
+ // .then(res => {
+ // uni.$u.toast('鏍¢獙鎴愬姛');
+ // })
+ // .catch(err => {
+ // uni.$u.toast('璇烽�夋嫨缁撶畻瀹㈡埛');
+ // });
+ // }
// },
// 閫夋嫨鍚堝悓绫诲瀷杈撳叆妗嗚幏鍙栫劍鐐硅Е鍙�
// searchContractFormTypeFocus() {
- // // 绫诲瀷寮瑰嚭妗�
- // this.selectContractTypeShow = true;
- // // 寮瑰嚭妗嗙被鍨嬭姹�
- // this.$nextTick(() => {
- // this.$reqGet('contract_type').then(res => {
- // res.data.forEach(item => {
- // this.selectContractTypeData[0].push(item.value);
- // });
- // });
- // });
+ // // 绫诲瀷寮瑰嚭妗�
+ // this.selectContractTypeShow = true;
+ // // 寮瑰嚭妗嗙被鍨嬭姹�
+ // this.$nextTick(() => {
+ // this.$reqGet('contract_type').then(res => {
+ // res.data.forEach(item => {
+ // this.selectContractTypeData[0].push(item.value);
+ // });
+ // });
+ // });
// },
// 閫夋嫨鍚堝悓寮规
// selectContractOpen() {
- // uni.showLoading({
- // title: '鍔犺浇涓�...'
- // });
- // this.$reqGet('contract_status').then(res => {
- // // console.log('鐘舵��', res);
- // });
- // this.$reqGet('contract', this.searchContractForm).then(res => {
- // uni.hideLoading();
- // if (res.code == 0) {
- // // console.log('鍚堝悓', res);
- // this.contractData = res.data.records;
- // }
- // });
+ // uni.showLoading({
+ // title: '鍔犺浇涓�...'
+ // });
+ // this.$reqGet('contract_status').then(res => {
+ // // console.log('鐘舵��', res);
+ // });
+ // this.$reqGet('contract', this.searchContractForm).then(res => {
+ // uni.hideLoading();
+ // if (res.code == 0) {
+ // // console.log('鍚堝悓', res);
+ // this.contractData = res.data.records;
+ // }
+ // });
// },
// selectContractClose() {
- // this.selectContractShow = false;
+ // this.selectContractShow = false;
// },
// 鍚堝悓绫诲瀷閫夋嫨鍣�
// selectContractTypeConfirm(v) {
- // this.searchContractForm.type = v.value[0];
- // this.selectContractTypeShow = false;
- // console.log('閫夋嫨鍣ㄧ‘瀹氬悗鐨勫��', v, this.searchContractForm.type);
+ // this.searchContractForm.type = v.value[0];
+ // this.selectContractTypeShow = false;
+ // console.log('閫夋嫨鍣ㄧ‘瀹氬悗鐨勫��', v, this.searchContractForm.type);
// },
// selectContractTypeClose(v) {
- // // 鍒濆鍖栧悎鍚岀被鍨嬮�夋嫨鍣�
- // this.selectContractTypeData[0] = [];
+ // // 鍒濆鍖栧悎鍚岀被鍨嬮�夋嫨鍣�
+ // this.selectContractTypeData[0] = [];
- // this.selectContractTypeShow = false;
- // if (v) {
- // this.searchContractForm.type = v.value[0];
- // }
+ // this.selectContractTypeShow = false;
+ // if (v) {
+ // this.searchContractForm.type = v.value[0];
+ // }
// },
// 鍚堝悓鏃堕棿閫夋嫨鍣�
// selectContractStartTimeConfirm(e) {
- // this.selectContractStartTimeShow = false;
- // this.searchContractForm.startDate = e[0];
+ // this.selectContractStartTimeShow = false;
+ // this.searchContractForm.startDate = e[0];
// },
// selectContractStartTimeClose() {
- // this.selectContractStartTimeShow = false;
+ // this.selectContractStartTimeShow = false;
// },
// selectContractEndTimeConfirm(e) {
- // this.selectContractEndTimeShow = false;
- // this.searchContractForm.endDate = e[0];
+ // this.selectContractEndTimeShow = false;
+ // this.searchContractForm.endDate = e[0];
// },
// selectContractEndTimeClose() {
- // this.selectContractEndTimeShow = false;
+ // this.selectContractEndTimeShow = false;
// },
// 閲嶇疆琛ㄥ崟鎵�鏈夊瓧娈�
// selectContractResetFields() {
- // this.searchContractForm.num = '';
- // this.searchContractForm.startDate = '';
- // this.searchContractForm.endDate = '';
- // this.searchContractForm.customerName = '';
- // this.searchContractForm.type = '';
+ // this.searchContractForm.num = '';
+ // this.searchContractForm.startDate = '';
+ // this.searchContractForm.endDate = '';
+ // this.searchContractForm.customerName = '';
+ // this.searchContractForm.type = '';
// },
// selectContractClick(e) {
- // console.log('閫夋嫨鍚堝悓', e);
- // this.newFormData.contractName = e.contractName;
- // this.newFormData.contractNum = e.num;
- // this.newFormData.contractId = e.id;
- // this.selectContractShow = false;
+ // console.log('閫夋嫨鍚堝悓', e);
+ // this.newFormData.contractName = e.contractName;
+ // this.newFormData.contractNum = e.num;
+ // this.newFormData.contractId = e.id;
+ // this.selectContractShow = false;
- // // 浠锋牸鍙傛暟璧嬪��
- // this.getNewPriceData.type = e.type;
- // // 閫夊畾鍚堝悓璇︽儏
- // uni
- // .request({
- // url: `/yunxiao/contractitem/getByContractId/${e.id}`,
- // method: 'GET',
- // header: {
- // 'TENANT-ID': 5,
- // Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- // VERSION: 'zzl'
- // }
- // })
- // .then(res => {
- // this.contractDetails = res[1].data.data;
- // console.log('鍚堝悓璇︽儏', res, this.contractDetails);
- // })
- // .catch(err => {
- // console.log(err);
- // });
+ // // 浠锋牸鍙傛暟璧嬪��
+ // this.getNewPriceData.type = e.type;
+ // // 閫夊畾鍚堝悓璇︽儏
+ // uni
+ // .request({
+ // url: `/yunxiao/contractitem/getByContractId/${e.id}`,
+ // method: 'GET',
+ // header: {
+ // 'TENANT-ID': 5,
+ // Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
+ // VERSION: 'zzl'
+ // }
+ // })
+ // .then(res => {
+ // this.contractDetails = res[1].data.data;
+ // console.log('鍚堝悓璇︽儏', res, this.contractDetails);
+ // })
+ // .catch(err => {
+ // console.log(err);
+ // });
// },
// 娣诲姞璁㈠崟鎸夐挳
addContractClick() {
@@ -1704,7 +1706,7 @@
this.$u.toast('娣诲姞鎴愬姛');
} else {
// this.newFormData.contractOrders.map(i => {
- // return this.newformData.contractOrders[]
+ // return this.newformData.contractOrders[]
// })
this.newFormData.contractOrders[this.applicationOrderIndex] = this.addContractFormdata;
this.addContractShow = false; // 闅愯棌寮瑰嚭妗�
@@ -1780,17 +1782,17 @@
},
// 閫夋嫨瀹㈡埛
// moveHandleCustomer() {
- // return true;
+ // return true;
// },
// moveHandleContract(){
- // return true;
+ // return true;
// },
// 鏂板缓鍙戣繍鐢宠
newApplicationFormDataClick() {
console.log('鎻愪氦鐢宠鎸夐挳');
- this.$refs.formRef
- .validate()
- .then(res => {
+ // this.$refs.formRef
+ // .validate()
+ // .then(res => {
let amount = 0;
this.newFormData.contractOrders.forEach(e => {
amount += Number(e.amount);
@@ -1801,11 +1803,7 @@
return false;
} else if (this.accountDetails.balance < amount) {
let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance;
- uni.showToast({
- title: '瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛岀幇姹囦綑棰�:' + msg,
- icon: 'error',
- duration: 2000
- });
+ this.$u.toast('瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg)
} else {
uni.showLoading({
title:'鍔犺浇涓�...'
@@ -1819,11 +1817,7 @@
return false;
} else if (this.accountDetails.balance2 < amount) {
let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2;
- uni.showToast({
- title: '瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg,
- icon: 'error',
- duration: 2000
- });
+ this.$u.toast('瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg)
} else {
uni.showLoading({
title:'鍔犺浇涓�...'
@@ -1832,15 +1826,15 @@
// this.xswaybill();
}
}
- })
- .catch(err => {
- uni.$u.toast('鏍¢獙澶辫触');
- });
+ // })
+ // .catch(err => {
+ // uni.$u.toast('鏍¢獙澶辫触');
+ // });
},
// 淇敼鐢宠淇℃伅
editShenQing() {
uni.request({
- url: '/yunxiao/xswaybill',
+ url: this.baseUrl + '/yunxiao/xswaybill',
method: "PUT",
data: this.newFormData,
header: {
@@ -1878,10 +1872,10 @@
duration: 2000
});
// this.$nextTick(() => {
- // uni.navigateBack({
- // // url: '/pages/my-application/my-application'
- // delta: 2
- // });
+ // uni.navigateBack({
+ // // url: '/pages/my-application/my-application'
+ // delta: 2
+ // });
// });
}
});
@@ -1947,12 +1941,12 @@
.selectCustomerContainer {
padding: 0 4%;
// .loadmoreClass{
- // .u-loadmore{
- // .u-loadmore__content{
- // .u-loadmore__content__text{
- // }
- // }
- // }
+ // .u-loadmore{
+ // .u-loadmore__content{
+ // .u-loadmore__content__text{
+ // }
+ // }
+ // }
// }
.searchContainer {
}
@@ -2174,20 +2168,20 @@
// 琛ㄥ崟
// .u-form{
- // .u-form-item{
- // .u-form-item__body{
- // .u-form-item__body__right{
- // .u-form-item__body__right__content__slot{
- // .u-input{
- // border:1px solid #dddddd;
- // .u-input__content{
+ // .u-form-item{
+ // .u-form-item__body{
+ // .u-form-item__body__right{
+ // .u-form-item__body__right__content__slot{
+ // .u-input{
+ // border:1px solid #dddddd;
+ // .u-input__content{
- // }
- // }
- // }
- // }
- // }
- // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
// }
.formUpCard {
--
Gitblit v1.9.1