WMS:盘库信息查询
master
xs 9 months ago
parent 4f8cc9c7b1
commit 0dc123719d

@ -3,6 +3,9 @@ package com.hw.wms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.service.IWmsBaseWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -35,6 +38,9 @@ public class WmsInventoryCheckController extends BaseController
@Autowired
private IWmsInventoryCheckService wmsInventoryCheckService;
@Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService;
/**
*
*/
@ -43,7 +49,7 @@ public class WmsInventoryCheckController extends BaseController
public TableDataInfo list(WmsInventoryCheck wmsInventoryCheck)
{
startPage();
List<WmsInventoryCheck> list = wmsInventoryCheckService.selectWmsInventoryCheckList(wmsInventoryCheck);
List<WmsInventoryCheck> list = wmsInventoryCheckService.selectWmsInventoryCheckJoinList(wmsInventoryCheck);
return getDataTable(list);
}
@ -102,4 +108,17 @@ public class WmsInventoryCheckController extends BaseController
{
return toAjax(wmsInventoryCheckService.deleteWmsInventoryCheckByInventoryCheckIds(inventoryCheckIds));
}
/**
*
*/
@RequiresPermissions("wms:inventoryCheck:list")
@GetMapping("/getWarehouses")
public AjaxResult getWarehouses(WmsBaseWarehouse wmsBaseWarehouse)
{
List<WmsBaseWarehouse> baseWarehouses = wmsBaseWarehouseService.selectWmsBaseWarehouseList(wmsBaseWarehouse);
return success(baseWarehouses);
}
}

@ -42,7 +42,6 @@ public class WmsMoveController extends BaseController
/**
*
*/
@ApiOperation("cccc")
@RequiresPermissions("wms:move:list")
@GetMapping("/list")
public TableDataInfo list(WmsMove wmsMove)

@ -351,7 +351,7 @@ public class WmsRawStock extends BaseEntity {
public String getLocationAndMaterial() {
return "库位:" + locationCode + ",物料条码:" + instockBatch +
",安全库存:"+(safeFlag.equals(MesConstants.MES_ORDER_BIND_SAFE_FLAG_YES)?"是":"否")+";";
",安全库存:"+(safeFlag!=null && safeFlag.equals(MesConstants.MES_ORDER_BIND_SAFE_FLAG_YES)?"是":"否")+";";
}
@Override
@ -375,6 +375,8 @@ public class WmsRawStock extends BaseEntity {
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.append("activeFlag", getActiveFlag())
.append("safeFlag", getSafeFlag())
.append("locationMaterial", getLocationAndMaterial())
.toString();
}
}

@ -40,7 +40,8 @@ public class WmsRawStockServiceImpl implements IWmsRawStockService
@Override
public List<WmsRawStock> selectWmsRawStockList(WmsRawStock wmsRawStock)
{
return wmsRawStockMapper.selectWmsRawStockList(wmsRawStock);
List<WmsRawStock> wmsRawStocks= wmsRawStockMapper.selectWmsRawStockList(wmsRawStock);;
return wmsRawStocks;
}
/**

@ -46,6 +46,9 @@
<result property="createDate" column="sub_create_date" />
<result property="updateBy" column="sub_update_by" />
<result property="updateDate" column="sub_update_date" />
<result property="materialCode" column="sub_material_code" />
<result property="materialName" column="sub_material_name" />
</resultMap>
<sql id="selectWmsInventoryCheckVo">
@ -67,9 +70,11 @@
<select id="selectWmsInventoryCheckByInventoryCheckId" parameterType="Long" resultMap="WmsInventoryCheckWmsInventoryCheckDetailResult">
select a.inventory_check_id, a.inventory_check_code, a.warehouse_id, a.check_status, a.begin_time, a.end_time, a.location_amount, a.inventorying_amount, a.inventoried_amount, a.remark, a.create_by, a.create_date, a.update_by, a.update_date,
b.inventory_check_detail_id as sub_inventory_check_detail_id, b.inventory_check_id as sub_inventory_check_id, b.material_id as sub_material_id, b.location_code as sub_location_code, b.material_batch as sub_material_batch, b.stock_type as sub_stock_type, b.stock_id as sub_stock_id, b.stock_amount as sub_stock_amount, b.real_amount as sub_real_amount, b.check_status as sub_check_status, b.inventory_time as sub_inventory_time, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.remark as sub_remark, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date
b.inventory_check_detail_id as sub_inventory_check_detail_id, b.inventory_check_id as sub_inventory_check_id, b.material_id as sub_material_id, b.location_code as sub_location_code, b.material_batch as sub_material_batch, b.stock_type as sub_stock_type, b.stock_id as sub_stock_id, b.stock_amount as sub_stock_amount, b.real_amount as sub_real_amount, b.check_status as sub_check_status, b.inventory_time as sub_inventory_time, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.remark as sub_remark, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date,
mbmi.material_code as sub_material_code,mbmi.material_name as sub_material_name
from wms_inventory_check a
left join wms_inventory_check_detail b on b.inventory_check_id = a.inventory_check_id
left join mes_base_material_info mbmi on b.material_id=mbmi.material_id
where a.inventory_check_id = #{inventoryCheckId}
</select>
@ -164,17 +169,28 @@
<select id="selectWmsInventoryCheckJoinList" parameterType="WmsInventoryCheck" resultMap="WmsInventoryCheckResult">
select wic.inventory_check_id, wic.inventory_check_code, wic.warehouse_id, wic.check_status, wic.begin_time, wic.end_time,wic.location_amount, wic.inventorying_amount, wic.inventoried_amount,
wbw.warehouse_name
wbw.warehouse_name,wic.create_by,wic.create_date,wic.update_by,wic.update_date
from wms_inventory_check wic left join wms_base_warehouse wbw on wic.warehouse_id = wbw.warehouse_id
<where>
<if test="inventoryCheckCode != null and inventoryCheckCode != ''"> and wic.inventory_check_code = #{inventoryCheckCode}</if>
<if test="warehouseId != null "> and wic.warehouse_id = #{warehouseId}</if>
<if test="checkStatus != null and checkStatus != ''"> and wic.check_status = #{checkStatus}</if>
<if test="beginTime != null "> and wic.begin_time = #{beginTime}</if>
<if test="endTime != null "> and wic.end_time = #{endTime}</if>
<if test="createDate != null "> and wic.create_date = #{createDate}</if>
<if test="updateDate != null "> and wic.update_date = #{updateDate}</if>
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
and wic.begin_time between #{params.beginBeginTime} and #{params.endBeginTime}</if>
<if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''">
and wic.end_time between #{params.beginEndTime} and #{params.endEndTime}</if>
<if test="createBy != null and createBy != ''"> and wic.create_by like concat('%', #{createBy},'%')</if>
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''">
and wic.create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
<if test="params.beginUpdateDate != null and params.beginUpdateDate != '' and params.endUpdateDate != null and params.endUpdateDate != ''">
and wic.update_date between #{params.beginUpdateDate} and #{params.endUpdateDate}</if>
</where>
order by wic.inventory_check_id desc
</select>

@ -0,0 +1,54 @@
import request from '@/utils/request'
// 查询盘点记录列表
export function listInventoryCheck(query) {
return request({
url: '/wms/inventoryCheck/list',
method: 'get',
params: query
})
}
// 查询盘点记录详细
export function getInventoryCheck(inventoryCheckId) {
return request({
url: '/wms/inventoryCheck/' + inventoryCheckId,
method: 'get'
})
}
// 新增盘点记录
export function addInventoryCheck(data) {
return request({
url: '/wms/inventoryCheck',
method: 'post',
data: data
})
}
// 修改盘点记录
export function updateInventoryCheck(data) {
return request({
url: '/wms/inventoryCheck',
method: 'put',
data: data
})
}
// 删除盘点记录
export function delInventoryCheck(inventoryCheckId) {
return request({
url: '/wms/inventoryCheck/' + inventoryCheckId,
method: 'delete'
})
}
// 查询仓库列表
export function getWarehouses(query) {
return request({
url: '/wms/inventoryCheck/getWarehouses',
method: 'get',
params: query
})
}

@ -0,0 +1,311 @@
<template>
<div class="app-container">
<el-form ref="form" :model="form" label-width="136px">
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="盘点单号" prop="inventoryCheckCode" >
<el-input v-model="form.inventoryCheckCode" placeholder="请输入盘点单号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="仓库" prop="warehouseName">
<el-input v-model="form.warehouseName" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="盘点开始时间" prop="beginTime">
<el-input v-model="form.beginTime" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="盘点结束时间" prop="endTime">
<el-input v-model="form.endTime" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="库位总数量" prop="locationAmount">
<el-input v-model="form.locationAmount" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="正在盘点库位数量" prop="inventoryingAmount">
<el-input v-model="form.inventoryingAmount" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="已盘点库位数量" prop="inventoriedAmount">
<el-input v-model="form.inventoriedAmount" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="状态" prop="checkStatus">
<el-input v-model="form.checkStatus" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="创建人" prop="createBy">
<el-input v-model="form.createBy" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="form.createDate" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="更新人" prop="updateBy">
<el-input v-model="form.updateBy" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="更新时间" prop="createTime">
<el-input v-model="form.updateDate" disabled/>
</el-form-item>
</el-col>
</el-row>
<!--el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" disabled/>
</el-form-item-->
<el-divider content-position="center">盘点记录明细信息</el-divider>
<el-table :data="wmsInventoryCheckDetailList" :row-class-name="rowWmsInventoryCheckDetailIndex" @selection-change="handleWmsInventoryCheckDetailSelectionChange" ref="wmsInventoryCheckDetail">
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" />
<el-table-column label="库位编码" align="center" prop="locationCode" />
<el-table-column label="库存类型" align="center" prop="stockType">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_warehouse_instock_type" :value="scope.row.stockType"/>
</template>
</el-table-column>
<el-table-column label="库存数量" align="center" prop="stockAmount" />
<el-table-column label="盘点数量" align="center" prop="realAmount"/>
<el-table-column label="明细状态" align="center" prop="checkStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_inventory_check_status" :value="scope.row.checkStatus"/>
</template>
</el-table-column>
<el-table-column label="盘点次数" align="center" prop="inventoryTime" />
<el-table-column label="同步ERP状态" align="center" prop="erpStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
</template>
</el-table-column>
<el-table-column label="同步ERP数量" align="center" prop="erpAmount" />
<el-table-column label="创建时间" align="center" prop="createDate" />
<el-table-column label="最后更新时间" align="center" prop="updateDate" />
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</div>
</template>
<script>
import { getInventoryCheck,getWarehouses } from "@/api/wms/inventoryCheck";
export default {
name: "InventoryCheck",
dicts: ['wms_warehouse_instock_type','wms_inventory_check_status','wms_erp_status'],
data() {
return {
//
loading: true,
//
ids: [],
//
checkedWmsInventoryCheckDetail: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
inventoryCheckList: [],
warehouseOptions: [],
//
daterangeCreateDate: [],
//
wmsInventoryCheckDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
inventoryCheckCode: null,
warehouseId: null,
checkStatus: null,
beginTime: null,
endTime: null,
locationAmount: null,
inventoryingAmount: null,
inventoriedAmount: null,
createDate: null,
updateDate: null
},
//
form: {},
};
},
created() {
const inventoryCheckId = this.$route.params && this.$route.params.inventoryCheckId;
const inventoryCheckCode = this.$route.params && this.$route.params.inventoryCheckCode;
const warehouseName = this.$route.params && this.$route.params.warehouseName;
getInventoryCheck(inventoryCheckId).then(response => {
this.form = response.data;
this.wmsInventoryCheckDetailList = response.data.wmsInventoryCheckDetailList;
this.form.warehouseName = warehouseName;
});
// this.detailFlag = detailFlag == "1";
// this.form.rawOutstockId = rawOutstockId;
// this.form.taskCode = taskCode;
},
methods: {
//
cancel() {
const obj = {path: "/wms/info/inventoryCheck", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
this.$tab.closeOpenPage(obj);
},
//
reset() {
this.form = {
inventoryCheckId: null,
inventoryCheckCode: null,
warehouseId: null,
checkStatus: null,
beginTime: null,
endTime: null,
locationAmount: null,
inventoryingAmount: null,
inventoriedAmount: null,
remark: null,
createBy: null,
createDate: null,
updateBy: null,
updateDate: null
};
this.wmsInventoryCheckDetailList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.inventoryCheckId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加盘点记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const inventoryCheckId = row.inventoryCheckId || this.ids
getInventoryCheck(inventoryCheckId).then(response => {
this.form = response.data;
this.wmsInventoryCheckDetailList = response.data.wmsInventoryCheckDetailList;
this.open = true;
this.title = "修改盘点记录";
});
},
/** 删除按钮操作 */
handleDelete(row) {
const inventoryCheckIds = row.inventoryCheckId || this.ids;
this.$modal.confirm('是否确认删除盘点记录编号为"' + inventoryCheckIds + '"的数据项?').then(function() {
return delInventoryCheck(inventoryCheckIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 盘点记录明细序号 */
rowWmsInventoryCheckDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 盘点记录明细添加按钮操作 */
handleAddWmsInventoryCheckDetail() {
let obj = {};
obj.materialId = "";
obj.locationCode = "";
obj.materialBatch = "";
obj.stockType = "";
obj.stockId = "";
obj.stockAmount = "";
obj.realAmount = "";
obj.checkStatus = "";
obj.inventoryTime = "";
obj.erpStatus = "";
obj.erpAmount = "";
obj.remark = "";
obj.createDate = "";
obj.updateDate = "";
this.wmsInventoryCheckDetailList.push(obj);
},
/** 复选框选中数据 */
handleWmsInventoryCheckDetailSelectionChange(selection) {
this.checkedWmsInventoryCheckDetail = selection.map(item => item.index)
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/inventoryCheck/export', {
...this.queryParams
}, `inventoryCheck_${new Date().getTime()}.xlsx`)
},
/** 查询仓库列表 */
getWarehouses() {
getWarehouses().then(response => {
this.warehouseOptions = response.data;
});
},
}
};
</script>

@ -0,0 +1,355 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="盘点单号" prop="inventoryCheckCode">
<el-input
v-model="queryParams.inventoryCheckCode"
placeholder="请输入盘点单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
<el-option
v-for="(category, index) in warehouseOptions"
:key="index"
:label="category.warehouseName"
:value="category.warehouseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="盘点状态" prop="checkStatus">
<el-select
v-model="queryParams.checkStatus"
placeholder="请选择盘点状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_inventory_check_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="盘点开始时间" prop="beginTime">
<el-date-picker
v-model="dateRangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder=""
end-placeholder=""
></el-date-picker>
</el-form-item>
<el-form-item label="盘点结束时间" prop="endTime">
<el-date-picker
v-model="dateRangeEndTime"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder=""
end-placeholder=""
></el-date-picker>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="inventoryCheckList" @selection-change="handleSelectionChange">
<el-table-column label="盘点单号" align="center" prop="inventoryCheckCode" />
<el-table-column label="仓库" align="center" prop="warehouseName" />
<el-table-column label="盘点状态" align="center" prop="checkStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_inventory_check_status" :value="scope.row.checkStatus"/>
</template>
</el-table-column>
<el-table-column label="盘点开始时间" align="center" prop="beginTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="盘点结束时间" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="库位总数量" align="center" prop="locationAmount" />
<el-table-column label="正在盘点库位数量" align="center" prop="inventoryingAmount" />
<el-table-column label="已盘点库位数量" align="center" prop="inventoriedAmount" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleOpenDetail(scope.row)"
v-hasPermi="['wms:inventoryCheck:detail']"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listInventoryCheck, getInventoryCheck,getWarehouses } from "@/api/wms/inventoryCheck";
export default {
name: "InventoryCheck",
dicts: ['wms_inventory_check_status'],
data() {
return {
//
loading: true,
//
ids: [],
//
checkedWmsInventoryCheckDetail: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
inventoryCheckList: [],
warehouseOptions: [],
//
dateRangeBeginTime: [],
//
dateRangeEndTime: [],
//
wmsInventoryCheckDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
inventoryCheckCode: null,
warehouseId: null,
checkStatus: null,
beginTime: null,
endTime: null,
locationAmount: null,
inventoryingAmount: null,
inventoriedAmount: null,
createDate: null,
updateDate: null
},
//
form: {},
//
rules: {
warehouseId: [
{ required: true, message: "仓库ID不能为空", trigger: "blur" }
],
checkStatus: [
{ required: true, message: "盘点状态(0待盘点不能为空", trigger: "change" }
],
locationAmount: [
{ required: true, message: "库位总数量不能为空", trigger: "blur" }
],
inventoryingAmount: [
{ required: true, message: "正在盘点库位数量不能为空", trigger: "blur" }
],
inventoriedAmount: [
{ required: true, message: "已盘点库位数量不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getWarehouses();
this.getList();
},
methods: {
/** 查询盘点记录列表 */
getList() {
this.loading = true;
if (null != this.dateRangeBeginTime && '' != this.dateRangeBeginTime) {
this.queryParams = this.addDateRange(this.queryParams, this.dateRangeBeginTime,"BeginTime");
}
if (null != this.dateRangeEndTime && '' != this.dateRangeEndTime) {
this.queryParams = this.addDateRange(this.queryParams, this.dateRangeEndTime,"EndTime");
}
listInventoryCheck(this.queryParams).then(response => {
this.inventoryCheckList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
inventoryCheckId: null,
inventoryCheckCode: null,
warehouseId: null,
checkStatus: null,
beginTime: null,
endTime: null,
locationAmount: null,
inventoryingAmount: null,
inventoriedAmount: null,
remark: null,
createBy: null,
createDate: null,
updateBy: null,
updateDate: null
};
this.wmsInventoryCheckDetailList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeBeginTime = [];
this.dateRangeEndTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.inventoryCheckId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加盘点记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const inventoryCheckId = row.inventoryCheckId || this.ids
getInventoryCheck(inventoryCheckId).then(response => {
this.form = response.data;
this.wmsInventoryCheckDetailList = response.data.wmsInventoryCheckDetailList;
this.open = true;
this.title = "修改盘点记录";
});
},
/** 删除按钮操作 */
handleDelete(row) {
const inventoryCheckIds = row.inventoryCheckId || this.ids;
this.$modal.confirm('是否确认删除盘点记录编号为"' + inventoryCheckIds + '"的数据项?').then(function() {
return delInventoryCheck(inventoryCheckIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 盘点记录明细序号 */
rowWmsInventoryCheckDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 盘点记录明细添加按钮操作 */
handleAddWmsInventoryCheckDetail() {
let obj = {};
obj.materialId = "";
obj.locationCode = "";
obj.materialBatch = "";
obj.stockType = "";
obj.stockId = "";
obj.stockAmount = "";
obj.realAmount = "";
obj.checkStatus = "";
obj.inventoryTime = "";
obj.erpStatus = "";
obj.erpAmount = "";
obj.remark = "";
obj.createDate = "";
obj.updateDate = "";
this.wmsInventoryCheckDetailList.push(obj);
},
/** 复选框选中数据 */
handleWmsInventoryCheckDetailSelectionChange(selection) {
this.checkedWmsInventoryCheckDetail = selection.map(item => item.index)
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/inventoryCheck/export', {
...this.queryParams
}, `inventoryCheck_${new Date().getTime()}.xlsx`)
},
/** 查询仓库列表 */
getWarehouses() {
getWarehouses().then(response => {
this.warehouseOptions = response.data;
});
},
handleOpenDetail(row) {
const inventoryCheckId = row.inventoryCheckId;
const inventoryCheckCode = row.inventoryCheckCode
const warehouseName = row.warehouseName;
const params = {pageNum: this.queryParams.pageNum};
this.$tab.openPage("盘点详情[" + inventoryCheckCode + "]", '/wms/inventory-check/detail/'+inventoryCheckId+'/' + inventoryCheckCode+'/'+warehouseName, params);
},
}
};
</script>
Loading…
Cancel
Save