付延余
2022-07-29 a0f333ef7944e2964e6807e86fd6ebe50f66402f
pages/edit-my-application/edit-my-application.vue
@@ -4,7 +4,7 @@
    <!-- page-mete的page-style属性相当于HTML的body属性 -->
    <!-- <page-meta :page-style="spanStyle"></page-meta> -->
    <!-- 表单 -->
    <combination-title class="newApplicationTitle" title="新增"></combination-title>
    <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
    <!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> -->
@@ -35,13 +35,13 @@
        </u-form-item>
      </u--form>
    </view>
    <!-- 申请日历、范围时间 -->
    <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110"
                :maxDate="maxDate"></u-calendar>
    <!-- 申请付款方式弹出菜单 -->
    <!-- <u-action-sheet :show="showPayType" :actions="actions" title="请选择付款方式" @close="showPayType = false" @select="sexSelect"></u-action-sheet> -->
    <!-- 选择客户弹框 -->
    <!--  @touchmove.stop.prevent="moveHandleCustomer":防止图层穿透 -->
    <!-- <view class="selectCustomerPopup">
@@ -107,7 +107,7 @@
        @select="selectCustomerSelect"
      ></u-action-sheet>
    </view> -->
    <!-- 级别菜单项 -->
    <!-- <view class="selectLevelSheet">
      <u-action-sheet :show="selectLevelShow" :actions="levelList" title="请选择级别" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet>
@@ -116,7 +116,7 @@
</scroll-view>
</u-popup>
</view> -->
    <!-- 选择合同 -->
    <!-- @touchmove.stop.prevent="moveHandleContract" -->
    <!-- <view class="selectCustomerPopup">
@@ -202,7 +202,7 @@
          </uni-tr>
        </uni-table>
      </view>
      <view class="TableUtilBtn">
        <uni-table border emptyText="暂无更多数据">
          <uni-tr><uni-th align="center">操作</uni-th></uni-tr>
@@ -243,8 +243,8 @@
</u-popup>
</view>
-->
    <!-- 添加合同子项 -->
    <view class="addContractContainer">
      <u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22">
@@ -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>
@@ -375,7 +375,7 @@
                              <uni-td align="center">{{ item.val }}</uni-td>
                              <uni-td align="center">{{ item.price }}</uni-td>
                            </uni-tr>
                          </uni-table>
                        </u-checkbox-group>
                      </view>
@@ -400,18 +400,18 @@
                            v-model="addContractFormdata.quant"></u--input>
                </u-form-item>
              </view>
              <!-- <u-form-item label="发站" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.fromStation" border="none"></u--input></u-form-item>
              <u-form-item label="到站" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.toStation" border="none"></u--input></u-form-item>
              <u-form-item label="运费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost1" border="none"></u--input></u-form-item>
              <u-form-item label="抑尘费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> -->
            </u--form>
            <view class="addContractConfirm">
              <u-button text="添加" type="primary" @click="addContractSanConfirm"></u-button>
            </view>
          </view>
          <!-- 选择煤厂 -->
          <view class="coalFiledSelectPopup">
            <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom"
@@ -444,7 +444,7 @@
                      </uni-tr>
                    </uni-table>
                  </view>
                  <view class="TableUtilBtn">
                    <uni-table border emptyText="暂无更多数据">
                      <uni-tr>
@@ -465,7 +465,7 @@
              </scroll-view>
            </u-popup>
          </view>
          <!-- 选择收货人 -->
          <view class="selectCustomerPopup">
            <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose"
@@ -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>
@@ -547,7 +547,7 @@
              </scroll-view>
            </u-popup>
          </view>
          <!-- 品种选择器 -->
          <view class="addContractCoalPicker">
            <u-picker
@@ -560,7 +560,7 @@
                keyName="label"
            ></u-picker>
          </view>
          <!-- 运输选择器 -->
          <view class="addContractCoalPicker">
            <u-picker
@@ -576,9 +576,9 @@
        </scroll-view>
      </u-popup>
    </view>
    <!-- 申请表格 -->
    <view class="newApplicationTable">
      <!-- <uni-table border stripe emptyText="暂无更多数据">
        <uni-tr v-for="(item, index) in 12" :key="index">
@@ -601,7 +601,7 @@
      <view class="balanceNo" v-if="accountDetails.balanceTotal < 0">
        <text style="color:red;">客户账户当前处于欠款状态</text>
      </view>
      <view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0">
        <text style="color: #FFA500;;">客户账户现汇余额:{{
            accountDetails.balanceTotal
@@ -630,7 +630,7 @@
                  <text>{{ item.compName }}</text>
                </view>
              </view>
              <view class="cardList_item">
                <view class="">
                  品种:
@@ -658,28 +658,28 @@
          </view>
        </u-swipe-action-item>
      </u-swipe-action>
      <view class="addCard" @click="addContractClick">
        <view class="addCard-icon">
          <u-icon name="plus" size="100"></u-icon>
        </view>
      </view>
    </view>
    <view class="new-application-button">
      <u-button text="取消" :plain="true" type="primary" @click="backPage"></u-button>
      <u-button text="确定" type="primary" @click="newApplicationFormDataClick"></u-button>
    </view>
    <!-- 菜单栏 -->
    <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
  </view>
</template>
<script>
import combinationTitle from '@/components/common/combined-title/combined-title.vue';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
// 最大显示的日期
const d = new Date();
const year = d.getFullYear();
@@ -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: [],
      // 类型
@@ -817,7 +817,7 @@
        //     trigger: ['blur', 'change']
        //   }
        // ],
      },
      addContractFormdata: {
        // id:null,
@@ -844,7 +844,7 @@
        // toStation: '',
        // trainType: 1,
        // type: ''
      },
      contractDetails: [], // 选择的合同详情
      // 选择煤厂
@@ -858,7 +858,7 @@
      addContractCoalShow: false,
      addContractCoalData: [[]],
      // 运输类型
      // 优惠
      favouredpolicyListAll: [], //优惠政策列表所有的
      favouredpolicyList: [], // 优惠政策列表
@@ -916,7 +916,7 @@
  },
  onLoad(options) {
    this.editApplicationTableId = JSON.parse(options.index);
  },
  onShow() {
    if (this.menuShow == true) {
@@ -979,14 +979,14 @@
        }
      });
      this.favouredpolicyList = list;
      return true;
    },
    async currentRowComputed() {
      //变价格用的
      this.changePriceMode(this.addContractFormdata.priceMode);
      //变订单量
      if (this.addContractFormdata.id != null) {
        if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
@@ -1003,7 +1003,7 @@
            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);
          }
@@ -1014,29 +1014,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: {
@@ -1097,10 +1097,10 @@
        this.newFormData = res.data;
        this.timeDataStr = this.newFormData.startDate;
      })
      // 获取合同详情,煤种
      await this.getContractDetails();
      // 初始化当前申请客户账户情况
      if(this.newFormData.customerId){
        await this.$reqGet('getAccount', {customerId: this.newFormData.customerId}).then(res => {
@@ -1119,8 +1119,8 @@
          this.selectOKfavouredpolicyValue.push(Number(item));
        });
      }
      // 获取价格
      // this.getNewPriceData = this.addContractFormdata;
      this.getNewPriceData.compName = this.newFormData.contractOrders[this.applicationOrderIndex].compName;
@@ -1137,7 +1137,7 @@
      this.getNewPriceData.coalName = this.newFormData.contractOrders[this.applicationOrderIndex].coalName;
      // 获取合同煤种价格
      this.getNewPrice();
      // 初始化第一次优惠价格计算
      // this.$nextTick(()=>{
      if (this.selectOKfavouredpolicyValue.length == 0) {
@@ -1151,7 +1151,7 @@
        })
      }
      // })
      // 订单运输类型
      switch (this.addContractFormdata.trainType) {
        case 1:
@@ -1161,12 +1161,12 @@
          this.addContractTransport = '路运';
          break;
      }
      this.$nextTick(() => {
        this.addContractShow = true;
      })
    },
    getContractDetails() {
      uni.showLoading({
@@ -1202,7 +1202,7 @@
          }
        })
      }
    },
    // 选择客户
    selectCustomer() {
@@ -1223,11 +1223,11 @@
    },
    // 客户选择弹框打开了
    // selectCustomerOpen() {
    //    // this.spanStyle = 'overflow:hidden'; //当蒙层弹起时,固定界面禁止滚动,当蒙层关闭时,允许滚动
    //     // this.spanStyle = 'overflow:hidden'; //当蒙层弹起时,固定界面禁止滚动,当蒙层关闭时,允许滚动
    // },
    // selectCustomerClose() {
    //    // this.spanStyle = 'overflow:auto'; // 让html的body可滑动
    //    // this.selectCustomerShow = false;
    //     // this.spanStyle = 'overflow:auto'; // 让html的body可滑动
    //     // this.selectCustomerShow = false;
    // },
    // 获取单位树
    fetchCompTree() {
@@ -1280,7 +1280,7 @@
      this.newFormData.customerId = v.id;
      this.$reqGet('getAccount', {customerId: v.id}).then(res => {
        this.accountDetails = res.data;
        this.searchContractForm.customerName = res.data.customerName;
      });
      this.$nextTick(() => {
@@ -1313,126 +1313,126 @@
        this.timeDataStr = v[0] + ' 至 ' + v[v.length - 1];
      });
    },
    // 选择合同
    // 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.selectContractTypeShow = false;
    //    if (v) {
    //       this.searchContractForm.type = v.value[0];
    //    }
    //     // 初始化合同类型选择器
    //     this.selectContractTypeData[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;
    //    // 价格参数赋值
    //    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);
    //       });
    //     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);
    //         });
    // },
    // 添加订单按钮
    addContractClick() {
@@ -1480,7 +1480,7 @@
                  trainType: 1,
                  type: ''
                };
                // this.getNewPriceData.type = this.newFormData.type;
                // this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName;
                // this.getNewPriceData.customerAddressId = this.addContractFormdata.id;
@@ -1489,7 +1489,7 @@
                // this.getNewPriceData.coalName =this.addContractFormdata.coalName;
                // 获取合同煤种价格
                // this.getNewPrice();
                // 运输类型初始化
                switch (this.addContractFormdata.trainType) {
                  case 1:
@@ -1499,10 +1499,10 @@
                    this.addContractTransport = '路运';
                    break;
                }
                // 获取合同详情,煤种
                this.getContractDetails();
                this.multipleSelection = [];
              }
            }
@@ -1534,9 +1534,9 @@
      this.addContractFormdata.compId = e.compId;
      this.addContractFormdata.filedId = e.id;
      this.addContractFormdata.fromStation = e.toStation;
      this.selectCoalFiledData = e;
      this.coalFiledSelectShow = false;
    },
    // 收货人
@@ -1565,15 +1565,15 @@
      this.$nextTick(() => {
        this.addContractConsigneeShow = false;
      });
      // 赋值给取价格请求参数
      this.getNewPriceData.customerAddressName = v.customerFullName;
      this.getNewPriceData.customerAddressId = v.id;
      this.getNewPriceData.toStation = v.toStation;
      this.addContractFormdata.toStation = v.toStation;
      this.addContractFormdata.customerAddressId = v.id;
      // 添加煤种选项
      this.contractDetails.forEach(item => {
        let a = [{label: '', id: ''}];
@@ -1584,23 +1584,23 @@
        }
        this.addContractCoalData.push(a);
      });
    },
    // 品种选择器
    addContractCoalConfirm(e) {
      // console.log('品种选择器', e);
      this.addContractCoalShow = false; // 关闭选择器
      this.addContractFormdata.coalId = e.value[0].id;
      this.addContractFormdata.coalName = e.value[0].label;
      // 煤种价格请求(煤厂=>价格参数)
      this.getNewPriceData.coalId = e.value[0].id;
      this.getNewPriceData.coalName = e.value[0].label;
      // this.selectCoalFiledData.compId = e.compId;
      // this.selectCoalFiledData.compName = e.compName;
      // this.selectCoalFiledData.toStation = e.fromStation;
      this.getNewPrice();
    },
    getNewPrice() {
@@ -1616,7 +1616,7 @@
            this.currentCoal.steelMillPrice = data.steelMillPrice; // 钢厂价格
            this.currentCoal.modifyId = data.modifyId; //修改id
            this.currentCoal.modifyInfoId = data.id;
            this.addContractFormdata.price = data.steelMillPrice;
            this.addContractFormdata.modifyId = data.modifyId;
            // this.addContractFormdata.id = data.id;
@@ -1638,7 +1638,7 @@
      if (e) {
        this.addContractFormdata.priceMode = e;
      }
      this.addContractFormdata.price = this.afterPrice.quotePrice;
      switch (this.addContractFormdata.priceMode) {
        case '0':
@@ -1704,7 +1704,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 +1780,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 +1801,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 +1815,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 +1824,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 +1870,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
          //     });
          // });
        }
      });
@@ -1894,7 +1886,7 @@
  }
};
</script>
<style lang="scss" scoped>
@include tableMainStyle();
::v-deep.new-application-form-data {
@@ -1904,13 +1896,13 @@
  .newApplicationTitle {
    margin-bottom: 0;
  }
  // 表单
  .formDataContaniner {
    .u-form {
      width: 91%;
      margin: 0 auto 0;
      .u-form-item {
        .u-form-item__body {
          .u-form-item__body__left {
@@ -1919,7 +1911,7 @@
              }
            }
          }
          .u-form-item__body__right {
            .u-form-item__body__right__content {
              .u-form-item__body__right__content__slot {
@@ -1930,61 +1922,61 @@
      }
    }
  }
  // 选择客户弹框
  .selectCustomerPopup {
    .u-popup {
      .u-transition {
        height: 95%;
        .u-popup__content {
          overflow: scroll !important;
          .selectCustomerTitle {
            margin-bottom: 0;
          }
          .selectCustomerContainer {
            padding: 0 4%;
            // .loadmoreClass{
            //    .u-loadmore{
            //       .u-loadmore__content{
            //          .u-loadmore__content__text{
            //          }
            //       }
            //    }
            //     .u-loadmore{
            //         .u-loadmore__content{
            //             .u-loadmore__content__text{
            //             }
            //         }
            //     }
            // }
            .searchContainer {
            }
            .searchCustomerBtn {
              margin-top: vww(10);
              display: flex;
              .u-button {
                width: 30%;
              }
            }
            // 数据列表
            .searchResultList {
              margin-top: vww(16);
            }
            // 合同表格
            .tableContract {
              margin-top: vww(30);
              display: flex;
              justify-content: center;
              .uni-table-scroll {
                min-width: 0 !important;
                .uni-table {
                  .uni-table-tr {
                    padding: 0;
                    font-size: vww(13);
                    .uni-table-th {
                      width: vww(100);
                      height: vww(32);
@@ -1994,7 +1986,7 @@
                      font-weight: 400;
                      background: #f5f5f5;
                    }
                    .uni-table-td {
                      line-height: vww(20);
                      padding: vww(5) vww(10);
@@ -2003,19 +1995,19 @@
                  }
                }
              }
              .tableBody {
                width: 80%;
              }
              .TableUtilBtn {
                width: 20%;
                overflow: hidden;
                .uni-table {
                  min-width: 0 !important;
                }
                .TableUtilBtnContainer {
                  .u-button {
                    width: vww(20);
@@ -2023,7 +2015,7 @@
                }
              }
            }
            // 合同类型选择器
            .selectContractTypePicker {
              .u-popup {
@@ -2032,7 +2024,7 @@
                }
              }
            }
            .selectCustomerCompSheet {
              .u-popup {
                .u-transition {
@@ -2040,7 +2032,7 @@
                }
              }
            }
            .selectLevelSheet {
              .u-popup {
                .u-transition {
@@ -2048,7 +2040,7 @@
                }
              }
            }
            // 时间选择器
            .selectContractStartTime {
              .u-popup {
@@ -2057,7 +2049,7 @@
                }
              }
            }
            .selectContractEndTime {
              .u-popup {
                .u-transition {
@@ -2070,30 +2062,30 @@
      }
    }
  }
  // 煤厂
  .addContractContainer {
    .u-popup {
      .u-transition {
        height: 95%;
        .u-popup__content {
          overflow: scroll !important;
          .addContractFormTitle {
            margin-bottom: 0;
          }
          // 搜索
          .coalFiledSelectSearch {
          }
          // 选择煤种
          .coalFiledSelectPopup {
            .u-popup {
              .u-transition {
                height: 80%;
                .u-popup__content {
                  overflow: scroll !important;
                  // 表格
@@ -2102,15 +2094,15 @@
                    display: flex;
                    justify-content: center;
                    margin: 0 auto;
                    .uni-table-scroll {
                      min-width: 0 !important;
                      .uni-table {
                        .uni-table-tr {
                          padding: 0;
                          font-size: vww(13);
                          .uni-table-th {
                            width: vww(100);
                            height: vww(32);
@@ -2120,7 +2112,7 @@
                            font-weight: 400;
                            background: #f5f5f5;
                          }
                          .uni-table-td {
                            line-height: vww(20);
                            padding: vww(5) vww(10);
@@ -2129,19 +2121,19 @@
                        }
                      }
                    }
                    .tableBody {
                      width: 80%;
                    }
                    .TableUtilBtn {
                      width: 20%;
                      overflow: hidden;
                      .uni-table {
                        min-width: 0 !important;
                      }
                      .TableUtilBtnContainer {
                        .u-button {
                          width: vww(20);
@@ -2157,39 +2149,39 @@
      }
    }
  }
  // 添加合同
  .addContractContainer {
    .u-popup {
      .u-transition {
        height: 95%;
        .u-popup__content {
          // background-color: rgb(247, 247, 247);
          overflow: scroll !important;
          .addContractForm {
            width: 92%;
            margin: 0 auto;
            // 表单
            // .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 {
              margin-top: vww(10);
              padding: vww(10);
@@ -2204,19 +2196,19 @@
                box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
                // margin-top:vww(10);
                background-color: #ffffff;
                .currentPriceContainer {
                  .currentPriceBox {
                    width: 92%;
                    margin: 0 auto;
                  }
                }
                .selectPriceContainer {
                  .selectPricebox {
                    width: 92%;
                    margin: 0 auto;
                    .selectPriceboxItem {
                      display: flex;
                      justify-content: space-between;
@@ -2225,7 +2217,7 @@
                }
              }
            }
            .formDownCard {
              border-radius: vww(4);
              padding: vww(10);
@@ -2233,12 +2225,12 @@
              margin-top: vww(10);
              background-color: #ffffff;
            }
            .addContractConfirm {
              margin-top: vww(30);
            }
          }
          // 品种选择器
          .addContractCoalPicker {
            .u-popup {
@@ -2251,19 +2243,19 @@
      }
    }
  }
  // 表格
  .newApplicationTable {
    margin: vww(40) auto;
    width: 100%;
    padding: vww(0) vww(10) vww(60) vww(10);
    box-sizing: border-box;
    .u-swipe-action {
      .u-swipe-action-item {
        box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
        margin-top: vww(10);
        .u-swipe-action-item__right {
          .u-swipe-action-item__right__button {
            .u-swipe-action-item__right__button__wrapper {
@@ -2273,28 +2265,28 @@
        }
      }
    }
    .cardList {
      height: vww(130);
      border-radius: vww(4);
      padding: vww(10);
      position: relative;
      .cardListIcon {
        position: absolute;
        right: vww(20);
        top: vww(20);
      }
      .cardList-container {
        .cardList_item {
          margin-top: vww(12);
          font-size: 14px;
          display: flex;
          view {
            width: 50%;
            &:nth-child(2) {
              margin-left: vww(20);
            }
@@ -2302,7 +2294,7 @@
        }
      }
    }
    .addCard {
      width: 100%;
      height: vww(130);
@@ -2314,15 +2306,15 @@
      box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
    }
  }
  // button
  .new-application-button {
    display: flex;
    .u-button {
      width: vww(120);
      height: vww(40);
    }
  }
}
</style>
</style>