手持机平库入 新增,修改,删除库存记录
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "若依移动端",
|
||||
"appid" : "__UNI__A2DE016",
|
||||
"name" : "541立库APP",
|
||||
"appid" : "__UNI__2E13A0F",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.0",
|
||||
"versionCode" : "100",
|
||||
|
||||
@@ -2,89 +2,76 @@
|
||||
<view class="container">
|
||||
<view class="form card">
|
||||
<view class="field">
|
||||
<text class="label">托盘条码</text>
|
||||
<uni-easyinput ref="trayInput" v-model="trayCode" @input="onTrayInput" placeholder="请输入托盘条码" :disabled="loadingTray" :clearable="true" >
|
||||
<template #right>
|
||||
<text class="scan-icon" @click="handleScanTray">📷</text>
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
<text class="input-label">仓库</text>
|
||||
<uni-data-select
|
||||
v-model="warehouseId"
|
||||
:localdata="warehouseList"
|
||||
:clear="false"
|
||||
placeholder="请选择仓库"
|
||||
|
||||
/>
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="label">物料条码</text>
|
||||
<uni-easyinput v-model="materialCode" @input="onMaterialInput" placeholder="请输入物料条码" :clearable="true">
|
||||
<text class="label">入库子单</text>
|
||||
<uni-easyinput v-model="materialCode" @input="onMaterialInput" placeholder="请输入入库子单编码"
|
||||
:clearable="true">
|
||||
<template #right>
|
||||
<text class="scan-icon" @click="handleScanMaterial">📷</text>
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<text class="input-label">仓库</text>
|
||||
<uni-data-select
|
||||
v-model="warehouseId"
|
||||
:localdata="warehouseList"
|
||||
:clear="false"
|
||||
placeholder="请选择仓库"
|
||||
|
||||
/>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="tray-info card" v-if="trayMaterials.length">
|
||||
<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">
|
||||
<uni-popup ref="detailPopup" type="bottom">
|
||||
<view class="popup">
|
||||
<text class="popup-title">物料详情</text>
|
||||
<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">
|
||||
<text class="row-label">绑定数量</text>
|
||||
<uni-easyinput v-model="bindQty" type="number" placeholder="输入数量" />
|
||||
<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.quantityX }}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="row-label">入库数量</text>
|
||||
<uni-easyinput v-model="bindQty" type="number" placeholder="输入数量"/>
|
||||
</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
<!-- 页脚操作区:确认入库 -->
|
||||
<view class="footer-actions">
|
||||
<button class="confirm-btn" @click="handleConfirmIn" :disabled="!trayCode || isConfirming">
|
||||
{{ isConfirming ? '入库中...' : '确认入库' }}
|
||||
</button>
|
||||
</view>
|
||||
<!-- <view class="footer-actions">-->
|
||||
<!-- <button class="confirm-btn" @click="handleConfirmIn" :disabled="!trayCode || isConfirming">-->
|
||||
<!-- {{ isConfirming ? '入库中...' : '确认入库' }}-->
|
||||
<!-- </button>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrayInfo, bindTray, getOrderGoods, addInJobpk } from '@/api/in/order.js'
|
||||
import { getBasWarehouList } from '@/api/bas/bas.js'
|
||||
import {addInJobpk, bindTray, getOrderGoods, getTrayInfo} from '@/api/in/order.js'
|
||||
import {getBasWarehouList} from '@/api/bas/bas.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
trayCode: '',
|
||||
materialCode: '',
|
||||
warehouseId:'',
|
||||
warehouseList: [],
|
||||
warehouseId: '',
|
||||
warehouseList: [],
|
||||
trayMaterials: [],
|
||||
loadingTray: false,
|
||||
materialDetail: null,
|
||||
@@ -97,87 +84,90 @@ export default {
|
||||
},
|
||||
onReady() {
|
||||
|
||||
|
||||
// 获取仓库列表
|
||||
this.getWarehouseList()
|
||||
|
||||
// 获取仓库列表
|
||||
this.getWarehouseList()
|
||||
},
|
||||
methods: {
|
||||
// 获取仓库列表
|
||||
async getWarehouseList() {
|
||||
try {
|
||||
const response = await getBasWarehouList({
|
||||
pageNum:1,
|
||||
pageSize:100,
|
||||
warehouseType:2
|
||||
|
||||
})
|
||||
if (response.code === 200) {
|
||||
this.warehouseList = response.rows.map(item => ({
|
||||
value: item.warehouseId,
|
||||
text: item.warehouseName
|
||||
// type: item.warehouseType
|
||||
}))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取仓库列表失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取仓库列表失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取仓库列表
|
||||
async getWarehouseList() {
|
||||
try {
|
||||
const response = await getBasWarehouList({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
warehouseType: 2
|
||||
|
||||
})
|
||||
if (response.code === 200) {
|
||||
this.warehouseList = response.rows.map(item => ({
|
||||
value: item.warehouseId,
|
||||
text: item.warehouseName
|
||||
// type: item.warehouseType
|
||||
}))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取仓库列表失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取仓库列表失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
mapTrayMaterials(res) {
|
||||
const list = Array.isArray(res.data) ? res.data : (Array.isArray(res.rows) ? res.rows : (res.data.rows || []))
|
||||
return list.map(item => ({
|
||||
productId: item.productId ,
|
||||
materialDesc: item.productName ,
|
||||
productId: item.productId,
|
||||
materialDesc: item.productName,
|
||||
quantity: item.quantity,
|
||||
}))
|
||||
},
|
||||
async onTrayInput(val) {
|
||||
this.trayCode = String(val || '').trim()
|
||||
if (!this.trayCode) { this.trayMaterials = []; return }
|
||||
if (!this.trayCode) {
|
||||
this.trayMaterials = [];
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.loadingTray = true
|
||||
const res = await getTrayInfo(this.trayCode)
|
||||
this.trayMaterials = res.data
|
||||
} catch (e) {
|
||||
console.error('getTrayInfo error', e)
|
||||
uni.showToast({ title: '查询托盘失败', icon: 'none' })
|
||||
uni.showToast({title: '查询托盘失败', icon: 'none'})
|
||||
} finally {
|
||||
this.loadingTray = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 确认入库
|
||||
async handleConfirmIn() {
|
||||
if (!this.trayCode) {
|
||||
uni.showToast({ title: '请先输入托盘条码', icon: 'none' })
|
||||
|
||||
if (!this.warehouseId) {
|
||||
uni.showToast({title: '请先选择仓库', icon: 'none'})
|
||||
return
|
||||
}
|
||||
if (!this.warehouseId) {
|
||||
uni.showToast({ title: '请先选择仓库', icon: 'none' })
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.isConfirming = true
|
||||
|
||||
const payload = {
|
||||
trayCode: this.trayCode,
|
||||
warehouseId: this.warehouseId,
|
||||
stockinDetailId: this.materialCode,
|
||||
inQuantity: this.bindQty
|
||||
}
|
||||
const resp = await addInJobpk(payload)
|
||||
if (resp && resp.code === 200) {
|
||||
uni.showToast({ title: '入库成功', icon: 'success' })
|
||||
uni.showToast({title: '入库成功', icon: 'success'})
|
||||
// 清空托盘与列表,便于下一次操作
|
||||
this.trayCode = ''
|
||||
this.trayMaterials = []
|
||||
} else {
|
||||
uni.showToast({ title: (resp && resp.msg) || '入库失败', icon: 'none' })
|
||||
uni.showToast({title: (resp && resp.msg) || '入库失败', icon: 'none'})
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('addInJob error', e)
|
||||
uni.showToast({ title: '入库失败', icon: 'none' })
|
||||
uni.showToast({title: '入库失败', icon: 'none'})
|
||||
} finally {
|
||||
this.isConfirming = false
|
||||
this.isBinding = false
|
||||
}
|
||||
},
|
||||
extractMaterialDetail(res) {
|
||||
@@ -201,43 +191,23 @@ export default {
|
||||
this.materialCode = String(val || '').trim()
|
||||
if (!this.materialCode) return
|
||||
try {
|
||||
const res = await getOrderGoods({ stockinDetailId: this.materialCode })
|
||||
const res = await getOrderGoods({stockinDetailId: this.materialCode})
|
||||
const detail = res.data
|
||||
if (!detail) {
|
||||
uni.showToast({ title: '未找到物料信息', icon: 'none' })
|
||||
uni.showToast({title: '未找到物料信息', icon: 'none'})
|
||||
return
|
||||
}
|
||||
this.materialDetail = detail
|
||||
this.bindQty = detail.quantity
|
||||
this.bindQty = detail.quantityX
|
||||
this.$refs.detailPopup.open()
|
||||
} catch (e) {
|
||||
console.error('get material detail error', e)
|
||||
uni.showToast({ title: '查询物料失败', icon: 'none' })
|
||||
uni.showToast({title: '查询物料失败', icon: 'none'})
|
||||
}
|
||||
},
|
||||
async handleBindTray() {
|
||||
if (!this.trayCode) { uni.showToast({ title: '请先输入托盘条码', icon: 'none' }); return }
|
||||
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()
|
||||
},
|
||||
closePopup() { this.$refs.detailPopup.close() },
|
||||
handleScanTray() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
@@ -256,33 +226,163 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container { padding: 12px; background: #f6f7fb; min-height: 100vh; }
|
||||
.card { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); padding: 12px; margin-bottom: 12px; }
|
||||
.form { display: flex; flex-direction: column; gap: 12px; }
|
||||
.field { display: flex; flex-direction: column; gap: 6px; }
|
||||
.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; }
|
||||
.container {
|
||||
padding: 12px;
|
||||
background: #f6f7fb;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
@@ -83,6 +83,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
List<MydoJob> roadwayRunningMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (CollUtil.isEmpty(roadwayRunningMydoJobs)){
|
||||
mydoJobParam1.setStatus("1");
|
||||
mydoJobParam1.setRoadwayId(String.valueOf(i));
|
||||
List<MydoJob> roadwayWaitingMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam1);
|
||||
if (CollUtil.isNotEmpty(roadwayWaitingMydoJobs)){
|
||||
MydoJob outMydoJob = roadwayWaitingMydoJobs.get(0);
|
||||
|
||||
@@ -361,6 +361,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpace.setTheType(mydoJob.getLineId());
|
||||
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
|
||||
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
@@ -411,6 +413,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpace.setTheType(mydoJob.getLineId());
|
||||
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
|
||||
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
@@ -445,6 +449,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTheType(mydoJob.getLineId());
|
||||
basCargoSpace.setTheTypeName(mydoJob.getWorkshopId());
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
@@ -169,6 +169,25 @@ public class ViewHandAllotStock extends BaseEntity
|
||||
private String theColumn;
|
||||
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() {
|
||||
return roadwayId;
|
||||
}
|
||||
|
||||
@@ -2,22 +2,33 @@ package com.ruoyi.pda.domain;
|
||||
|
||||
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 status;
|
||||
private String inOut;
|
||||
private String status;
|
||||
|
||||
//容量
|
||||
private String workshopId;
|
||||
|
||||
public String getWorkshopId() {
|
||||
return workshopId;
|
||||
}
|
||||
|
||||
public void setWorkshopId(String workshopId) {
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
|
||||
@@ -208,6 +208,7 @@ public class PdaServiceImp implements PdaService {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_dept_id", SecurityUtils.getDeptId().toString());
|
||||
map.put("v_workshop_id", trayCodeMsg.getWorkshopId());
|
||||
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
|
||||
pdaMapper.rkSure(map);
|
||||
String result = map.get("v_result").toString();
|
||||
@@ -222,12 +223,13 @@ public class PdaServiceImp implements PdaService {
|
||||
@Override
|
||||
public AjaxResult rkSurepk(TrayCodeMsg trayCodeMsg) {
|
||||
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());
|
||||
pdaMapper.rkSure(map);
|
||||
AjaxResult ajaxResult = mydoJobService.manualCompleted(mydoJobService.selectMydoJobByTrayCode(trayCodeMsg.getTrayCode()), 1);
|
||||
map.put("v_in_stock_detail_id", trayCodeMsg.getStockinDetailId());
|
||||
map.put("v_in_quantity", trayCodeMsg.getInQuantity());
|
||||
pdaMapper.pkIn(map);
|
||||
|
||||
return ajaxResult;
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.stock.freeze.service.impl;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
|
||||
import com.ruoyi.stock.freeze.mapper.BasStockFreezeRecordMapper;
|
||||
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
|
||||
@@ -45,6 +46,7 @@ public class BasStockFreezeRecordServiceImpl implements IBasStockFreezeRecordSer
|
||||
//@DataScope(warehouseAlias = "bw")
|
||||
public List<BasStockFreezeRecord> selectBasStockFreezeRecordList(BasStockFreezeRecord basStockFreezeRecord)
|
||||
{
|
||||
basStockFreezeRecord.setPrintDate(SecurityUtils.getDeptId().toString());
|
||||
return basStockFreezeRecordMapper.selectBasStockFreezeRecordList(basStockFreezeRecord);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.stock.maintain.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
import com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper;
|
||||
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
|
||||
@@ -44,6 +45,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor
|
||||
//@DataScope(warehouseAlias = "bw")
|
||||
public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
basStockMaintainRecord.setPrintDate(SecurityUtils.getDeptId().toString());
|
||||
return basStockMaintainRecordMapper.selectBasStockMaintainRecordList(basStockMaintainRecord);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,4 +217,6 @@ public class BasStock extends BaseEntity {
|
||||
private String cargoNo;
|
||||
@Excel(name = "备注",sort=31)
|
||||
private String remark;
|
||||
|
||||
private List<String> warehouseIdList;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
}
|
||||
|
||||
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.setWhGuid(IdUtil.fastSimpleUUID());
|
||||
basStockMaintainRecord.setStockId(basStock.getStockId());
|
||||
@@ -135,6 +135,45 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
basStockMaintainRecord.setProductName(basStock.getProductName());
|
||||
basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId());
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -182,6 +221,7 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
basStockFreezeRecord.setOldStatus(oldBasStock.getStockStatus());
|
||||
basStockFreezeRecord.setCurrStatus(basStock.getStockStatus());
|
||||
basStockFreezeRecord.setWarehouseId(basStock.getWarehouseId());
|
||||
basStockFreezeRecord.setPrintDate(SecurityUtils.getDeptId().toString());
|
||||
if ("1".equals(basStock.getStockStatus())){
|
||||
basStockFreezeRecord.setMethod("解冻");
|
||||
}else {
|
||||
@@ -261,32 +301,37 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
@Override
|
||||
public List<BasStockSummary> selectBasStockSummary(BasStock basStock) {
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
ArrayList<String> warehouseIdList = new ArrayList<>();
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
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();
|
||||
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();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
basStock.setWarehouseId("02");
|
||||
warehouseIdList.add("02");
|
||||
warehouseIdList.add("03");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
basStock.setWarehouseId("01");
|
||||
warehouseIdList.add("01");
|
||||
}
|
||||
basStock.setWarehouseIdList(warehouseIdList);
|
||||
}
|
||||
return basStockMapper.selectBasStockSummary(basStock);
|
||||
}
|
||||
|
||||
@@ -46,13 +46,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="theColumn" column="the_column" />
|
||||
<result property="theFloor" column="the_floor" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="theType" column="the_type" />
|
||||
<result property="theTypeName" column="the_type_name" />
|
||||
</resultMap>
|
||||
|
||||
<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,
|
||||
the_platoon,
|
||||
the_column,
|
||||
the_floor from view_hand_allot_stock vhat
|
||||
the_floor,
|
||||
the_type,
|
||||
the_type_name from view_hand_allot_stock vhat
|
||||
</sql>
|
||||
|
||||
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
|
||||
|
||||
@@ -85,8 +85,10 @@
|
||||
</select>
|
||||
|
||||
<select id="pkIn" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_pk_in(
|
||||
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
{call proc_add_in_pk(
|
||||
#{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_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
@@ -115,6 +117,7 @@
|
||||
{call proc_add_in_job(
|
||||
#{v_tray_code,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_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
|
||||
@@ -357,7 +357,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and bs.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="trayCode != null and trayCode != ''">
|
||||
and bs.tray_code like concat('%',#{trayCode},'%');
|
||||
and bs.tray_code like concat('%',#{trayCode},'%')
|
||||
</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>
|
||||
</mapper>
|
||||
|
||||
@@ -25,6 +25,13 @@ export function addInJob(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function rkSurepk(data) {
|
||||
return request({
|
||||
url: '/pda/rkSurepk',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据托盘条码获取物料信息
|
||||
export function getTaskDetail(data) {
|
||||
|
||||
@@ -86,6 +86,16 @@
|
||||
v-hasPermi="['job:mydoJob:manualCompleted']"
|
||||
>手动完成</el-button><!--手动完成-->
|
||||
</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>
|
||||
</el-row>
|
||||
|
||||
@@ -106,6 +116,8 @@
|
||||
<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="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="createTime" width="180"/>
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
|
||||
@@ -176,6 +188,24 @@
|
||||
@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>
|
||||
</template>
|
||||
@@ -258,8 +288,12 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
rules: {
|
||||
trayCode: [
|
||||
{ required: true, message: "托盘码不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
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() {
|
||||
this.download('job/mydoJob/export', {
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
>
|
||||
</el-input>
|
||||
</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-input
|
||||
v-model="formData.stockinDetailId"
|
||||
@@ -89,6 +98,7 @@ export default {
|
||||
warehouseId: undefined,
|
||||
trayCode: undefined,
|
||||
stockinDetailId: undefined,
|
||||
workshopId: undefined
|
||||
},
|
||||
detailLoading: false,
|
||||
detailOpen: false,
|
||||
|
||||
@@ -16,18 +16,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-input
|
||||
v-model="formData.stockinDetailId"
|
||||
@@ -39,19 +27,9 @@
|
||||
>
|
||||
</el-input>
|
||||
</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>
|
||||
|
||||
|
||||
@@ -77,7 +55,7 @@
|
||||
</template>
|
||||
<script>
|
||||
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";
|
||||
|
||||
export default {
|
||||
@@ -89,11 +67,11 @@ export default {
|
||||
warehouseId: undefined,
|
||||
trayCode: undefined,
|
||||
stockinDetailId: undefined,
|
||||
inQuantity: null
|
||||
},
|
||||
detailLoading: false,
|
||||
detailOpen: false,
|
||||
detailRow: null,
|
||||
inQuantity: null,
|
||||
trayMaterials: [],
|
||||
warehouseOptions:[],
|
||||
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() {
|
||||
const id = (this.formData.stockinDetailId || '').toString().trim()
|
||||
if (!id) return
|
||||
@@ -170,20 +139,6 @@ export default {
|
||||
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() {
|
||||
this.$refs['elForm'].resetFields()
|
||||
this.trayMaterials = []
|
||||
@@ -204,24 +159,19 @@ export default {
|
||||
this.$message.error('入库数量不能超过剩余数量')
|
||||
return
|
||||
}
|
||||
if (!this.formData.trayCode){
|
||||
this.$message.error('请输入托盘码')
|
||||
return
|
||||
}
|
||||
if (!this.formData.warehouseId){
|
||||
this.$message.error('请输入仓库号')
|
||||
return
|
||||
}
|
||||
const payload = {
|
||||
trayCode: this.formData.trayCode,
|
||||
stockinDetailId: this.formData.stockinDetailId,
|
||||
inQuantity: qty,
|
||||
warehouseId: this.formData.warehouseId
|
||||
}
|
||||
bindTray(payload).then(() => {
|
||||
this.$message.success('绑定成功')
|
||||
rkSurepk(payload).then(() => {
|
||||
this.detailOpen = false
|
||||
this.handleTrayChange()
|
||||
this.resetForm()
|
||||
this.$message.success('入库成功')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,14 +89,14 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<!-- <el-form-item label="规格型号" prop="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
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><!-- 搜索 -->
|
||||
@@ -122,6 +122,7 @@
|
||||
<el-table-column label="列" align="center" prop="theColumn"/>
|
||||
<el-table-column label="层" align="center" prop="theFloor"/>
|
||||
<el-table-column label="重量" align="center" prop="theType"/>
|
||||
<el-table-column label="容量" align="center" prop="theTypeName"/>
|
||||
<el-table-column label="部门" align="center" prop="model">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/>
|
||||
@@ -606,10 +607,10 @@ export default {
|
||||
methods: {
|
||||
getDeptDictOptions(row) {
|
||||
const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0")
|
||||
if (wid === "01") {
|
||||
if (wid === "01" ) {
|
||||
return this.dict.type.sl_dept || []
|
||||
}
|
||||
if (wid === "02") {
|
||||
if (wid === "02" || wid === "03") {
|
||||
return this.dict.type.el_dept || []
|
||||
}
|
||||
return this.dict.type.sl_dept || []
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</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="trayCode" />
|
||||
<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="productName" />
|
||||
<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="spare1" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user