From 1d13033bffaa8b14f4a5edaf21a5ebb769ed0b4a Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 04 八月 2022 11:47:54 +0800 Subject: [PATCH] 新建发运通知单,合同列表样式 --- pages/new-application-form-data/new-application-form-data.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 45 insertions(+), 7 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..d7f1b5a 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, @@ -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 => { @@ -1257,11 +1264,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); } }); }, @@ -1317,7 +1349,7 @@ this.getNewPriceData.type = e.type; // 閫夊畾鍚堝悓璇︽儏 uni.showLoading({ - title:'鍔犺浇涓�...' + title: '鍔犺浇涓�...' }) this.$reqGet('getByContractId', {}, e.id).then(res => { uni.hideLoading(); @@ -1858,6 +1890,12 @@ .tableBody { width: 80%; + .contractTableTd{ + width:vww(200); + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } } .TableUtilBtn { -- Gitblit v1.9.1