Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
smart-rack-base
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
smart-rack-base
Commits
1d8a7925
Commit
1d8a7925
authored
Apr 21, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 料架号和物料维护界面可以出库调整
2 入库 选择物料界面调整
parent
14d0ab1d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
378 additions
and
76 deletions
+378
-76
TRackMaterialRelation.java
.../zehong/system/domain/material/TRackMaterialRelation.java
+11
-0
TRackMaterialRelationMapper.java
...g/system/mapper/material/TRackMaterialRelationMapper.java
+10
-8
ITShelfApiServiceImpl.java
...hong/system/service/impl/shelf/ITShelfApiServiceImpl.java
+19
-8
TRackMaterialRelationMapper.xml
...resources/mapper/material/TRackMaterialRelationMapper.xml
+22
-13
index.vue
smart-rack-base-web/src/views/materialmanage/info/index.vue
+1
-1
index.vue
...rack-base-web/src/views/materialmanage/relation/index.vue
+95
-14
index.vue
...base-web/src/views/pcbamanage/pcbashelflocation/index.vue
+113
-16
index.vue
...web/src/views/producemange/produceshelflocation/index.vue
+107
-16
No files found.
smart-rack-base-system/src/main/java/com/zehong/system/domain/material/TRackMaterialRelation.java
View file @
1d8a7925
...
@@ -46,6 +46,9 @@ public class TRackMaterialRelation extends BaseEntity
...
@@ -46,6 +46,9 @@ public class TRackMaterialRelation extends BaseEntity
/** 储位 */
/** 储位 */
private
String
location
;
private
String
location
;
/** 描述 */
private
String
locationDesc
;
public
void
setRelationId
(
Long
relationId
)
public
void
setRelationId
(
Long
relationId
)
{
{
this
.
relationId
=
relationId
;
this
.
relationId
=
relationId
;
...
@@ -124,6 +127,14 @@ public class TRackMaterialRelation extends BaseEntity
...
@@ -124,6 +127,14 @@ public class TRackMaterialRelation extends BaseEntity
this
.
location
=
location
;
this
.
location
=
location
;
}
}
public
String
getLocationDesc
()
{
return
locationDesc
;
}
public
void
setLocationDesc
(
String
locationDesc
)
{
this
.
locationDesc
=
locationDesc
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
smart-rack-base-system/src/main/java/com/zehong/system/mapper/material/TRackMaterialRelationMapper.java
View file @
1d8a7925
...
@@ -5,15 +5,15 @@ import com.zehong.system.domain.material.TRackMaterialRelation;
...
@@ -5,15 +5,15 @@ import com.zehong.system.domain.material.TRackMaterialRelation;
/**
/**
* 料架和物料维护Mapper接口
* 料架和物料维护Mapper接口
*
*
* @author zehong
* @author zehong
* @date 2025-09-24
* @date 2025-09-24
*/
*/
public
interface
TRackMaterialRelationMapper
public
interface
TRackMaterialRelationMapper
{
{
/**
/**
* 查询料架和物料维护
* 查询料架和物料维护
*
*
* @param relationId 料架和物料维护ID
* @param relationId 料架和物料维护ID
* @return 料架和物料维护
* @return 料架和物料维护
*/
*/
...
@@ -28,15 +28,17 @@ public interface TRackMaterialRelationMapper
...
@@ -28,15 +28,17 @@ public interface TRackMaterialRelationMapper
/**
/**
* 查询料架和物料维护列表
* 查询料架和物料维护列表
*
*
* @param tRackMaterialRelation 料架和物料维护
* @param tRackMaterialRelation 料架和物料维护
* @return 料架和物料维护集合
* @return 料架和物料维护集合
*/
*/
public
List
<
TRackMaterialRelation
>
selectTRackMaterialRelationList
(
TRackMaterialRelation
tRackMaterialRelation
);
public
List
<
TRackMaterialRelation
>
selectTRackMaterialRelationList
(
TRackMaterialRelation
tRackMaterialRelation
);
public
List
<
TRackMaterialRelation
>
selectByRockCode
(
String
rackCode
);
/**
/**
* 新增料架和物料维护
* 新增料架和物料维护
*
*
* @param tRackMaterialRelation 料架和物料维护
* @param tRackMaterialRelation 料架和物料维护
* @return 结果
* @return 结果
*/
*/
...
@@ -44,7 +46,7 @@ public interface TRackMaterialRelationMapper
...
@@ -44,7 +46,7 @@ public interface TRackMaterialRelationMapper
/**
/**
* 修改料架和物料维护
* 修改料架和物料维护
*
*
* @param tRackMaterialRelation 料架和物料维护
* @param tRackMaterialRelation 料架和物料维护
* @return 结果
* @return 结果
*/
*/
...
@@ -52,7 +54,7 @@ public interface TRackMaterialRelationMapper
...
@@ -52,7 +54,7 @@ public interface TRackMaterialRelationMapper
/**
/**
* 删除料架和物料维护
* 删除料架和物料维护
*
*
* @param relationId 料架和物料维护ID
* @param relationId 料架和物料维护ID
* @return 结果
* @return 结果
*/
*/
...
@@ -60,7 +62,7 @@ public interface TRackMaterialRelationMapper
...
@@ -60,7 +62,7 @@ public interface TRackMaterialRelationMapper
/**
/**
* 批量删除料架和物料维护
* 批量删除料架和物料维护
*
*
* @param relationIds 需要删除的数据ID
* @param relationIds 需要删除的数据ID
* @return 结果
* @return 结果
*/
*/
...
...
smart-rack-base-system/src/main/java/com/zehong/system/service/impl/shelf/ITShelfApiServiceImpl.java
View file @
1d8a7925
...
@@ -108,14 +108,25 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
...
@@ -108,14 +108,25 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
* @param param 关联信息
* @param param 关联信息
*/
*/
private
void
addRelationInfo
(
JSONObject
param
){
private
void
addRelationInfo
(
JSONObject
param
){
TRackMaterialRelation
tRackMaterialRelation
=
new
TRackMaterialRelation
();
List
<
TRackMaterialRelation
>
tRackMaterialRelations
=
rackMaterialRelationMapper
.
selectByRockCode
(
param
.
getString
(
"rackCode"
));
tRackMaterialRelation
.
setMaterialId
(
param
.
getLong
(
"materialId"
));
if
(
tRackMaterialRelations
.
size
()
>
0
){
tRackMaterialRelation
.
setRackCode
(
param
.
getString
(
"rackCode"
));
TRackMaterialRelation
tRackMaterialRelation
=
tRackMaterialRelations
.
get
(
0
);
tRackMaterialRelation
.
setCreateTime
(
new
Date
());
tRackMaterialRelation
.
setUpdateTime
(
new
Date
());
tRackMaterialRelation
.
setCreateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getNickName
());
tRackMaterialRelation
.
setUpdateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getNickName
());
tRackMaterialRelation
.
setShelf
(
param
.
getString
(
"shelf"
));
tRackMaterialRelation
.
setMaterialId
(
param
.
getLong
(
"materialId"
));
int
result
=
rackMaterialRelationMapper
.
insertTRackMaterialRelation
(
tRackMaterialRelation
);
tRackMaterialRelation
.
setRackCode
(
param
.
getString
(
"rackCode"
));
if
(
result
==
0
)
throw
new
CustomException
(
"入库料盘物料信息关联失败"
);
tRackMaterialRelation
.
setShelf
(
param
.
getString
(
"shelf"
));
rackMaterialRelationMapper
.
updateTRackMaterialRelation
(
tRackMaterialRelation
);
}
else
{
TRackMaterialRelation
tRackMaterialRelation
=
new
TRackMaterialRelation
();
tRackMaterialRelation
.
setMaterialId
(
param
.
getLong
(
"materialId"
));
tRackMaterialRelation
.
setRackCode
(
param
.
getString
(
"rackCode"
));
tRackMaterialRelation
.
setCreateTime
(
new
Date
());
tRackMaterialRelation
.
setCreateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getNickName
());
tRackMaterialRelation
.
setShelf
(
param
.
getString
(
"shelf"
));
int
result
=
rackMaterialRelationMapper
.
insertTRackMaterialRelation
(
tRackMaterialRelation
);
if
(
result
==
0
)
throw
new
CustomException
(
"入库料盘物料信息关联失败"
);
}
}
}
/**
/**
...
...
smart-rack-base-system/src/main/resources/mapper/material/TRackMaterialRelationMapper.xml
View file @
1d8a7925
...
@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"shelf"
column=
"f_shelf"
/>
<result
property=
"shelf"
column=
"f_shelf"
/>
<result
property=
"layer"
column=
"layer"
/>
<result
property=
"layer"
column=
"layer"
/>
<result
property=
"location"
column=
"location"
/>
<result
property=
"location"
column=
"f_location"
/>
<result
property=
"locationDesc"
column=
"locationDesc"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTRackMaterialRelationVo"
>
<sql
id=
"selectTRackMaterialRelationVo"
>
...
@@ -32,24 +33,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -32,24 +33,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
relation.update_by,
relation.update_by,
relation.update_time,
relation.update_time,
relation.f_shelf,
relation.f_shelf,
CASE
location.f_location,
WHEN location.f_location BETWEEN 1 AND 80 THEN '一层正面'
CONCAT(
WHEN location.f_location BETWEEN 161 AND 240 THEN '一层反面'
CASE
WHEN location.f_location BETWEEN 81 AND 160 THEN '二层正面'
WHEN location.f_location BETWEEN 1 AND 80 THEN '一层正面'
WHEN location.f_location BETWEEN 241 AND 320 THEN '二层反面'
WHEN location.f_location BETWEEN 161 AND 240 THEN '一层反面'
WHEN location.f_location BETWEEN 321 AND 400 THEN '三层正面'
WHEN location.f_location BETWEEN 81 AND 160 THEN '二层正面'
WHEN location.f_location BETWEEN 401 AND 480 THEN '三层反面'
WHEN location.f_location BETWEEN 241 AND 320 THEN '二层反面'
WHEN location.f_location BETWEEN 481 AND 528 THEN '四层正面'
WHEN location.f_location BETWEEN 321 AND 400 THEN '三层正面'
WHEN location.f_location BETWEEN 529 AND 576 THEN '五层正面'
WHEN location.f_location BETWEEN 401 AND 480 THEN '三层反面'
ELSE '未知层'
WHEN location.f_location BETWEEN 481 AND 528 THEN '四层正面'
END AS layer,
WHEN location.f_location BETWEEN 529 AND 576 THEN '五层正面'
location.f_label as location
ELSE '未知层'
END,
'-',
IFNULL(location.f_label, '')
) AS locationDesc
FROM
FROM
t_rack_material_relation relation
t_rack_material_relation relation
LEFT JOIN t_rack_material_info info ON info.material_id = relation.material_id
LEFT JOIN t_rack_material_info info ON info.material_id = relation.material_id
LEFT JOIN t_shelf_storage_location location ON location.f_rid = relation.rack_code
LEFT JOIN t_shelf_storage_location location ON location.f_rid = relation.rack_code
</sql>
</sql>
<select
id=
"selectByRockCode"
parameterType=
"string"
resultMap=
"TRackMaterialRelationResult"
>
<include
refid=
"selectTRackMaterialRelationVo"
/>
where relation.rack_code = #{rackCode}
</select>
<select
id=
"selectTRackMaterialRelationList"
parameterType=
"TRackMaterialRelation"
resultMap=
"TRackMaterialRelationResult"
>
<select
id=
"selectTRackMaterialRelationList"
parameterType=
"TRackMaterialRelation"
resultMap=
"TRackMaterialRelationResult"
>
<include
refid=
"selectTRackMaterialRelationVo"
/>
<include
refid=
"selectTRackMaterialRelationVo"
/>
<where>
<where>
...
...
smart-rack-base-web/src/views/materialmanage/info/index.vue
View file @
1d8a7925
...
@@ -180,7 +180,7 @@ export default {
...
@@ -180,7 +180,7 @@ export default {
}
}
}
;
}
;
}
,
}
,
cre
ated
()
{
activ
ated
()
{
this
.
getList
();
this
.
getList
();
}
,
}
,
methods
:
{
methods
:
{
...
...
smart-rack-base-web/src/views/materialmanage/relation/index.vue
View file @
1d8a7925
...
@@ -84,24 +84,18 @@
...
@@ -84,24 +84,18 @@
<el-table-column
label=
"名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"名称"
align=
"center"
prop=
"materialName"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"materialSpecifications"
/>
<el-table-column
label=
"料架号"
align=
"center"
prop=
"shelf"
/>
<el-table-column
label=
"料架号"
align=
"center"
prop=
"shelf"
/>
<el-table-column
label=
"层"
align=
"center"
prop=
"layer"
/>
<el-table-column
label=
"位置"
align=
"center"
prop=
"locationDesc"
/>
<el-table-column
label=
"位置"
align=
"center"
prop=
"location"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<!--
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
<el-button
v-if=
"!scope.row.locationDesc.includes('未知层')"
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-remove"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleOut(scope.row)"
>
修改
</el-button>
>
出库
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
-->
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
...
@@ -144,6 +138,7 @@
...
@@ -144,6 +138,7 @@
<
script
>
<
script
>
import
{
relationListInfo
,
listRelation
,
getRelation
,
delRelation
,
addRelation
,
updateRelation
,
exportRelation
}
from
"@/api/material/relation"
;
import
{
relationListInfo
,
listRelation
,
getRelation
,
delRelation
,
addRelation
,
updateRelation
,
exportRelation
}
from
"@/api/material/relation"
;
import
{
rackInOutput
}
from
"@/api/shelf/location"
;
export
default
{
export
default
{
name
:
"Relation"
,
name
:
"Relation"
,
...
@@ -196,17 +191,100 @@ export default {
...
@@ -196,17 +191,100 @@ export default {
materialSpecifications
:
[
materialSpecifications
:
[
{
required
:
true
,
message
:
"规格型号不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"规格型号不能为空"
,
trigger
:
"blur"
}
],
],
}
},
ws
:
null
,
heartbeatInterval
:
null
,
};
};
},
},
created
()
{
created
()
{
this
.
connect
();
},
activated
()
{
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
// 出库操作需要选择位置可多选不需要扫码
handleOut
(
row
){
if
(
row
.
locationDesc
.
includes
(
'未知层'
)){
this
.
$message
.
error
(
"未知层不能出库!!!"
);
return
;
}
const
param
=
{
ID
:
this
.
generateUUID
(),
OPTYPE
:
"O"
,
SHELF
:
row
.
shelf
,
COLOR
:
"1"
,
USERNAME
:
"admin"
,
TOTALINFO
:
[
{
RID
:
row
.
rackCode
,
LOCATION
:
row
.
location
}
],
}
this
.
$confirm
(
"是否确认出库?"
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
return
rackInOutput
(
JSON
.
stringify
(
param
));
}).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
msgSuccess
(
"请取物料"
);
}
}).
catch
(()
=>
{});
},
//生成uuid
generateUUID
()
{
return
([
1
e7
]
+-
1
e3
+-
4
e3
+-
8
e3
+-
1
e11
).
replace
(
/
[
018
]
/g
,
c
=>
(
c
^
crypto
.
getRandomValues
(
new
Uint8Array
(
1
))[
0
]
&
15
>>
c
/
4
).
toString
(
16
)
);
},
connect
()
{
this
.
ws
=
new
WebSocket
(
'ws://'
+
window
.
location
.
host
+
process
.
env
.
VUE_APP_BASE_API
+
'/ws/notifications'
);
this
.
ws
.
onopen
=
()
=>
{
console
.
log
(
'WebSocket Connected'
);
// 连接建立后,开始定期发送心跳
this
.
heartbeatInterval
=
setInterval
(()
=>
{
if
(
this
.
ws
.
readyState
===
WebSocket
.
OPEN
)
{
this
.
ws
.
send
(
JSON
.
stringify
({
type
:
'ping'
}));
console
.
log
(
"发送心跳"
)
}
},
30000
);
};
this
.
ws
.
onmessage
=
(
event
)
=>
{
// Add received message to the list
const
message
=
JSON
.
parse
(
event
.
data
);
if
(
message
&&
message
.
shelfId
){
//入库
if
(
"I"
==
message
.
optype
){
this
.
getList
()
}
//出库
if
(
"O"
==
message
.
optype
){
this
.
getList
();
}
}
};
this
.
ws
.
onerror
=
(
error
)
=>
{
console
.
error
(
'WebSocket Error:'
,
error
);
};
this
.
ws
.
onclose
=
()
=>
{
console
.
log
(
'WebSocket Closed'
);
clearInterval
(
this
.
heartbeatInterval
);
};
},
disconnect
()
{
if
(
this
.
ws
)
{
this
.
ws
.
close
();
}
},
/** 查询料架和物料维护列表 */
/** 查询料架和物料维护列表 */
getList
()
{
getList
()
{
console
.
log
(
"getList"
)
this
.
loading
=
true
;
this
.
loading
=
true
;
listRelation
(
this
.
queryParams
).
then
(
response
=>
{
listRelation
(
this
.
queryParams
).
then
(
response
=>
{
console
.
log
(
"getList result"
)
this
.
relationList
=
response
.
rows
;
this
.
relationList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
...
@@ -332,6 +410,9 @@ export default {
...
@@ -332,6 +410,9 @@ export default {
handleSelect
(
item
){
handleSelect
(
item
){
this
.
form
.
materialName
=
item
.
materialName
;
this
.
form
.
materialName
=
item
.
materialName
;
this
.
form
.
materialSpecifications
=
item
.
materialSpecifications
;
this
.
form
.
materialSpecifications
=
item
.
materialSpecifications
;
},
beforeDestroy
()
{
this
.
disconnect
();
}
}
}
}
};
};
...
...
smart-rack-base-web/src/views/pcbamanage/pcbashelflocation/index.vue
View file @
1d8a7925
...
@@ -66,6 +66,73 @@
...
@@ -66,6 +66,73 @@
</div>
</div>
</div>
</div>
<el-dialog
custom-class=
"bold-title-dialog"
title=
"请选择物料清单"
:visible
.
sync=
"selectMaterialInfoForPurReqOpen"
width=
"688px"
append-to-body
:close-on-click-modal=
"false"
:before-close=
"materialForPurReqFormBeforeClose"
>
<el-form
ref=
"materialForPurReqForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-input
v-model=
"queryMaterialInfoListParams.materialCode"
placeholder=
"请输入物料代码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"listMaterialInfoListMethod"
/>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-input
v-model=
"queryMaterialInfoListParams.materialName"
placeholder=
"请输入产品名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"listMaterialInfoListMethod"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"listMaterialInfoListMethod"
>
搜索
</el-button
>
</el-form-item>
</el-form>
<el-table
border
style=
"width: 100%"
ref=
"prodInfoFormTableRef"
height=
"550"
:data=
"materialInfoList"
@
row-click=
"materialInfoHandleCellClick"
:key=
"Math.random()"
>
<el-table-column
width=
"200"
prop=
"materialCode"
label=
"物料代码"
>
</el-table-column>
<el-table-column
width=
"200"
prop=
"materialName"
label=
"物料名称"
>
</el-table-column>
<el-table-column
width=
"200"
prop=
"materialSpecifications"
label=
"规格型号"
>
</el-table-column>
</el-table>
<pagination
v-show=
"materialForPurReqRefTotal > 0"
:total=
"materialForPurReqRefTotal"
:page
.
sync=
"queryMaterialInfoListParams.pageNum"
:limit
.
sync=
"queryMaterialInfoListParams.pageSize"
@
pagination=
"listMaterialInfoListMethod"
/>
</el-dialog>
<!-- 出库 -->
<!-- 出库 -->
<el-dialog
title=
"入库"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-dialog
title=
"入库"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
...
@@ -73,19 +140,12 @@
...
@@ -73,19 +140,12 @@
<el-input
v-model=
"form.rackCode"
placeholder=
"请输入物料代码"
:readOnly=
"true"
/>
<el-input
v-model=
"form.rackCode"
placeholder=
"请输入物料代码"
:readOnly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-
selec
t
<el-
inpu
t
v-model=
"form.materialCode"
v-model=
"form.materialCode"
placeholder=
"请选择物料代码"
placeholder=
"请点击选择物料"
:style=
"
{ width: '100%' }"
readonly
@change="materialCodeChange"
@
click
.
native=
"openMaterialSelectDialog"
>
/>
<el-option
v-for=
"(item, index) in materialInfoList"
:key=
"index"
:label=
"item.materialCode"
:value=
"item.materialId"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入名称"
:readOnly=
"true"
/>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入名称"
:readOnly=
"true"
/>
...
@@ -105,7 +165,7 @@
...
@@ -105,7 +165,7 @@
<
script
>
<
script
>
import
{
locationListInfo
,
rackInOutput
}
from
"@/api/shelf/location"
;
import
{
locationListInfo
,
rackInOutput
}
from
"@/api/shelf/location"
;
import
{
materialInfoList
}
from
"@/api/material/info"
;
import
{
materialInfoList
,
listInfo
}
from
"@/api/material/info"
;
export
default
{
export
default
{
name
:
"shelf-location"
,
name
:
"shelf-location"
,
data
(){
data
(){
...
@@ -154,6 +214,13 @@
...
@@ -154,6 +214,13 @@
],
],
},
},
materialInfoList
:
[],
materialInfoList
:
[],
selectMaterialInfoForPurReqOpen
:
false
,
materialForPurReqRefTotal
:
0
,
queryMaterialInfoListParams
:
{
status
:
1
,
pageNum
:
1
,
pageSize
:
10
,
},
// 料盘号
// 料盘号
fShelf
:
null
fShelf
:
null
}
}
...
@@ -168,6 +235,31 @@
...
@@ -168,6 +235,31 @@
this
.
connect
();
this
.
connect
();
},
},
methods
:{
methods
:{
openMaterialSelectDialog
()
{
this
.
selectMaterialInfoForPurReqOpen
=
true
;
this
.
listMaterialInfoListMethod
();
// 立即加载第一页数据
},
materialInfoHandleCellClick
(
row
)
{
this
.
form
.
materialId
=
row
.
materialInfoId
||
row
.
materialId
;
this
.
form
.
materialCode
=
row
.
materialCode
;
this
.
form
.
materialName
=
row
.
materialName
;
this
.
form
.
materialSpecifications
=
row
.
specification
||
row
.
materialSpecifications
;
this
.
selectMaterialInfoForPurReqOpen
=
false
;
},
materialForPurReqFormBeforeClose
()
{
this
.
queryMaterialInfoListParams
=
{
status
:
1
,
pageNum
:
1
,
pageSize
:
10
,
};
this
.
selectMaterialInfoForPurReqOpen
=
false
;
},
listMaterialInfoListMethod
()
{
listInfo
(
this
.
queryMaterialInfoListParams
).
then
((
response
)
=>
{
this
.
materialInfoList
=
response
.
rows
;
this
.
materialForPurReqRefTotal
=
response
.
total
;
});
}
,
getList
(){
getList
(){
locationListInfo
(
this
.
queryParams
).
then
(
res
=>
{
locationListInfo
(
this
.
queryParams
).
then
(
res
=>
{
this
.
shelfInfo
=
res
.
data
;
this
.
shelfInfo
=
res
.
data
;
...
@@ -269,6 +361,7 @@
...
@@ -269,6 +361,7 @@
},
},
// 入库操作需要扫码不需要选位置
// 入库操作需要扫码不需要选位置
handleIn
(){
handleIn
(){
this
.
reset
();
if
(
!
this
.
barCode
){
if
(
!
this
.
barCode
){
this
.
$message
.
error
(
"请扫描或输入料盘条形码"
);
this
.
$message
.
error
(
"请扫描或输入料盘条形码"
);
return
return
...
@@ -299,7 +392,7 @@
...
@@ -299,7 +392,7 @@
})
})
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
msgSuccess
(
"
出库成功
"
);
this
.
msgSuccess
(
"
请取物料
"
);
}
}
});
});
this
.
clearSelection
();
this
.
clearSelection
();
...
@@ -371,7 +464,7 @@
...
@@ -371,7 +464,7 @@
{
{
ID
:
this
.
generateUUID
(),
ID
:
this
.
generateUUID
(),
OPTYPE
:
"I"
,
OPTYPE
:
"I"
,
SHELF
:
this
.
$route
.
query
.
s
helf
,
SHELF
:
this
.
fS
helf
,
COLOR
:
"1"
,
COLOR
:
"1"
,
USERNAME
:
"admin"
,
USERNAME
:
"admin"
,
TOTALINFO
:
[{
RID
:
this
.
barCode
}]
TOTALINFO
:
[{
RID
:
this
.
barCode
}]
...
@@ -382,8 +475,12 @@
...
@@ -382,8 +475,12 @@
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
open
=
false
;
this
.
open
=
false
;
this
.
msgSuccess
(
"入库成功"
);
this
.
barCode
=
null
;
this
.
msgSuccess
(
"请放物料"
);
this
.
clearSelection
();
this
.
clearSelection
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
barCode
.
focus
();
})
}
}
})
})
},
},
...
...
smart-rack-base-web/src/views/producemange/produceshelflocation/index.vue
View file @
1d8a7925
...
@@ -67,6 +67,72 @@
...
@@ -67,6 +67,72 @@
</div>
</div>
</div>
</div>
<el-dialog
custom-class=
"bold-title-dialog"
title=
"请选择物料清单"
:visible
.
sync=
"selectMaterialInfoForPurReqOpen"
width=
"688px"
append-to-body
:close-on-click-modal=
"false"
:before-close=
"materialForPurReqFormBeforeClose"
>
<el-form
ref=
"materialForPurReqForm"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-input
v-model=
"queryMaterialInfoListParams.materialCode"
placeholder=
"请输入物料代码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"listMaterialInfoListMethod"
/>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-input
v-model=
"queryMaterialInfoListParams.materialName"
placeholder=
"请输入产品名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"listMaterialInfoListMethod"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"listMaterialInfoListMethod"
>
搜索
</el-button
>
</el-form-item>
</el-form>
<el-table
border
style=
"width: 100%"
ref=
"prodInfoFormTableRef"
height=
"550"
:data=
"materialInfoList"
@
row-click=
"materialInfoHandleCellClick"
:key=
"Math.random()"
>
<el-table-column
width=
"200"
prop=
"materialCode"
label=
"物料代码"
>
</el-table-column>
<el-table-column
width=
"200"
prop=
"materialName"
label=
"物料名称"
>
</el-table-column>
<el-table-column
width=
"200"
prop=
"materialSpecifications"
label=
"规格型号"
>
</el-table-column>
</el-table>
<pagination
v-show=
"materialForPurReqRefTotal > 0"
:total=
"materialForPurReqRefTotal"
:page
.
sync=
"queryMaterialInfoListParams.pageNum"
:limit
.
sync=
"queryMaterialInfoListParams.pageSize"
@
pagination=
"listMaterialInfoListMethod"
/>
</el-dialog>
<!-- 出库 -->
<!-- 出库 -->
<el-dialog
title=
"入库"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-dialog
title=
"入库"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
...
@@ -74,19 +140,12 @@
...
@@ -74,19 +140,12 @@
<el-input
v-model=
"form.rackCode"
placeholder=
"请输入物料代码"
:readOnly=
"true"
/>
<el-input
v-model=
"form.rackCode"
placeholder=
"请输入物料代码"
:readOnly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-form-item
label=
"物料代码"
prop=
"materialCode"
>
<el-
selec
t
<el-
inpu
t
v-model=
"form.materialCode"
v-model=
"form.materialCode"
placeholder=
"请选择物料代码"
placeholder=
"请点击选择物料"
:style=
"
{ width: '100%' }"
readonly
@change="materialCodeChange"
@
click
.
native=
"openMaterialSelectDialog"
>
/>
<el-option
v-for=
"(item, index) in materialInfoList"
:key=
"index"
:label=
"item.materialCode"
:value=
"item.materialId"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入名称"
:readOnly=
"true"
/>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入名称"
:readOnly=
"true"
/>
...
@@ -106,7 +165,7 @@
...
@@ -106,7 +165,7 @@
<
script
>
<
script
>
import
{
locationListInfo
,
rackInOutput
}
from
"@/api/shelf/location"
;
import
{
locationListInfo
,
rackInOutput
}
from
"@/api/shelf/location"
;
import
{
materialInfoList
}
from
"@/api/material/info"
;
import
{
materialInfoList
,
listInfo
}
from
"@/api/material/info"
;
export
default
{
export
default
{
name
:
"shelf-location"
,
name
:
"shelf-location"
,
data
(){
data
(){
...
@@ -155,6 +214,13 @@
...
@@ -155,6 +214,13 @@
],
],
},
},
materialInfoList
:
[],
materialInfoList
:
[],
selectMaterialInfoForPurReqOpen
:
false
,
materialForPurReqRefTotal
:
0
,
queryMaterialInfoListParams
:
{
status
:
1
,
pageNum
:
1
,
pageSize
:
10
,
},
// 料盘号
// 料盘号
fShelf
:
null
fShelf
:
null
}
}
...
@@ -169,6 +235,31 @@
...
@@ -169,6 +235,31 @@
this
.
connect
();
this
.
connect
();
},
},
methods
:{
methods
:{
openMaterialSelectDialog
()
{
this
.
selectMaterialInfoForPurReqOpen
=
true
;
this
.
listMaterialInfoListMethod
();
// 立即加载第一页数据
},
materialInfoHandleCellClick
(
row
)
{
this
.
form
.
materialId
=
row
.
materialInfoId
||
row
.
materialId
;
this
.
form
.
materialCode
=
row
.
materialCode
;
this
.
form
.
materialName
=
row
.
materialName
;
this
.
form
.
materialSpecifications
=
row
.
specification
||
row
.
materialSpecifications
;
this
.
selectMaterialInfoForPurReqOpen
=
false
;
},
materialForPurReqFormBeforeClose
()
{
this
.
queryMaterialInfoListParams
=
{
status
:
1
,
pageNum
:
1
,
pageSize
:
10
,
};
this
.
selectMaterialInfoForPurReqOpen
=
false
;
},
listMaterialInfoListMethod
()
{
listInfo
(
this
.
queryMaterialInfoListParams
).
then
((
response
)
=>
{
this
.
materialInfoList
=
response
.
rows
;
this
.
materialForPurReqRefTotal
=
response
.
total
;
});
}
,
getList
(){
getList
(){
locationListInfo
(
this
.
queryParams
).
then
(
res
=>
{
locationListInfo
(
this
.
queryParams
).
then
(
res
=>
{
this
.
shelfInfo
=
res
.
data
;
this
.
shelfInfo
=
res
.
data
;
...
@@ -299,7 +390,7 @@
...
@@ -299,7 +390,7 @@
})
})
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
msgSuccess
(
"
出库成功
"
);
this
.
msgSuccess
(
"
请取物料
"
);
}
}
});
});
this
.
clearSelection
();
this
.
clearSelection
();
...
@@ -371,7 +462,7 @@
...
@@ -371,7 +462,7 @@
{
{
ID
:
this
.
generateUUID
(),
ID
:
this
.
generateUUID
(),
OPTYPE
:
"I"
,
OPTYPE
:
"I"
,
SHELF
:
this
.
$route
.
query
.
s
helf
,
SHELF
:
this
.
fS
helf
,
COLOR
:
"1"
,
COLOR
:
"1"
,
USERNAME
:
"admin"
,
USERNAME
:
"admin"
,
TOTALINFO
:
[{
RID
:
this
.
barCode
}]
TOTALINFO
:
[{
RID
:
this
.
barCode
}]
...
@@ -382,7 +473,7 @@
...
@@ -382,7 +473,7 @@
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
rackInOutput
(
JSON
.
stringify
(
param
)).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
open
=
false
;
this
.
open
=
false
;
this
.
msgSuccess
(
"
入库成功
"
);
this
.
msgSuccess
(
"
请放物料
"
);
this
.
clearSelection
();
this
.
clearSelection
();
}
}
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment