小牛集卡web 客户端
chenwei
9 days ago e41faf1640e2e71febf4ba347a301e0c043b6ce9
港口达下单的完善
8 files modified
741 ■■■■■ changed files
src/components/agopage/comment/AddBox.vue 32 ●●●●● patch | view | raw | blame | history
src/components/agopage/comment/BoxAdress.vue 18 ●●●● patch | view | raw | blame | history
src/components/agopage/comment/BoxType.vue 187 ●●●●● patch | view | raw | blame | history
src/components/agopage/comment/InfoDialog.vue 8 ●●●● patch | view | raw | blame | history
src/components/agopage/home/Harbour.vue 4 ●●●● patch | view | raw | blame | history
src/components/agopage/home/Wind.vue 168 ●●●● patch | view | raw | blame | history
src/components/agopage/map/AiAdress.vue 50 ●●●● patch | view | raw | blame | history
src/views/agomiddle/InquiryCenter.vue 274 ●●●● patch | view | raw | blame | history
src/components/agopage/comment/AddBox.vue
@@ -2,27 +2,27 @@
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="常规箱子" name="first">
        <div class="show-box" v-for="(item, index) in 6" :key="index">
        <div class="show-box" v-for="(item, index) in allData.ContainerList" :key="index">
          <div class="box">
            <i class="iconfont icon-jizhuangxiang_container"></i>
            <span>20GP</span>
            <span>限重30T</span>
            <span>{{item.CntrName}}</span>
            <span>{{item.CntrSubtitle}}</span>
          </div>
          <div class="switch">
          <!-- <div class="switch">
            <el-switch v-model="value1" active-text="拼车"> </el-switch>
          </div>
          </div> -->
        </div>
      </el-tab-pane>
      <el-tab-pane label="特种箱" name="second">
        <div class="show-box" v-for="(item, index) in 6" :key="index">
        <div class="show-box" v-for="(sitem, sindex) in allData.SpecialContainerList" :key="sindex">
          <div class="box">
            <i class="iconfont icon-jizhuangxiang_container"></i>
            <span>40RH</span>
            <span>限重30T</span>
            <span>{{sitem.CntrName}}</span>
            <span>{{sitem.CntrSubtitle}}</span>
          </div>
          <div class="switch">
          <!-- <div class="switch">
            <el-switch v-model="value1" active-text="拼车"> </el-switch>
          </div>
          </div> -->
        </div>
      </el-tab-pane>
      <div class="btn">
@@ -37,9 +37,21 @@
    return {
      activeName: "second",
      value1: true,
      allData:{}
    };
  },
  created(){
    this.getBoxList();
  },
  methods: {
    //请求箱型列表
    async getBoxList(){
      await this.$axios.get("/api/HomePage/GetOrderForm").then(res=>{
            this.allData = res.data;
      }).catch(err=>{
          console.log(err);
      })
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
src/components/agopage/comment/BoxAdress.vue
@@ -2,9 +2,12 @@
  <div>
    <div class="form-input">
      <div class="tibox-adres">
        <el-input @focus="tiFocus" readonly v-model="playBox"></el-input>
        <el-input @focus="tiFocus" readonly v-model="playBox" @blur="boxBlur"></el-input>
        <div class="select-tibox" v-if="isTShow">
          <el-tabs v-model="subform.CityId" @tab-click="handleClick">
          <div class="empty" v-if="boxaddress.length==0">
              暂 无 数 据
          </div>
          <el-tabs v-else v-model="subform.CityId" @tab-click="handleClick">
            <el-tab-pane
              v-for="(item, cindex) in boxaddress"
              :key="cindex+6"
@@ -69,6 +72,12 @@
        tiFocus(){
            this.isTShow=true;
        },
        boxBlur(){
          console.log(this.returnBoxAdress)
          if(this.returnBoxAdress.length==0){
            this.isTShow = false;
          }
        },
        handleClick(val){
            console.log(val);
        },
@@ -119,4 +128,9 @@
.suffix-txt .shortcut:hover {
  color: #409eff;
}
.empty{
  text-align: center;
  padding: 6px 0px;
  color: #c3c3c3;
}
</style>
src/components/agopage/comment/BoxType.vue
@@ -45,10 +45,10 @@
              </div>
              <div class="box" @click="perfectInfo(item, index)">
                <span v-if="item.tempOrder.TempOrderContainer.length != 0"
                  >箱号:{{
                    item.tempOrder.TempOrderContainer[0].ContainerNo
                  }}</span
                <div style="width:100px;overflow:hidden;" v-if="item.tempOrder.TempOrderContainer.length != 0"
                  >提单号:{{
                    item.tempOrder.TempOrderContainer[0].BolCode
                  }}</div
                >
                <span v-else>请点击此处完善信息</span>
                <i class="el-icon-s-unfold"></i>
@@ -121,9 +121,19 @@
              </div>
              <div
                style="text-align: center; color: #d9001b; width: 50px"
                v-if="item.tempOrder.ToTalMoney != null"
                v-if="item.tempOrder.BaseMoney != null&&!(item.tempOrder.IsUrgent)"
              >
                ¥{{ item.tempOrder.ToTalMoney }}
                ¥{{(item.tempOrder.BaseMoney)*(item.tempOrder.ContainerNub)}}
              </div>
              <div
                style="text-align: center; color: #d9001b; width: 50px"
                v-if="item.tempOrder.BaseMoney != null&&item.tempOrder.IsUrgent"
              >
                ¥{{(item.tempOrder.BaseMoney+item.tempOrder.UrgentMoney)*(item.tempOrder.ContainerNub)}}
              </div>
              <div v-if="item.tempOrder.BaseMoney == null"   style="text-align: center; color: #d9001b; width: 50px">
                  ¥0
              </div>
              <div class="money">
                <!-- style="min-width: 42px" -->
@@ -141,14 +151,21 @@
                    size="mini"
                    icon="el-icon-document-copy"
                    title="复制"
                    @click="copyBox(item,index)"
                  >
                  </el-button>
                </div>
                     <el-button  v-if="item.tempOrder.IsInquiryAllowed == 2" type="info" size="mini" disabled>询价中</el-button>
                <div v-if="item.tempOrder.IsInquiryAllowed == 1">
                  <button @click="enquiry(item.tempOrder.TempOrderID, item)">
                  <button @click="enquiry(item.tempOrder.TempOrderID, item,index)">
                    <i class="el-icon-phone-outline"></i> 询 价
                  </button>
                </div>
                <div
                  style="width: 72px"
                  v-if="item.tempOrder.IsInquiryAllowed == 0"
@@ -164,7 +181,7 @@
                <div v-if="item.tempOrder.Container.CntrType == 2">
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'FR'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'FR'
                    "
                    class="two"
                  >
@@ -209,7 +226,7 @@
                  <!-- RF -->
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'RF'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'RF'
                    "
                    class="two"
                  >
@@ -240,7 +257,7 @@
                  <!--OT  -->
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'OT'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'OT'
                    "
                    class="two"
                  >
@@ -263,7 +280,7 @@
                  </div>
                  <!-- 初次之外的样式 -->
                  <div   v-if="
                      (item.tempOrder.Container.CntrName.substring(2) != 'OT'&& item.tempOrder.Container.CntrName.substring(2) != 'FR')&& item.tempOrder.Container.CntrName.substring(2) != 'RF'
                      (item.tempOrder.Container.CntrName.substring(2,4) != 'OT'&& item.tempOrder.Container.CntrName.substring(2,4) != 'FR')&& item.tempOrder.Container.CntrName.substring(2,4) != 'RF'
                    "
                    class="two" >
                        <div class="input-info">
@@ -283,90 +300,90 @@
                 <div v-if="item.tempOrder.Container.CntrType == 2">
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'FR'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'FR'
                    "
                    class="two"
                  >
                    <div class="input-info">
                      <span>货物:</span>
                       <span>{{item.orderData.OdiqGoods}}</span>
                       <span>{{item.orderinqiry.OdiqGoods}}</span>
                    </div>
                    <div class="bulk">
                      <div>
                        <span>长:</span>
                        <span>{{item.orderData.OdiqLong}}</span>
                        <span>{{item.orderinqiry.OdiqLong}}</span>
                      </div>
                      <div>
                        <span>宽:</span>
                        <span>{{item.orderData.OdiqWidth}}</span>
                        <span>{{item.orderinqiry.OdiqWidth}}</span>
                       
                      </div>
                      <div>
                        <span>高:</span>
                        <span>{{item.orderData.OdiqHeight}}</span>
                        <span>{{item.orderinqiry.OdiqHeight}}</span>
                      </div>
                    </div>
                    <div class="input-remark">
                      <span>备注:</span>
                      <span>{{item.orderData.OdiqRemarks}}</span>
                      <span>{{item.orderinqiry.OdiqRemarks}}</span>
                    </div>
                  </div>
                  <!-- RF -->
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'RF'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'RF'
                    "
                    class="two"
                  >
                    <div class="input-info">
                      <span><i class="iconfont icon-wendu1"></i>温度:</span>
                      <span>{{item.orderData.OdiqTemperature}}℃</span>
                      <span>{{item.orderinqiry.OdiqTemperature}}℃</span>
                    </div>
                    <div class="input-info">
                      <span>货物:</span>
                      <span>{{item.orderData.OdiqGoods}}</span>
                      <span>{{item.orderinqiry.OdiqGoods}}</span>
                    </div>
                    <div class="input-remark">
                      <span>备注:</span>
                      <span>{{item.orderData.OdiqRemarks}}</span>
                      <span>{{item.orderinqiry.OdiqRemarks}}</span>
                    </div>
                  </div>
                  <!--OT  -->
                  <div
                    v-if="
                      item.tempOrder.Container.CntrName.substring(2) == 'OT'
                      item.tempOrder.Container.CntrName.substring(2,4) == 'OT'
                    "
                    class="two"
                  >
                    <div class="input-info">
                      <span>货物:</span>
                      <span>{{item.orderData.OdiqGoods}}</span>
                      <span>{{item.orderinqiry.OdiqGoods}}</span>
                    </div>
                    <div class="bulk">
                      <div>
                        <span>高:</span>
                        <span>{{item.orderData.OdiqHeight}}</span>
                        <span>{{item.orderinqiry.OdiqHeight}}</span>
                      </div>
                    </div>
                    <div class="input-remark">
                      <span>备注:</span>
                      <span>{{item.orderData.OdiqRemarks}}</span>
                      <span>{{item.orderinqiry.OdiqRemarks}}</span>
                    </div>
                  </div>
                  <!-- 初次之外的样式 -->
                  <div   v-if="
                      (item.tempOrder.Container.CntrName.substring(2) != 'OT'&& item.tempOrder.Container.CntrName.substring(2) != 'FR')&& item.tempOrder.Container.CntrName.substring(2) != 'RF'
                      (item.tempOrder.Container.CntrName.substring(2,4) != 'OT'&& item.tempOrder.Container.CntrName.substring(2,4) != 'FR')&& item.tempOrder.Container.CntrName.substring(2,4) != 'RF'
                    "
                    class="two" >
                        <div class="input-info">
                      <span>货物:</span>
                      <span>{{item.orderData.OdiqGoods}}</span>
                      <span>{{item.orderinqiry.OdiqGoods}}</span>
                    </div>
                  
                    <div class="input-remark">
                      <span>备注:</span>
                       <span>{{item.orderData.OdiqRemarks}}</span>
                       <span>{{item.orderinqiry.OdiqRemarks}}</span>
                    </div>
                  </div>
                </div>
@@ -387,7 +404,7 @@
        :demo="perfectBoxData"
        :count="boxCount"
        :type="orderType"
        :self="selfOwer"
        @info="acceptInfo"
      ></info-dialog>
    </el-dialog>
@@ -422,7 +439,7 @@
      boxCount: 1,
      begin: {},
      orderType:0, //装卸类型
      selfOwer:false
    };
  },
  props: ["orderall"],
@@ -435,20 +452,9 @@
  watch: {
    orderall: {
      handler(val) {
        console.log("箱子类型里面收到的值",val)
        this.orderType = val.OrderType;
        for (var i = 0; i < val.tempOrderForms.length; i++) {
          // var orderinQiry = {
          //   TempOrderID: "",
          //   OdiqWeight: "",
          //   OdiqTemperature: "",
          //   OdiqLong: "",
          //   OdiqWidth: "",
          //   OdiqHeight: "",
          //   OdiqRemarks: "",
          //   OdiqGoods:""
          // };
          // val.tempOrderForms[i].orderData = orderinQiry;
          val.tempOrderForms[i].isNumDisable = false;
          if (
            val.tempOrderForms[i].tempOrder.IsUrgent == null ||
@@ -464,10 +470,10 @@
            val.tempOrderForms[i].tempOrder.SelfBox == 0
          ) {
            val.tempOrderForms[i].tempOrder.SelfBox = false;
            this.selfOwer = false;
            // this.selfOwer = false;
          } else {
            val.tempOrderForms[i].tempOrder.SelfBox = true;
            this.selfOwer = true;
            // this.selfOwer = true;
          }
          if (
            val.tempOrderForms[i].tempOrder.IsCarPooling == null ||
@@ -483,27 +489,48 @@
      deep: true,
    },
    pollArr(val) {
      //点击询价后该数组就有询价id了,然后进行询价
      if (val.length != 0) {
        console.log(val);
        this.begin = setInterval(() => {
          this.getPolling({ OdiqIds: val });
          if (this.pollData.length != 0) {
            this.pollData.forEach((item, index) => {
              if (this.pollArr.indexOf(item.OdiqId) > -1) {
                this.pollArr.splice(index, 1);
              }
            });
          }
        }, 3000);
          // if (this.pollData.length != 0) {
          //   this.pollData.forEach((item, index) => {
          //     if (this.pollArr.indexOf(item.OdiqId) > -1) { //里面包含此id就进行删除
          //       //已经回复价格了的进行删除
          //       this.pollArr.splice(index, 1);
          //       console.log("询价成功后",this.pollArr)
          //     }
          //   });
          // }
        }, 30000);
      } else {
        console.log(this.pollArr);
        console.log(this.begin);
        clearInterval(this.begin);
      }
    },
  },
  methods: {
    //复制箱子
    copyBox(content,index){
      var model = Object.assign(content)
        this.copySingleBox(model,index)
    },
    //复制箱子的接口
    async copySingleBox(model,index){
      await this.$axios.post("/api/Order/CopySingeContainner",this.$qs.stringify({tempOrderID:model.tempOrder.TempOrderID})).then(res=>{
        console.log(res);
        // model = Object.assign(model)
        this.$parent.getTempOrder();
         this.tempOrderForms.splice(index,0,model);
      }).catch(err=>{
        this.$message.error("复制失败");
        console.log(err)
      })
    },
    perfectInfo(content, index) {
      console.log("箱子信息",content);
      this.boxCount = index;
@@ -565,13 +592,17 @@
          SelfBox: 1,
          TempOrderID: content.tempOrder.TempOrderID,
        });
        this.selfOwer = val;
        // this.selfOwer = val;
      } else {
        this.getSingeTemp({
          SelfBox: 0,
          TempOrderID: content.tempOrder.TempOrderID,
        });
          this.selfOwer = val;
        //取消自备箱的时候清除箱号
        for(var i=0;i<content.tempOrder.TempOrderContainer.length;i++){
        }
          // this.selfOwer = val;
      }
    },
    //调整数量
@@ -600,15 +631,15 @@
              console.log(res);
            })
            .catch((err) => {
              this.$message.error("出错了");
              console.log(err);
            });
        })
        .catch(() => {});
    },
    //询价
    enquiry(id, item) {
      console.log(item);
      console.log(this.tempOrderForms);
    enquiry(id, item,index) {
      this.tempOrderForms[index].tempOrder.IsInquiryAllowed = 2;
      item.orderData.TempOrderID = id;
      this.getEnquiry(item.orderData);
    },
@@ -617,7 +648,18 @@
      await this.$axios
        .post("/api/Order/GetPollingInquiry", this.$qs.stringify(model))
        .then((res) => {
          this.pollData = res.data;
          // 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){
                  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);
                }
            }
          }
        })
        .catch((err) => {
          console.log(err);
@@ -659,8 +701,11 @@
    },
    //调整箱子信息
    acceptInfo(e) {
      console.log("修改箱子信息内容",e)
      console.log("调整箱子",this.tempOrderForms);
      this.infoDialog = false;
      var arr = [];
      //根据more里面的长度,来决定有几个箱子
      if (e.moreBox.length > 1) {
        for (var i = 0; i < e.moreBox.length; i++) {
          arr.push({
@@ -685,15 +730,21 @@
        });
      }
      this.getSingeTemp({ TempOrderID: e.id, TempOrderContainer: arr });
      // 给箱号赋值进行展示
      this.tempOrderForms[e.index].TempOrderContainer[0].ContainerNo =
        e.moreBox[0].ContainerNo;
      // 给提单号赋值进行展示
      var  a = e.index
      if(  this.tempOrderForms[a].tempOrder.TempOrderContainer.length==0){
          this.tempOrderForms[a].tempOrder.TempOrderContainer=(arr);
      }else{
          this.tempOrderForms[a].tempOrder.TempOrderContainer[0].BolCode=
        e.BolCode;
      }
      //禁用数量
      this.tempOrderForms[e.index].isNumDisable = true;
      setTimeout(() => {
        this.getTempOrder();
      }, 200);
      console.log(this.tempOrderForms);
      this.tempOrderForms[a].isNumDisable = true;
      // setTimeout(() => {
      //   this.getTempOrder();
      // }, 200);
      // console.log(this.tempOrderForms);
    },
    handleClose(done) {
src/components/agopage/comment/InfoDialog.vue
@@ -102,9 +102,10 @@
        ],
      },
      temId: "",
      self:false
    };
  },
  props: ["demo", "count","type","self"],
  props: ["demo", "count","type"],
  created() {
    this.$set(this.demo);
  },
@@ -114,6 +115,9 @@
  watch: {
    demo: {
      handler(val, oldVal) {
        console.log("箱子弹窗的值",val)
        //根据是否为自备箱进行增加或删除输入项
        this.self = val.SelfBox
        this.temId = val.TempOrderID;
        if (val.TempOrderContainer.length != 0) {
          this.ruleForm.BolCode = val.TempOrderContainer[0].BolCode;
@@ -142,7 +146,7 @@
              val.TempOrderContainer[0].ContainerNo;
            this.ruleForm.moreBox[0].BoxSeal =
              val.TempOrderContainer[0].BoxSeal;
              his.ruleForm.moreBox[0].Weight =
              this.ruleForm.moreBox[0].Weight =
              val.TempOrderContainer[0].Weight;
          }
          console.log(this.ruleForm);
src/components/agopage/home/Harbour.vue
@@ -237,7 +237,7 @@
                :class="{ activebox: activeProduct == item }"
                @click="selProeuct(item)"
              >
                {{ item }}
                {{ item.GoodsTypeName }}
              </div>
              <div class="pro-input">
                <el-input
@@ -318,7 +318,7 @@
      value1: "",
      radio1: "",
      value4: "",
      productData: ["汽车类", "钢材类"],
      productData: [],
      factory: [],
      boxType: [], //普通箱子列表
src/components/agopage/home/Wind.vue
@@ -13,20 +13,21 @@
          </div>
        </div>
        <div class="form">
          <el-form ref="form" :model="form" label-width="160px">
          <el-form ref="form" :model="submitForm" label-width="160px">
            <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <i class="iconfont icon-listmatou"></i>
                  <!-- <img src="../../../../public/img/index/boat.png" alt="" /> -->
                  <span>提箱地 : </span>
                </div>
              </template>
              <div class="form-input">
                <box-adress
                  :boxaddress="retrunPlaceList"
                  @acceptreturn="acceptReturnAdress"
                ></box-adress>
                    <box-adress
                :boxaddress="retrunPlaceList"
                @acceptreturn="acceptReturnAdress"
              ></box-adress>
              </div>
            </el-form-item>
            <el-form-item>
@@ -35,90 +36,89 @@
                  <i
                    class="iconfont icon-diaoyun_lift_jizhuangxiang_container"
                  ></i>
                  <!-- <img
                        src="../../../../public/img/index/zhuang.png"
                        alt=""
                      /> -->
                  <span>装卸地 : </span>
                </div>
              </template>
              <div class="form-input enter-text">
                <ai-adress></ai-adress>
                  <ai-adress @platfrom="platFormData"></ai-adress>
                <div class="suffix-txt">
                  <div>常用地址</div>
                  <div @click="usualAdrDialog = true">常用地址</div>
                </div>
              </div>
            </el-form-item>
            <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <!-- <img
                        src="../../../../public/img/index/haixiangdi.svg"
                        alt=""
                      /> -->
                  <i class="iconfont icon-components-full"></i>
                  <span>还箱地 : </span>
                </div>
              </template>
              <div class="form-input">
                <el-select v-model="form.region" placeholder="请选择活动区域">
                  <el-option label="区域一" value="shanghai"></el-option>
                  <el-option label="区域二" value="beijing"></el-option>
                </el-select>
                <div class="suffix-txt">
                  <div>果园港</div>
                  <div>果园港</div>
                  <div>果园港</div>
                </div>
              </div>
              <box-adress
                :boxaddress="retrunPlaceList"
                @acceptreturn="acceptReturnAdress"
              ></box-adress>
            </el-form-item>
            <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <!-- <img
                        src="../../../../public/img/index/box-state.png"
                        alt=""
                      /> -->
                  <i class="iconfont icon-express-package-full"></i>
                  <span>双托箱型 : </span>
                  <span>配拖箱型 : </span>
                </div>
              </template>
              <div class="form-input">
                <el-select v-model="form.region" placeholder="请选择活动区域">
                  <el-option label="区域一" value="shanghai"></el-option>
                  <el-option label="区域二" value="beijing"></el-option>
                </el-select>
                <div class="box-type">
                  <div >
                    <el-select v-model="value" placeholder="请选择">
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      >
                      </el-option>
                    </el-select>
                  </div>
                </div>
              </div>
            </el-form-item>
            <el-form-item>
             <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <!-- <img
                        src="../../../../public/img/index/box-state.png"
                        alt=""
                      /> -->
                  <i class="iconfont icon-express-package-full"></i>
                  <span>重量 : </span>
                </div>
              </template>
              <div class="form-input wind-weight">
                <el-input></el-input>
                <span>吨</span>
              <div class="form-input">
                <div class="box-type">
                  <div class="tibox-adres" style="display:flex;">
                       <el-input
                    @focus="tiFocus"
                   type="number"
                    v-model="playBox"
                  ></el-input>
                  <span style="margin-left:6px;">吨</span>
                  </div>
                </div>
              </div>
            </el-form-item>
            <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <!-- <img src="../../../../public/img/index/time.svg" alt="" /> -->
                  <i class="iconfont icon-shijian"></i>
                  <span>到达时间 : </span>
                  <span>配拖时间: </span>
                </div>
              </template>
              <div class="form-input">
                <el-date-picker
                  v-model="value1"
                  type="date"
                  placeholder="选择日期"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  v-model="submitForm.ArriveTime"
                  type="daterange"
                  placeholder="选择日期时间"
                  :picker-options="urgentTime"
                  value-format="yyyy-MM-dd HH:mm"
                >
                </el-date-picker>
              </div>
@@ -126,26 +126,26 @@
            <el-form-item>
              <template slot="label">
                <div class="form-label">
                  <!-- <img
                        src="../../../../public/img/index/product.svg"
                        alt=""
                      /> -->
                  <i class="iconfont icon-express-package-full"></i>
                  <span>物品 : </span>
                </div>
              </template>
              <div class="form-input">
                <div v-for="(item, index) in productData" :key="index">
                  <div
                    class="product"
                    :class="{ activepro: item == activeVal }"
                    @click="proActive(item)"
                  >
                    {{ item }}
                  </div>
                <div
                  class="product"
                  v-for="(item, indexp) in productData"
                  :key="indexp"
                  :class="{ activebox: activeProduct == item }"
                  @click="selProeuct(item)"
                >
                  {{ item.GoodsTypeName }}
                </div>
                <div class="pro-input">
                  <el-input placeholder="输入物品" @focus="proInput"></el-input>
                  <el-input
                    placeholder="输入物品"
                    v-model="productVal"
                    @focus="proInput"
                  ></el-input>
                </div>
              </div>
            </el-form-item>
@@ -175,9 +175,14 @@
        <button @click="sharePill">拼 单</button>
      </div>
    </div>
    <el-dialog title="顺风达拼车" :visible.sync="carDialog" width="900px" class="ride">
    <el-dialog
      title="顺风达拼车"
      :visible.sync="carDialog"
      width="900px"
      class="ride"
    >
      <!-- <car-pool></car-pool> -->
        <car-sharing></car-sharing>
      <car-sharing></car-sharing>
    </el-dialog>
  </div>
</template>
@@ -185,13 +190,14 @@
import Wind from "./Wind.vue";
import ShareCar from "../comment/ShareCar.vue";
// import CarPool from "./CarPool.vue";
import CarSharing from'../comment/CarSharing.vue'
import CarSharing from "../comment/CarSharing.vue";
import AiAdress from "../map/AiAdress.vue";
import BoxAdress from"../comment/BoxAdress"
import BoxAdress from "../comment/BoxAdress";
export default {
  data() {
    return {
      nav: ["我要装", "我要卸"],
      lunboImg: [
        require("../../../../public/img/index/lunbo.png"),
        require("../../../../public/img/index/niu.png"),
@@ -212,32 +218,36 @@
      submitForm: {
        CityId: "5dc90c98-475e-4529-bb3a-c3010a82b0e1",
        OrderType: 3,
      },
      radio1: "",
      productData: [
        "物品1",
        "物品2",
        "物品3",
        "物品4",
        "物品5",
        "物品6",
        "物品7",
      ],
      productData: [],
      value1: "",
      factory: ["重庆长安新厂区", "重庆福特厂区", "重庆福特配件厂区"],
      activeVal: "",
      carDialog: false,
      retrunPlaceList:[],
      urgentTime:{
          disabledDate(time) {
            //只能选择的当天及当天之后的日期
            return time.getTime() < Date.now() - 8.64e7;
          }
      }
    };
  },
  components: {
    Wind,
    ShareCar,
    // CarPool,
    AiAdress,BoxAdress,CarSharing
    AiAdress,
    BoxAdress,
    CarSharing,
  },
  props: ["cardialog"],
  methods: {
    //接收装卸地传来的数据
    platFormData(e){
      console.log(e);
    },
    proActive(content) {
      this.activeVal = content;
    },
@@ -259,8 +269,8 @@
</script>
<style lang="less" scoped>
// 修改弹窗的样式
.ride{
  /deep/.el-dialog__body{
.ride {
  /deep/.el-dialog__body {
    padding: 0 10px;
    padding-bottom: 10px;
  }
src/components/agopage/map/AiAdress.vue
@@ -2,12 +2,12 @@
  <div class="form-input enter-text">
    <el-input
      v-model="mapVal"
      @focus="mapAdre"
      id="tipinput"
      clearable
      @input="test"
    ></el-input>
    <!-- <map-poi v-if="isMap"></map-poi> -->
    <div id="container" style="display: none"></div>
  </div>
</template>
@@ -24,7 +24,7 @@
  methods: {
    test(){
        console.log(this.mapVal);
         var map = new AMap.Map("container", {
        resizeEnable: true,
      });
@@ -32,45 +32,21 @@
      var auto = new AMap.Autocomplete({
        input: "tipinput",
      });
      console.log(78);
      // var placeSearch = new AMap.PlaceSearch({
      //   map: map,
      // });
      //构造地点查询类
      //注册监听,当选中某条记录时会触发
       var _this = this;
      AMap.event.addListener(auto, "select", select);
         function select(e) {
        console.log(456)
           _this.mapVal =e.poi.district+e.poi.name
           _this.$emit('platfrom',e)
              console.log(e);
      }
      //注册监听,当选中某条记录时会触发
      var $this = this;
      console.log(910);
   
    },
    mapAdre() {
      console.log(this.mapVal);
      // console.log(456);
      // var map = new AMap.Map("container", {
      //   resizeEnable: true,
      // });
      // //输入提示
      // var auto = new AMap.Autocomplete({
      //   input: "tipinput",
      // });
      // console.log(78);
      // var placeSearch = new AMap.PlaceSearch({
      //   map: map,
      // }); //构造地点查询类
      // AMap.event.addListener(auto, "select", select);
      // //注册监听,当选中某条记录时会触发
      // var $this = this;
      // console.log(910);
      // function select(e) {
      //   console.log(e.poi);
      // }
      // console.log(11);
    },
  },
};
</script>
src/views/agomiddle/InquiryCenter.vue
@@ -15,7 +15,7 @@
          </div>
          <div>
            <img src="../../../public/img/index/gouxuan2.svg" alt="" />
            <span>{{allOrder.OrderType==1?'我要装':'我要卸'}}</span>
            <span>{{ allOrder.OrderType == 1 ? "我要装" : "我要卸" }}</span>
          </div>
        </div>
      </div>
@@ -43,10 +43,10 @@
            <span class="type">类型</span>
            <span class="info">箱子信息</span>
            <span class="number">数量(车)</span>
              <span  style="width:33px;">箱量</span>
            <span style="width: 33px">箱量</span>
            <!-- <span class="number">箱量</span> -->
            <span style="width:50px;">价格</span>
            <span style="width:195px;"></span>
            <span style="width: 50px">价格</span>
            <span style="width: 195px"></span>
          </div>
          <box-type :orderall="allOrder" @pinche="acceptPin"></box-type>
@@ -67,7 +67,9 @@
            >
          </div>
          <div>
            <span>合计:¥{{ allOrder.TotalAmount }}</span>
            <span>额外:¥{{extraMoney}}</span>
              <span>+运输:¥{{carriage}}=</span>
            <span>合计:¥{{ totalMoney }}</span>
            <button @click="placeOrder">
              <i class="iconfont icon-gouxuan"></i> 下 单
            </button>
@@ -76,7 +78,7 @@
      </div>
    </div>
    <el-dialog title="新增箱子" :visible.sync="addBoxDialog" width="30%">
    <el-dialog title="新增箱子" :visible.sync="addBoxDialog" width="300px">
      <add-box></add-box>
    </el-dialog>
    <!-- 下单的弹窗 -->
@@ -90,7 +92,7 @@
      <div class="order">
        <div class="title">
          <span>支付订单</span>
          <span>合计¥{{allOrder.TotalAmount}}</span>
          <span>合计¥{{ allOrder.TotalAmount }}</span>
        </div>
        <div class="my">
          <i class="el-icon-s-custom"></i>
@@ -193,7 +195,6 @@
export default {
  data() {
    return {
      value3: "",
      checked: false,
      num: 1,
      orderDialog: false,
@@ -218,12 +219,55 @@
      },
      CusSurplusAmount: 0,
      myCoupon: [],
      orderRemark:"",
      endtime:"",
      isShowShun:false,
      routerPrice:0,
      pid:"",
      orderRemark: "",
      endtime: "",
      isShowShun: false,
      routerPrice: 0,
      pid: "",
    };
  },
  computed:{
      //计算运输费用
      carriage(){
        var count=0;
        if(this.allOrder.tempOrderForms!=undefined){
              for(var i =0;i<this.allOrder.tempOrderForms.length;i++){
          count+=(this.allOrder.tempOrderForms[i].tempOrder.BaseMoney)*(this.allOrder.tempOrderForms[i].tempOrder.ContainerNub);
        }
        }
         return count;
        },
        // 计算额外费用
        extraMoney(){
          var count=0;
        if(this.allOrder.tempOrderForms!=undefined){
              for(var i =0;i<this.allOrder.tempOrderForms.length;i++){
                if(this.allOrder.tempOrderForms[i].tempOrder.IsUrgent){
                    count+=(this.allOrder.tempOrderForms[i].tempOrder.UrgentMoney)*(this.allOrder.tempOrderForms[i].tempOrder.ContainerNub);
                }
        }
        }
         return count;
        },
        // 合计费用
        totalMoney(){
              var count=0;
              var count1=0;
        if(this.allOrder.tempOrderForms!=undefined){
              for(var i =0;i<this.allOrder.tempOrderForms.length;i++){
          count+=(this.allOrder.tempOrderForms[i].tempOrder.BaseMoney)*(this.allOrder.tempOrderForms[i].tempOrder.ContainerNub);
        }
        }
        if(this.allOrder.tempOrderForms!=undefined){
              for(var i =0;i<this.allOrder.tempOrderForms.length;i++){
                if(this.allOrder.tempOrderForms[i].tempOrder.IsUrgent){
                    count1+=(this.allOrder.tempOrderForms[i].tempOrder.UrgentMoney)*(this.allOrder.tempOrderForms[i].tempOrder.ContainerNub);
                }
        }
        }
        return count+count1;
        },
  },
  components: {
    BoxType,
@@ -236,73 +280,128 @@
    orderSure() {
      console.log(this.allOrder);
      this.portOrderSave.CityId = "5dc90c98-475e-4529-bb3a-c3010a82b0e1";
      this.portOrderSave.OrderType = 1;
      this.portOrderSave.PickPlace = this.allOrder.tempOrderForms[0].tempOrder.PickPlace;
      this.portOrderSave.ReturnPlace = this.allOrder.tempOrderForms[0].tempOrder.ReturnPlace;
      this.portOrderSave.CaPositionLongitude = this.allOrder.OrderAddressLongitude;
      this.portOrderSave.CaPositionLatitude = this.allOrder.OrderAddressLatitude;
      this.portOrderSave.OrderType = this.allOrder.OrderType;
      this.portOrderSave.PickPlace =
        this.allOrder.tempOrderForms[0].tempOrder.PickPlace;
      this.portOrderSave.ReturnPlace =
        this.allOrder.tempOrderForms[0].tempOrder.ReturnPlace;
      this.portOrderSave.CaPositionLongitude =
        this.allOrder.OrderAddressLongitude;
      this.portOrderSave.CaPositionLatitude =
        this.allOrder.OrderAddressLatitude;
      this.portOrderSave.CaAdress = this.allOrder.OrderAddress;
      //订单联系人和联系带电话备注之类的进行双向绑定了 ,可以直接输入值
      this.portOrderSave.OrderPayType = 0;
      this.portOrderSave.OrderUseCoupon = 0;
      this.portOrderSave.Goods = this.allOrder.TransportGoods;
      // 保存箱子详情
      for (var i = 0; i < this.allOrder.tempOrderForms.length; i++) {
        if(this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer.length>0){
          for(var j = 0;j<this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer.length;j++){
                this.portOrderSave.OrderDetailed.push({
          CtnerId: this.allOrder.tempOrderForms[i].tempOrder.TempOrderID,
          CtnerNub: this.allOrder.tempOrderForms[i].tempOrder.ContainerNub,
          SelfBox: this.allOrder.tempOrderForms[i].tempOrder.SelfBox?1:0,
        //有几条数据
          OdtaskIsUrgent: this.allOrder.tempOrderForms[i].tempOrder.IsUrgent?1:0,
        if (
          this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer.length >
          0
        ) {
          // 详情修改成对象后
          Defaultset: 0,
          var arr = [];
          for (
            var j = 0;
            j <
            this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer.length;
            j++
          ) {
            arr.push({
              BolCode:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .BolCode,
              TradeCode:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .TradeCode,
          BolCode: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].BolCode,
          TradeCode: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].TradeCode,
          ArriveTime: this.allOrder.tempOrderForms[i].tempOrder.ArriveTime,
          ShipAgent:this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ShipAgent,
          ContainerOwner: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ContainerOwner,
          ContainerNo: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ContainerNo,
          BoxSeal:this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].BoxSeal,
           IsCarPooling: this.allOrder.tempOrderForms[i].tempOrder.IsCarPooling?1:0,
              ShipAgent:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .ShipAgent,
              ContainerOwner:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .ContainerOwner,
              ContainerNo:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .ContainerNo,
            Weight: this.allOrder.tempOrderForms[i].tempOrder.Weight,
             EndTime: this.endtime,
               OrderRemark: this.orderRemark
        });
        }
        }else{
            this.portOrderSave.OrderDetailed.push({
                CtnerId: this.allOrder.tempOrderForms[i].tempOrder.TempOrderID,
          CtnerNub: this.allOrder.tempOrderForms[i].tempOrder.ContainerNub,
          SelfBox: this.allOrder.tempOrderForms[i].tempOrder.SelfBox?1:0,
          OdtaskIsUrgent: this.allOrder.tempOrderForms[i].tempOrder.IsUrgent?1:0,
              BoxSeal:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .BoxSeal,
              Weight:
                this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j]
                  .Weight,
            });
          Defaultset: 0,
           IsCarPooling: this.allOrder.tempOrderForms[i].tempOrder.IsCarPooling?1:0,
            //箱子信息
            Weight: this.allOrder.tempOrderForms[i].tempOrder.Weight,
             EndTime: this.endtime,
               OrderRemark: this.orderRemark
            })
            //         this.portOrderSave.OrderDetailed.orderDetaileCnters.push({
            //   BolCode: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].BolCode,
            //   TradeCode: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].TradeCode,
            //   ShipAgent:this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ShipAgent,
            //   ContainerOwner: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ContainerOwner,
            //   ContainerNo: this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].ContainerNo,
            //   BoxSeal:this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer[j].BoxSeal,
            //     Weight: this.allOrder.tempOrderForms[i].tempOrder.Weight
            // });
          }
          this.portOrderSave.OrderDetailed.push({
            CtnerId: this.allOrder.tempOrderForms[i].tempOrder.Container.CntrId,
            TempOrderId: this.allOrder.tempOrderForms[i].tempOrder.TempOrderID,
            CtnerNub: this.allOrder.tempOrderForms[i].tempOrder.ContainerNub,
            SelfBox: this.allOrder.tempOrderForms[i].tempOrder.SelfBox ? 1 : 0,
            OdtaskIsUrgent: this.allOrder.tempOrderForms[i].tempOrder.IsUrgent
              ? 1
              : 0,
            Defaultset: 0,
            ArriveTime: this.allOrder.tempOrderForms[i].tempOrder.ArriveTime,
            orderDetaileCnters: arr,
          });
        } else {
          console.log("应该不会存在把");
          //   this.portOrderSave.OrderDetailed.push({
          //       CtnerId: this.allOrder.tempOrderForms[i].tempOrder.TempOrderID,
          // CtnerNub: this.allOrder.tempOrderForms[i].tempOrder.ContainerNub,
          // SelfBox: this.allOrder.tempOrderForms[i].tempOrder.SelfBox?1:0,
          // OdtaskIsUrgent: this.allOrder.tempOrderForms[i].tempOrder.IsUrgent?1:0,
          // Defaultset: 0,
          //  IsCarPooling: this.allOrder.tempOrderForms[i].tempOrder.IsCarPooling?1:0,
          //   Weight: this.allOrder.tempOrderForms[i].tempOrder.Weight,
          //    EndTime: this.endtime,
          //      OrderRemark: this.orderRemark
          //   })
          //  this.portOrderSave.OrderDetailed=[];
        }
      }
      console.log(this.portOrderSave);
      this.getPortOrderSave(this.portOrderSave);
      this.orderDialog = false;
    },
    //提交订单
      async getPortOrderSave(model) {
    async getPortOrderSave(model) {
      await this.$axios
        .post("/api/Order/PortOrderSave",this.$qs.stringify(model))
        .post("/api/Order/PortOrderSave", this.$qs.stringify(model))
        .then((res) => {
          console.log(this.portOrderSave);
         console.log(res);
          if(res.data){
            this.$message({
              message:"下单成功",
              type:"success"
            });
            this.$router.push("/order");
          }
          console.log(res);
        })
        .catch((err) => {
          console.log(err);
@@ -328,7 +427,7 @@
          };
          for (var i = 0; i < model.tempOrderForms.length; i++) {
            model.tempOrderForms[i].orderData = Object.assign({}, orderinQiry);
            if(  model.tempOrderForms[i].tempOrder.IsCarPooling==1){
            if (model.tempOrderForms[i].tempOrder.IsCarPooling == 1) {
              this.isShowShun = true;
            }
          }
@@ -343,42 +442,57 @@
      console.log(value);
    },
    //接收拼车的信息
    acceptPin(e){
      if(e==""){
        this.pid="";
    acceptPin(e) {
      if (e == "") {
        this.pid = "";
        this.isShowShun = false;
      }else{
      } else {
        this.pid = e;
         this.isShowShun = true;
        this.isShowShun = true;
      }
    },
    placeOrder() {
      console.log(this.allOrder);
      this.getPayCaptal();
      this.getMyCoupon();
      if(this.pid!=""){
            this.getRoutePrice({
        PickPlace:this.allOrder.tempOrderForms[0].tempOrder.PickPlace,
        AddressLongitude:this.allOrder.OrderAddressLongitude,
        AddressLatitude:this.allOrder.OrderAddressLatitude,
        ReturnPlace:this.allOrder.tempOrderForms[0].tempOrder.ReturnPlace,
        CtnerId:this.pid,
        TransType:1,
      })
      // 下单前要判断信息是否完善,价格是否为0
      for(var i =0;i<this.allOrder.tempOrderForms.length;i++){
        if(this.allOrder.tempOrderForms[i].tempOrder.BaseMoney==0){
           this.$message.error("请先询价");
           return;
        }
        if(this.allOrder.tempOrderForms[i].tempOrder.TempOrderContainer.length==0){
           this.$message.error("请完善箱子信息");
           return;
        }
      }
      // console.log(totalMoney);
      console.log(this.totalMoney);
      //是否有顺风达
      // if(this.pid!=""){
      //       this.getRoutePrice({
      //   PickPlace:this.allOrder.tempOrderForms[0].tempOrder.PickPlace,
      //   AddressLongitude:this.allOrder.OrderAddressLongitude,
      //   AddressLatitude:this.allOrder.OrderAddressLatitude,
      //   ReturnPlace:this.allOrder.tempOrderForms[0].tempOrder.ReturnPlace,
      //   CtnerId:this.pid,
      //   TransType:1,
      // })
      // }
      // this.getTempOrder();
      this.orderDialog = true;
    },
    //获取运输价格
    async getRoutePrice(model) {
      await this.$axios
        .post("/api/Order/GetTransPortationRoutePrice",this.$qs.stringify(model))
        .post(
          "/api/Order/GetTransPortationRoutePrice",
          this.$qs.stringify(model)
        )
        .then((res) => {
            this.routerPrice = res.data;
          this.routerPrice = res.data;
        })
        .catch((err) => {
          console.log(err);