盘点管理 基础点位管理 绑定物料 解除物料
This commit is contained in:
44
ruoyi-ui/src/api/bas/port.js
Normal file
44
ruoyi-ui/src/api/bas/port.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询基础点位列表
|
||||
export function listPort(query) {
|
||||
return request({
|
||||
url: '/bas/port/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询基础点位详细
|
||||
export function getPort(id) {
|
||||
return request({
|
||||
url: '/bas/port/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增基础点位
|
||||
export function addPort(data) {
|
||||
return request({
|
||||
url: '/bas/port',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改基础点位
|
||||
export function updatePort(data) {
|
||||
return request({
|
||||
url: '/bas/port',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除基础点位
|
||||
export function delPort(id) {
|
||||
return request({
|
||||
url: '/bas/port/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
45
ruoyi-ui/src/api/bas/portProductRel.js
Normal file
45
ruoyi-ui/src/api/bas/portProductRel.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询点位与物料关联列表
|
||||
export function listPortProductRel(query) {
|
||||
return request({
|
||||
url: '/bas/portProductRel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询点位与物料关联详细
|
||||
export function getPortProductRel(id) {
|
||||
return request({
|
||||
url: '/bas/portProductRel/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增点位与物料关联
|
||||
export function addPortProductRel(data) {
|
||||
return request({
|
||||
url: '/bas/portProductRel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改点位与物料关联
|
||||
export function updatePortProductRel(data) {
|
||||
return request({
|
||||
url: '/bas/portProductRel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除点位与物料关联
|
||||
export function delPortProductRel(data) {
|
||||
return request({
|
||||
url: '/bas/portProductRel/unbind',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/check/stockCheck.js
Normal file
44
ruoyi-ui/src/api/check/stockCheck.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询盘库单据主信息列表
|
||||
export function listStockCheck(query) {
|
||||
return request({
|
||||
url: '/check/stockCheck/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘库单据主信息详细
|
||||
export function getStockCheck(stockGuid) {
|
||||
return request({
|
||||
url: '/check/stockCheck/' + stockGuid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增盘库单据主信息
|
||||
export function addStockCheck(data) {
|
||||
return request({
|
||||
url: '/check/stockCheck',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改盘库单据主信息
|
||||
export function updateStockCheck(data) {
|
||||
return request({
|
||||
url: '/check/stockCheck',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除盘库单据主信息
|
||||
export function delStockCheck(stockGuid) {
|
||||
return request({
|
||||
url: '/check/stockCheck/' + stockGuid,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/check/stockCheckDetail.js
Normal file
44
ruoyi-ui/src/api/check/stockCheckDetail.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询盘库单据子信息列表
|
||||
export function listStockCheckDetail(query) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘库单据子信息详细
|
||||
export function getStockCheckDetail(stockCheckDetailId) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetail/' + stockCheckDetailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增盘库单据子信息
|
||||
export function addStockCheckDetail(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改盘库单据子信息
|
||||
export function updateStockCheckDetail(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除盘库单据子信息
|
||||
export function delStockCheckDetail(stockCheckDetailId) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetail/' + stockCheckDetailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/check/stockCheckDetailFinish.js
Normal file
44
ruoyi-ui/src/api/check/stockCheckDetailFinish.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询盘库历史单据子信息列表
|
||||
export function listStockCheckDetailFinish(query) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetailFinish/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘库历史单据子信息详细
|
||||
export function getStockCheckDetailFinish(stockCheckDetailId) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetailFinish/' + stockCheckDetailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增盘库历史单据子信息
|
||||
export function addStockCheckDetailFinish(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetailFinish',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改盘库历史单据子信息
|
||||
export function updateStockCheckDetailFinish(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetailFinish',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除盘库历史单据子信息
|
||||
export function delStockCheckDetailFinish(stockCheckDetailId) {
|
||||
return request({
|
||||
url: '/check/stockCheckDetailFinish/' + stockCheckDetailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/check/stockCheckFinish.js
Normal file
44
ruoyi-ui/src/api/check/stockCheckFinish.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询盘库历史单据主信息列表
|
||||
export function listStockCheckFinish(query) {
|
||||
return request({
|
||||
url: '/check/stockCheckFinish/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘库历史单据主信息详细
|
||||
export function getStockCheckFinish(stockGuid) {
|
||||
return request({
|
||||
url: '/check/stockCheckFinish/' + stockGuid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增盘库历史单据主信息
|
||||
export function addStockCheckFinish(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckFinish',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改盘库历史单据主信息
|
||||
export function updateStockCheckFinish(data) {
|
||||
return request({
|
||||
url: '/check/stockCheckFinish',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除盘库历史单据主信息
|
||||
export function delStockCheckFinish(stockGuid) {
|
||||
return request({
|
||||
url: '/check/stockCheckFinish/' + stockGuid,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -9,30 +9,30 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="父节点id" prop="parentId">
|
||||
<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="spare1">
|
||||
<el-input
|
||||
v-model="queryParams.spare1"
|
||||
placeholder="请输入英文描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="父节点id" prop="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
placeholder="请输入父节点id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input
|
||||
v-model="queryParams.price"
|
||||
placeholder="请输入价格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌" prop="cargoNo">
|
||||
<el-input
|
||||
v-model="queryParams.cargoNo"
|
||||
placeholder="请输入品牌"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
@@ -41,13 +41,47 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
|
||||
<!-- <el-form-item label="品牌" prop="cargoNo">
|
||||
<el-input
|
||||
v-model="queryParams.cargoNo"
|
||||
placeholder="请输入品牌"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="规格" prop="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
placeholder="请输入规格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="箱号" prop="spare3">
|
||||
<el-input
|
||||
v-model="queryParams.spare3"
|
||||
placeholder="请输入箱号"
|
||||
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="price">
|
||||
<el-input
|
||||
v-model="queryParams.price"
|
||||
placeholder="请输入价格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input
|
||||
@@ -105,14 +139,14 @@
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<!-- <el-form-item label="物料名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</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>
|
||||
@@ -169,19 +203,20 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="父节点id" align="center" prop="parentId" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="品牌" align="center" prop="cargoNo" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" v-if="false"/> -->
|
||||
<!-- <el-table-column label="备用字段2" align="center" prop="spare2" />-->
|
||||
<!-- <el-table-column label="备用字段3" align="center" prop="spare3" />-->
|
||||
<!-- <el-table-column label="备用字段4" align="center" prop="spare4" />-->
|
||||
<!-- <el-table-column label="备用字段5" align="center" prop="spare5" />-->
|
||||
<!-- <el-table-column label="备用字段6" align="center" prop="spare6" />-->
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="英文描述" align="center" prop="spare1"/>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="单件净重KG" align="center" prop="spare2" />
|
||||
<el-table-column label="箱号" align="center" prop="spare3" />
|
||||
<el-table-column label="包装方式" align="center" prop="spare4" />
|
||||
<el-table-column label="长MM" align="center" prop="spare5" />
|
||||
<el-table-column label="宽MM" align="center" prop="spare6" />
|
||||
<el-table-column label="高MM" align="center" prop="spare7" />
|
||||
<el-table-column label="体积m³" align="center" prop="spare8" />
|
||||
<!-- <el-table-column label="净重KG" align="center" prop="spare8" />
|
||||
<el-table-column label="毛重KG" align="center" prop="spare9" />-->
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -212,49 +247,52 @@
|
||||
|
||||
<!-- 添加或修改物料管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style="max-height: 500px; overflow-y: auto;">
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父节点id" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入父节点id" />
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-input v-model="form.productName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌" prop="cargoNo">
|
||||
<el-input v-model="form.cargoNo" placeholder="请输入品牌" />
|
||||
<el-form-item label="英文描述" prop="spare1">
|
||||
<el-input v-model="form.spare1" placeholder="请输入英文描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
<el-input v-model="form.spec" placeholder="请输入规格" />
|
||||
<el-form-item label="单件净重KG" prop="spare2">
|
||||
<el-input v-model="form.spare2" placeholder="请输入单件净重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号" prop="spare3">
|
||||
<el-input v-model="form.spare3" placeholder="请输入箱号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="包装方式" prop="spare4">
|
||||
<el-input v-model="form.spare4" placeholder="请输入包装方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="长MM" prop="spare5">
|
||||
<el-input v-model="form.spare5" placeholder="请输入长度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽MM" prop="spare6">
|
||||
<el-input v-model="form.spare6" placeholder="请输入宽度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高MM" prop="spare7">
|
||||
<el-input v-model="form.spare7" placeholder="请输入高度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体积m³" prop="spare8">
|
||||
<el-input v-model="form.spare8" placeholder="请输入体积m³" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="净重KG" prop="spare8">
|
||||
<el-input v-model="form.spare8" placeholder="请输入净重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="毛重KG" prop="spare9">
|
||||
<el-input v-model="form.spare9" placeholder="请输入毛重" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入描述" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备用字段1" prop="spare1">-->
|
||||
<!-- <el-input v-model="form.spare1" placeholder="请输入备用字段1" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备用字段2" prop="spare2">-->
|
||||
<!-- <el-input v-model="form.spare2" placeholder="请输入备用字段2" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备用字段3" prop="spare3">-->
|
||||
<!-- <el-input v-model="form.spare3" placeholder="请输入备用字段3" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备用字段4" prop="spare4">-->
|
||||
<!-- <el-input v-model="form.spare4" placeholder="请输入备用字段4" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备用字段5" prop="spare5">-->
|
||||
<!-- <el-input v-model="form.spare5" placeholder="请输入备用字段5" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备用字段6" prop="spare6">-->
|
||||
<!-- <el-input v-model="form.spare6" placeholder="请输入备用字段6" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-input v-model="form.productName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -315,15 +353,48 @@ export default {
|
||||
productId: [
|
||||
{ required: true, message: "物料编码不能为空", trigger: "blur" }
|
||||
],
|
||||
parentId: [
|
||||
{ required: true, message: "父节点id不能为空", trigger: "blur" }
|
||||
],
|
||||
productName: [
|
||||
{ required: true, message: "物料名称不能为空", trigger: "blur" }
|
||||
],
|
||||
unit: [
|
||||
{ required: true, message: "单位不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "价格不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.spare2': {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
// 单件净重变化时,自动计算总净重
|
||||
const netWeight = parseFloat(val || 0);
|
||||
this.form.spare8 = netWeight.toString();
|
||||
// 如果毛重小于净重,自动更新毛重
|
||||
const grossWeight = parseFloat(this.form.spare9 || 0);
|
||||
if (grossWeight < netWeight) {
|
||||
this.form.spare9 = netWeight.toString();
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'form.spare8': {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
// 总净重变化时,如果毛重小于净重,自动更新毛重
|
||||
const netWeight = parseFloat(val || 0);
|
||||
const grossWeight = parseFloat(this.form.spare9 || 0);
|
||||
if (grossWeight < netWeight) {
|
||||
this.form.spare9 = netWeight.toString();
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
@@ -347,19 +418,19 @@ export default {
|
||||
this.form = {
|
||||
productGuid: null,
|
||||
productId: null,
|
||||
parentId: null,
|
||||
price: null,
|
||||
cargoNo: null,
|
||||
unit: null,
|
||||
spec: null,
|
||||
remark: null,
|
||||
productName: null,
|
||||
spare1: null,
|
||||
unit: null,
|
||||
spare2: null,
|
||||
spare3: null,
|
||||
spare4: null,
|
||||
spare5: null,
|
||||
spare6: null,
|
||||
productName: null
|
||||
spare7: null,
|
||||
spare8: null,
|
||||
spare9: null,
|
||||
price: null,
|
||||
remark: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
|
||||
474
ruoyi-ui/src/views/bas/port/index.vue
Normal file
474
ruoyi-ui/src/views/bas/port/index.vue
Normal file
@@ -0,0 +1,474 @@
|
||||
<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="点位名称" prop="portName">
|
||||
<el-input
|
||||
v-model="queryParams.portName"
|
||||
placeholder="请输入点位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位分类" prop="portType">
|
||||
<el-input
|
||||
v-model="queryParams.portType"
|
||||
placeholder="请输入点位分类"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位描述" prop="portDesc">
|
||||
<el-input
|
||||
v-model="queryParams.portDesc"
|
||||
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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['bas:port:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['bas:port:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['bas:port:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['bas:port:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="portList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="点位名称" align="center" prop="portName" />
|
||||
<el-table-column label="点位分类" align="center" prop="portType" />
|
||||
<el-table-column label="点位描述" align="center" prop="portDesc" />
|
||||
<el-table-column label="创建人" align="center" prop="createMan" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<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="handleUpdate(scope.row)"
|
||||
v-hasPermi="['bas:port:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['bas:port:remove']"
|
||||
>删除</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleBindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:list']"
|
||||
>绑定物料</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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改基础点位对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="点位名称" prop="portName">
|
||||
<el-input v-model="form.portName" placeholder="请输入点位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位分类" prop="portDesc">
|
||||
<el-input v-model="form.portType" placeholder="请输入点位分类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位描述" prop="portDesc">
|
||||
<el-input v-model="form.portDesc" placeholder="请输入点位描述" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 选择物料对话框 -->
|
||||
<el-dialog :title="$t('receiveStockinAdd.selectProduct')" :visible.sync="productSelectVisible" width="1300px" append-to-body>
|
||||
<el-form :model="queryProductParams" :inline="true" label-width="80px">
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryProductParams.productId"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryProductParams.productName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否绑定" prop="bindStatus">
|
||||
<el-select v-model="queryProductParams.bindStatus" placeholder="请选择状态" clearable @change="handleProductQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.product_port_rel_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" v-hasPermi="['bas:portProdcutRel:list']" @click="handleProductQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetProductQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-if="queryProductParams.bindStatus === '0'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchBindProduct"
|
||||
v-hasPermi="['bas:portProductRel:add']"
|
||||
>批量绑定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
v-if="queryProductParams.bindStatus === '1'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchUnbindProduct"
|
||||
v-hasPermi="['bas:portProductRel:remove']"
|
||||
>批量删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="productOptions" border @selection-change="handleProductSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="英文描述" align="center" prop="spare1"/>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="单件净重KG" align="center" prop="spare2" />
|
||||
<el-table-column label="箱号" align="center" prop="spare3" />
|
||||
<el-table-column label="包装方式" align="center" prop="spare4" />
|
||||
<el-table-column label="长MM" align="center" prop="spare5" />
|
||||
<el-table-column label="宽MM" align="center" prop="spare6" />
|
||||
<el-table-column label="高MM" align="center" prop="spare7" />
|
||||
<el-table-column label="体积m³" align="center" prop="spare8" />
|
||||
<!-- <el-table-column label="净重KG" align="center" prop="spare8" />
|
||||
<el-table-column label="毛重KG" align="center" prop="spare9" />-->
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<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-plus"
|
||||
@click="handleBatchBindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:add']"
|
||||
v-if="queryProductParams.bindStatus === '0'"
|
||||
>绑定物料</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleBatchUnbindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:remove']"
|
||||
v-if="queryProductParams.bindStatus === '1'"
|
||||
>删除物料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="productTotal>0"
|
||||
:total="productTotal"
|
||||
:page.sync="queryProductParams.pageNum"
|
||||
:limit.sync="queryProductParams.pageSize"
|
||||
@pagination="getProductList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPort, getPort, delPort, addPort, updatePort } from "@/api/bas/port"
|
||||
import {listPortProductRel, addPortProductRel, delPortProductRel} from "@/api/bas/portProductRel";
|
||||
|
||||
export default {
|
||||
name: "Port",
|
||||
dicts:['product_port_rel_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 物料选择对话框
|
||||
productSelectVisible: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
id:null,
|
||||
productIds:[],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
productMultiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
productTotal: 0,
|
||||
// 基础点位表格数据
|
||||
portList: [],
|
||||
// 物料信息表
|
||||
productOptions: [],
|
||||
// 已选物料
|
||||
selectedProducts: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
portName: null,
|
||||
portType: null,
|
||||
portDesc: null
|
||||
},
|
||||
queryProductParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
bindStatus: null
|
||||
},
|
||||
|
||||
handleBindProduct(row){
|
||||
this.queryProductParams.bindStatus = '1';
|
||||
this.id = row.id;
|
||||
this.queryProductParams.portId = this.id;
|
||||
this.getProductList();
|
||||
this.productSelectVisible = true;
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询基础点位列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listPort(this.queryParams).then(response => {
|
||||
this.portList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
portName: null,
|
||||
portType: null,
|
||||
portDesc: 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.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加基础点位"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getPort(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改基础点位"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePort(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addPort(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除基础点位编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPort(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('bas/port/export', {
|
||||
...this.queryParams
|
||||
}, `port_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 物料选择变更 */
|
||||
handleProductSelectionChange(selection) {
|
||||
this.selectedProducts = selection;
|
||||
this.productIds = selection.map(item => item.productId);
|
||||
this.productMultiple = !selection.length
|
||||
},
|
||||
/** 获取物料列表 */
|
||||
getProductList() {
|
||||
listPortProductRel(this.queryProductParams).then(response => {
|
||||
this.productOptions = response.rows;
|
||||
this.productTotal = response.total;
|
||||
});
|
||||
},
|
||||
/** 搜索物料按钮操作 */
|
||||
handleProductQuery() {
|
||||
this.queryProductParams.pageNum = 1;
|
||||
this.getProductList();
|
||||
},
|
||||
/** 重置物料查询操作 */
|
||||
resetProductQuery() {
|
||||
this.queryProductParams.bindStatus = '1';
|
||||
this.handleProductQuery();
|
||||
},
|
||||
/** 批量绑定物料按钮操作 */
|
||||
handleBatchBindProduct(row) {
|
||||
const productIds = row.productId || this.productIds
|
||||
let ids = [];
|
||||
if (Array.isArray(productIds)) {
|
||||
ids = productIds;
|
||||
} else {
|
||||
ids.push(productIds);
|
||||
}
|
||||
const data = {
|
||||
portId: this.id,
|
||||
productIds: ids
|
||||
}
|
||||
addPortProductRel(data).then(response => {
|
||||
this.$modal.msgSuccess("绑定成功")
|
||||
this.getProductList()
|
||||
});
|
||||
},
|
||||
/** 批量删除物料按钮操作 */
|
||||
handleBatchUnbindProduct(row){
|
||||
const productIds = row.productId || this.productIds
|
||||
let ids = [];
|
||||
if (Array.isArray(productIds)) {
|
||||
ids = productIds;
|
||||
} else {
|
||||
ids.push(productIds);
|
||||
}
|
||||
const data = {
|
||||
portId: this.id,
|
||||
productIds: ids
|
||||
}
|
||||
delPortProductRel(data).then(response => {
|
||||
this.$modal.msgSuccess("解绑成功")
|
||||
this.getProductList()
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
563
ruoyi-ui/src/views/check/stockCheck/index.vue
Normal file
563
ruoyi-ui/src/views/check/stockCheck/index.vue
Normal file
@@ -0,0 +1,563 @@
|
||||
<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="stockCheckId">
|
||||
<el-input
|
||||
v-model="queryParams.stockCheckId"
|
||||
placeholder="请输入盘点单据ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="盘库类型" prop="checkType">
|
||||
<el-select v-model="queryParams.checkType" placeholder="请选择盘库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_stock_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.checkType" placeholder="请选择盘库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_bill_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="建立时间" prop="createDate">
|
||||
<el-input
|
||||
v-model="queryParams.createDate"
|
||||
placeholder="请输入建立时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createManId">
|
||||
<el-input
|
||||
v-model="queryParams.createManId"
|
||||
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="item in warehouseOptions"
|
||||
:key="item.warehouseId"
|
||||
:label="item.warehouseName"
|
||||
:value="item.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label=" 完成日期" prop="finishDate">
|
||||
<el-input
|
||||
v-model="queryParams.finishDate"
|
||||
placeholder="请输入 完成日期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="erp单号" prop="erpBill">
|
||||
<el-input
|
||||
v-model="queryParams.erpBill"
|
||||
placeholder="请输入erp单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据来源" prop="stockSource">
|
||||
<el-input
|
||||
v-model="queryParams.stockSource"
|
||||
placeholder="请输入单据来源"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户编码" prop="customerNo">
|
||||
<el-input
|
||||
v-model="queryParams.customerNo"
|
||||
placeholder="请输入客户编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组编码" prop="classNo">
|
||||
<el-input
|
||||
v-model="queryParams.classNo"
|
||||
placeholder="请输入班组编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="supplierNo">
|
||||
<el-input
|
||||
v-model="queryParams.supplierNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备用字段1" prop="spare1">
|
||||
<el-input
|
||||
v-model="queryParams.spare1"
|
||||
placeholder="请输入备用字段1"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备用字段2" prop="spare2">
|
||||
<el-input
|
||||
v-model="queryParams.spare2"
|
||||
placeholder="请输入备用字段2"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备用字段3" prop="spare3">
|
||||
<el-input
|
||||
v-model="queryParams.spare3"
|
||||
placeholder="请输入备用字段3"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备用字段4" prop="spare4">
|
||||
<el-input
|
||||
v-model="queryParams.spare4"
|
||||
placeholder="请输入备用字段4"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备用字段5" prop="spare5">
|
||||
<el-input
|
||||
v-model="queryParams.spare5"
|
||||
placeholder="请输入备用字段5"
|
||||
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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['check:stockCheck:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['check:stockCheck:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['check:stockCheck:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['check:stockCheck:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stockCheckList" @selection-change="handleSelectionChange" @row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="GUID" align="center" prop="stockGuid" />
|
||||
<el-table-column label="盘点单据ID" align="center" prop="stockCheckId" />
|
||||
<el-table-column label="盘库类型" align="center" prop="checkType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.check_stock_type" :value="scope.row.checkType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="单据状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.check_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource" />
|
||||
<el-table-column label="部门编码" align="center" prop="departmentNo" />
|
||||
<el-table-column label="创建人" align="center" prop="createManId" />
|
||||
<el-table-column label="建立时间" align="center" prop="createDate" />
|
||||
<el-table-column label=" 完成日期" align="center" prop="finishDate" />
|
||||
<!-- <el-table-column label="erp单号" align="center" prop="erpBill" />-->
|
||||
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo" />
|
||||
<el-table-column label="班组编码" align="center" prop="classNo" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierNo" />-->
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段5" align="center" prop="spare5" />
|
||||
<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="handleUpdate(scope.row)"
|
||||
v-hasPermi="['check:stockCheck:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['check:stockCheck:remove']"
|
||||
>删除</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"
|
||||
/>
|
||||
|
||||
<el-table v-loading="detailLoading" :data="stockCheckDetailList" @selection-change="handleDetailSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="子单ID" align="center" prop="stockCheckDetailId" />
|
||||
<el-table-column label="主单GUID" align="center" prop="stockCheckGuid" />
|
||||
<el-table-column label="主单ID" align="center" prop="stockCheckId" />
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||
<el-table-column label="物料ID" align="center" prop="productGuid" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column label="计划数量(箱)" align="center" prop="quantityX" />
|
||||
<el-table-column label="计划数量(件)" align="center" prop="quantityJ" />
|
||||
<el-table-column label="参考单价" align="center" prop="price" />
|
||||
<el-table-column label="品牌" align="center" prop="cargoNo" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
<el-table-column label="实际数量(箱)" align="center" prop="assignNumX" />
|
||||
<el-table-column label="实际数量(件)" align="center" prop="assignNumJ" />
|
||||
<el-table-column label="入库日期" align="center" prop="printDate" />
|
||||
<el-table-column label="单据状态" align="center" prop="stockStatus" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierId" />
|
||||
<el-table-column label="客户编码" align="center" prop="customerId" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="扫码数量" align="center" prop="scanNum" />
|
||||
<el-table-column label="扫码数量(箱)" align="center" prop="scanNumX" />
|
||||
<el-table-column label="扫码数量(件)" align="center" prop="scanNumJ" />
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
<el-table-column label="备用字段4" align="center" prop="spare4" />
|
||||
<el-table-column label="备用字段5" align="center" prop="spare5" />
|
||||
<el-table-column label="备用字段6" align="center" prop="spare6" /> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStockCheck, getStockCheck, delStockCheck, addStockCheck, updateStockCheck } from "@/api/check/stockCheck"
|
||||
import { listStockCheckDetail } from "@/api/check/stockCheckDetail"
|
||||
import { listWarehouse } from "@/api/bas/warehouse"
|
||||
|
||||
export default {
|
||||
name: "StockCheck",
|
||||
dicts: ['check_stock_type', 'check_bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 仓库选项列表
|
||||
warehouseOptions: [],
|
||||
// 盘库单据主信息表格数据
|
||||
stockCheckList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 明细遮罩层
|
||||
detailLoading: false,
|
||||
// 明细选中数组
|
||||
detailIds: [],
|
||||
// 明细总条数
|
||||
detailTotal: 0,
|
||||
// 明细表格数据
|
||||
stockCheckDetailList: [],
|
||||
// 明细查询参数
|
||||
queryDetailParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
stockCheckGuid: null
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
stockCheckId: null,
|
||||
checkType: '1',
|
||||
createDate: null,
|
||||
createManId: null,
|
||||
status: null,
|
||||
warehouseId: null,
|
||||
finishDate: null,
|
||||
erpBill: null,
|
||||
stockSource: null,
|
||||
departmentNo: null,
|
||||
customerNo: null,
|
||||
classNo: null,
|
||||
supplierNo: null,
|
||||
spare1: null,
|
||||
spare2: null,
|
||||
spare3: null,
|
||||
spare4: null,
|
||||
spare5: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
stockCheckId: [
|
||||
{ required: true, message: "盘点单据ID不能为空", trigger: "blur" }
|
||||
],
|
||||
checkType: [
|
||||
{ required: true, message: "盘库类型不能为空", trigger: "change" }
|
||||
],
|
||||
createDate: [
|
||||
{ required: true, message: "建立时间不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "单据状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getWarehouseList();
|
||||
},
|
||||
methods: {
|
||||
/** 行点击事件处理 */
|
||||
handleRowClick(row) {
|
||||
this.queryDetailParams.stockCheckGuid = row.stockGuid
|
||||
this.getDetailList()
|
||||
},
|
||||
/** 查询盘库单据主信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listStockCheck(this.queryParams).then(response => {
|
||||
this.stockCheckList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
// 获取列表后,自动点击第一行数据
|
||||
if (this.stockCheckList.length > 0) {
|
||||
this.handleRowClick(this.stockCheckList[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 查询仓库列表 */
|
||||
getWarehouseList() {
|
||||
listWarehouse().then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询明细列表 */
|
||||
getDetailList() {
|
||||
this.detailLoading = true
|
||||
listStockCheckDetail(this.queryDetailParams).then(response => {
|
||||
this.stockCheckDetailList = response.rows
|
||||
this.detailTotal = response.total
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
/** 明细多选框选中数据 */
|
||||
handleDetailSelectionChange(selection) {
|
||||
this.detailIds = selection.map(item => item.stockCheckDetailId)
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
stockGuid: null,
|
||||
stockCheckId: null,
|
||||
checkType: null,
|
||||
createDate: null,
|
||||
createManId: null,
|
||||
status: null,
|
||||
warehouseId: null,
|
||||
finishDate: null,
|
||||
erpBill: null,
|
||||
stockSource: null,
|
||||
departmentNo: null,
|
||||
customerNo: null,
|
||||
classNo: null,
|
||||
supplierNo: null,
|
||||
spare1: null,
|
||||
spare2: null,
|
||||
spare3: null,
|
||||
spare4: null,
|
||||
spare5: 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.stockGuid)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
if (selection.length === 1) {
|
||||
this.queryDetailParams.stockCheckGuid = selection[0].stockGuid
|
||||
this.getDetailList()
|
||||
} else {
|
||||
this.queryDetailParams.stockCheckGuid = null
|
||||
this.stockCheckDetailList = []
|
||||
this.detailTotal = 0
|
||||
}
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加盘库单据主信息"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const stockGuid = row.stockGuid || this.ids
|
||||
getStockCheck(stockGuid).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改盘库单据主信息"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.stockGuid != null) {
|
||||
updateStockCheck(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addStockCheck(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const stockGuids = row.stockGuid || this.ids
|
||||
this.$modal.confirm('是否确认删除盘库单据主信息编号为"' + stockGuids + '"的数据项?').then(function() {
|
||||
return delStockCheck(stockGuids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('check/stockCheck/export', {
|
||||
...this.queryParams
|
||||
}, `stockCheck_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
// 明细遮罩层
|
||||
// 明细选中数组
|
||||
// 明细总条数
|
||||
// 明细表格数据
|
||||
// 明细查询参数
|
||||
handleDetailSelectionChange(selection) {
|
||||
this.detailIds = selection.map(item => item.stockCheckDetailId)
|
||||
}
|
||||
/** 查询明细列表 */
|
||||
getDetailList() {
|
||||
this.detailLoading = true
|
||||
listStockCheckDetail(this.queryDetailParams).then(response => {
|
||||
this.stockCheckDetailList = response.rows
|
||||
this.detailTotal = response.total
|
||||
this.detailLoading = false
|
||||
})
|
||||
}
|
||||
/** 选择主表行 */
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.stockGuid)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
}
|
||||
}
|
||||
@@ -59,23 +59,25 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table :data="productList" border>
|
||||
<el-table :data="productList" border style="width: 100%">
|
||||
<el-table-column type="index" :label="$t('receiveStockinAdd.serialNumber')" width="50" align="center"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.guid')" align="center" prop="productGuid"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.parentId')" align="center" prop="parentId"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.productCode')" align="center" prop="productId"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.productName')" align="center" prop="productName"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.price')" align="center" prop="price"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.brand')" align="center" prop="cargoNo"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.unit')" align="center" prop="unit"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.spec')" align="center" prop="spec"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.description')" align="center" prop="remark"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" v-if="false"/> -->
|
||||
<!-- <el-table-column label="备用字段2" align="center" prop="spare2" />-->
|
||||
<!-- <el-table-column label="备用字段3" align="center" prop="spare3" />-->
|
||||
<!-- <el-table-column label="备用字段4" align="center" prop="spare4" />-->
|
||||
<!-- <el-table-column label="备用字段5" align="center" prop="spare5" />-->
|
||||
<!-- <el-table-column label="备用字段6" align="center" prop="spare6" />-->
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<el-table-column fixed label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column fixed label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column fixed label="英文描述" align="center" prop="spare1"/>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="单件净重KG" align="center" prop="spare2" />
|
||||
<el-table-column label="总净重" align="center" prop="totalNetWeight" />
|
||||
<el-table-column label="箱号" align="center" prop="spare3" />
|
||||
<el-table-column label="包装方式" align="center" prop="spare4" />
|
||||
<el-table-column label="长MM" align="center" prop="spare5" />
|
||||
<el-table-column label="宽MM" align="center" prop="spare6" />
|
||||
<el-table-column label="高MM" align="center" prop="spare7" />
|
||||
<el-table-column label="体积m³" align="center" prop="spare8" />
|
||||
<el-table-column label="净重KG" align="center" prop="netWeight" />
|
||||
<el-table-column label="毛重KG" align="center" prop="grossWeight" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<el-table-column :label="$t('receiveStockinAdd.batchNumber')" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@@ -126,7 +128,7 @@
|
||||
</el-table>
|
||||
|
||||
<div class="total-info" style="margin-top: 15px; text-align: right">
|
||||
<span>{{ $t('receiveStockinAdd.totalQuantity') }}:{{ totalQuantity }}</span>
|
||||
<!-- <span>{{ $t('receiveStockinAdd.totalQuantity') }}:{{ totalQuantity }}</span>-->
|
||||
<span style="margin-left: 20px">{{ $t('receiveStockinAdd.totalAmount') }}:{{ totalAmount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,24 +139,25 @@
|
||||
</div>
|
||||
|
||||
<!-- 选择物料对话框 -->
|
||||
<el-dialog :title="$t('receiveStockinAdd.selectProduct')" :visible.sync="productSelectVisible" width="800px" append-to-body>
|
||||
<el-dialog :title="$t('receiveStockinAdd.selectProduct')" :visible.sync="productSelectVisible" width="1300px" append-to-body>
|
||||
<el-table :data="productOptions" border @selection-change="handleProductSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.guid')" align="center" prop="productGuid"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.parentId')" align="center" prop="parentId"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.productCode')" align="center" prop="productId"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.productName')" align="center" prop="productName"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.price')" align="center" prop="price"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.brand')" align="center" prop="cargoNo"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.unit')" align="center" prop="unit"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.spec')" align="center" prop="spec"/>
|
||||
<el-table-column :label="$t('receiveStockinAdd.description')" align="center" prop="remark"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" v-if="false"/> -->
|
||||
<!-- <el-table-column label="备用字段2" align="center" prop="spare2" />-->
|
||||
<!-- <el-table-column label="备用字段3" align="center" prop="spare3" />-->
|
||||
<!-- <el-table-column label="备用字段4" align="center" prop="spare4" />-->
|
||||
<!-- <el-table-column label="备用字段5" align="center" prop="spare5" />-->
|
||||
<!-- <el-table-column label="备用字段6" align="center" prop="spare6" />-->
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="英文描述" align="center" prop="spare1"/>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="单件净重KG" align="center" prop="spare2" />
|
||||
<el-table-column label="箱号" align="center" prop="spare3" />
|
||||
<el-table-column label="包装方式" align="center" prop="spare4" />
|
||||
<el-table-column label="长MM" align="center" prop="spare5" />
|
||||
<el-table-column label="宽MM" align="center" prop="spare6" />
|
||||
<el-table-column label="高MM" align="center" prop="spare7" />
|
||||
<el-table-column label="体积m³" align="center" prop="spare8" />
|
||||
<!-- <el-table-column label="净重KG" align="center" prop="spare8" />
|
||||
<el-table-column label="毛重KG" align="center" prop="spare9" />-->
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="productTotal>0"
|
||||
@@ -208,6 +211,9 @@ export default {
|
||||
remark: undefined,
|
||||
totalQuantity: 0,
|
||||
totalAmount: 0,
|
||||
totalNetWeight:0,
|
||||
netWeight:0,
|
||||
grossWeight:0,
|
||||
file: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
@@ -237,6 +243,9 @@ export default {
|
||||
totalQuantity: 0,
|
||||
// 总金额
|
||||
totalAmount: 0,
|
||||
totalNetWeight:0,
|
||||
netWeight:0,
|
||||
grossWeight:0,
|
||||
//物料总数
|
||||
productTotal: 0,
|
||||
//物料查询参数
|
||||
@@ -314,6 +323,17 @@ export default {
|
||||
remark: item.remark,
|
||||
productName: item.productName,
|
||||
quantity: 1,
|
||||
spare1: item.spare1,
|
||||
spare2: item.spare2,
|
||||
spare3: item.spare3,
|
||||
spare4: item.spare4,
|
||||
spare5: item.spare5,
|
||||
spare6: item.spare6,
|
||||
spare7: item.spare7,
|
||||
spare8: item.spare8,
|
||||
totalNetWeight: 0,
|
||||
netWeight: 0,
|
||||
grossWeight: 0
|
||||
}));
|
||||
this.productList.push(...newProducts);
|
||||
this.productSelectVisible = false;
|
||||
@@ -328,8 +348,27 @@ export default {
|
||||
calculateTotal() {
|
||||
this.totalQuantity = this.productList.reduce((sum, item) => sum + (item.quantity || 0), 0);
|
||||
this.totalAmount = this.productList.reduce((sum, item) => sum + ((item.quantity || 0) * (item.price || 0)), 0);
|
||||
|
||||
// 遍历产品列表,计算每个产品的重量
|
||||
this.productList.forEach(item => {
|
||||
// 计算总净重(单件净重×数量)
|
||||
item.totalNetWeight = (item.quantity || 0) * (item.spare2 || 0);
|
||||
// 净重等于总净重
|
||||
item.netWeight = item.totalNetWeight;
|
||||
// 毛重等于总净重
|
||||
item.grossWeight = item.totalNetWeight;
|
||||
});
|
||||
|
||||
// 计算表单总计
|
||||
this.totalNetWeight = this.productList.reduce((sum, item) => sum + (item.totalNetWeight || 0), 0);
|
||||
this.netWeight = this.totalNetWeight;
|
||||
this.grossWeight = this.totalNetWeight;
|
||||
|
||||
this.form.totalQuantity = this.totalQuantity;
|
||||
this.form.totalAmount = this.totalAmount;
|
||||
this.form.totalNetWeight = this.totalNetWeight;
|
||||
this.form.netWeight = this.netWeight;
|
||||
this.form.grossWeight = this.grossWeight;
|
||||
},
|
||||
/** 表单提交 */
|
||||
submitForm() {
|
||||
@@ -351,9 +390,24 @@ export default {
|
||||
supplierId: this.form.supplierId,
|
||||
//batchId: this.form.batchNo,
|
||||
productVoList: this.productList.map(item => ({
|
||||
productGuid: item.productGuid,
|
||||
productId: item.productId,
|
||||
quantity: item.quantity,
|
||||
lotNo: item.lotNo
|
||||
lotNo: item.lotNo,
|
||||
productGuid: item.productGuid,
|
||||
englishDesc: item.spare1,
|
||||
cartonNo: item.spare3,
|
||||
packingMethod: item.spare4,
|
||||
length: item.spare5,
|
||||
width: item.spare6,
|
||||
height: item.spare7,
|
||||
volume: item.spare8,
|
||||
totalNetWeight: item.totalNetWeight,
|
||||
netWeight: item.netWeight,
|
||||
grossWeight: item.grossWeight,
|
||||
materialDesc: item.productName,
|
||||
unit: item.unit,
|
||||
unitNetWeight:item.spare2
|
||||
|
||||
}))
|
||||
};
|
||||
|
||||
|
||||
@@ -229,11 +229,11 @@
|
||||
<!-- <el-table-column label=" 完成日期" align="center" prop="finishDate"/>-->
|
||||
<!-- <el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段1" align="center" prop="spare1" />-->
|
||||
<el-table-column label="erp单号" align="center" prop="erpBill"/>
|
||||
<!-- <el-table-column label="erp单号" align="center" prop="erpBill"/>-->
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource"/>
|
||||
<el-table-column label="部门" align="center" prop="departmentName"/>
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo"/>-->
|
||||
<el-table-column label="班组编码" align="center" prop="classNo"/>
|
||||
<!-- <el-table-column label="班组编码" align="center" prop="classNo"/>-->
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@@ -294,11 +294,16 @@
|
||||
<!-- <el-table-column label="主单GUID" align="center" prop="stockinGuid" /> -->
|
||||
<el-table-column label="主单ID" align="center" prop="stockinId"/>
|
||||
<el-table-column label="批次号" align="center" prop="lotNo"/>
|
||||
<el-table-column label="物料ID" align="center" prop="productGuid"/>
|
||||
<!-- <el-table-column label="物料ID" align="center" prop="productGuid"/>-->
|
||||
<el-table-column label="物料编码" align="center" prop="productId"/>
|
||||
<el-table-column label="物料描述" align="center" prop="extraField.materialDesc"/>
|
||||
<el-table-column label="英文描述" align="center" prop="extraField.englishDesc"/>
|
||||
<el-table-column label="箱号" align="center" prop="extraField.cartonNo"/>
|
||||
<el-table-column label="包装方式" align="center" prop="extraField.packingMethod"/>
|
||||
<el-table-column label="计划数量" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-dialog-drag-width="100"
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
@@ -308,9 +313,9 @@
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="计划数量(箱)" align="center" prop="quantityX" />
|
||||
<el-table-column label="计划数量(件)" align="center" prop="quantityJ" />-->
|
||||
<el-table-column label="参考单价" align="center" prop="price"/>
|
||||
<el-table-column label="品牌" align="center" prop="cargoNo"/>
|
||||
<el-table-column label="描述" align="center" prop="remark"/>
|
||||
<!-- <el-table-column label="参考单价" align="center" prop="price"/>-->
|
||||
<!-- <el-table-column label="品牌" align="center" prop="cargoNo"/>-->
|
||||
<!-- <el-table-column label="描述" align="center" prop="remark"/>-->
|
||||
<!-- <el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
<el-table-column label="实际数量(箱)" align="center" prop="assignNumX" />
|
||||
<el-table-column label="实际数量(件)" align="center" prop="assignNumJ" />-->
|
||||
@@ -322,8 +327,8 @@
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="供应商编码" align="center" prop="supplierId"/>-->
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerId"/>-->
|
||||
<el-table-column label="单位" align="center" prop="unit"/>
|
||||
<el-table-column label="规格" align="center" prop="spec"/>
|
||||
<!-- <el-table-column label="单位" align="center" prop="unit"/>-->
|
||||
<!-- <el-table-column label="规格" align="center" prop="spec"/>-->
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
<el-table-column label="备用字段3" align="center" prop="spare3" />
|
||||
|
||||
@@ -250,8 +250,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName"/>
|
||||
<el-table-column label=" 完成日期" align="center" prop="finishDate"/>
|
||||
<el-table-column label="erp单号" align="center" prop="erpBill"/>
|
||||
<el-table-column label="完成日期" align="center" prop="finishDate"/>
|
||||
<!-- <el-table-column label="erp单号" align="center" prop="erpBill"/>-->
|
||||
<el-table-column label="单据来源" align="center" prop="stockSource">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockSource"/>
|
||||
@@ -259,7 +259,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="部门" align="center" prop="departmentName"/>
|
||||
<!-- <el-table-column label="客户编码" align="center" prop="customerNo" />-->
|
||||
<el-table-column label="班组编码" align="center" prop="classNo"/>
|
||||
<!-- <el-table-column label="班组编码" align="center" prop="classNo"/>-->
|
||||
<el-table-column label="供应商" align="center" prop="supplierName"/>
|
||||
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" />
|
||||
<el-table-column label="备用字段2" align="center" prop="spare2" />
|
||||
@@ -302,21 +302,10 @@
|
||||
<el-table-column label="批次号" align="center" prop="lotNo"/>
|
||||
<el-table-column label="物料ID" align="center" prop="productGuid"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productId"/>
|
||||
|
||||
<!-- <el-table-column label="计划数量(箱)" align="center" prop="quantityX" />
|
||||
<el-table-column label="计划数量(件)" align="center" prop="quantityJ" />-->
|
||||
<el-table-column label="参考单价" align="center" prop="price"/>
|
||||
<el-table-column label="品牌" align="center" prop="cargoNo"/>
|
||||
<el-table-column label="描述" align="center" prop="remark"/>
|
||||
|
||||
<!-- <el-table-column label="实际数量(箱)" align="center" prop="assignNumX" />
|
||||
<el-table-column label="实际数量(件)" align="center" prop="assignNumJ" />-->
|
||||
<el-table-column label="入库日期" align="center" prop="printDate"/>
|
||||
<!-- <el-table-column label="单据状态" align="center" prop="stockStatus" />-->
|
||||
<!-- <el-table-column label="供应商编码" align="center" prop="supplierId" />
|
||||
<el-table-column label="客户编码" align="center" prop="customerId" />-->
|
||||
<el-table-column label="单位" align="center" prop="unit"/>
|
||||
<el-table-column label="规格" align="center" prop="spec"/>
|
||||
<el-table-column label="物料描述" align="center" prop="extraField.materialDesc"/>
|
||||
<el-table-column label="英文描述" align="center" prop="extraField.englishDesc"/>
|
||||
<el-table-column label="箱号" align="center" prop="extraField.cartonNo"/>
|
||||
<el-table-column label="包装方式" align="center" prop="extraField.packingMethod"/>
|
||||
<el-table-column label="计划数量" align="center" prop="quantity"/>
|
||||
<el-table-column label="扫码数量" align="center" prop="scanNum"/>
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum"/>
|
||||
|
||||
Reference in New Issue
Block a user