物料信息 添加 料号批量查询
							parent
							
								
									344bbb6ef8
								
							
						
					
					
						commit
						06630187b6
					
				| 
						 | 
					@ -1,4 +1,3 @@
 | 
				
			||||||
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="div1">
 | 
					  <div class="div1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,23 +7,7 @@
 | 
				
			||||||
        <div class="condition-row">
 | 
					        <div class="condition-row">
 | 
				
			||||||
          <!-- 料号 -->
 | 
					          <!-- 料号 -->
 | 
				
			||||||
          <label class="condition-label">料号:</label>
 | 
					          <label class="condition-label">料号:</label>
 | 
				
			||||||
          <el-select
 | 
					          <el-input type="textarea"  v-model="param.itemCodeList" style="width: 180px;" :rows="1"></el-input>
 | 
				
			||||||
              v-model="param.itemCodeList"
 | 
					 | 
				
			||||||
              multiple
 | 
					 | 
				
			||||||
              filterable
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              remote
 | 
					 | 
				
			||||||
              reserve-keyword
 | 
					 | 
				
			||||||
              placeholder="请输入关键词"
 | 
					 | 
				
			||||||
              :remote-method="remoteItemList"
 | 
					 | 
				
			||||||
              :loading="loading">
 | 
					 | 
				
			||||||
            <el-option
 | 
					 | 
				
			||||||
                v-for="item in itemList"
 | 
					 | 
				
			||||||
                :key="item.code"
 | 
					 | 
				
			||||||
                :label="item.code"
 | 
					 | 
				
			||||||
                :value="item.code">
 | 
					 | 
				
			||||||
            </el-option>
 | 
					 | 
				
			||||||
          </el-select>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <!-- 推荐库区 -->
 | 
					          <!-- 推荐库区 -->
 | 
				
			||||||
          <label class="condition-label">推荐库区:</label>
 | 
					          <label class="condition-label">推荐库区:</label>
 | 
				
			||||||
| 
						 | 
					@ -372,11 +355,11 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { downloadExcel } from '@/util/excelUtils';
 | 
					import {downloadExcel} from '@/util/excelUtils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      itemList:[],
 | 
					 | 
				
			||||||
      pickerOptions: {
 | 
					      pickerOptions: {
 | 
				
			||||||
        shortcuts: [{
 | 
					        shortcuts: [{
 | 
				
			||||||
          text: '最近一周',
 | 
					          text: '最近一周',
 | 
				
			||||||
| 
						 | 
					@ -405,22 +388,22 @@ export default {
 | 
				
			||||||
        }]
 | 
					        }]
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableloding: false,
 | 
					      tableloding: false,
 | 
				
			||||||
      isShow:false,//是否展示全部搜索条件
 | 
					      isShow: false,//是否展示全部搜索条件
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      pageSize: 50,
 | 
					      pageSize: 50,
 | 
				
			||||||
      pageNum: 1,
 | 
					      pageNum: 1,
 | 
				
			||||||
      total: 3,
 | 
					      total: 3,
 | 
				
			||||||
      param: {
 | 
					      param: {
 | 
				
			||||||
        //料号
 | 
					        //料号
 | 
				
			||||||
        itemCodeList: [],
 | 
					        itemCodeList: '',
 | 
				
			||||||
        //推荐库区
 | 
					        //推荐库区
 | 
				
			||||||
        tKq: null,
 | 
					        tKq: null,
 | 
				
			||||||
        //默认库区
 | 
					        //默认库区
 | 
				
			||||||
        mKq: null,
 | 
					        mKq: null,
 | 
				
			||||||
        //包装
 | 
					        //包装
 | 
				
			||||||
        smallUnit:null,
 | 
					        smallUnit: null,
 | 
				
			||||||
        //是否有限期
 | 
					        //是否有限期
 | 
				
			||||||
        isBOM:null
 | 
					        isBOM: null
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      Ku: [],
 | 
					      Ku: [],
 | 
				
			||||||
      Gz: [],
 | 
					      Gz: [],
 | 
				
			||||||
| 
						 | 
					@ -428,9 +411,9 @@ export default {
 | 
				
			||||||
      loading: false,
 | 
					      loading: false,
 | 
				
			||||||
      checked: false,
 | 
					      checked: false,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },computed:{
 | 
					  }, computed: {
 | 
				
			||||||
    MaxHeight(){
 | 
					    MaxHeight() {
 | 
				
			||||||
      return  window.innerHeight - 240 +"px";
 | 
					      return window.innerHeight - 240 + "px";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted: function () {
 | 
					  mounted: function () {
 | 
				
			||||||
| 
						 | 
					@ -457,26 +440,9 @@ export default {
 | 
				
			||||||
      this.pageNum = val;
 | 
					      this.pageNum = val;
 | 
				
			||||||
      this.queryUser();
 | 
					      this.queryUser();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    remoteItemList(query) {
 | 
					    KuS() {
 | 
				
			||||||
      if (query !== '') {
 | 
					 | 
				
			||||||
        this.loading = true;
 | 
					 | 
				
			||||||
        this.$axios.post(this.$httpUrl + '/Enumerate/Item', {
 | 
					 | 
				
			||||||
          query
 | 
					 | 
				
			||||||
        }).then(res => {
 | 
					 | 
				
			||||||
          this.itemList = res.data.data;
 | 
					 | 
				
			||||||
        },err=>{
 | 
					 | 
				
			||||||
          this.tableloding=false;
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        this.loading = false;
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.options = [];
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    KuS(){
 | 
					 | 
				
			||||||
      //库区下拉列表数据加载
 | 
					      //库区下拉列表数据加载
 | 
				
			||||||
      this.$axios.post(this.$httpUrl + '/Enumerate/Zone', {
 | 
					      this.$axios.post(this.$httpUrl + '/Enumerate/Zone', {}).then(res => res.data)
 | 
				
			||||||
 | 
					 | 
				
			||||||
      }).then(res => res.data)
 | 
					 | 
				
			||||||
          .then(res => {
 | 
					          .then(res => {
 | 
				
			||||||
            if (res.code == 200) {
 | 
					            if (res.code == 200) {
 | 
				
			||||||
              this.Ku = res.data;
 | 
					              this.Ku = res.data;
 | 
				
			||||||
| 
						 | 
					@ -485,15 +451,13 @@ export default {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // eslint-disable-next-line no-unused-vars
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
          },err=>{
 | 
					          }, err => {
 | 
				
			||||||
            this.tableloding=false;
 | 
					            this.tableloding = false;
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    GzzS(){
 | 
					    GzzS() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.$axios.post(this.$httpUrl + '/Enumerate/Gzz ', {
 | 
					      this.$axios.post(this.$httpUrl + '/Enumerate/Gzz ', {}).then(res => res.data)
 | 
				
			||||||
 | 
					 | 
				
			||||||
      }).then(res => res.data)
 | 
					 | 
				
			||||||
          .then(res => {
 | 
					          .then(res => {
 | 
				
			||||||
            if (res.code == 200) {
 | 
					            if (res.code == 200) {
 | 
				
			||||||
              this.Gz = res.data;
 | 
					              this.Gz = res.data;
 | 
				
			||||||
| 
						 | 
					@ -502,8 +466,8 @@ export default {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // eslint-disable-next-line no-unused-vars
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
          },err=>{
 | 
					          }, err => {
 | 
				
			||||||
            this.tableloding=false;
 | 
					            this.tableloding = false;
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    queryUser() {
 | 
					    queryUser() {
 | 
				
			||||||
| 
						 | 
					@ -523,16 +487,16 @@ export default {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // eslint-disable-next-line no-unused-vars
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
          },err=>{
 | 
					          }, err => {
 | 
				
			||||||
            this.tableloding=false;
 | 
					            this.tableloding = false;
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    find(){
 | 
					    find() {
 | 
				
			||||||
      this.pageNum=1;
 | 
					      this.pageNum = 1;
 | 
				
			||||||
      this.queryUser();
 | 
					      this.queryUser();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    down(){
 | 
					    down() {
 | 
				
			||||||
      this.downExcel();
 | 
					      this.downExcel();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    downExcel() {
 | 
					    downExcel() {
 | 
				
			||||||
| 
						 | 
					@ -546,19 +510,19 @@ export default {
 | 
				
			||||||
            this.tableloding = false;
 | 
					            this.tableloding = false;
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    Allquesr(){
 | 
					    Allquesr() {
 | 
				
			||||||
      //查询按钮
 | 
					      //查询按钮
 | 
				
			||||||
      if(this.checked){
 | 
					      if (this.checked) {
 | 
				
			||||||
        this.isShow=true;
 | 
					        this.isShow = true;
 | 
				
			||||||
      }else {
 | 
					      } else {
 | 
				
			||||||
        this.isShow=false;
 | 
					        this.isShow = false;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    rest() {
 | 
					    rest() {
 | 
				
			||||||
      //条件查询重置
 | 
					      //条件查询重置
 | 
				
			||||||
      this.checked=false;
 | 
					      this.checked = false;
 | 
				
			||||||
      this.isShow=false;
 | 
					      this.isShow = false;
 | 
				
			||||||
      this.param={};
 | 
					      this.param = {};
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,13 @@
 | 
				
			||||||
package com.yc.wms.controller;
 | 
					package com.yc.wms.controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cn.hutool.core.date.DateUnit;
 | 
					import cn.hutool.core.util.StrUtil;
 | 
				
			||||||
import cn.hutool.json.JSONObject;
 | 
					import cn.hutool.json.JSONObject;
 | 
				
			||||||
import cn.hutool.json.JSONUtil;
 | 
					import cn.hutool.json.JSONUtil;
 | 
				
			||||||
import com.yc.wms.bean.Xuliehao;
 | 
					 | 
				
			||||||
import com.yc.wms.service.Xuliehaoqingdan;
 | 
					import com.yc.wms.service.Xuliehaoqingdan;
 | 
				
			||||||
import com.yc.wms.until.QueryPageUtil;
 | 
					import com.yc.wms.until.QueryPageUtil;
 | 
				
			||||||
import com.yc.wms.until.Result;
 | 
					import com.yc.wms.until.Result;
 | 
				
			||||||
import com.yc.wms.utils.FileUtil;
 | 
					import com.yc.wms.utils.FileUtil;
 | 
				
			||||||
import com.yc.wms.utils.QueryUtil;
 | 
					import com.yc.wms.utils.QueryUtil;
 | 
				
			||||||
import com.yc.wms.utils.StringUtils;
 | 
					 | 
				
			||||||
import lombok.AllArgsConstructor;
 | 
					 | 
				
			||||||
import lombok.Data;
 | 
					 | 
				
			||||||
import lombok.extern.slf4j.Slf4j;
 | 
					import lombok.extern.slf4j.Slf4j;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 | 
					import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 | 
				
			||||||
| 
						 | 
					@ -22,13 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.persistence.*;
 | 
					import javax.persistence.*;
 | 
				
			||||||
import javax.servlet.http.HttpServletResponse;
 | 
					import javax.servlet.http.HttpServletResponse;
 | 
				
			||||||
import java.io.Serializable;
 | 
					 | 
				
			||||||
import java.text.SimpleDateFormat;
 | 
					 | 
				
			||||||
import java.util.*;
 | 
					import java.util.*;
 | 
				
			||||||
import java.util.concurrent.Callable;
 | 
					 | 
				
			||||||
import java.util.concurrent.ExecutorService;
 | 
					 | 
				
			||||||
import java.util.concurrent.Executors;
 | 
					 | 
				
			||||||
import java.util.concurrent.Future;
 | 
					 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@RestController
 | 
					@RestController
 | 
				
			||||||
| 
						 | 
					@ -99,9 +89,21 @@ public class ItemController {
 | 
				
			||||||
        query.setPageNum((int)jsonObject.get("pageNum"));
 | 
					        query.setPageNum((int)jsonObject.get("pageNum"));
 | 
				
			||||||
        JSONObject param= (JSONObject)jsonObject.get("param");
 | 
					        JSONObject param= (JSONObject)jsonObject.get("param");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (param.getJSONArray("itemCodeList")!=null&¶m.getJSONArray("itemCodeList").size()>0){
 | 
					
 | 
				
			||||||
            querySql=querySql+" and item.code in ("+ StringUtils.strInSql(JSONUtil.toList(param.getJSONArray("itemCodeList"), String.class))+")";
 | 
					        //料号
 | 
				
			||||||
 | 
					        String itemCodes = param.getStr("itemCodeList");
 | 
				
			||||||
 | 
					        if (StrUtil.isNotBlank(itemCodes) && !itemCodes.isEmpty()) {
 | 
				
			||||||
 | 
					            String[] codes = itemCodes.trim().split("\n");
 | 
				
			||||||
 | 
					            if (codes.length > 1) {
 | 
				
			||||||
 | 
					                String inClause = Arrays.stream(codes)
 | 
				
			||||||
 | 
					                        .map(String::trim)
 | 
				
			||||||
 | 
					                        .filter(code -> !code.isEmpty())
 | 
				
			||||||
 | 
					                        .map(code -> "'" + code + "'")
 | 
				
			||||||
 | 
					                        .collect(Collectors.joining(", "));
 | 
				
			||||||
 | 
					                querySql += " and item.code in (" + inClause + ")";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //推荐库区
 | 
					        //推荐库区
 | 
				
			||||||
        if (param.getStr("tKq")!=null&¶m.getStr("tKq").length()>0){
 | 
					        if (param.getStr("tKq")!=null&¶m.getStr("tKq").length()>0){
 | 
				
			||||||
            querySql=querySql+" and wa.id = "+param.getStr("tKq");
 | 
					            querySql=querySql+" and wa.id = "+param.getStr("tKq");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue