no message
							parent
							
								
									1800cb614c
								
							
						
					
					
						commit
						35af95e180
					
				| 
						 | 
					@ -689,7 +689,7 @@ export default {
 | 
				
			||||||
        //拣货库区
 | 
					        //拣货库区
 | 
				
			||||||
       z_name: [],
 | 
					       z_name: [],
 | 
				
			||||||
        //所在库位
 | 
					        //所在库位
 | 
				
			||||||
        lc1_code: '',
 | 
					        lc2_code: '',
 | 
				
			||||||
        //料号
 | 
					        //料号
 | 
				
			||||||
        i_code: '',
 | 
					        i_code: '',
 | 
				
			||||||
        //单据类型
 | 
					        //单据类型
 | 
				
			||||||
| 
						 | 
					@ -703,7 +703,7 @@ export default {
 | 
				
			||||||
        //容器码
 | 
					        //容器码
 | 
				
			||||||
         LP: '',
 | 
					         LP: '',
 | 
				
			||||||
        //拣货库位
 | 
					        //拣货库位
 | 
				
			||||||
        lc2_code: [],
 | 
					        lc1_code: [],
 | 
				
			||||||
        //需求日期
 | 
					        //需求日期
 | 
				
			||||||
        ORDER_DATE: [],
 | 
					        ORDER_DATE: [],
 | 
				
			||||||
        //分配日期
 | 
					        //分配日期
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,487 @@
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="div1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="div2" style="padding-bottom: 10px">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <el-form ref="form" :model="param" label-width="80px">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="相关单号:">
 | 
				
			||||||
 | 
					              <el-input type="textarea" v-model="param.RELATED_BILL" :rows="1"></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="日志类型:">
 | 
				
			||||||
 | 
					              <el-select v-model="param.LOG_TYPE"   multiple filterable  placeholder="请选择工厂" style="width: 100%;">
 | 
				
			||||||
 | 
					                <el-option
 | 
				
			||||||
 | 
					                    v-for="item in Log"
 | 
				
			||||||
 | 
					                    :key="item.index"
 | 
				
			||||||
 | 
					                    :label="item.LOG_TYPE"
 | 
				
			||||||
 | 
					                    :value="item.LOG_TYPE"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                </el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="源库位:" >
 | 
				
			||||||
 | 
					              <el-input  type="textarea" v-model="param.loc1_code" :rows="1"></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="目标库位:">
 | 
				
			||||||
 | 
					              <el-input type="textarea" v-model="param.loc_code" :rows="1"></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="料号:">
 | 
				
			||||||
 | 
					              <el-input type="textarea" v-model="param.i_code" :rows="1"></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="LOC:">
 | 
				
			||||||
 | 
					              <el-select v-model="param.PROP_C2"  multiple filterable placeholder="请选择LOC" style="width: 100%;">
 | 
				
			||||||
 | 
					                <el-option
 | 
				
			||||||
 | 
					                    v-for="item in LOCS"
 | 
				
			||||||
 | 
					                    :key="item.ID"
 | 
				
			||||||
 | 
					                    :label="item.PROP_C2"
 | 
				
			||||||
 | 
					                    :value="item.PROP_C2"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                </el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-row :gutter="24" v-show="isShow">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="4">
 | 
				
			||||||
 | 
					            <el-form-item label="操作员">
 | 
				
			||||||
 | 
					              <el-input type="textarea" v-model="param.OPERATOR" :rows="1"></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="8">
 | 
				
			||||||
 | 
					            <el-form-item label="发生时间:">
 | 
				
			||||||
 | 
					              <el-date-picker style="width: 325px"
 | 
				
			||||||
 | 
					                              v-model="param.OCCUR_TIME"
 | 
				
			||||||
 | 
					                              type="daterange"
 | 
				
			||||||
 | 
					                              align="right"
 | 
				
			||||||
 | 
					                              unlink-panels
 | 
				
			||||||
 | 
					                              range-separator="至"
 | 
				
			||||||
 | 
					                              start-placeholder="开始日期"
 | 
				
			||||||
 | 
					                              end-placeholder="结束日期"
 | 
				
			||||||
 | 
					                              :picker-options="pickerOptions">
 | 
				
			||||||
 | 
					              </el-date-picker>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-button type="success" @click="find">查找</el-button>
 | 
				
			||||||
 | 
					        <el-button type="success" @click="rest">重置</el-button>  
 | 
				
			||||||
 | 
					        <el-checkbox v-model="checked" @change="Allquesr">是否显示全部查询条件</el-checkbox>
 | 
				
			||||||
 | 
					      </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-table
 | 
				
			||||||
 | 
					        v-loading="this.tableloding"
 | 
				
			||||||
 | 
					        :height="MaxHeight"
 | 
				
			||||||
 | 
					        :header-cell-style="{background:'#000',color:'#fff'}"
 | 
				
			||||||
 | 
					        :data="tableData"
 | 
				
			||||||
 | 
					        id="educe-table"
 | 
				
			||||||
 | 
					        ref="tableData"
 | 
				
			||||||
 | 
					        style="width: 100%;">
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          type="selection"
 | 
				
			||||||
 | 
					          width="55">
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          fixed
 | 
				
			||||||
 | 
					          label="序号"
 | 
				
			||||||
 | 
					          v-if="false"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <span style="margin-left: 10px">{{ scope.row.id }}</span>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="ID"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.id}}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="相关单号"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.RELATED_BILL }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="日记类型"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.LOG_TYPE }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="单据类型"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.NAME }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="源库位"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.loc1_code }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="目标库位"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.loc_code }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="料号"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.i_code }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="描述"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.i_name }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="单位"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.UNIT }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="发生数量"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.number }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="操作人"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.OPERATOR }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="发生日期"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.OCCUR_TIME }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="备注"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.DESCRIPTION }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="批号"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.PROP_C1 }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="LOC"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.PROP_C2 }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="特殊标记"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.PROP_C3 }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="供应商编号"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{scope.row.PROP_C5}}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="暂存原因"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.PROP_C8}}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="工厂"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.PROP_C9 }}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="工作站"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.endRegion}}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column
 | 
				
			||||||
 | 
					          label="容器"
 | 
				
			||||||
 | 
					          width="180">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <div slot="reference" class="name-wrapper">
 | 
				
			||||||
 | 
					            <span>{{ scope.row.LP}}</span>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </el-table>
 | 
				
			||||||
 | 
					    <el-pagination
 | 
				
			||||||
 | 
					        @size-change="handleSizeChange"
 | 
				
			||||||
 | 
					        @current-change="handleCurrentChange"
 | 
				
			||||||
 | 
					        :current-page="pageNum"
 | 
				
			||||||
 | 
					        :page-sizes="[ 50, 100, 200,500]"
 | 
				
			||||||
 | 
					        :page-size="pageSize"
 | 
				
			||||||
 | 
					        layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
 | 
					        :total="total">
 | 
				
			||||||
 | 
					    </el-pagination>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "Kucunrizhi",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      pickerOptions: {
 | 
				
			||||||
 | 
					        shortcuts: [{
 | 
				
			||||||
 | 
					          text: '最近一周',
 | 
				
			||||||
 | 
					          onClick(picker) {
 | 
				
			||||||
 | 
					            const end = new Date();
 | 
				
			||||||
 | 
					            const start = new Date();
 | 
				
			||||||
 | 
					            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
 | 
				
			||||||
 | 
					            picker.$emit('pick', [start, end]);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          text: '最近一个月',
 | 
				
			||||||
 | 
					          onClick(picker) {
 | 
				
			||||||
 | 
					            const end = new Date();
 | 
				
			||||||
 | 
					            const start = new Date();
 | 
				
			||||||
 | 
					            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
 | 
				
			||||||
 | 
					            picker.$emit('pick', [start, end]);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          text: '最近三个月',
 | 
				
			||||||
 | 
					          onClick(picker) {
 | 
				
			||||||
 | 
					            const end = new Date();
 | 
				
			||||||
 | 
					            const start = new Date();
 | 
				
			||||||
 | 
					            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
 | 
				
			||||||
 | 
					            picker.$emit('pick', [start, end]);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableloding: false,
 | 
				
			||||||
 | 
					      isShow:false,//是否展示全部搜索条件
 | 
				
			||||||
 | 
					      tableData: [],
 | 
				
			||||||
 | 
					      pageSize: 50,
 | 
				
			||||||
 | 
					      pageNum: 1,
 | 
				
			||||||
 | 
					      total: 3,
 | 
				
			||||||
 | 
					      param: {
 | 
				
			||||||
 | 
					        //相关单号
 | 
				
			||||||
 | 
					        RELATED_BILL: '',
 | 
				
			||||||
 | 
					        //日志类型
 | 
				
			||||||
 | 
					        LOG_TYPE: [],
 | 
				
			||||||
 | 
					        //源库位
 | 
				
			||||||
 | 
					        loc1_code: '',
 | 
				
			||||||
 | 
					        //目标库位
 | 
				
			||||||
 | 
					        loc_code: '',
 | 
				
			||||||
 | 
					        //料号
 | 
				
			||||||
 | 
					        i_code: '',
 | 
				
			||||||
 | 
					        //LOC
 | 
				
			||||||
 | 
					        PROP_C2: [],
 | 
				
			||||||
 | 
					        //操作员
 | 
				
			||||||
 | 
					        OPERATOR: '',
 | 
				
			||||||
 | 
					        //发生时间
 | 
				
			||||||
 | 
					        OCCUR_TIME: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      LOCS: [],
 | 
				
			||||||
 | 
					      Log: [],
 | 
				
			||||||
 | 
					      checked: false,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },computed:{
 | 
				
			||||||
 | 
					    MaxHeight(){
 | 
				
			||||||
 | 
					      return  window.innerHeight - 240 +"px";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.queryUser();
 | 
				
			||||||
 | 
					    this.LOC();
 | 
				
			||||||
 | 
					    this.LogS();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    handleEdit(index, row) {
 | 
				
			||||||
 | 
					      console.log(index, row);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleDelete(index, row) {
 | 
				
			||||||
 | 
					      console.log(index, row);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleSizeChange(val) {
 | 
				
			||||||
 | 
					      console.log(`每页 ${val} 条`);
 | 
				
			||||||
 | 
					      this.pageNum = 1;
 | 
				
			||||||
 | 
					      this.pageSize = val;
 | 
				
			||||||
 | 
					      this.queryUser();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleCurrentChange(val) {
 | 
				
			||||||
 | 
					      console.log(`当前页: ${val}`);
 | 
				
			||||||
 | 
					      this.pageNum = val;
 | 
				
			||||||
 | 
					      this.queryUser();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    LOC(){
 | 
				
			||||||
 | 
					      //LOC下拉列表数据加载
 | 
				
			||||||
 | 
					      this.$axios.post(this.$httpUrl + '/Rukuzhengli/LOC', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }).then(res => res.data)
 | 
				
			||||||
 | 
					          .then(res => {
 | 
				
			||||||
 | 
					            if (res.code == 200) {
 | 
				
			||||||
 | 
					              this.LOCS = res.data;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              this.$message.error('获取数据失败');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
 | 
					          },err=>{
 | 
				
			||||||
 | 
					            this.tableloding=false;
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    LogS(){
 | 
				
			||||||
 | 
					      //日志类型下拉列表数据加载
 | 
				
			||||||
 | 
					      this.$axios.post(this.$httpUrl + '/Kucunrizhi/log', {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }).then(res => res.data)
 | 
				
			||||||
 | 
					          .then(res => {
 | 
				
			||||||
 | 
					            if (res.code == 200) {
 | 
				
			||||||
 | 
					              this.Log = res.data;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              this.$message.error('获取数据失败');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
 | 
					          },err=>{
 | 
				
			||||||
 | 
					            this.tableloding=false;
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    queryUser() {
 | 
				
			||||||
 | 
					      //列表数据加载
 | 
				
			||||||
 | 
					      this.$axios.post(this.$httpUrl + '/Kucunrizhi/queryRi', {
 | 
				
			||||||
 | 
					        pageSize: this.pageSize,
 | 
				
			||||||
 | 
					        pageNum: this.pageNum,
 | 
				
			||||||
 | 
					        param: this.param,
 | 
				
			||||||
 | 
					      }).then(res => res.data)
 | 
				
			||||||
 | 
					          .then(res => {
 | 
				
			||||||
 | 
					            if (res.code == 200) {
 | 
				
			||||||
 | 
					              this.tableData = res.data
 | 
				
			||||||
 | 
					              this.total = res.total
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              this.$message.error('获取数据失败');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // eslint-disable-next-line no-unused-vars
 | 
				
			||||||
 | 
					          },err=>{
 | 
				
			||||||
 | 
					            this.tableloding=false;
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    find(){
 | 
				
			||||||
 | 
					      this.queryUser();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    Allquesr(){
 | 
				
			||||||
 | 
					      //查询按钮
 | 
				
			||||||
 | 
					      if(this.checked){
 | 
				
			||||||
 | 
					        this.isShow=true;
 | 
				
			||||||
 | 
					      }else {
 | 
				
			||||||
 | 
					        this.isShow=false;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    rest() {
 | 
				
			||||||
 | 
					      //条件查询重置
 | 
				
			||||||
 | 
					      this.checked=false;
 | 
				
			||||||
 | 
					      this.isShow=false;
 | 
				
			||||||
 | 
					      this.param={};
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ const routes=[
 | 
				
			||||||
                meta:{
 | 
					                meta:{
 | 
				
			||||||
                    title:'首页'
 | 
					                    title:'首页'
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                component: () => import('../components/duochaxun/Jianhuojiemian')
 | 
					                component: () => import('../components/duochaxun/Kucunrizhi')
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                path:'/Zhengliqingdan',
 | 
					                path:'/Zhengliqingdan',
 | 
				
			||||||
| 
						 | 
					@ -56,6 +56,14 @@ const routes=[
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                component: () => import('@/components/duochaxun/Jianhuojiemian.vue')
 | 
					                component: () => import('@/components/duochaxun/Jianhuojiemian.vue')
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                path:'/Kucunrizhi',
 | 
				
			||||||
 | 
					                name:'Kucunrizhi',
 | 
				
			||||||
 | 
					                meta:{
 | 
				
			||||||
 | 
					                    title:'库存操作日志'
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                component: () => import('@/components/duochaxun/Kucunrizhi.vue')
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,30 @@
 | 
				
			||||||
 | 
					package com.yc.wms.bean;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Kucunrizhi {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //相关单号
 | 
				
			||||||
 | 
					    public String RELATED_BILL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //日志类型
 | 
				
			||||||
 | 
					    public String[] LOG_TYPE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //源库位
 | 
				
			||||||
 | 
					    public String loc1_code;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //目标库位
 | 
				
			||||||
 | 
					    public String loc_code;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //料号
 | 
				
			||||||
 | 
					    public String i_code;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //LOC
 | 
				
			||||||
 | 
					    public String[] PROP_C2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //操作员
 | 
				
			||||||
 | 
					    public String OPERATOR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //发生时间
 | 
				
			||||||
 | 
					    public Date[] OCCUR_TIME;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,7 @@ public class JianhuojiemianController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @PostMapping("/queryJian")
 | 
					    @PostMapping("/queryJian")
 | 
				
			||||||
    public Result queryUser(@RequestBody String  json) {
 | 
					    public Result queryUser(@RequestBody String  json) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        QueryPageUtil query =new QueryPageUtil();
 | 
					        QueryPageUtil query =new QueryPageUtil();
 | 
				
			||||||
        JSONObject jsonObject= JSONUtil.parseObj(json);
 | 
					        JSONObject jsonObject= JSONUtil.parseObj(json);
 | 
				
			||||||
        query.setPageSize((int)jsonObject.get("pageSize"));
 | 
					        query.setPageSize((int)jsonObject.get("pageSize"));
 | 
				
			||||||
| 
						 | 
					@ -36,6 +37,7 @@ public class JianhuojiemianController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       com.yc.wms.bean.Jianhuojiemian j = JSONUtil.toBean(param.toString(), com.yc.wms.bean.Jianhuojiemian.class);
 | 
					       com.yc.wms.bean.Jianhuojiemian j = JSONUtil.toBean(param.toString(), com.yc.wms.bean.Jianhuojiemian.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return jianhuojiemian.QueryJson(query,j);
 | 
					        return jianhuojiemian.QueryJson(query,j);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,7 +65,7 @@ public class JianhuojiemianController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        JSONObject jsonObject= JSONUtil.parseObj(query);
 | 
					        JSONObject jsonObject= JSONUtil.parseObj(query);
 | 
				
			||||||
        String w= (String) jsonObject.get("query");
 | 
					        String w= (String) jsonObject.get("query");
 | 
				
			||||||
        System.out.println(w);
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return  jianhuojiemian.Kw(w);
 | 
					        return  jianhuojiemian.Kw(w);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,41 @@
 | 
				
			||||||
 | 
					package com.yc.wms.controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.hutool.json.JSONObject;
 | 
				
			||||||
 | 
					import cn.hutool.json.JSONUtil;
 | 
				
			||||||
 | 
					import com.yc.wms.service.Kucunrizhi;
 | 
				
			||||||
 | 
					import com.yc.wms.until.QueryPageUtil;
 | 
				
			||||||
 | 
					import com.yc.wms.until.Result;
 | 
				
			||||||
 | 
					import lombok.extern.slf4j.Slf4j;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.PostMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestBody;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RestController;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					@Slf4j
 | 
				
			||||||
 | 
					@RequestMapping("/Kucunrizhi")
 | 
				
			||||||
 | 
					public class KucunrizhiController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private Kucunrizhi kucunrizhi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping("/queryRi")
 | 
				
			||||||
 | 
					    public Result queryUser(@RequestBody String  json) {
 | 
				
			||||||
 | 
					        QueryPageUtil query =new QueryPageUtil();
 | 
				
			||||||
 | 
					        JSONObject jsonObject= JSONUtil.parseObj(json);
 | 
				
			||||||
 | 
					        query.setPageSize((int)jsonObject.get("pageSize"));
 | 
				
			||||||
 | 
					        query.setPageNum((int)jsonObject.get("pageNum"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        JSONObject param= (JSONObject)jsonObject.get("param");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        com.yc.wms.bean.Kucunrizhi k = JSONUtil.toBean(param.toString(), com.yc.wms.bean.Kucunrizhi.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return kucunrizhi.QueryJson(query,k);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping("/log")
 | 
				
			||||||
 | 
					    public Result Log() {
 | 
				
			||||||
 | 
					        return kucunrizhi.Log();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -48,7 +48,7 @@ public class UserController {
 | 
				
			||||||
//        return result;
 | 
					//        return result;
 | 
				
			||||||
        JSONArray array=new JSONArray();
 | 
					        JSONArray array=new JSONArray();
 | 
				
			||||||
        JSONObject data=new JSONObject();
 | 
					        JSONObject data=new JSONObject();
 | 
				
			||||||
        int menuCount=4;
 | 
					        int menuCount=5;
 | 
				
			||||||
        for (int i=1;i<=menuCount;i++){
 | 
					        for (int i=1;i<=menuCount;i++){
 | 
				
			||||||
            JSONObject menu=new JSONObject();
 | 
					            JSONObject menu=new JSONObject();
 | 
				
			||||||
            menu.put("id",i);
 | 
					            menu.put("id",i);
 | 
				
			||||||
| 
						 | 
					@ -69,6 +69,10 @@ public class UserController {
 | 
				
			||||||
                menu.put("menuName", "拣货界面");
 | 
					                menu.put("menuName", "拣货界面");
 | 
				
			||||||
                menu.put("menuComponent","/Jianhuojiemian");
 | 
					                menu.put("menuComponent","/Jianhuojiemian");
 | 
				
			||||||
                menu.put("menuClick","Jianhuojiemian");
 | 
					                menu.put("menuClick","Jianhuojiemian");
 | 
				
			||||||
 | 
					            }else if(i==5) {
 | 
				
			||||||
 | 
					                menu.put("menuName", "库存操作日志");
 | 
				
			||||||
 | 
					                menu.put("menuComponent","/Kucunrizhi");
 | 
				
			||||||
 | 
					                menu.put("menuClick","Kucunrizhi");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            menu.put("menuLevel",i);
 | 
					            menu.put("menuLevel",i);
 | 
				
			||||||
            menu.put("menuParentCode",i);
 | 
					            menu.put("menuParentCode",i);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					package com.yc.wms.service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yc.wms.until.QueryPageUtil;
 | 
				
			||||||
 | 
					import com.yc.wms.until.Result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface Kucunrizhi {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 条件查询加分页
 | 
				
			||||||
 | 
					    Result QueryJson(QueryPageUtil query, com.yc.wms.bean.Kucunrizhi kucunrizhi);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //日志类型
 | 
				
			||||||
 | 
					    Result Log();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -212,21 +212,21 @@ public class JianhuojiemianImpl implements Jianhuojiemian {
 | 
				
			||||||
        if(jianhuojiemian.ORDER_DATE!=null&&jianhuojiemian.ORDER_DATE.length>0){
 | 
					        if(jianhuojiemian.ORDER_DATE!=null&&jianhuojiemian.ORDER_DATE.length>0){
 | 
				
			||||||
            String startDate = simpleDateFormat.format(jianhuojiemian.ORDER_DATE[0]);
 | 
					            String startDate = simpleDateFormat.format(jianhuojiemian.ORDER_DATE[0]);
 | 
				
			||||||
            String endDate = simpleDateFormat.format(jianhuojiemian.ORDER_DATE[1]);
 | 
					            String endDate = simpleDateFormat.format(jianhuojiemian.ORDER_DATE[1]);
 | 
				
			||||||
            sql+=" and pt.ORDER_DATE "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
					            sql+=" and pt.ORDER_DATE between "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //分配日期
 | 
					        //分配日期
 | 
				
			||||||
        if(jianhuojiemian.CREATE_TIME!=null&&jianhuojiemian.CREATE_TIME.length>0){
 | 
					        if(jianhuojiemian.CREATE_TIME!=null&&jianhuojiemian.CREATE_TIME.length>0){
 | 
				
			||||||
            String startDate = simpleDateFormat.format(jianhuojiemian.CREATE_TIME[0]);
 | 
					            String startDate = simpleDateFormat.format(jianhuojiemian.CREATE_TIME[0]);
 | 
				
			||||||
            String endDate = simpleDateFormat.format(jianhuojiemian.CREATE_TIME[1]);
 | 
					            String endDate = simpleDateFormat.format(jianhuojiemian.CREATE_TIME[1]);
 | 
				
			||||||
            sql+=" and t.CREATE_TIME "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
					            sql+=" and t.CREATE_TIME between "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //拣货日期
 | 
					        //拣货日期
 | 
				
			||||||
        if(jianhuojiemian.OPERATE_TIME!=null&&jianhuojiemian.OPERATE_TIME.length>0){
 | 
					        if(jianhuojiemian.OPERATE_TIME!=null&&jianhuojiemian.OPERATE_TIME.length>0){
 | 
				
			||||||
            String startDate = simpleDateFormat.format(jianhuojiemian.OPERATE_TIME[0]);
 | 
					            String startDate = simpleDateFormat.format(jianhuojiemian.OPERATE_TIME[0]);
 | 
				
			||||||
            String endDate = simpleDateFormat.format(jianhuojiemian.OPERATE_TIME[1]);
 | 
					            String endDate = simpleDateFormat.format(jianhuojiemian.OPERATE_TIME[1]);
 | 
				
			||||||
            sql+=" and t.OPERATE_TIME "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
					            sql+=" and t.OPERATE_TIME between "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //拣货状态
 | 
					        //拣货状态
 | 
				
			||||||
| 
						 | 
					@ -261,10 +261,10 @@ public class JianhuojiemianImpl implements Jianhuojiemian {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        String sqlCount = "select count(t.id) as nums from(" + sql+") t";
 | 
					        String sqlCount = "select count(t.id) as nums from(" + sql+") t";
 | 
				
			||||||
        String sqlFy = "select t.* from(" + sql+") t";
 | 
					        String sqlFy = "select t.* from(" + sql+") t";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
 | 
					          sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
 | 
				
			||||||
        //查询单数据
 | 
					        //查询单数据
 | 
				
			||||||
        Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
 | 
					        Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,186 @@
 | 
				
			||||||
 | 
					package com.yc.wms.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yc.wms.service.Kucunrizhi;
 | 
				
			||||||
 | 
					import com.yc.wms.until.QueryPageUtil;
 | 
				
			||||||
 | 
					import com.yc.wms.until.Result;
 | 
				
			||||||
 | 
					import lombok.extern.slf4j.Slf4j;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.text.SimpleDateFormat;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					@Slf4j
 | 
				
			||||||
 | 
					public class KucunrizhiImpl implements Kucunrizhi {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Autowired
 | 
				
			||||||
 | 
					    private NamedParameterJdbcTemplate jdbcTemplate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public Result QueryJson(QueryPageUtil query, com.yc.wms.bean.Kucunrizhi kucunrizhi) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        int pageNum = query.getPageNum();//当前页
 | 
				
			||||||
 | 
					        int pageSize = query.getPageSize();//条数
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String sql="select Row_number() OVER(ORDER BY log.id) as Row_Num,log.id,log.RELATED_BILL,\n" +
 | 
				
			||||||
 | 
					                "log.LOG_TYPE ,bt.NAME bt_name,loc1.CODE loc1_code,loc.CODE loc_code,\n" +
 | 
				
			||||||
 | 
					                "i.CODE i_code,i.NAME i_name,i.UNIT,\n" +
 | 
				
			||||||
 | 
					                "log.OCCUR_QUANTITY*log.INC_DEC number,\n" +
 | 
				
			||||||
 | 
					                "log.OPERATOR ,log.OCCUR_TIME ,log.DESCRIPTION ,\n" +
 | 
				
			||||||
 | 
					                "ik.PROP_C1 ,ik.PROP_C2 ,ik.PROP_C3 ,ik.PROP_C5 ,ik.PROP_C8 ,\n" +
 | 
				
			||||||
 | 
					                "ik.PROP_C9 ,log.endRegion ,log.LP \n" +
 | 
				
			||||||
 | 
					                "FROM INVENTORY_LOG log\n" +
 | 
				
			||||||
 | 
					                "left join BILL_TYPE bt on bt.ID=log.BILL_TYPE_ID\n" +
 | 
				
			||||||
 | 
					                "left join LOCATION loc on loc.id=log.LOCATION_ID\n" +
 | 
				
			||||||
 | 
					                "left join LOCATION loc1 on loc1.id=log.SRCLOC_ID\n" +
 | 
				
			||||||
 | 
					                "left join ITEM_KEY ik on ik.id=log.ITEM_KEY_ID\n" +
 | 
				
			||||||
 | 
					                "left join item i on i.id=ik.ITEM_ID\n" +
 | 
				
			||||||
 | 
					                "where 1=1";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //相关单号
 | 
				
			||||||
 | 
					        if(kucunrizhi.RELATED_BILL!=null){
 | 
				
			||||||
 | 
					            if(!kucunrizhi.RELATED_BILL.trim().equals("")){
 | 
				
			||||||
 | 
					                String[] str=kucunrizhi.RELATED_BILL.trim().split("\n");
 | 
				
			||||||
 | 
					                StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					                for (int i=0;i<str.length;i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(str.length-1==i){
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'");
 | 
				
			||||||
 | 
					                    }else {
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'"+",");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                sql+=" and log.RELATED_BILL in ("+sb.toString()+")";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //日志类型
 | 
				
			||||||
 | 
					        if(kucunrizhi.LOG_TYPE!=null&& kucunrizhi.LOG_TYPE.length>0){
 | 
				
			||||||
 | 
					            StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					            for (int i = 0; i< kucunrizhi.LOG_TYPE.length; i++){
 | 
				
			||||||
 | 
					                if(kucunrizhi.LOG_TYPE.length-1==i){
 | 
				
			||||||
 | 
					                    sb.append("'"+ kucunrizhi.LOG_TYPE[i]+"'");
 | 
				
			||||||
 | 
					                }else {
 | 
				
			||||||
 | 
					                    sb.append("'"+ kucunrizhi.LOG_TYPE[i]+"'"+",");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            sql+=" and log.LOG_TYPE in ("+sb.toString()+")";;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //源库位
 | 
				
			||||||
 | 
					        if(kucunrizhi.loc1_code!=null){
 | 
				
			||||||
 | 
					            if(!kucunrizhi.loc1_code.trim().equals("")){
 | 
				
			||||||
 | 
					                String[] str=kucunrizhi.loc1_code.trim().split("\n");
 | 
				
			||||||
 | 
					                StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					                for (int i=0;i<str.length;i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(str.length-1==i){
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'");
 | 
				
			||||||
 | 
					                    }else {
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'"+",");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                sql+=" and loc1.CODE in ("+sb.toString()+")";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //目标库位
 | 
				
			||||||
 | 
					        if(kucunrizhi.loc_code!=null){
 | 
				
			||||||
 | 
					            if(!kucunrizhi.loc_code.trim().equals("")){
 | 
				
			||||||
 | 
					                String[] str=kucunrizhi.loc_code.trim().split("\n");
 | 
				
			||||||
 | 
					                StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					                for (int i=0;i<str.length;i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(str.length-1==i){
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'");
 | 
				
			||||||
 | 
					                    }else {
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'"+",");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                sql+=" and loc.CODE in ("+sb.toString()+")";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //料号
 | 
				
			||||||
 | 
					        if(kucunrizhi.i_code!=null){
 | 
				
			||||||
 | 
					            if(!kucunrizhi.i_code.trim().equals("")){
 | 
				
			||||||
 | 
					                String[] str=kucunrizhi.i_code.trim().split("\n");
 | 
				
			||||||
 | 
					                StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					                for (int i=0;i<str.length;i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(str.length-1==i){
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'");
 | 
				
			||||||
 | 
					                    }else {
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'"+",");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                sql+=" and i.CODE in ("+sb.toString()+")";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //LOC
 | 
				
			||||||
 | 
					        if(kucunrizhi.PROP_C2!=null&& kucunrizhi.PROP_C2.length>0){
 | 
				
			||||||
 | 
					            StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					            for (int i = 0; i< kucunrizhi.PROP_C2.length; i++){
 | 
				
			||||||
 | 
					                if(kucunrizhi.PROP_C2.length-1==i){
 | 
				
			||||||
 | 
					                    sb.append("'"+ kucunrizhi.PROP_C2[i]+"'");
 | 
				
			||||||
 | 
					                }else {
 | 
				
			||||||
 | 
					                    sb.append("'"+ kucunrizhi.PROP_C2[i]+"'"+",");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            sql+=" and ik.PROP_C2 in ("+sb.toString()+")";;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //操作员
 | 
				
			||||||
 | 
					        if(kucunrizhi.OPERATOR!=null){
 | 
				
			||||||
 | 
					            if(!kucunrizhi.OPERATOR.trim().equals("")){
 | 
				
			||||||
 | 
					                String[] str=kucunrizhi.OPERATOR.trim().split("\n");
 | 
				
			||||||
 | 
					                StringBuffer sb = new StringBuffer();
 | 
				
			||||||
 | 
					                for (int i=0;i<str.length;i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(str.length-1==i){
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'");
 | 
				
			||||||
 | 
					                    }else {
 | 
				
			||||||
 | 
					                        sb.append("'"+ str[i]+"'"+",");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                sql+=" and log.OPERATOR in ("+sb.toString()+")";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //发生时间
 | 
				
			||||||
 | 
					        if(kucunrizhi.OCCUR_TIME!=null&&kucunrizhi.OCCUR_TIME.length>0){
 | 
				
			||||||
 | 
					            String startDate = simpleDateFormat.format(kucunrizhi.OCCUR_TIME[0]);
 | 
				
			||||||
 | 
					            String endDate = simpleDateFormat.format(kucunrizhi.OCCUR_TIME[1]);
 | 
				
			||||||
 | 
					            sql+=" and log.OCCUR_TIME between"+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String sqlCount = "select count(t.id) as nums from(" + sql+")   t";
 | 
				
			||||||
 | 
					        String sqlFy = "select t.* from(" + sql+") t";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
 | 
				
			||||||
 | 
					        //查询单数据
 | 
				
			||||||
 | 
					        Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
 | 
				
			||||||
 | 
					        //查询多条数据据
 | 
				
			||||||
 | 
					        List<Map<String,Object>> maps = jdbcTemplate.queryForList(sqlFy, new HashMap<>());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return  Result.success(Long.parseLong(listCount.get("nums").toString()),maps);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public Result Log() {
 | 
				
			||||||
 | 
					        String sql=" select distinct LOG_TYPE from INVENTORY_LOG";
 | 
				
			||||||
 | 
					        List<Map<String,Object>> list=jdbcTemplate.queryForList(sql,new HashMap<>());
 | 
				
			||||||
 | 
					        return Result.success(list);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue