手持机平库入 新增,修改,删除库存记录

This commit is contained in:
liuhanqing
2026-01-20 13:32:45 +08:00
parent 149a036f82
commit f4d5e2c714
20 changed files with 500 additions and 237 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name" : "若依移动端", "name" : "541立库APP",
"appid" : "__UNI__A2DE016", "appid" : "__UNI__2E13A0F",
"description" : "", "description" : "",
"versionName" : "1.1.0", "versionName" : "1.1.0",
"versionCode" : "100", "versionCode" : "100",

View File

@@ -2,89 +2,76 @@
<view class="container"> <view class="container">
<view class="form card"> <view class="form card">
<view class="field"> <view class="field">
<text class="label">托盘条码</text> <text class="input-label">仓库</text>
<uni-easyinput ref="trayInput" v-model="trayCode" @input="onTrayInput" placeholder="请输入托盘条码" :disabled="loadingTray" :clearable="true" > <uni-data-select
<template #right> v-model="warehouseId"
<text class="scan-icon" @click="handleScanTray">📷</text> :localdata="warehouseList"
</template> :clear="false"
</uni-easyinput> placeholder="请选择仓库"
/>
</view> </view>
<view class="field"> <view class="field">
<text class="label">物料条码</text> <text class="label">入库子单</text>
<uni-easyinput v-model="materialCode" @input="onMaterialInput" placeholder="请输入物料条码" :clearable="true"> <uni-easyinput v-model="materialCode" @input="onMaterialInput" placeholder="请输入入库子单编码"
:clearable="true">
<template #right> <template #right>
<text class="scan-icon" @click="handleScanMaterial">📷</text> <text class="scan-icon" @click="handleScanMaterial">📷</text>
</template> </template>
</uni-easyinput> </uni-easyinput>
</view> </view>
<view class="field">
<text class="input-label">仓库</text>
<uni-data-select
v-model="warehouseId"
:localdata="warehouseList"
:clear="false"
placeholder="请选择仓库"
/>
</view>
</view> </view>
<view class="tray-info card" v-if="trayMaterials.length"> <uni-popup ref="detailPopup" type="bottom">
<text class="section-title">托盘已绑定物料</text>
<view class="list">
<view class="item" v-for="(m, idx) in trayMaterials" :key="idx">
<view class="item-header">
<text class="name">{{ m.productName || '未知物料' }}</text>
<text class="qty-tag">× {{ m.quantity }}</text>
</view>
<!-- <text class="meta">编码:{{ m.productId}}</text> -->
</view>
</view>
</view>
<view class="tray-info card" v-else>
<text class="section-title">托盘已绑定物料</text>
<view class="empty">暂无数据</view>
</view>
<uni-popup ref="detailPopup" type="bottom">
<view class="popup"> <view class="popup">
<text class="popup-title">物料详情</text> <text class="popup-title">物料详情</text>
<view v-if="materialDetail"> <view v-if="materialDetail">
<view class="row"><text class="row-label">物料名称</text><text class="row-value">{{ materialDetail.productName }}</text></view>
<view class="row"><text class="row-label">物料编码</text><text class="row-value">{{ materialDetail.productId }}</text></view>
<view class="row"><text class="row-label">可用数量</text><text class="row-value">{{ materialDetail.quantity }}</text></view>
<view class="row"> <view class="row">
<text class="row-label">绑定数量</text> <text class="row-label">物料名称</text>
<uni-easyinput v-model="bindQty" type="number" placeholder="输入数量" /> <text class="row-value">{{ materialDetail.productName }}</text>
</view>
<view class="row">
<text class="row-label">物料编码</text>
<text class="row-value">{{ materialDetail.productId }}</text>
</view>
<view class="row">
<text class="row-label">可用数量</text>
<text class="row-value">{{ materialDetail.quantityX }}</text>
</view>
<view class="row">
<text class="row-label">入库数量</text>
<uni-easyinput v-model="bindQty" type="number" placeholder="输入数量"/>
</view> </view>
<view class="actions"> <view class="actions">
<button class="btn primary" @click="handleBindTray" :disabled="isBinding">绑定托盘</button> <button class="btn primary" @click="handleConfirmIn" :disabled="isBinding">确认入库</button>
<button class="btn secondary" @click="closePopup">取消</button> <button class="btn secondary" @click="closePopup">取消</button>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 页脚操作区:确认入库 --> <!-- 页脚操作区:确认入库 -->
<view class="footer-actions"> <!-- <view class="footer-actions">-->
<button class="confirm-btn" @click="handleConfirmIn" :disabled="!trayCode || isConfirming"> <!-- <button class="confirm-btn" @click="handleConfirmIn" :disabled="!trayCode || isConfirming">-->
{{ isConfirming ? '入库中...' : '确认入库' }} <!-- {{ isConfirming ? '入库中...' : '确认入库' }}-->
</button> <!-- </button>-->
</view> <!-- </view>-->
</view> </view>
</template> </template>
<script> <script>
import { getTrayInfo, bindTray, getOrderGoods, addInJobpk } from '@/api/in/order.js' import {addInJobpk, bindTray, getOrderGoods, getTrayInfo} from '@/api/in/order.js'
import { getBasWarehouList } from '@/api/bas/bas.js' import {getBasWarehouList} from '@/api/bas/bas.js'
export default { export default {
data() { data() {
return { return {
trayCode: '', trayCode: '',
materialCode: '', materialCode: '',
warehouseId:'', warehouseId: '',
warehouseList: [], warehouseList: [],
trayMaterials: [], trayMaterials: [],
loadingTray: false, loadingTray: false,
materialDetail: null, materialDetail: null,
@@ -97,87 +84,90 @@ export default {
}, },
onReady() { onReady() {
// 获取仓库列表 // 获取仓库列表
this.getWarehouseList() this.getWarehouseList()
}, },
methods: { methods: {
// 获取仓库列表 // 获取仓库列表
async getWarehouseList() { async getWarehouseList() {
try { try {
const response = await getBasWarehouList({ const response = await getBasWarehouList({
pageNum:1, pageNum: 1,
pageSize:100, pageSize: 100,
warehouseType:2 warehouseType: 2
}) })
if (response.code === 200) { if (response.code === 200) {
this.warehouseList = response.rows.map(item => ({ this.warehouseList = response.rows.map(item => ({
value: item.warehouseId, value: item.warehouseId,
text: item.warehouseName text: item.warehouseName
// type: item.warehouseType // type: item.warehouseType
})) }))
} }
} catch (error) { } catch (error) {
console.error('获取仓库列表失败:', error) console.error('获取仓库列表失败:', error)
uni.showToast({ uni.showToast({
title: '获取仓库列表失败', title: '获取仓库列表失败',
icon: 'none' icon: 'none'
}) })
} }
}, },
mapTrayMaterials(res) { mapTrayMaterials(res) {
const list = Array.isArray(res.data) ? res.data : (Array.isArray(res.rows) ? res.rows : (res.data.rows || [])) const list = Array.isArray(res.data) ? res.data : (Array.isArray(res.rows) ? res.rows : (res.data.rows || []))
return list.map(item => ({ return list.map(item => ({
productId: item.productId , productId: item.productId,
materialDesc: item.productName , materialDesc: item.productName,
quantity: item.quantity, quantity: item.quantity,
})) }))
}, },
async onTrayInput(val) { async onTrayInput(val) {
this.trayCode = String(val || '').trim() this.trayCode = String(val || '').trim()
if (!this.trayCode) { this.trayMaterials = []; return } if (!this.trayCode) {
this.trayMaterials = [];
return
}
try { try {
this.loadingTray = true this.loadingTray = true
const res = await getTrayInfo(this.trayCode) const res = await getTrayInfo(this.trayCode)
this.trayMaterials = res.data this.trayMaterials = res.data
} catch (e) { } catch (e) {
console.error('getTrayInfo error', e) console.error('getTrayInfo error', e)
uni.showToast({ title: '查询托盘失败', icon: 'none' }) uni.showToast({title: '查询托盘失败', icon: 'none'})
} finally { } finally {
this.loadingTray = false this.loadingTray = false
} }
}, },
// 确认入库 // 确认入库
async handleConfirmIn() { async handleConfirmIn() {
if (!this.trayCode) {
uni.showToast({ title: '请先输入托盘条码', icon: 'none' }) if (!this.warehouseId) {
uni.showToast({title: '请先选择仓库', icon: 'none'})
return return
} }
if (!this.warehouseId) {
uni.showToast({ title: '请先选择仓库', icon: 'none' })
return
}
try { try {
this.isConfirming = true this.isConfirming = true
const payload = { const payload = {
trayCode: this.trayCode, warehouseId: this.warehouseId,
stockinDetailId: this.materialCode,
inQuantity: this.bindQty
} }
const resp = await addInJobpk(payload) const resp = await addInJobpk(payload)
if (resp && resp.code === 200) { if (resp && resp.code === 200) {
uni.showToast({ title: '入库成功', icon: 'success' }) uni.showToast({title: '入库成功', icon: 'success'})
// 清空托盘与列表,便于下一次操作 // 清空托盘与列表,便于下一次操作
this.trayCode = '' this.trayCode = ''
this.trayMaterials = [] this.trayMaterials = []
} else { } else {
uni.showToast({ title: (resp && resp.msg) || '入库失败', icon: 'none' }) uni.showToast({title: (resp && resp.msg) || '入库失败', icon: 'none'})
} }
} catch (e) { } catch (e) {
console.error('addInJob error', e) console.error('addInJob error', e)
uni.showToast({ title: '入库失败', icon: 'none' }) uni.showToast({title: '入库失败', icon: 'none'})
} finally { } finally {
this.isConfirming = false this.isConfirming = false
this.isBinding = false
} }
}, },
extractMaterialDetail(res) { extractMaterialDetail(res) {
@@ -201,43 +191,23 @@ export default {
this.materialCode = String(val || '').trim() this.materialCode = String(val || '').trim()
if (!this.materialCode) return if (!this.materialCode) return
try { try {
const res = await getOrderGoods({ stockinDetailId: this.materialCode }) const res = await getOrderGoods({stockinDetailId: this.materialCode})
const detail = res.data const detail = res.data
if (!detail) { if (!detail) {
uni.showToast({ title: '未找到物料信息', icon: 'none' }) uni.showToast({title: '未找到物料信息', icon: 'none'})
return return
} }
this.materialDetail = detail this.materialDetail = detail
this.bindQty = detail.quantity this.bindQty = detail.quantityX
this.$refs.detailPopup.open() this.$refs.detailPopup.open()
} catch (e) { } catch (e) {
console.error('get material detail error', e) console.error('get material detail error', e)
uni.showToast({ title: '查询物料失败', icon: 'none' }) uni.showToast({title: '查询物料失败', icon: 'none'})
} }
}, },
async handleBindTray() { closePopup() {
if (!this.trayCode) { uni.showToast({ title: '请先输入托盘条码', icon: 'none' }); return } this.$refs.detailPopup.close()
if (!this.materialDetail?.stockinDetailId) { uni.showToast({ title: '物料信息缺失', icon: 'none' }); return }
try {
this.isBinding = true
const payload = { trayCode: this.trayCode, stockinDetailId: this.materialCode, inQuantity: this.bindQty }
const resp = await bindTray(payload)
if (resp.code === 200) {
uni.showToast({ title: '绑定成功', icon: 'success' })
this.$refs.detailPopup.close()
this.materialCode = ''
await this.onTrayInput(this.trayCode)
} else {
uni.showToast({ title: resp.msg || '绑定失败', icon: 'none' })
}
} catch (e) {
console.error('bindTray error', e)
uni.showToast({ title: resp.msg, icon: 'none' })
} finally {
this.isBinding = false
}
}, },
closePopup() { this.$refs.detailPopup.close() },
handleScanTray() { handleScanTray() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
@@ -256,33 +226,163 @@ export default {
} }
} }
} }
</script> </script>
<style> <style>
.container { padding: 12px; background: #f6f7fb; min-height: 100vh; } .container {
.card { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); padding: 12px; margin-bottom: 12px; } padding: 12px;
.form { display: flex; flex-direction: column; gap: 12px; } background: #f6f7fb;
.field { display: flex; flex-direction: column; gap: 6px; } min-height: 100vh;
.label { color: #666; font-size: 12px; } }
.scan-icon { font-size: 16px; padding: 0 8px; color: #2979ff; }
.section-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; } .card {
.list { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; } background: #fff;
.item { padding: 10px; border: 1px solid #eee; border-radius: 8px; } border-radius: 10px;
.item-header { display: flex; justify-content: space-between; align-items: center; } box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
.name { font-size: 14px; color: #333; } padding: 12px;
.qty-tag { background: #eef3ff; color: #2979ff; padding: 2px 6px; border-radius: 12px; font-size: 12px; } margin-bottom: 12px;
.meta { color: #888; font-size: 12px; margin-top: 6px; } }
.empty { color: #999; font-size: 12px; padding: 12px; text-align: center; }
.popup { padding: 16px; background: #fff; border-top-left-radius: 12px; border-top-right-radius: 12px; } .form {
.popup-title { font-weight: 600; font-size: 16px; margin-bottom: 10px; } display: flex;
.row { margin: 8px 0; display: flex; justify-content: space-between; } flex-direction: column;
.row-label { color: #666; } gap: 12px;
.row-value { color: #333; } }
.actions { display: flex; gap: 10px; margin-top: 12px; }
.btn { flex: 1; padding: 10px; border-radius: 8px; } .field {
.primary { background: #2979ff; color: #fff; } display: flex;
.secondary { background: #f1f1f1; color: #333; } flex-direction: column;
/* 页脚操作区 */ gap: 6px;
.footer-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.06); } }
.confirm-btn { width: 100%; padding: 12px; border-radius: 8px; background: #07c160; color: #fff; font-size: 16px; }
.label {
color: #666;
font-size: 12px;
}
.scan-icon {
font-size: 16px;
padding: 0 8px;
color: #2979ff;
}
.section-title {
font-size: 14px;
font-weight: 600;
margin-bottom: 8px;
}
.list {
margin-top: 4px;
display: flex;
flex-direction: column;
gap: 10px;
}
.item {
padding: 10px;
border: 1px solid #eee;
border-radius: 8px;
}
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.name {
font-size: 14px;
color: #333;
}
.qty-tag {
background: #eef3ff;
color: #2979ff;
padding: 2px 6px;
border-radius: 12px;
font-size: 12px;
}
.meta {
color: #888;
font-size: 12px;
margin-top: 6px;
}
.empty {
color: #999;
font-size: 12px;
padding: 12px;
text-align: center;
}
.popup {
padding: 16px;
background: #fff;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
.popup-title {
font-weight: 600;
font-size: 16px;
margin-bottom: 10px;
}
.row {
margin: 8px 0;
display: flex;
justify-content: space-between;
}
.row-label {
color: #666;
}
.row-value {
color: #333;
}
.actions {
display: flex;
gap: 10px;
margin-top: 12px;
}
.btn {
flex: 1;
padding: 10px;
border-radius: 8px;
}
.primary {
background: #2979ff;
color: #fff;
}
.secondary {
background: #f1f1f1;
color: #333;
}
/* 页脚操作区 */
.footer-actions {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 10px 12px;
background: #fff;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}
.confirm-btn {
width: 100%;
padding: 12px;
border-radius: 8px;
background: #07c160;
color: #fff;
font-size: 16px;
}
</style> </style>

View File

@@ -83,6 +83,7 @@ public class ToWcsServiceImpl implements IToWcsService {
List<MydoJob> roadwayRunningMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam); List<MydoJob> roadwayRunningMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
if (CollUtil.isEmpty(roadwayRunningMydoJobs)){ if (CollUtil.isEmpty(roadwayRunningMydoJobs)){
mydoJobParam1.setStatus("1"); mydoJobParam1.setStatus("1");
mydoJobParam1.setRoadwayId(String.valueOf(i));
List<MydoJob> roadwayWaitingMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam1); List<MydoJob> roadwayWaitingMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam1);
if (CollUtil.isNotEmpty(roadwayWaitingMydoJobs)){ if (CollUtil.isNotEmpty(roadwayWaitingMydoJobs)){
MydoJob outMydoJob = roadwayWaitingMydoJobs.get(0); MydoJob outMydoJob = roadwayWaitingMydoJobs.get(0);

View File

@@ -361,6 +361,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
basCargoSpace.setTrayCode(mydoJob.getTrayCode()); basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId()); basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpace.setTheType(mydoJob.getLineId()); basCargoSpace.setTheType(mydoJob.getLineId());
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace); basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//插入库存信息 //插入库存信息
@@ -411,6 +413,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
basCargoSpace.setTrayCode(mydoJob.getTrayCode()); basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId()); basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpace.setTheType(mydoJob.getLineId()); basCargoSpace.setTheType(mydoJob.getLineId());
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace); basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//插入库存信息 //插入库存信息
@@ -445,6 +449,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
//修改货位状态 //修改货位状态
basCargoSpace.setStatus("2"); basCargoSpace.setStatus("2");
basCargoSpace.setTheType(mydoJob.getLineId()); basCargoSpace.setTheType(mydoJob.getLineId());
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
basCargoSpace.setTrayCode(mydoJob.getTrayCode()); basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId()); basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace); basCargoSpaceService.updateBasCargoSpace(basCargoSpace);

View File

@@ -169,6 +169,25 @@ public class ViewHandAllotStock extends BaseEntity
private String theColumn; private String theColumn;
private String theFloor; private String theFloor;
private String theType;
private String theTypeName;
public String getTheType() {
return theType;
}
public void setTheType(String theType) {
this.theType = theType;
}
public String getTheTypeName() {
return theTypeName;
}
public void setTheTypeName(String theTypeName) {
this.theTypeName = theTypeName;
}
public String getRoadwayId() { public String getRoadwayId() {
return roadwayId; return roadwayId;
} }

View File

@@ -2,22 +2,33 @@ package com.ruoyi.pda.domain;
public class TrayCodeMsg { public class TrayCodeMsg {
private String trayCode; private String trayCode;
private String warehouseId; private String warehouseId;
private String inQuantity; private String inQuantity;
private String entranceId; private String entranceId;
private String cargoSpaceId; private String cargoSpaceId;
private String exitId; private String exitId;
private String stockinDetailId; private String stockinDetailId;
private String inOut; private String inOut;
private String status; private String status;
//容量
private String workshopId;
public String getWorkshopId() {
return workshopId;
}
public void setWorkshopId(String workshopId) {
this.workshopId = workshopId;
}
public String getStatus() { public String getStatus() {
return status; return status;

View File

@@ -208,6 +208,7 @@ public class PdaServiceImp implements PdaService {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMsg.getTrayCode()); map.put("v_tray_code", trayCodeMsg.getTrayCode());
map.put("v_dept_id", SecurityUtils.getDeptId().toString()); map.put("v_dept_id", SecurityUtils.getDeptId().toString());
map.put("v_workshop_id", trayCodeMsg.getWorkshopId());
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId()); map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
pdaMapper.rkSure(map); pdaMapper.rkSure(map);
String result = map.get("v_result").toString(); String result = map.get("v_result").toString();
@@ -222,12 +223,13 @@ public class PdaServiceImp implements PdaService {
@Override @Override
public AjaxResult rkSurepk(TrayCodeMsg trayCodeMsg) { public AjaxResult rkSurepk(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMsg.getTrayCode()); map.put("v_dept_id", SecurityUtils.getDeptId().toString());
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId()); map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
pdaMapper.rkSure(map); map.put("v_in_stock_detail_id", trayCodeMsg.getStockinDetailId());
AjaxResult ajaxResult = mydoJobService.manualCompleted(mydoJobService.selectMydoJobByTrayCode(trayCodeMsg.getTrayCode()), 1); map.put("v_in_quantity", trayCodeMsg.getInQuantity());
pdaMapper.pkIn(map);
return ajaxResult; return AjaxResult.success();
} }
@Override @Override

View File

@@ -3,6 +3,7 @@ package com.ruoyi.stock.freeze.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord; import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
import com.ruoyi.stock.freeze.mapper.BasStockFreezeRecordMapper; import com.ruoyi.stock.freeze.mapper.BasStockFreezeRecordMapper;
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService; import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
@@ -45,6 +46,7 @@ public class BasStockFreezeRecordServiceImpl implements IBasStockFreezeRecordSer
//@DataScope(warehouseAlias = "bw") //@DataScope(warehouseAlias = "bw")
public List<BasStockFreezeRecord> selectBasStockFreezeRecordList(BasStockFreezeRecord basStockFreezeRecord) public List<BasStockFreezeRecord> selectBasStockFreezeRecordList(BasStockFreezeRecord basStockFreezeRecord)
{ {
basStockFreezeRecord.setPrintDate(SecurityUtils.getDeptId().toString());
return basStockFreezeRecordMapper.selectBasStockFreezeRecordList(basStockFreezeRecord); return basStockFreezeRecordMapper.selectBasStockFreezeRecordList(basStockFreezeRecord);
} }

View File

@@ -2,6 +2,7 @@ package com.ruoyi.stock.maintain.service.impl;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord; import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
import com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper; import com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper;
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService; import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
@@ -44,6 +45,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor
//@DataScope(warehouseAlias = "bw") //@DataScope(warehouseAlias = "bw")
public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord) public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord)
{ {
basStockMaintainRecord.setPrintDate(SecurityUtils.getDeptId().toString());
return basStockMaintainRecordMapper.selectBasStockMaintainRecordList(basStockMaintainRecord); return basStockMaintainRecordMapper.selectBasStockMaintainRecordList(basStockMaintainRecord);
} }

View File

@@ -217,4 +217,6 @@ public class BasStock extends BaseEntity {
private String cargoNo; private String cargoNo;
@Excel(name = "备注",sort=31) @Excel(name = "备注",sort=31)
private String remark; private String remark;
private List<String> warehouseIdList;
} }

View File

@@ -119,7 +119,7 @@ public class BasStockServiceImpl implements IBasStockService
} }
private void insertMaintainRecord(BasStock oldStock, BasStock basStock, String operate) { private void insertMaintainRecord(BasStock oldStock, BasStock basStock, String operate) {
if (oldStock != null && (!oldStock.getQuantity().equals(basStock.getQuantity())||!oldStock.getProductId().equals(basStock.getProductId()))) { if ("2".equals(operate) && oldStock != null && (!oldStock.getQuantity().equals(basStock.getQuantity())||!oldStock.getProductId().equals(basStock.getProductId()))) {
BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord(); BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord();
basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID()); basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID());
basStockMaintainRecord.setStockId(basStock.getStockId()); basStockMaintainRecord.setStockId(basStock.getStockId());
@@ -135,6 +135,45 @@ public class BasStockServiceImpl implements IBasStockService
basStockMaintainRecord.setProductName(basStock.getProductName()); basStockMaintainRecord.setProductName(basStock.getProductName());
basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId()); basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId());
basStockMaintainRecord.setMethod(operate); basStockMaintainRecord.setMethod(operate);
basStockMaintainRecord.setPrintDate(SecurityUtils.getDeptId().toString());
basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord);
}
if ("1".equals(operate)){
BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord();
basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID());
basStockMaintainRecord.setStockId(basStock.getStockId());
basStockMaintainRecord.setCargoSpaceId(basStock.getCargoSpaceId());
basStockMaintainRecord.setLotNo("");
basStockMaintainRecord.setTrayCode(basStock.getTrayCode());
basStockMaintainRecord.setProductGuid(basStock.getProductGuid());
basStockMaintainRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername());
basStockMaintainRecord.setCreateTime(new Date());
basStockMaintainRecord.setOldQuantity("0");
basStockMaintainRecord.setQuantity(basStock.getQuantity());
basStockMaintainRecord.setProductId(basStock.getProductId());
basStockMaintainRecord.setProductName(basStock.getProductName());
basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId());
basStockMaintainRecord.setMethod(operate);
basStockMaintainRecord.setPrintDate(SecurityUtils.getDeptId().toString());
basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord);
}
if ("3".equals(operate)){
BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord();
basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID());
basStockMaintainRecord.setStockId(basStock.getStockId());
basStockMaintainRecord.setCargoSpaceId(basStock.getCargoSpaceId());
basStockMaintainRecord.setLotNo("");
basStockMaintainRecord.setTrayCode(basStock.getTrayCode());
basStockMaintainRecord.setProductGuid(basStock.getProductGuid());
basStockMaintainRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername());
basStockMaintainRecord.setCreateTime(new Date());
basStockMaintainRecord.setOldQuantity(basStock.getQuantity());
basStockMaintainRecord.setQuantity("0");
basStockMaintainRecord.setProductId(basStock.getProductId());
basStockMaintainRecord.setProductName(basStock.getProductName());
basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId());
basStockMaintainRecord.setMethod(operate);
basStockMaintainRecord.setPrintDate(SecurityUtils.getDeptId().toString());
basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord); basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord);
} }
} }
@@ -182,6 +221,7 @@ public class BasStockServiceImpl implements IBasStockService
basStockFreezeRecord.setOldStatus(oldBasStock.getStockStatus()); basStockFreezeRecord.setOldStatus(oldBasStock.getStockStatus());
basStockFreezeRecord.setCurrStatus(basStock.getStockStatus()); basStockFreezeRecord.setCurrStatus(basStock.getStockStatus());
basStockFreezeRecord.setWarehouseId(basStock.getWarehouseId()); basStockFreezeRecord.setWarehouseId(basStock.getWarehouseId());
basStockFreezeRecord.setPrintDate(SecurityUtils.getDeptId().toString());
if ("1".equals(basStock.getStockStatus())){ if ("1".equals(basStock.getStockStatus())){
basStockFreezeRecord.setMethod("解冻"); basStockFreezeRecord.setMethod("解冻");
}else { }else {
@@ -261,32 +301,37 @@ public class BasStockServiceImpl implements IBasStockService
@Override @Override
public List<BasStockSummary> selectBasStockSummary(BasStock basStock) { public List<BasStockSummary> selectBasStockSummary(BasStock basStock) {
if (!"admin".equals(SecurityUtils.getUsername())){ if (!"admin".equals(SecurityUtils.getUsername())){
basStock.setModel(SecurityUtils.getDeptId().toString());
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
if (CollUtil.isEmpty(roles)) { if (CollUtil.isEmpty(roles)) {
//如果未设置角色 ,直接返回空列表 //如果未设置角色 ,直接返回空列表
return new ArrayList<>(); return new ArrayList<>();
} }
ArrayList<String> warehouseIdList = new ArrayList<>();
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst(); Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
if (first.isPresent()){ if (first.isPresent()){
//二联合普通人员 //二联合普通人员
basStock.setWarehouseId("02"); basStock.setModel(SecurityUtils.getDeptId().toString());
warehouseIdList.add("02");
warehouseIdList.add("03");
} }
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst(); Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
if (first1.isPresent()){ if (first1.isPresent()){
//三联合普通人员 //三联合普通人员
basStock.setWarehouseId("01"); basStock.setModel(SecurityUtils.getDeptId().toString());
warehouseIdList.add("01");
} }
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst(); Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
if (first2.isPresent()){ if (first2.isPresent()){
//二联合管理员 //二联合管理员
basStock.setWarehouseId("02"); warehouseIdList.add("02");
warehouseIdList.add("03");
} }
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst(); Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
if (first3.isPresent()){ if (first3.isPresent()){
//三联合管理员 //三联合管理员
basStock.setWarehouseId("01"); warehouseIdList.add("01");
} }
basStock.setWarehouseIdList(warehouseIdList);
} }
return basStockMapper.selectBasStockSummary(basStock); return basStockMapper.selectBasStockSummary(basStock);
} }

View File

@@ -46,13 +46,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="theColumn" column="the_column" /> <result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" /> <result property="theFloor" column="the_floor" />
<result property="roadwayId" column="roadway_id" /> <result property="roadwayId" column="roadway_id" />
<result property="theType" column="the_type" />
<result property="theTypeName" column="the_type_name" />
</resultMap> </resultMap>
<sql id="selectViewHandAllotStockVo"> <sql id="selectViewHandAllotStockVo">
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name,roadway_id, select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name,roadway_id,
the_platoon, the_platoon,
the_column, the_column,
the_floor from view_hand_allot_stock vhat the_floor,
the_type,
the_type_name from view_hand_allot_stock vhat
</sql> </sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult"> <select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">

View File

@@ -85,8 +85,10 @@
</select> </select>
<select id="pkIn" parameterType="java.util.Map" statementType="CALLABLE"> <select id="pkIn" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_pk_in( {call proc_add_in_pk(
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR}, #{v_dept_id,mode=IN,jdbcType=VARCHAR},
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
#{v_in_stock_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_in_quantity,mode=IN,jdbcType=INTEGER}, #{v_in_quantity,mode=IN,jdbcType=INTEGER},
#{v_result,mode=OUT,jdbcType=INTEGER}, #{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR} #{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
@@ -115,6 +117,7 @@
{call proc_add_in_job( {call proc_add_in_job(
#{v_tray_code,mode=IN,jdbcType=VARCHAR}, #{v_tray_code,mode=IN,jdbcType=VARCHAR},
#{v_dept_id,mode=IN,jdbcType=VARCHAR}, #{v_dept_id,mode=IN,jdbcType=VARCHAR},
#{v_workshop_id,mode=IN,jdbcType=VARCHAR},
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR}, #{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=INTEGER}, #{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR} #{v_resultmsg,mode=OUT,jdbcType=VARCHAR}

View File

@@ -357,7 +357,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bs.warehouse_id = #{warehouseId} and bs.warehouse_id = #{warehouseId}
</if> </if>
<if test="trayCode != null and trayCode != ''"> <if test="trayCode != null and trayCode != ''">
and bs.tray_code like concat('%',#{trayCode},'%'); and bs.tray_code like concat('%',#{trayCode},'%')
</if> </if>
<if test="roadwayId != null ">
and bcs.roadway_id = #{roadwayId}
</if>
<if test="thePlatoon != null ">
and bcs.the_platoon = #{thePlatoon}
</if>
<if test="theColumn != null ">
and bcs.the_column = #{theColumn}
</if>
<if test="theFloor != null ">
and bcs.the_floor = #{theFloor}
</if>
<if test="spare5 != null and spare5 != ''">
and bs.spare5 like concat('%',#{spare5},'%')
</if>
<if test="orderId != null and orderId != ''">
and bs.order_id like concat('%',#{orderId},'%')
</if>
<if test="power != null and power != ''">
and bs.power like concat('%',#{power},'%')
</if>
<if test="productName != null and productName != ''">
and bs.product_name like concat('%',#{productName},'%')
</if>
<if test="warehouseIdList != null and warehouseIdList.size() > 0">
and bs.warehouse_id in
<foreach collection="warehouseIdList" open="(" close=")" item="it" separator=",">
#{it}
</foreach>
</if>
</select> </select>
</mapper> </mapper>

View File

@@ -25,6 +25,13 @@ export function addInJob(data) {
data: data data: data
}) })
} }
export function rkSurepk(data) {
return request({
url: '/pda/rkSurepk',
method: 'post',
data: data
})
}
// 根据托盘条码获取物料信息 // 根据托盘条码获取物料信息
export function getTaskDetail(data) { export function getTaskDetail(data) {

View File

@@ -86,6 +86,16 @@
v-hasPermi="['job:mydoJob:manualCompleted']" v-hasPermi="['job:mydoJob:manualCompleted']"
>手动完成</el-button><!--手动完成--> >手动完成</el-button><!--手动完成-->
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="openEditTrayDialog"
>修改托盘码</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@@ -106,6 +116,8 @@
<el-table-column label="任务号" align="left" prop="taskNo" /> <el-table-column label="任务号" align="left" prop="taskNo" />
<el-table-column label="托盘码" align="left" prop="trayCode" width="140" /> <el-table-column label="托盘码" align="left" prop="trayCode" width="140" />
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" /> <el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" />
<el-table-column label="重量" align="left" prop="lineId" />
<el-table-column label="容量" align="left" prop="workshopId" />
<el-table-column label="仓库" align="left" prop="warehouseName" /> <el-table-column label="仓库" align="left" prop="warehouseName" />
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/> <el-table-column label="创建时间" align="left" prop="createTime" width="180"/>
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/> <el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
@@ -176,6 +188,24 @@
@pagination="getDetailList" @pagination="getDetailList"
/> />
<el-dialog :title="title" :visible.sync="open" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="任务ID">
<el-input v-model="form.jobId" disabled />
</el-form-item>
<el-form-item label="任务号">
<el-input v-model="form.taskNo" disabled />
</el-form-item>
<el-form-item label="托盘码" prop="trayCode">
<el-input v-model="form.trayCode" 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>
</div> </div>
</template> </template>
@@ -258,8 +288,12 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 99, pageSize: 99,
}, },
// 表单参数
form: {}, form: {},
rules: {
trayCode: [
{ required: true, message: "托盘码不能为空", trigger: "blur" }
]
},
} }
}, },
created() { created() {
@@ -394,6 +428,37 @@ export default {
} }
}, },
openEditTrayDialog() {
if (this.ids.length === 0) {
this.$modal.msgError("请选择要修改的任务");
return;
}
if (this.ids.length > 1) {
this.$modal.msgError("一次只能修改一条任务");
return;
}
const jobId = this.ids[0];
const row = this.mydoJobList.find(item => item.jobId === jobId);
if (!row) {
this.$modal.msgError("未找到选中任务数据");
return;
}
this.form = Object.assign({}, row);
this.title = "修改任务托盘码";
this.open = true;
},
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
updateMydoJob(this.form).then(() => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('job/mydoJob/export', { this.download('job/mydoJob/export', {

View File

@@ -28,6 +28,15 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="容量" prop="workshopId">
<el-input
v-model="formData.workshopId"
placeholder="请输入容量"
clearable
:style="{width: '15%'}"
>
</el-input>
</el-form-item>
<el-form-item label="入库子单" prop="stockinDetailId"> <el-form-item label="入库子单" prop="stockinDetailId">
<el-input <el-input
v-model="formData.stockinDetailId" v-model="formData.stockinDetailId"
@@ -89,6 +98,7 @@ export default {
warehouseId: undefined, warehouseId: undefined,
trayCode: undefined, trayCode: undefined,
stockinDetailId: undefined, stockinDetailId: undefined,
workshopId: undefined
}, },
detailLoading: false, detailLoading: false,
detailOpen: false, detailOpen: false,

View File

@@ -16,18 +16,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="托盘码" prop="trayCode">
<el-input
v-model="formData.trayCode"
:maxlength="8"
show-word-limit
placeholder="请输入条码"
clearable
:style="{width: '15%'}"
@change="handleTrayChange"
>
</el-input>
</el-form-item>
<el-form-item label="入库子单" prop="stockinDetailId"> <el-form-item label="入库子单" prop="stockinDetailId">
<el-input <el-input
v-model="formData.stockinDetailId" v-model="formData.stockinDetailId"
@@ -39,19 +27,9 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-card style="margin-top: 16px;">
<div slot="header">托盘已绑定物料</div>
<el-table v-if="trayMaterials && trayMaterials.length" :data="trayMaterials" size="small">
<el-table-column label="子单编码" align="left" prop="stockinDetailId"/>
<el-table-column label="物料名称" align="left" prop="productName"/>
<el-table-column label="数量" align="right" prop="quantity"/>
</el-table>
<el-empty v-else description="暂无数据"></el-empty>
</el-card>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">确认入库</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form> </el-form>
@@ -77,7 +55,7 @@
</template> </template>
<script> <script>
import { getStockInDetail} from '@/api/in/stockInDetail' import { getStockInDetail} from '@/api/in/stockInDetail'
import { bindTray ,getTrayInfo ,addInJobpk} from '@/api/rf/rf' import {rkSurepk, getTrayInfo, addInJobpk} from '@/api/rf/rf'
import {listWarehouse} from "@/api/bas/warehouse"; import {listWarehouse} from "@/api/bas/warehouse";
export default { export default {
@@ -89,11 +67,11 @@ export default {
warehouseId: undefined, warehouseId: undefined,
trayCode: undefined, trayCode: undefined,
stockinDetailId: undefined, stockinDetailId: undefined,
inQuantity: null
}, },
detailLoading: false, detailLoading: false,
detailOpen: false, detailOpen: false,
detailRow: null, detailRow: null,
inQuantity: null,
trayMaterials: [], trayMaterials: [],
warehouseOptions:[], warehouseOptions:[],
queryWarehouseParams:{ queryWarehouseParams:{
@@ -143,15 +121,6 @@ export default {
} }
}); });
}, },
async handleTrayChange() {
const code = (this.formData.trayCode || '').toString().trim()
if (!code) {
this.trayMaterials = []
return
}
const res = await getTrayInfo(code)
this.trayMaterials = res.data || res.rows || []
},
async handleQueryDetail() { async handleQueryDetail() {
const id = (this.formData.stockinDetailId || '').toString().trim() const id = (this.formData.stockinDetailId || '').toString().trim()
if (!id) return if (!id) return
@@ -170,20 +139,6 @@ export default {
this.detailLoading = false this.detailLoading = false
} }
}, },
submitForm() {
if (!this.formData.warehouseId){
this.$message.error('请输入仓库号')
return
}
if (!this.formData.trayCode){
this.$message.error('请输入托盘码')
return
}
addInJobpk(this.formData).then(() => {
this.$message.success('入库成功')
this.resetForm()
})
},
resetForm() { resetForm() {
this.$refs['elForm'].resetFields() this.$refs['elForm'].resetFields()
this.trayMaterials = [] this.trayMaterials = []
@@ -204,24 +159,19 @@ export default {
this.$message.error('入库数量不能超过剩余数量') this.$message.error('入库数量不能超过剩余数量')
return return
} }
if (!this.formData.trayCode){
this.$message.error('请输入托盘码')
return
}
if (!this.formData.warehouseId){ if (!this.formData.warehouseId){
this.$message.error('请输入仓库号') this.$message.error('请输入仓库号')
return return
} }
const payload = { const payload = {
trayCode: this.formData.trayCode,
stockinDetailId: this.formData.stockinDetailId, stockinDetailId: this.formData.stockinDetailId,
inQuantity: qty, inQuantity: qty,
warehouseId: this.formData.warehouseId warehouseId: this.formData.warehouseId
} }
bindTray(payload).then(() => { rkSurepk(payload).then(() => {
this.$message.success('绑定成功')
this.detailOpen = false this.detailOpen = false
this.handleTrayChange() this.resetForm()
this.$message.success('入库成功')
}) })
} }
} }

View File

@@ -89,14 +89,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="规格型号" prop="spec"> <!-- <el-form-item label="规格型号" prop="spec">
<el-input <el-input
v-model="queryParams.spec" v-model="queryParams.spec"
placeholder="请输入规格型号" placeholder="请输入规格型号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </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><!-- 搜索 -->
@@ -122,6 +122,7 @@
<el-table-column label="列" align="center" prop="theColumn"/> <el-table-column label="列" align="center" prop="theColumn"/>
<el-table-column label="层" align="center" prop="theFloor"/> <el-table-column label="层" align="center" prop="theFloor"/>
<el-table-column label="重量" align="center" prop="theType"/> <el-table-column label="重量" align="center" prop="theType"/>
<el-table-column label="容量" align="center" prop="theTypeName"/>
<el-table-column label="部门" align="center" prop="model"> <el-table-column label="部门" align="center" prop="model">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/> <dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/>
@@ -606,10 +607,10 @@ export default {
methods: { methods: {
getDeptDictOptions(row) { getDeptDictOptions(row) {
const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0") const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0")
if (wid === "01") { if (wid === "01" ) {
return this.dict.type.sl_dept || [] return this.dict.type.sl_dept || []
} }
if (wid === "02") { if (wid === "02" || wid === "03") {
return this.dict.type.el_dept || [] return this.dict.type.el_dept || []
} }
return this.dict.type.sl_dept || [] return this.dict.type.sl_dept || []

View File

@@ -101,7 +101,7 @@
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/> <dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存编码" align="center" prop="stockId" /> <el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" /> <el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
<el-table-column label="托盘码" align="center" prop="trayCode" /> <el-table-column label="托盘码" align="center" prop="trayCode" />
<el-table-column label="合同号" align="center" prop="orderId" /> <el-table-column label="合同号" align="center" prop="orderId" />
@@ -111,6 +111,8 @@
<el-table-column label="物料编码" align="center" prop="productId" /> <el-table-column label="物料编码" align="center" prop="productId" />
<el-table-column label="物料名称" align="center" prop="productName" /> <el-table-column label="物料名称" align="center" prop="productName" />
<el-table-column label="规格型号" align="center" prop="netWeight" /> <el-table-column label="规格型号" align="center" prop="netWeight" />
<el-table-column label="重量" align="center" prop="theType" />
<el-table-column label="容量" align="center" prop="theTypeName" />
<el-table-column label="库存数量" align="center" prop="quantity" width="80" /> <el-table-column label="库存数量" align="center" prop="quantity" width="80" />
<!-- <el-table-column label="来源" align="center" prop="spare1" > <!-- <el-table-column label="来源" align="center" prop="spare1" >
<template slot-scope="scope"> <template slot-scope="scope">