小牛集卡web 客户端
chenwei
2021-05-31 7a1e09490105e8d67c7b04abad1fe916739f0d30
完善
5 files modified
105 ■■■■■ changed files
package-lock.json 2 ●●● patch | view | raw | blame | history
public/index.html 2 ●●● patch | view | raw | blame | history
src/components/agopage/comment/BoxAdress.vue 55 ●●●● patch | view | raw | blame | history
src/components/agopage/home/Harbour.vue 44 ●●●●● patch | view | raw | blame | history
vue.config.js 2 ●●● patch | view | raw | blame | history
package-lock.json
@@ -1,5 +1,5 @@
{
  "name": "vue_manager",
  "name": "小牛集卡",
  "version": "0.1.0",
  "lockfileVersion": 2,
  "requires": true,
public/index.html
@@ -13,7 +13,7 @@
    </style>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4b1707590337ba8bd6607ee4926e270c&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Driving"></script>
    <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
    <title><%= htmlWebpackPlugin.options.title %></title>
    <title>小牛集卡</title>
  </head>
  <body>
    <noscript>
src/components/agopage/comment/BoxAdress.vue
@@ -7,15 +7,16 @@
          <el-tabs v-model="subform.CityId" @tab-click="handleClick">
            <el-tab-pane
              v-for="(item, cindex) in boxaddress"
              :key="cindex"
              :key="cindex+6"
              :label="item.CityName"
              :name="item.CityId"
              :name="cindex.CityId"
            >
              <el-radio-group v-model="radio" @change="selectPort">
                <el-radio
                  @change="boxRadio"
                  v-for="(ritem, rindex) in item.PortList"
                  :key="rindex"
                  :key="rindex+13"
                  :label="ritem"
                  >{{ ritem.PortName }}</el-radio
                >
@@ -26,14 +27,14 @@
      </div>
      <div class="suffix-txt">
        <div v-for="(item, kindex) in boxaddress" :key="kindex">
        <div v-for="(item, kindex) in boxaddress" :key="kindex+20">
          <div
            class="shortcut"
            v-for="(shortcut, sindex) in item.PortList"
            :key="sindex"
            @click="shortCut(item, shortcut)"
            :key="sindex+15"
            @click="shortCut(shortcut)"
          >
            <span v-if="index < 3">{{ shortcut.PortName }}</span>
            <span v-if="sindex < 3">{{ shortcut.PortName }}</span>
          </div>
        </div>
      </div>
@@ -50,23 +51,38 @@
           },
           playBox:"",
           radio:"",
           returnBoxAdress:[],
        }
    },
    props:["boxaddress"],
    watch:{
        boxaddress(val){
            console.log(val);
        boxaddress:{
          handler(val){
              this.returnBoxAdress = val;
          },
          deep:true,
          immediate:true
        },
    },
    methods:{
        tiFocus(){
            this.isTShow=true;
        },
        handleClick(val){
            console.log(val);
        },
        selectPort(){
        test(val){
          console.log(val)
        },
        shortCut(item){
            this.playBox = item.PortName
             this.$emit("acceptreturn",item.PortId);
        },
        selectPort(val){
          this.playBox = val.PortName;
          this.$emit("acceptreturn",val.PortId);
            this.isTShow=false;
        },
    }
};
@@ -90,4 +106,17 @@
    display: none;
  }
}
.suffix-txt {
  display: flex;
  margin-left: 50px;
  color: #aaaaaa;
}
.suffix-txt div {
  margin-right: 20px;
  display: flex;
  cursor: pointer;
}
.suffix-txt .shortcut:hover {
  color: #409eff;
}
</style>
src/components/agopage/home/Harbour.vue
@@ -11,13 +11,13 @@
          {{ item }}
        </div>
      </div>
      <div class="form">
       <div class="form">
        <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>
@@ -60,7 +60,7 @@
                    :key="sindex"
                    @click="shortCut(item, shortcut)"
                  >
                    <span v-if="index < 3">{{ shortcut.PortName }}</span>
                    <span v-if="sindex < 3">{{ shortcut.PortName }}</span>
                  </div>
                </div>
              </div>
@@ -72,10 +72,6 @@
                <i
                  class="iconfont icon-diaoyun_lift_jizhuangxiang_container"
                ></i>
                <!-- <img
                        src="../../../../public/img/index/zhuang.png"
                        alt=""
                      /> -->
                <span>装卸地 : </span>
              </div>
            </template>
@@ -86,7 +82,7 @@
                id="tipinput"
                clearable
              ></el-input>
              <!-- <map-poi v-if="isMap"></map-poi> -->
              <div class="suffix-txt">
                <div @click="usualAdrDialog = true">常用地址</div>
              </div>
@@ -95,23 +91,17 @@
          <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>
            <box-adress :boxaddress="retrunPlaceList"></box-adress>
            <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>
              </div>
@@ -200,7 +190,7 @@
          <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>
              </div>
@@ -225,10 +215,7 @@
          <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>
@@ -258,6 +245,7 @@
          <span>箱子具体信息[智能输入]</span>
        </div>
      </div>
    </div>
    <div class="btns">
      <div v-if="1 == 2">
@@ -348,10 +336,11 @@
            let M = (new Date()).getMonth();
            let D = (new Date()).getDate();
            let curDate = (new Date()).getTime();
            let defDate = (new Date(Y,M,D)).getTime() - new Date(2021,3,30).getTime(); // 14 * 24 * 3600 * 1000;因为月份取出来的值小1,所以直接用了new Date(2019,3,11).getTime()
            let chooseDate = curDate - defDate;
            return time.getTime() < Date.now() || time.getTime() < chooseDate;
            let defDate = (new Date(Y,M,D)).getTime() - new Date(2021,5,30).getTime(); // 14 * 24 * 3600 * 1000;因为月份取出来的值小1,所以直接用了new Date(2019,3,11).getTime()
            // let chooseDate = curDate - defDate;
            let chooseDate =curDate-defDate;
            return time.getTime()<Date.now() || time.getTime() <chooseDate;
          }
      }
    };
@@ -378,6 +367,9 @@
  },
  mounted() {},
  methods: {
    acceptReturnAdress(e){
        this.submitForm.ReturnPlace=e;
    },
    selectBoxType(e, id) {
      console.log(id);
      if (e.target.localName == "div") {
vue.config.js
@@ -7,7 +7,7 @@
      hotOnly: false, 
      proxy: {
          '/api': {
              target: 'http://192.168.0.158:49138/', //API服务器的地址
              target: 'http://192.168.0.157:49138/', //API服务器的地址
              changeOrigin: true,
              // pathRewrite: {
              //     '^/api': 'http://192.168.0.157:49138/'