出库单据
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ruoyi.job.mydojob.service.impl;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.api.service.IToWcsService;
|
import com.ruoyi.api.service.IToWcsService;
|
||||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||||
@@ -418,14 +419,16 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
mydoJobMapper.pointOut(map);
|
mydoJobMapper.pointOut(map);
|
||||||
iToWcsService.pushOutMydoJob();
|
iToWcsService.pushOutMydoJob();
|
||||||
String result = map.get("v_result").toString();
|
String result = map.get("v_result").toString();
|
||||||
if ("10".equals(result)) {
|
if (!"10".equals(result)) {
|
||||||
msg = "操作成功!";
|
|
||||||
} else {
|
|
||||||
msg = map.get("v_resultmsg").toString();
|
|
||||||
}
|
|
||||||
Stringbuilder += stockId + msg + "<br/>";
|
Stringbuilder += stockId + msg + "<br/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!StrUtil.isEmpty(Stringbuilder)) {
|
||||||
|
return AjaxResult.warn(Stringbuilder);
|
||||||
|
}
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ public class BasStockServiceImpl implements IBasStockService
|
|||||||
* @return 库存信息
|
* @return 库存信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(warehouseAlias = "bw")
|
|
||||||
public List<BasStock> selectBasStockList(BasStock basStock)
|
public List<BasStock> selectBasStockList(BasStock basStock)
|
||||||
{
|
{
|
||||||
return basStockMapper.selectBasStockList(basStock);
|
return basStockMapper.selectBasStockList(basStock);
|
||||||
|
|||||||
@@ -108,15 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="orderId != null and orderId != ''"> and bs.order_id = #{orderId}</if>
|
<if test="orderId != null and orderId != ''"> and bs.order_id = #{orderId}</if>
|
||||||
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
|
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
|
||||||
<if test="cargoSpaceStockStatus != null and cargoSpaceStockStatus != ''"> and bcs.status = #{cargoSpaceStockStatus}</if>
|
<if test="cargoSpaceStockStatus != null and cargoSpaceStockStatus != ''"> and bcs.status = #{cargoSpaceStockStatus}</if>
|
||||||
<if test="typeData != null and typeData.size()>0">
|
|
||||||
and bw.warehouse_type in
|
|
||||||
<foreach item="item" index="index" collection="typeData" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
|
||||||
${params.warehouseDataScope}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ export function getOutStockoutDetail(query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 查询可出库的库存物资信息列表
|
// 查询可出库的库存物资信息列表
|
||||||
export function listProductAndStock(query) {
|
export function listProductAndStock(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 查询库存信息列表
|
// 查询库存信息列表
|
||||||
export function listManagement(query) {
|
export function listManagement(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/stock/management/list',
|
url: '/out/handAllotStock/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,16 +17,16 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库存状态" prop="stockStatus"><!-- 库存状态 -->
|
<!-- <el-form-item label="库存状态" prop="stockStatus"><!– 库存状态 –>-->
|
||||||
<el-select v-model="queryParams.stockStatus" placeholder="请选择库存状态" clearable>
|
<!-- <el-select v-model="queryParams.stockStatus" placeholder="请选择库存状态" clearable>-->
|
||||||
<el-option
|
<!-- <el-option-->
|
||||||
v-for="dict in dict.type.stock_status"
|
<!-- v-for="dict in dict.type.stock_status"-->
|
||||||
:key="dict.value"
|
<!-- :key="dict.value"-->
|
||||||
:label="dict.label"
|
<!-- :label="dict.label"-->
|
||||||
:value="dict.value"
|
<!-- :value="dict.value"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<!-- <el-form-item :label="$t('stockManagement.cargoSpaceStockStatus')" prop="cargoSpaceStockStatus"><!– 货位状态 –>-->
|
<!-- <el-form-item :label="$t('stockManagement.cargoSpaceStockStatus')" prop="cargoSpaceStockStatus"><!– 货位状态 –>-->
|
||||||
<!-- <el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.cargoSpaceStockStatus')" clearable>-->
|
<!-- <el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.cargoSpaceStockStatus')" clearable>-->
|
||||||
<!-- <el-option-->
|
<!-- <el-option-->
|
||||||
@@ -37,16 +37,7 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="物料状态" prop="productStatus"><!-- 物料状态 -->
|
|
||||||
<el-select v-model="queryParams.productStatus" placeholder="请选择物料状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.product_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="入库时间" prop="startDate"><!-- 入库时间 -->
|
<el-form-item label="入库时间" prop="startDate"><!-- 入库时间 -->
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="queryParams.inDate"
|
v-model="queryParams.inDate"
|
||||||
@@ -55,33 +46,17 @@
|
|||||||
placeholder="请选择入库时间">
|
placeholder="请选择入库时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="托盘条码" prop="trayCode"><!-- 托盘条码 -->
|
|
||||||
|
|
||||||
|
<el-form-item label="品名" prop="productName"><!-- 物料描述 -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.trayCode"
|
v-model="queryParams.productName"
|
||||||
placeholder="请输入托盘条码"
|
placeholder="请输入品名"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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="warehouseId"><!-- 仓库id -->
|
|
||||||
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库">
|
|
||||||
<el-option
|
|
||||||
v-for="item in warehouseOptions"
|
|
||||||
:key="item.warehouseId"
|
|
||||||
:label="item.warehouseName"
|
|
||||||
:value="item.warehouseId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</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 type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
||||||
@@ -105,63 +80,26 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange" max-height="650">
|
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange" max-height="650">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column width="150" label="库存ID" align="left" prop="stockId" /> <!-- 库存id -->
|
<el-table-column label="库存编码" align="center" prop="stockId" />
|
||||||
<el-table-column width="120" label="货位ID" align="left" prop="cargoSpaceId" /> <!-- 货位id -->
|
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||||
<el-table-column width="120" label="货位名称" align="left" prop="cargoSpaceName" /> <!-- 货位id -->
|
<el-table-column label="批次号" align="center" prop="lotNo" />
|
||||||
<el-table-column width="120" label="库存状态" align="left" prop="stockStatus" ><!-- 库存状态 -->
|
<el-table-column label="品号" align="center" prop="productId" />
|
||||||
<template slot-scope="scope">
|
<el-table-column label="品名" align="center" prop="productName" />
|
||||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
<el-table-column label="数量" align="center" prop="quantity" width="80" />
|
||||||
</template>
|
<el-table-column label="规格" align="center" prop="spare1" />
|
||||||
</el-table-column>
|
<el-table-column label="单位" align="center" prop="spare3" />
|
||||||
<el-table-column label="货位状态" align="left" prop="cargoSpaceStockStatus"> <!-- 货位状态 -->
|
<el-table-column label="型号" align="center" prop="spare4" />
|
||||||
<template slot-scope="scope">
|
<el-table-column label="颜色" align="center" prop="spare5" />
|
||||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStockStatus"/>
|
<el-table-column label="序列号" align="center" prop="spare6" />
|
||||||
</template>
|
<el-table-column label="电压" align="center" prop="voltage" />
|
||||||
</el-table-column>
|
<el-table-column label="功率" align="center" prop="power" />
|
||||||
<el-table-column width="120" label="货位状态" align="left" prop="cargoSpaceStatus" ><!--货位状态-->
|
<el-table-column label="相位" align="center" prop="phase" />
|
||||||
<template slot-scope="scope">
|
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||||
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.cargoSpaceStatus"/>
|
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||||
</template>
|
<el-table-column label="分销" align="center" prop="distribution" />
|
||||||
</el-table-column><!-- 货位状态 -->
|
<el-table-column label="机型" align="center" prop="model" />
|
||||||
<el-table-column label="物料状态" align="left" width="120" prop="productStatus"> <!-- 物料状态 -->
|
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="120" label="物料ID" align="left" prop="extraField.productId" /> <!-- 物料Id -->
|
|
||||||
<el-table-column width="120" label="物料描述" align="left" prop="extraField.materialDesc" /> <!-- 物料描述 -->
|
|
||||||
<el-table-column width="120" label="英文描述" align="left" prop="extraField.englishDesc" /> <!-- 物料英文描述 -->
|
|
||||||
<el-table-column width="100" label="净重" align="right" prop="extraField.netWeight" /> <!-- 净重 -->
|
|
||||||
<el-table-column width="100" label="长" align="right" prop="extraField.length" /> <!-- 长 -->
|
|
||||||
<el-table-column width="100" label="宽" align="right" prop="extraField.width" /> <!-- 宽 -->
|
|
||||||
<el-table-column width="100" label="高" align="right" prop="extraField.height"/> <!-- 高 -->
|
|
||||||
<el-table-column width="100" label="体积" align="right" prop="extraField.volume"/> <!-- 体积 -->
|
|
||||||
<el-table-column width="100" label="库存数量" align="right" prop="quantity"/> <!-- 库存数量 -->
|
|
||||||
<el-table-column width="120" label="作业ID" align="left" prop="jobId" /> <!-- 作业ID -->
|
|
||||||
<el-table-column width="120" label="托盘条码" align="left" prop="trayCode" /> <!-- 托盘条码 -->
|
|
||||||
<el-table-column width="120" label="入库主单" align="left" prop="stockinId" /> <!-- 入库主单 -->
|
|
||||||
<el-table-column width="120" label="入库子单ID" align="left" prop="stockinDetailId" /> <!-- 入库子单id -->
|
|
||||||
<el-table-column width="120" label="入库类型" align="left" prop="inType" /> <!-- 入库类型 -->
|
|
||||||
<el-table-column width="120" label="仓库" align="left" prop="warehouseName" /> <!-- 仓库 -->
|
|
||||||
<el-table-column width="120" label="入库时间" align="left" prop="inDate" /> <!-- 入库时间 -->
|
|
||||||
<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="['stock:management:edit']"
|
|
||||||
>修改 <!-- 修改 --></el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['stock:management:remove']"
|
|
||||||
>删除 <!-- 删除 --></el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@@ -305,25 +243,12 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 出口选项
|
// 出口选项
|
||||||
exitOptions: [],
|
exitOptions: [
|
||||||
// 所有出口数据(按仓库ID分组)
|
{ exitId: '1', exitName: '一楼'},
|
||||||
allExitOptions: {
|
{ exitId: '2', exitName: '二楼'},
|
||||||
'02': [
|
|
||||||
{ exitId: "G1004", exitName: 'G1004' },
|
|
||||||
{ exitId: 'G1010', exitName: 'G1010' },
|
|
||||||
{ exitId: 'fluent1', exitName: 'fluent1' },
|
|
||||||
{ exitId: 'fluent2', exitName: 'fluent2' },
|
|
||||||
],
|
],
|
||||||
'13': [
|
|
||||||
{ exitId: 'G2001', exitName: 'G2001' },
|
|
||||||
{ exitId: 'G3001', exitName: 'G3001' },
|
|
||||||
{ exitId: 'G3010', exitName: 'G3010' },
|
|
||||||
{ exitId: 'G4001', exitName: 'G4001' },
|
|
||||||
{ exitId: 'G4010', exitName: 'G4010' },
|
|
||||||
{ exitId: 'G5001', exitName: 'G5001' },
|
|
||||||
{ exitId: 'G5010', exitName: 'G5010' },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// 选中的库存数据
|
// 选中的库存数据
|
||||||
selectedStockData: []
|
selectedStockData: []
|
||||||
}
|
}
|
||||||
@@ -456,47 +381,13 @@ export default {
|
|||||||
const selectedData = this.managementList.filter(item => this.ids.includes(item.stockId));
|
const selectedData = this.managementList.filter(item => this.ids.includes(item.stockId));
|
||||||
this.selectedStockData = selectedData;
|
this.selectedStockData = selectedData;
|
||||||
|
|
||||||
// 根据选中数据的仓库ID设置出口选项
|
|
||||||
this.setExitOptionsByWarehouse(selectedData);
|
|
||||||
|
|
||||||
// 显示出口选择弹窗
|
// 显示出口选择弹窗
|
||||||
this.exitDialogVisible = true;
|
this.exitDialogVisible = true;
|
||||||
this.exitForm.exitId = null;
|
this.exitForm.exitId = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 根据仓库ID设置出口选项 */
|
|
||||||
setExitOptionsByWarehouse(selectedData) {
|
|
||||||
try {
|
|
||||||
// 获取选中数据的仓库ID集合,过滤掉空值和无效值
|
|
||||||
const warehouseIds = [...new Set(
|
|
||||||
selectedData
|
|
||||||
.map(row => row.warehouseId)
|
|
||||||
.filter(id => id !== null && id !== undefined && id !== '')
|
|
||||||
)];
|
|
||||||
|
|
||||||
// 如果没有有效的仓库ID,清空出口选项
|
|
||||||
if (warehouseIds.length === 0) {
|
|
||||||
this.exitOptions = []
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (warehouseIds.length === 1) {
|
|
||||||
// 如果所有选中数据都是同一个仓库,显示该仓库的出口
|
|
||||||
const warehouseId = warehouseIds[0]
|
|
||||||
this.exitOptions = this.allExitOptions[warehouseId] || []
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果最终没有可用的出口选项,给出默认选项
|
|
||||||
if (this.exitOptions.length === 0) {
|
|
||||||
this.exitOptions=[{exitId: '0', exitName: '人工出口'}]
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error('设置出口选项时发生错误:', error)
|
|
||||||
// 发生错误时,设置为空数组,确保不会影响用户操作
|
|
||||||
this.exitOptions = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 提交指定货位出库 */
|
/** 提交指定货位出库 */
|
||||||
submitPointOut() {
|
submitPointOut() {
|
||||||
|
|||||||
Reference in New Issue
Block a user