luobang 2 vuotta sitten
vanhempi
commit
c45f2152a2

+ 70 - 27
src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue

@@ -2,28 +2,47 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <!-- <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
-      </el-input>
-       -->
-      <span>扫码时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        入库
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            class="inputStyle"
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
       <dilTable v-bind.sync="options">
@@ -102,6 +121,25 @@ export default {
     padLeftZero(str) {
       return ("00" + str).substr(str.length);
     },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
@@ -126,6 +164,9 @@ export default {
             endTime +
             "&i=" +
             new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
@@ -152,13 +193,15 @@ export default {
 };
 </script>
 
-<style lang="scss" scode>
+<style lang="scss" scoped>
 .steel_inbound {
   .sache {
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
 </style>

+ 69 - 20
src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue

@@ -2,22 +2,47 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <span>扫码时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        入库
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            class="inputStyle"
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
       <dilTable v-bind.sync="options"> </dilTable>
@@ -88,6 +113,25 @@ export default {
     padLeftZero(str) {
       return ("00" + str).substr(str.length);
     },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
@@ -112,6 +156,9 @@ export default {
             endTime +
             "&i=" +
             new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
@@ -141,10 +188,12 @@ export default {
 <style lang="scss" scoped>
 .steel_inbound {
   .sache {
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
 </style>

+ 48 - 61
src/views/WMS/components/steel/steel_inbound.vue

@@ -2,36 +2,47 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <span class="text">入库时间:</span>
-      <el-date-picker
-        disabled
-        v-model="startTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
-      </el-date-picker>
-      <span class="text">至</span>
-      <el-date-picker
-        disabled
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
-      </el-date-picker>
-      <span class="text">物资类型</span>
-      <el-autocomplete
-        class="inputStyle"
-        v-model="inputText"
-        :fetch-suggestions="querySearch"
-        placeholder="请输入内容"
-        @select="handleSelect"
-      ></el-autocomplete>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        入库
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">扫码时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            class="inputStyle"
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
       <dilTable
@@ -46,7 +57,6 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
@@ -123,8 +133,7 @@ export default {
     createFilter(queryString) {
       return restaurant => {
         return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
         );
       };
     },
@@ -182,35 +191,13 @@ export default {
 
 <style lang="scss" scoped>
 .steel_inbound {
-  margin-top: 30px;
-  margin-left: 20px;
-
   .sache {
-    display: flex;
-    margin-bottom: 10px;
-    padding-right: 10px;
-    .inputStyle {
-      width: 200px;
-      margin-right: 5px;
-      margin-left: 5px;
-    }
-    .text {
-      text-align: left;
-      line-height: 40px;
-    }
-    .el-date-editor {
-      margin-right: 5px;
-      margin-left: 5px;
-    }
-    .btn {
-      margin-left: 10px;
-    }
-    .el-select {
-      width: 100%;
-      .el-input__inner {
-        width: 150px;
-      }
-    }
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
 </style>