| | |
| | | <view :style="tdStyle">{{ item.compName }}</view> |
| | | </uni-td> |
| | | <uni-td align="left"> |
| | | <view :style="tdStyle">{{ item.customerName }}</view> |
| | | <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> |
| | |
| | | </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"> |
| | |
| | | data() { |
| | | return { |
| | | // accountMsgType: 'error', |
| | | tdStyle: 'max-height: 30px;overflow: scroll;', |
| | | tdStyle: 'max-height: 30px;overflow: auto;', |
| | | spanStyle: 'overflow:auto', |
| | | newFormData: { |
| | | amount: null, |
| | |
| | | selectContractShow: false, |
| | | searchContractForm: { |
| | | current: 1, |
| | | size: 10, |
| | | size: 50, |
| | | num: '', |
| | | startDate: '', |
| | | endDate: '', |
| | |
| | | type: '', |
| | | customerName: '' |
| | | }, |
| | | statusContractLoading: 'loadmore', |
| | | contractDataAllNum:0, // 合同总数 |
| | | contractData: [], |
| | | contractNumList: [], |
| | | // 类型 |
| | |
| | | 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 => { |
| | |
| | | }, |
| | | // 合同请求 |
| | | 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); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | |
| | | .tableBody { |
| | | width: 80%; |
| | | .contractTableTd{ |
| | | width:vww(200); |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | } |
| | | } |
| | | |
| | | .TableUtilBtn { |