小牛集卡web 客户端
chenwei
8 days ago 2621fec0d7ce1db0a2302c6c1ac0f08b36ae8a63
src/components/agopage/comment/BoxType.vue
@@ -453,6 +453,7 @@
    orderall: {
      handler(val) {
        this.orderType = val.OrderType;
        this.pollArr =[];
        for (var i = 0; i < val.tempOrderForms.length; i++) {
       
          val.tempOrderForms[i].isNumDisable = false;
@@ -483,6 +484,11 @@
          } else {
            val.tempOrderForms[i].tempOrder.IsCarPooling = true;
          }
          // //刷新后还没返回价格的
          // if( val.tempOrderForms[i].tempOrder.IsInquiryAllowed==2){
          //   this.pollArr.push(val.tempOrderForms[i].tempOrder.TempOrderID)
          // }
        }
        this.tempOrderForms = val.tempOrderForms;
      },
@@ -621,6 +627,10 @@
        type: "warning",
      })
        .then(() => {
          if(this.tempOrderForms.length==1){
            this.$message.error("请保持至少一条数据");
            return;
          }
          this.$axios
            .post(
              "/api/Order/DeleteSingeTmpOrder",
@@ -639,9 +649,29 @@
    },
    //询价
    enquiry(id, item,index) {
      this.tempOrderForms[index].tempOrder.IsInquiryAllowed = 2;
      item.orderData.TempOrderID = id;
      this.getEnquiry(item.orderData);
              this.tempOrderForms[index].tempOrder.IsInquiryAllowed = 2;
            this.getEnquiry(item.orderData);
      // //判断普通箱子的询价和特殊箱子的询价所要传的内容
      // if(item.tempOrder.Container.CntrType==2){
      //     var isNull = false
      //     for(let key in item.orderData){
      //         if(item.orderData[key]==""){
      //           isNull = true;
      //         }
      //     }
      //     if(isNull){
      //         this.$message.error("请填写信息");
      //     }else{
      //        this.tempOrderForms[index].tempOrder.IsInquiryAllowed = 2;
      //       this.getEnquiry(item.orderData);
      //     }
      // }else{
      //    this.tempOrderForms[index].tempOrder.IsInquiryAllowed = 2;
      //      this.getEnquiry(item.orderData);
      // }
    },
    //定时器轮询价格
    async getPolling(model) {
@@ -650,14 +680,15 @@
        .then((res) => {
          // this.pollData = res.data;
          // 是否返回询价的接口
          if(res.data.length>0 &&this.tempOrderForms.length>0){
            for(var i=0,j=0;i<res.data.length,j<this.tempOrderForms.length;i++,j++){
                if(res.data[i].TempOrderID==this.tempOrderForms[j].tempOrder.TempOrderID){
          if(res.data.length>0 && this.pollArr.length>0){
            for(var i=0;i<res.data.length;i++){
              for(var j=0;j<this.tempOrderForms.length;j++){
                    if(res.data[i].TempOrderID==this.tempOrderForms[j].tempOrder.TempOrderID){
                  this.tempOrderForms[j].tempOrder.BaseMoney = res.data[i].OdiqMoney;
                  this.tempOrderForms[j].tempOrder.IsInquiryAllowed = 0;
                   this.pollArr.splice(i, 1);
                  console.log("拿到返回询价的值",res.data[i].TempOrderID);
                }
              }
            }
          }
        })