366 lines
12 KiB
Vue
366 lines
12 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form-item label="库存ID" prop="stockId">
|
|
<el-input
|
|
v-model="queryParams.stockId"
|
|
placeholder="请输入库存ID"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="项目号" prop="spare4">
|
|
<el-input
|
|
v-model="queryParams.spare4"
|
|
placeholder="请输入项目号"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="物料编码" prop="productId">
|
|
<el-input
|
|
v-model="queryParams.productId"
|
|
placeholder="请输入物料编码"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="物料名称" prop="productName">
|
|
<el-input
|
|
v-model="queryParams.productName"
|
|
placeholder="请输入物料名称"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="是否满盘" prop="model">
|
|
<el-select v-model="queryParams.model" placeholder="请选择是否满盘" clearable>
|
|
<el-option label="否" value="0"></el-option>
|
|
<el-option label="是" value="1"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="货位状态" prop="cargoSpaceStatus">
|
|
<el-select v-model="queryParams.cargoSpaceStatus" placeholder="请选择货位状态" clearable>
|
|
<el-option
|
|
v-for="dict in dict.type.cargo_space_status"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
/>
|
|
</el-select>
|
|
</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-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="warning"
|
|
plain
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
@click="handleExport"
|
|
v-hasPermi="['search:ViewStockDetail:export']"
|
|
>导出</el-button>
|
|
</el-col>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
|
|
<el-table v-loading="loading" :data="ViewStockDetailList" >
|
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
<!-- <el-table-column label="${comment}" align="center" prop="onlyIdentity" />-->
|
|
<el-table-column width="180" label="库存ID" align="left" prop="stockId" />
|
|
<el-table-column width="180" label="物料编码" align="left" prop="productId" />
|
|
<el-table-column width="180" label="物料名称" align="left" prop="productName" />
|
|
<el-table-column width="80" label="库存数量" align="left" prop="quantity" />
|
|
<el-table-column width="180" label="托盘条码" align="left" prop="trayCode" />
|
|
<el-table-column width="80" label="是否满盘" align="left" prop="model"
|
|
:formatter="(row, column, cellValue) => cellValue == '1' ? '是' : '否'"
|
|
/>
|
|
<el-table-column width="80" label="盘点记录" align="left" prop="spare7"
|
|
:formatter="(row, column, cellValue) => cellValue == '1' ? '已盘点' : '未盘点'"
|
|
/>
|
|
<el-table-column width="180" label="项目号" align="left" prop="spare4" />
|
|
<el-table-column width="180" label="批号" align="left" prop="lotNo" />
|
|
<el-table-column width="180" label="层级关系" align="left" prop="spare1" show-overflow-tooltip/>
|
|
<el-table-column width="180" label="上层物料" align="left" prop="spare2" />
|
|
<el-table-column width="180" label="顶层物料" align="left" prop="spare3" />
|
|
<el-table-column width="180" label="合同号" align="left" prop="spare5" />
|
|
<el-table-column width="180" label="销售订单号" align="left" prop="spare6" />
|
|
<el-table-column width="180" label="供应商编码" align="left" prop="voltage" />
|
|
<el-table-column width="180" label="供应商名称" align="left" prop="stackingId" />
|
|
<el-table-column width="180" label="规格型号" align="left" prop="power" />
|
|
<el-table-column width="180" label="计量单位" align="left" prop="phase" />
|
|
<el-table-column width="180" label="货位名称" align="left" prop="cargoSpaceName" />
|
|
<el-table-column width="180" label="货位状态" align="left" prop="cargoSpaceStatus">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStatus"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column width="80" label="货位锁" align="left" prop="locked">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column width="80" label="库存状态" align="left" prop="stockStatus">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column width="80" label="物料状态" align="left" prop="productStatus">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column label="货位id" align="center" prop="cargoSpaceId" />-->
|
|
<el-table-column width="180" label="入库时间" align="left" prop="inDate" />
|
|
<!-- <el-table-column width="180" label="回流时间" align="center" prop="backDate" />-->
|
|
<!-- <el-table-column label="物料GUID" align="center" prop="productGuid" />-->
|
|
<el-table-column width="180" label="作业ID" align="left" prop="jobId" />
|
|
<el-table-column width="80" label="出库数量" align="left" prop="outQuantity" />
|
|
<el-table-column width="180" label="入库子单id" align="left" prop="stockinDetailId" />
|
|
<el-table-column width="180" label="入库单ID" align="left" prop="stockinId" />
|
|
<el-table-column width="80" label="入库类型" align="left" prop="inType" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.in_bill_type" :value="scope.row.inType"/>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column label="入库班组ID" align="center" prop="inClassId" />-->
|
|
<!-- <el-table-column label="仓库" align="center" prop="warehouseId" />-->
|
|
|
|
</el-table>
|
|
|
|
<pagination
|
|
v-show="total>0"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { listViewStockDetail, getViewStockDetail, delViewStockDetail, addViewStockDetail, updateViewStockDetail } from "@/api/search/ViewStockDetail"
|
|
|
|
export default {
|
|
name: "ViewStockDetail",
|
|
dicts: ['product_status', 'cargo_space_status', 'cargo_space_lock_status', 'stock_status','in_bill_type'],
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 库存明细查询表格数据
|
|
ViewStockDetailList: [],
|
|
// 弹出层标题
|
|
title: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
onlyIdentity: null,
|
|
stockId: null,
|
|
cargoSpaceId: null,
|
|
stockStatus: null,
|
|
productStatus: null,
|
|
lotNo: null,
|
|
inDate: null,
|
|
backDate: null,
|
|
productGuid: null,
|
|
quantity: null,
|
|
jobId: null,
|
|
trayCode: null,
|
|
outQuantity: null,
|
|
stockinDetailId: null,
|
|
stockinId: null,
|
|
inType: null,
|
|
inClassId: null,
|
|
warehouseId: null,
|
|
stackingId: null,
|
|
spare1: null,
|
|
spare2: null,
|
|
spare3: null,
|
|
spare4: null,
|
|
spare5: null,
|
|
spare6: null,
|
|
productId: null,
|
|
productName: null,
|
|
voltage: null,
|
|
power: null,
|
|
phase: null,
|
|
netWeight: null,
|
|
grossWeight: null,
|
|
distribution: null,
|
|
model: null,
|
|
orderId: null,
|
|
spare7: null,
|
|
spare8: null,
|
|
cargoSpaceName: null,
|
|
cargoSpaceStatus: null,
|
|
locked: null
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
stockId: [
|
|
{ required: true, message: "库存id不能为空", trigger: "blur" }
|
|
],
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
this.getList()
|
|
},
|
|
methods: {
|
|
/** 查询库存明细查询列表 */
|
|
getList() {
|
|
this.loading = true
|
|
listViewStockDetail(this.queryParams).then(response => {
|
|
this.ViewStockDetailList = response.rows
|
|
this.total = response.total
|
|
this.loading = false
|
|
})
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.open = false
|
|
this.reset()
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
onlyIdentity: null,
|
|
stockId: null,
|
|
cargoSpaceId: null,
|
|
stockStatus: null,
|
|
productStatus: null,
|
|
lotNo: null,
|
|
inDate: null,
|
|
backDate: null,
|
|
productGuid: null,
|
|
quantity: null,
|
|
jobId: null,
|
|
trayCode: null,
|
|
outQuantity: null,
|
|
stockinDetailId: null,
|
|
stockinId: null,
|
|
inType: null,
|
|
inClassId: null,
|
|
warehouseId: null,
|
|
stackingId: null,
|
|
spare1: null,
|
|
spare2: null,
|
|
spare3: null,
|
|
spare4: null,
|
|
spare5: null,
|
|
spare6: null,
|
|
productId: null,
|
|
productName: null,
|
|
voltage: null,
|
|
power: null,
|
|
phase: null,
|
|
netWeight: null,
|
|
grossWeight: null,
|
|
distribution: null,
|
|
model: null,
|
|
orderId: null,
|
|
spare7: null,
|
|
spare8: null,
|
|
cargoSpaceName: null,
|
|
cargoSpaceStatus: null,
|
|
locked: null
|
|
}
|
|
this.resetForm("form")
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1
|
|
this.getList()
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm")
|
|
this.handleQuery()
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.onlyIdentity)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
this.reset()
|
|
this.open = true
|
|
this.title = "添加库存明细查询"
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset()
|
|
const onlyIdentity = row.onlyIdentity || this.ids
|
|
getViewStockDetail(onlyIdentity).then(response => {
|
|
this.form = response.data
|
|
this.open = true
|
|
this.title = "修改库存明细查询"
|
|
})
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (this.form.onlyIdentity != null) {
|
|
updateViewStockDetail(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功")
|
|
this.open = false
|
|
this.getList()
|
|
})
|
|
} else {
|
|
addViewStockDetail(this.form).then(response => {
|
|
this.$modal.msgSuccess("新增成功")
|
|
this.open = false
|
|
this.getList()
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const onlyIdentitys = row.onlyIdentity || this.ids
|
|
this.$modal.confirm('是否确认删除库存明细查询编号为"' + onlyIdentitys + '"的数据项?').then(function() {
|
|
return delViewStockDetail(onlyIdentitys)
|
|
}).then(() => {
|
|
this.getList()
|
|
this.$modal.msgSuccess("删除成功")
|
|
}).catch(() => {})
|
|
},
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
this.download('search/ViewStockDetail/export', {
|
|
...this.queryParams
|
|
}, `ViewStockDetail_${new Date().getTime()}.xlsx`)
|
|
}
|
|
}
|
|
}
|
|
</script>
|