小牛集卡web 客户端
chenwei
8 days ago 2621fec0d7ce1db0a2302c6c1ac0f08b36ae8a63
src/components/agopage/home/Harbour.vue
@@ -21,49 +21,10 @@
                <span>提箱地 : </span>
              </div>
            </template>
            <div class="form-input">
              <div class="tibox-adres">
                <el-input
                  @focus="tiFocus"
                  readonly
                  v-model="playBox"
                ></el-input>
                <div class="select-tibox" v-if="isTShow">
                  <div v-if="pickPlaceList.length == 0">暂 无 数 据</div>
                  <el-tabs v-model="submitForm.CityId" @tab-click="handleClick">
                    <el-tab-pane
                      v-for="item in pickPlaceList"
                      :key="item.CityId"
                      :label="item.CityName"
                      :name="item.CityId"
                    >
                      <el-radio-group v-model="radio" @change="selectPort">
                        <el-radio
                          @change="boxRadio"
                          v-for="ritem in item.PortList"
                          :key="ritem.PortId"
                          :label="ritem"
                          >{{ ritem.PortName }}</el-radio
                        >
                      </el-radio-group>
                    </el-tab-pane>
                  </el-tabs>
                </div>
              </div>
              <div class="suffix-txt">
                <div v-for="(item, pindex) in pickPlaceList" :key="pindex">
                  <div
                    class="shortcut"
                    v-for="(shortcut, sindex) in item.PortList"
                    :key="sindex"
                    @click="shortCut(item, shortcut)"
                  >
                    <span v-if="sindex < 3">{{ shortcut.PortName }}</span>
                  </div>
                </div>
              </div>
            </div>
               <box-adress
              :boxaddress="pickPlaceList"
              @acceptreturn="acceptPickAdress"
            ></box-adress>
          </el-form-item>
          <el-form-item>
            <template slot="label">
@@ -230,22 +191,7 @@
              </div>
            </template>
            <div class="form-input">
              <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="输入物品"
                  v-model="productVal"
                  @focus="proInput"
                ></el-input>
              </div>
                <goods-classify :goodslist="productData" @acceptgoods="acceptProduct"></goods-classify>
            </div>
          </el-form-item>
        </el-form>
@@ -293,6 +239,7 @@
</template>
<script>
import BoxAdress from "../comment/BoxAdress";
import GoodsClassify from"../comment/GoodsClassify.vue";
export default {
  data() {
    return {
@@ -315,9 +262,6 @@
        // OnlyInput:""
      },
      timeUrgent: false,
      value1: "",
      radio1: "",
      value4: "",
      productData: [],
      factory: [],
@@ -335,8 +279,6 @@
      isSpecial: false,
      pickPlaceList: [],
      retrunPlaceList: [],
      activeProduct: "",
      productVal: "",
      isSelect: "",
      urgentBeginTime:"",
      urgentEndTime:"",
@@ -358,7 +300,7 @@
      },
    };
  },
  components: { BoxAdress },
  components: { BoxAdress,GoodsClassify },
  props: ["alldata"],
  watch: {
    alldata(val) {
@@ -367,7 +309,12 @@
        val.ContainerList[i].select = false;
        val.ContainerList[i].pinche = false;
      }
      this.boxType = val.ContainerList;
      // 剔除那个单箱
      for(var j =0;j<val.ContainerList.length;j++){
         if(val.ContainerList[j].CnterNub!=0){
             this.boxType.push(val.ContainerList[j]);
          }
      }
      val.SpecialContainerList.forEach((item) => {
        item.select = false;
        item.pinche = false;
@@ -386,11 +333,16 @@
        this.searchSpecial(val);
    },
  },
  mounted() {
  },
  methods: {
    //接收物品组件传来的值
    acceptProduct(e){
        this.submitForm.TransportGoods = e;
    },
    acceptPickAdress(e){
      this.submitForm.PickPlace = e;
    },
    //接收还箱地址
    acceptReturnAdress(e) {
      this.submitForm.ReturnPlace = e;
    },
@@ -475,34 +427,33 @@
      }
    },
    inquiryOrder() {
      if (this.activeProduct == "") {
        this.submitForm.TransportGoods = this.productVal;
      }
      // this.submitForm.ArriveTime = this.value1;
       this.submitForm.TempOrderContainerList=[];
      this.getForBox(this.boxType);
      this.getForBox(this.SpecialContainerList);
      var judge = false;
      for(var key in this.submitForm){
        if(this.submitForm[key]==""||this.submitForm[key].length==0){
             judge = true;
        }
      }
      if(judge){
         this.$message.error("请先完善下单信息");
         return;
      }
      console.log(this.submitForm);
      this.$axios
        .post("/api/Order/SaveTempOrder", this.$qs.stringify(this.submitForm))
        .then((res) => {
          console.log(res);
          console.log(this.value4);
          this.$router.push("/inquiry");
        })
        .catch((err) => {
          this.$message.error("请先登录!")
          console.log(err);
        });
    },
    //选中物品
    selProeuct(content) {
      this.productVal = "";
      this.activeProduct = content;
      this.submitForm.TransportGoods = content;
    },
    //输入物品
    proInput() {
      this.activeProduct = "";
    },
    // urgentChange(val) {
    //   if (val) {
    //      let year = this.urgentEndTime.slice(0,10)
@@ -514,6 +465,7 @@
    selAdress(content) {
      this.submitForm.OrderAddressLongitude = content.ComLongitude;
      this.submitForm.OrderAddressLatitude = content.ComLatitude;
      this.submitForm.OrderAddress =  content.ComAdress;
      this.mapVal = content.ComAdress;
      this.usualAdrDialog = false;
    },