From e333d366495e2406618c5b0daf3fe53a759903a6 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 23 八月 2022 11:20:09 +0800
Subject: [PATCH] 日计划
---
pages/new-application-form-data/new-application-form-data.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/pages/new-application-form-data/new-application-form-data.vue b/pages/new-application-form-data/new-application-form-data.vue
index 36f76be..cb85960 100644
--- a/pages/new-application-form-data/new-application-form-data.vue
+++ b/pages/new-application-form-data/new-application-form-data.vue
@@ -193,10 +193,10 @@
<view :style="tdStyle">{{ item.compName }}</view>
</uni-td>
<uni-td align="left">
- <view :style="tdStyle">{{ item.customerName }}</view>
- </uni-td>
+ <view class="contractTableTd">{{ item.customerName }}</view>
+ </uni-td>
<uni-td align="center">
- <view :style="tdStyle">{{ item.coalNames }}</view>
+ <view class="contractTableTd">{{ item.coalNames }}</view>
</uni-td>
<uni-td align="left">
<view :style="tdStyle">{{ item.num }}</view>
@@ -239,6 +239,11 @@
</uni-tr>
</uni-table>
</view>
+ </view>
+ <!-- 鍚堝悓鍔犺浇鏇村 -->
+ <view class="loadmoreClass">
+ <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="statusContractLoading" @loadmore="loadingContract"
+ fontSize="20" height="30px"/>
</view>
<!-- 鍚堝悓绫诲瀷閫夋嫨鍣� -->
<view class="selectContractTypePicker">
@@ -698,7 +703,7 @@
data() {
return {
// accountMsgType: 'error',
- tdStyle: 'max-height: 30px;overflow: scroll;',
+ tdStyle: 'max-height: 30px;overflow: auto;',
spanStyle: 'overflow:auto',
newFormData: {
amount: null,
@@ -720,7 +725,7 @@
quant: null,
remark: '',
startDate: '',
- type: '澶栭攢'
+ type: ''
},
accountDetails: {},
// 鏃堕棿
@@ -798,7 +803,7 @@
selectContractShow: false,
searchContractForm: {
current: 1,
- size: 10,
+ size: 50,
num: '',
startDate: '',
endDate: '',
@@ -806,6 +811,8 @@
type: '',
customerName: ''
},
+ statusContractLoading: 'loadmore',
+ contractDataAllNum:0, // 鍚堝悓鎬绘暟
contractData: [],
contractNumList: [],
// 绫诲瀷
@@ -1164,7 +1171,7 @@
this.$reqGet('getAccount', {customerId: v.id}).then(res => {
console.log('瀹㈡埛閫夋嫨璐︽埛', res);
this.accountDetails = res.data;
- this.searchContractForm.customerFullName = res.data.customerName;
+ this.searchContractForm.customerName = res.data.customerName;
this.reqContract();
this.$nextTick(() => {
this.contractData.forEach(item => {
@@ -1223,7 +1230,6 @@
}
this.selectContractShow = true;
-
} else {
this.$refs.formRef
.validate()
@@ -1257,11 +1263,36 @@
},
// 鍚堝悓璇锋眰
reqContract() {
+ this.searchContractForm.current = 1;
this.$reqGet('contract', this.searchContractForm).then(res => {
uni.hideLoading();
if (res.code == 0) {
console.log('鍚堝悓', res);
this.contractData = res.data.records;
+ this.contractDataAllNum = res.data.total;
+ }
+ });
+ },
+ // 鍚堝悓鍔犺浇鏇村
+ loadingContract(){
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ console.log('鍚堝悓鍔犺浇鏇村浜嬩欢',this.statusContractLoading);
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) return;
+ this.statusContractLoading = 'loading';
+ this.searchContractForm.current = ++this.searchContractForm.current;
+ this.$reqGet('contract', this.searchContractForm).then(res => {
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) {
+ this.statusContractLoading = 'nomore';
+ this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
+ }
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.contractDataAllNum = res.data.total;
+ this.contractData = this.contractData.concat(res.data.records);
+ this.statusContractLoading = 'loadmore';
+ console.log(this.searchContractForm);
}
});
},
@@ -1311,13 +1342,14 @@
this.newFormData.contractName = e.contractName;
this.newFormData.contractNum = e.num;
this.newFormData.contractId = e.id;
+ this.newFormData.type = e.type;
this.selectContractShow = false;
// 浠锋牸鍙傛暟璧嬪��
this.getNewPriceData.type = e.type;
// 閫夊畾鍚堝悓璇︽儏
uni.showLoading({
- title:'鍔犺浇涓�...'
+ title: '鍔犺浇涓�...'
})
this.$reqGet('getByContractId', {}, e.id).then(res => {
uni.hideLoading();
@@ -1575,6 +1607,7 @@
if (this.editApplicationIndex != null) {
this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata;
} else {
+ this.addContractFormdata.type = this.newFormData.type
this.newFormData.contractOrders.push(this.addContractFormdata);
console.log('娣诲姞瀛愯鍗�', this.addContractFormdata);
}
@@ -1858,6 +1891,12 @@
.tableBody {
width: 80%;
+ .contractTableTd{
+ width:vww(200);
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
}
.TableUtilBtn {
--
Gitblit v1.9.1