付延余
2022-08-04 1d13033bffaa8b14f4a5edaf21a5ebb769ed0b4a
新建发运通知单,合同列表样式
1个文件已修改
52 ■■■■ 已修改文件
pages/new-application-form-data/new-application-form-data.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 {