parent
4f8cc9c7b1
commit
0dc123719d
@ -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…
Reference in New Issue