From e41faf1640e2e71febf4ba347a301e0c043b6ce9 Mon Sep 17 00:00:00 2001
From: chenwei <chenwei@cqprow.com>
Date: 星期二, 08 六月 2021 17:38:22 +0800
Subject: [PATCH] 港口达下单的完善

---
 src/components/agopage/comment/InfoDialog.vue |    8 
 src/components/agopage/map/AiAdress.vue       |   50 +--
 src/components/agopage/home/Wind.vue          |  168 ++++++------
 src/views/agomiddle/InquiryCenter.vue         |  274 ++++++++++++++------
 src/components/agopage/comment/BoxAdress.vue  |   18 +
 src/components/agopage/home/Harbour.vue       |    4 
 src/components/agopage/comment/AddBox.vue     |   32 +
 src/components/agopage/comment/BoxType.vue    |  187 +++++++++-----
 8 files changed, 461 insertions(+), 280 deletions(-)

diff --git a/src/components/agopage/comment/AddBox.vue b/src/components/agopage/comment/AddBox.vue
index b86a474..e4da858 100644
--- a/src/components/agopage/comment/AddBox.vue
+++ b/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);
     },
diff --git a/src/components/agopage/comment/BoxAdress.vue b/src/components/agopage/comment/BoxAdress.vue
index a7ec501..a044aba 100644
--- a/src/components/agopage/comment/BoxAdress.vue
+++ b/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>
\ No newline at end of file
diff --git a/src/components/agopage/comment/BoxType.vue b/src/components/agopage/comment/BoxType.vue
index ae37af0..5d30119 100644
--- a/src/components/agopage/comment/BoxType.vue
+++ b/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) { //閲岄潰鍖呭惈姝d灏辫繘琛屽垹闄�
+          //       //宸茬粡鍥炲浠锋牸浜嗙殑杩涜鍒犻櫎
+          //       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) {
diff --git a/src/components/agopage/comment/InfoDialog.vue b/src/components/agopage/comment/InfoDialog.vue
index 71780a0..ea594d0 100644
--- a/src/components/agopage/comment/InfoDialog.vue
+++ b/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);
diff --git a/src/components/agopage/home/Harbour.vue b/src/components/agopage/home/Harbour.vue
index 82b473d..62b9d04 100644
--- a/src/components/agopage/home/Harbour.vue
+++ b/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: [], //鏅�氱瀛愬垪琛�
diff --git a/src/components/agopage/home/Wind.vue b/src/components/agopage/home/Wind.vue
index 42e3529..f1ffa10 100644
--- a/src/components/agopage/home/Wind.vue
+++ b/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;
   }
diff --git a/src/components/agopage/map/AiAdress.vue b/src/components/agopage/map/AiAdress.vue
index 1a6dfe2..23e4e56 100644
--- a/src/components/agopage/map/AiAdress.vue
+++ b/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>
diff --git a/src/views/agomiddle/InquiryCenter.vue b/src/views/agomiddle/InquiryCenter.vue
index e0778c1..28bcea4 100644
--- a/src/views/agomiddle/InquiryCenter.vue
+++ b/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);

--
Gitblit v1.9.1