Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a3fbc118
authored
May 10, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
货品上
parent
82f62083
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
323 additions
and
47 deletions
assets/css/stockRecheck/sort.scss
pages/putaway/packSingle.vue
pages/putaway/single.vue
pages/stockRecheck/sort.vue
util/api.js
assets/css/stockRecheck/sort.scss
View file @
a3fbc118
...
...
@@ -59,11 +59,18 @@
color
:
#c6c7cc
;
}
}
.title
{
font-size
:
18rpx
;
color
:
#292b33
;
font-weight
:
bold
;
.box-info
{
margin-bottom
:
10rpx
;
.title
{
font-size
:
18rpx
;
color
:
#292b33
;
font-weight
:
bold
;
}
.info
{
color
:
#1969f9
;
font-size
:
22rpx
;
margin-right
:
16rpx
;
}
}
}
.fix-btn
{
...
...
@@ -482,4 +489,54 @@
}
}
}
&
.box-drawer
{
.box-list
{
margin-top
:
50rpx
;
.box-title
{
margin-bottom
:
18rpx
;
.t1
{
font-size
:
18rpx
;
color
:
#292b33
;
font-weight
:
bold
;
}
.uni-input-show
{
font-size
:
20rpx
;
color
:
#292b33
;
font-weight
:
bold
;
}
.uni-arrow
{
width
:
14rpx
;
height
:
9rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png')
no-repeat
center
;
background-size
:
contain
;
margin-left
:
12rpx
;
}
}
.box-row
{
margin-bottom
:
10rpx
;
.text
{
flex
:
0
0
20%
;
color
:
#484b59
;
font-size
:
22rpx
;
}
}
.box-wrap
{
padding
:
18rpx
;
background
:
#ffffff
;
box-shadow
:
0px
3rpx
3rpx
0px
rgba
(
198
,
199
,
204
,
0
.3
);
border-radius
:
10rpx
;
border
:
1px
solid
#c6c7cc
;
margin-bottom
:
15rpx
;
.uni-input
{
height
:
55rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
#1969f9
;
text-indent
:
15rpx
;
font-size
:
16rpx
;
margin-right
:
10rpx
;
}
}
}
}
}
pages/putaway/packSingle.vue
View file @
a3fbc118
...
...
@@ -331,7 +331,7 @@ export default {
}
if
(
!
this
.
is_submit
)
{
uni
.
showToast
({
title
:
'请输入合适库位
s
'
,
title
:
'请输入合适库位'
,
icon
:
'error'
});
return
false
;
...
...
pages/putaway/single.vue
View file @
a3fbc118
...
...
@@ -97,17 +97,14 @@
</view>
<view
class=
"form-input"
>
<view
class=
"input-title"
><text
class=
"input-title-t1"
>
库位:
</text></view>
<view
class=
"search row bothSide verCenter"
style=
"width: 100%;"
>
<text
class=
"iconfont icon-juxing1"
></text>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"indexPosition"
:range=
"position"
:range-key=
"'name'"
style=
"width: 100%;height: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
style=
"width: 100%;height: 55rpx;"
>
<view
class=
"uni-input row verCenter"
>
{{
indexPosition
==
-
1
?
'请选择库位'
:
position
[
indexPosition
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
<view
class=
"input-box"
><input
:class=
"
{ 'error-style': !is_submit }" type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入库位编码" v-model="formParams.position_code" @input="inputPositionCodeChange()" />
</view>
</view>
<view
class=
"bor"
></view>
<view
class=
"tip-box row verCenter"
v-if=
"workingRule"
>
<text
class=
"iconfont icon-a-juxing4"
></text>
<text
class=
"t1"
>
{{
workingRuleList
.
prefix
}}{{
workingRuleList
.
execute_type_val
}}
库位:
</text>
<text
class=
"t2"
>
{{
workingRule
}}
</text>
</view>
<view
class=
"field-item row"
>
<view
class=
"item row verCenter"
>
<text
class=
"label"
>
销 售 员:
</text>
...
...
@@ -123,11 +120,6 @@
</view>
</view>
<view
class=
"bor"
></view>
<view
class=
"tip-box row verCenter"
v-if=
"workingRule"
>
<text
class=
"iconfont icon-a-juxing4"
></text>
<text
class=
"t1"
>
{{
workingRuleList
.
prefix
}}
推荐库位:
</text>
<text
class=
"t2"
>
{{
workingRule
}}
</text>
</view>
<view
class=
"field-item row"
>
<view
class=
"item row verCenter"
>
<text
class=
"label"
>
理货时间:
</text>
...
...
@@ -139,7 +131,7 @@
</view>
</view>
</view>
<view
class=
"fix-btn row verCenter"
><view
class=
"btn1 row rowCenter verCenter"
@
click=
"stockShelfByBatchSnAction()"
>
上 架
</view></view>
<view
class=
"fix-btn row verCenter"
><view
class=
"btn1 row rowCenter verCenter"
:class=
"
{ 'btn-disabled': !is_submit }"
@click="stockShelfByBatchSnAction()">上 架
</view></view>
</view>
</
template
>
...
...
@@ -150,19 +142,18 @@ import debounce from 'lodash/debounce';
export
default
{
data
()
{
return
{
is_submit
:
true
,
input_flag
:
false
,
index
:
0
,
array
:
[
'入库批次号'
],
detail
:
{},
indexPosition
:
-
1
,
position
:
[],
//库位
workingRuleList
:
{},
//,//推荐库位
workingRule
:
''
,
//推荐库位
searchParams
:
{
stock_in_batch_sn
:
''
//入库批次
},
formParams
:
{
position_
id
:
''
,
position_
code
:
''
,
//库位编码
qty_on_shelf
:
''
,
tally_id
:
''
}
...
...
@@ -201,7 +192,7 @@ export default {
* 监听上架数量
*/
inputNumChange
:
debounce
(
function
(
event
,
pending_shelf_qty
)
{
if
(
this
.
formParams
.
position_
id
&&
this
.
formParams
.
qty_on_shelf
)
{
if
(
this
.
formParams
.
position_
code
&&
this
.
formParams
.
qty_on_shelf
)
{
this
.
getWorkingRuleList
();
}
var
pending_shelf_qty
=
Number
(
pending_shelf_qty
);
...
...
@@ -210,17 +201,18 @@ export default {
this
.
formParams
.
qty_on_shelf
=
pending_shelf_qty
;
}
},
500
),
/**
* 监听库位编码
*/
inputPositionCodeChange
:
debounce
(
function
(
event
)
{
this
.
getWhPositionList
();
if
(
this
.
formParams
.
position_code
&&
this
.
formParams
.
qty_on_shelf
)
{
this
.
getWorkingRuleList
();
}
},
500
),
bindPickerChange
:
function
(
e
,
type
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
if
(
type
==
1
)
{
this
.
indexPosition
=
e
.
detail
.
value
;
this
.
formParams
.
position_id
=
this
.
position
[
e
.
detail
.
value
].
value
;
if
(
this
.
formParams
.
position_id
&&
this
.
formParams
.
qty_on_shelf
)
{
this
.
getWorkingRuleList
();
}
}
else
{
this
.
index
=
e
.
detail
.
value
;
}
this
.
index
=
e
.
detail
.
value
;
},
/**
* 获取详情数据
...
...
@@ -229,8 +221,9 @@ export default {
this
.
request
(
API
.
getStockShelfInfoByBatchSn
,
'POST'
,
{
...
this
.
searchParams
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
detail
=
res
.
data
;
this
.
formParams
.
qty_on_shelf
=
res
.
data
.
pending_shelf_qty
;
this
.
formParams
.
tally_id
=
res
.
data
.
tally_id
;
this
.
getW
hPosition
List
();
this
.
getW
orkingRule
List
();
}
});
},
...
...
@@ -240,11 +233,9 @@ export default {
getWhPositionList
()
{
this
.
request
(
API
.
getWhPositionList
,
'POST'
,
{
warehouse_id
:
this
.
detail
.
warehouse_id
,
stock_in_type
:
this
.
detail
.
stock_in_type
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
position
=
res
.
data
.
list
.
map
(
function
(
item
)
{
return
{
value
:
item
.
id
,
name
:
item
.
position_code
};
var
position_code
=
this
.
formParams
.
position_code
;
this
.
is_submit
=
res
.
data
.
list
.
some
(
function
(
obj
)
{
return
obj
.
position_code
===
position_code
;
});
}
else
{
uni
.
showToast
({
...
...
@@ -268,7 +259,7 @@ export default {
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
this
.
workingRuleList
=
res
.
data
;
this
.
workingRule
=
res
.
data
.
list
.
map
(
item
=>
item
.
position_
nam
e
).
join
(
','
);
this
.
workingRule
=
res
.
data
.
list
.
map
(
item
=>
item
.
position_
cod
e
).
join
(
','
);
}
else
{
this
.
workingRuleList
=
''
;
this
.
workingRule
=
''
;
...
...
@@ -292,9 +283,16 @@ export default {
});
return
false
;
}
if
(
!
this
.
formParams
.
position_id
)
{
if
(
!
this
.
formParams
.
position_code
)
{
uni
.
showToast
({
title
:
'请输入库位编码'
,
icon
:
'error'
});
return
false
;
}
if
(
!
this
.
is_submit
)
{
uni
.
showToast
({
title
:
'请
选择
库位'
,
title
:
'请
输入合适
库位'
,
icon
:
'error'
});
return
false
;
...
...
pages/stockRecheck/sort.vue
View file @
a3fbc118
...
...
@@ -6,7 +6,10 @@
<view
class=
"picking-sort-wrap"
>
<view
class=
"search-type row bothSide verCenter"
>
<view
class=
"left"
>
<view
class=
"title"
>
打包箱号:
</view>
<view
class=
"box-info row bothSide"
>
<view
class=
"title row bothSide verCenter"
>
打包箱号:
</view>
<view
class=
"info"
@
click=
"showBox()"
>
箱信息
</view>
</view>
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
...
...
@@ -20,7 +23,7 @@
</view>
<view
class=
"right"
>
<template
v-if=
"curr == 0"
>
<view
class=
"
title"
>
入库批次号:
</view>
<view
class=
"
box-info row bothSide"
><view
class=
"title row bothSide verCenter"
>
入库批次号:
</view>
</view>
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
...
...
@@ -29,8 +32,8 @@
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput(2)"
v-if=
"input_flag_stock_in_batch_sn"
></text>
</view>
</
template
>
<
template
v-else-if=
"curr == 1"
s
>
<view
class=
"
title"
>
容器:
</view>
<
template
v-else-if=
"curr == 1"
>
<view
class=
"
box-info row bothSide"
><view
class=
"title row bothSide verCenter"
>
容器:
</view>
</view>
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
...
...
@@ -379,6 +382,72 @@
</view>
</view>
</uni-drawer>
<!-- 箱信息 -->
<uni-drawer
ref=
"showBoxInfo"
mode=
"right"
>
<view
class=
"uni-drawer-picking box-drawer"
>
<view
class=
"title row rowCenter verCenter"
>
<text
class=
"iconfont icon-juxing2"
@
click=
"closeBox()"
></text>
<text
class=
"text"
>
箱信息
</text>
</view>
<view
class=
"box-list"
>
<view
class=
"box-wrap"
v-for=
"(item, i) in packList"
:key=
"i"
>
<view
class=
"box-title row bothSide verCenter"
>
<text
class=
"t1"
>
打包箱号:{{ item.box_name }}
</text>
<view>
<picker
@
change=
"bindPickerBoxChange($event, i)"
:value=
"index"
:range=
"packConfigList"
:range-key=
"'name'"
>
<view
class=
"row verCenter"
>
<view
class=
"uni-input-show"
>
{{ index == -1 ? '请选择' : packConfigList[index].name }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"row avarage verCenter box-row"
>
<
template
v-if=
"company_id == 1"
>
<text>
长cm
</text>
<text>
宽cm
</text>
<text>
高cm
</text>
<text>
净重kg
</text>
<text>
毛量kg
</text>
</
template
>
<
template
v-else
>
<view
class=
"text"
>
<text
style=
"color:red"
>
*
</text>
<text>
长cm
</text>
</view>
<view
class=
"text"
>
<text
style=
"color:red"
>
*
</text>
<text>
宽cm
</text>
</view>
<view
class=
"text"
>
<text
style=
"color:red"
>
*
</text>
<text>
高cm
</text>
</view>
<view
class=
"text"
>
<text
style=
"color:red"
>
*
</text>
<text>
净重kg
</text>
</view>
<view
class=
"text"
>
<text
style=
"color:red"
>
*
</text>
<text>
毛量kg
</text>
</view>
</
template
>
</view>
<view
class=
"row avarage verCenter"
>
<input
type=
"text"
placeholder=
"长cm"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"packList[i].length"
/>
<input
type=
"text"
placeholder=
"宽cm"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"packList[i].width"
/>
<input
type=
"text"
placeholder=
"高cm"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"packList[i].hight"
/>
<input
type=
"text"
placeholder=
"净重kg"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"packList[i].net_weight"
/>
<input
type=
"text"
placeholder=
"毛量kg"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"packList[i].gross_weight"
/>
</view>
</view>
</view>
<view
class=
"btn row verCenter bothSide"
>
<view
class=
"btn0 row rowCenter verCenter"
@
click=
"closeBox()"
>
取 消
</view>
<view
class=
"btn1 row rowCenter verCenter"
style=
"width: 50%;"
@
click=
"updatePackInfo()"
>
确认
</view>
</view>
</view>
</uni-drawer>
</view>
</template>
...
...
@@ -390,6 +459,7 @@ import debounce from 'lodash/debounce';
export
default
{
data
()
{
return
{
company_id
:
uni
.
getStorageSync
(
'company_id'
)
||
''
,
stock_out_sn
:
''
,
//标题显示出库单号
lock_ids
:
[],
//出库id集合
all_flag
:
false
,
//全选标记
...
...
@@ -399,6 +469,8 @@ export default {
page
:
1
,
limit
:
1000
,
curr
:
0
,
index
:
-
1
,
array
:
[
'深圳市猎芯科技有限公司'
,
'深贸电子有限公司'
],
itemArr
:
[
'按货品复核'
,
'按容器复核'
],
list
:
[],
filter_list
:
[],
//筛选已选中的列表
...
...
@@ -406,6 +478,8 @@ export default {
detail
:
{},
//按货品拣货详情
detailContainer
:
{},
//按容器拣货详情
stock_out_item_ids
:
''
,
//复核任务ids
packList
:
[],
//箱信息
packConfigList
:
[],
//箱配置列表
searchParams
:
{
stock_out_id
:
''
,
box_name
:
'001'
,
...
...
@@ -429,8 +503,18 @@ export default {
},
onShow
()
{
this
.
getData
();
this
.
getPackList
();
this
.
getBoxConfigList
();
},
methods
:
{
bindPickerBoxChange
:
function
(
e
,
index
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
var
packConfigList
=
this
.
packConfigList
[
e
.
detail
.
value
];
this
.
$set
(
this
.
packList
[
index
],
'length'
,
packConfigList
.
length
);
this
.
$set
(
this
.
packList
[
index
],
'width'
,
packConfigList
.
width
);
this
.
$set
(
this
.
packList
[
index
],
'hight'
,
packConfigList
.
hight
);
},
/**
* 找出false对应的下标
* @param {Object} arr
...
...
@@ -475,6 +559,36 @@ export default {
return
String
(
num
+
1
).
padStart
(
3
,
'0'
);
},
/**
* 获取箱信息
*/
getPackList
()
{
this
.
request
(
API
.
getPackList
,
'POST'
,
{
stock_out_id
:
this
.
searchParams
.
stock_out_id
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
packList
=
res
.
data
.
list
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
/**
* 获取箱配置
*/
getBoxConfigList
()
{
this
.
request
(
API
.
getBoxConfigList
,
'POST'
,
{
stock_out_id
:
this
.
searchParams
.
stock_out_id
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
packConfigList
=
res
.
data
.
list
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
/**
* 刷新数字
*/
refresh
()
{
...
...
@@ -520,6 +634,10 @@ export default {
}
this
.
getData
();
},
500
),
/**
* tab切换
* @param {Object} index
*/
tab
(
index
)
{
this
.
curr
=
index
;
this
.
getData
();
...
...
@@ -605,6 +723,97 @@ export default {
}
});
},
/**
* 保存打包信息
*/
updatePackInfo
()
{
var
parmas
=
{
pack_list
:
JSON
.
stringify
(
this
.
packList
)
};
if
(
this
.
company_id
==
2
)
{
var
hasEmptyWidth
=
this
.
packList
.
some
(
function
(
item
)
{
return
item
.
width
===
''
;
});
var
hasEmptyLength
=
this
.
packList
.
some
(
function
(
item
)
{
return
item
.
length
===
''
;
});
var
hasEmptyHight
=
this
.
packList
.
some
(
function
(
item
)
{
return
item
.
hight
===
''
;
});
var
hasEmptynetWeight
=
this
.
packList
.
some
(
function
(
item
)
{
return
item
.
net_weight
===
''
;
});
var
hasEmptygrossWeight
=
this
.
packList
.
some
(
function
(
item
)
{
return
item
.
gross_weight
===
''
;
});
if
(
hasEmptyLength
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
'请输入宽'
,
showCancel
:
false
});
return
false
;
}
if
(
hasEmptyWidth
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
'请输入长'
,
showCancel
:
false
});
return
false
;
}
if
(
hasEmptyHight
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
'请输入高'
,
showCancel
:
false
});
return
false
;
}
if
(
hasEmptynetWeight
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
'请输入净重'
,
showCancel
:
false
});
return
false
;
}
if
(
hasEmptygrossWeight
)
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
'请输入毛重'
,
showCancel
:
false
});
return
false
;
}
}
this
.
request
(
API
.
updatePackInfo
,
'POST'
,
parmas
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
closeBox
();
},
2000
);
}
else
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
res
.
msg
,
showCancel
:
false
});
}
});
},
/**
* 展示箱信息
*/
showBox
()
{
this
.
$refs
.
showBoxInfo
.
open
();
},
closeBox
()
{
this
.
$refs
.
showBoxInfo
.
close
();
},
showDrawer
(
type
,
data
)
{
if
(
type
==
1
)
{
//按货品复核
...
...
util/api.js
View file @
a3fbc118
...
...
@@ -230,7 +230,19 @@ const API = {
/**
* 库存查询
* */
searchStockList
:
API_BASE
+
'/api/h5/stockIn/searchStockList'
searchStockList
:
API_BASE
+
'/api/h5/stockIn/searchStockList'
,
/**
* 箱信息
* */
getPackList
:
API_BASE
+
'/api/stockRecheck/getPackList'
,
/**
* 箱配置信息
* */
getBoxConfigList
:
API_BASE
+
'/api/stockRecheck/getBoxConfigList'
,
/**
* 保存打包信息
* */
updatePackInfo
:
API_BASE
+
'/api/stockRecheck/updatePackInfo'
}
...
...
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