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
dd3ec76a
authored
Apr 28, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
库存查询
parent
2f87ba70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
171 additions
and
81 deletions
assets/css/immediatelyStockIn/index.scss
assets/css/putaway/packSingle.scss
manifest.json
pages/immediatelyStockIn/index.vue
pages/immediatelyStockIn/list.vue
pages/putaway/pack.vue
pages/putaway/packSingle.vue
uni.scss
util/api.js
assets/css/immediatelyStockIn/index.scss
View file @
dd3ec76a
...
...
@@ -5,6 +5,7 @@
background
:
#ffffff
;
border-radius
:
10rpx
;
margin-bottom
:
15rpx
;
border
:
1px
solid
transparent
;
.text
{
padding-left
:
17rpx
;
width
:
164rpx
;
...
...
@@ -74,8 +75,7 @@
}
.list
{
.box
{
padding
:
15px
17rpx
;
height
:
283rpx
;
padding
:
15rpx
17rpx
10rpx
17rpx
;
background
:
#ffffff
;
box-shadow
:
0px
3rpx
3rpx
0px
rgba
(
198
,
199
,
204
,
0
.3
);
border-radius
:
10rpx
;
...
...
assets/css/putaway/packSingle.scss
View file @
dd3ec76a
...
...
@@ -7,6 +7,7 @@
padding-right
:
17rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
transparent
;
.icon-juxing1
{
font-size
:
30rpx
;
color
:
#919399
;
...
...
manifest.json
View file @
dd3ec76a
...
...
@@ -87,7 +87,7 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx
61a41a064fa2fb3c
"
,
"appid"
:
"wx
060bcd34e30d0db2
"
,
"setting"
:
{
"urlCheck"
:
false
,
"postcss"
:
true
,
...
...
pages/immediatelyStockIn/index.vue
View file @
dd3ec76a
...
...
@@ -17,7 +17,7 @@
<view
class=
"form-input row verCenter"
>
<text
class=
"text row verCenter"
>
仓 库
</text>
<view
class=
"row bothSide verCenter select-wrap"
>
<picker
@
change=
"bindPickerChange(
1, $event)"
:value=
"warehouse_id_index"
:range=
"warehouse_id_data"
:range-key=
"'name'
"
style=
"width: 100%;"
>
<picker
@
change=
"bindPickerChange(
$event)"
:value=
"warehouse_id_index"
:range=
"warehouse_id_data"
range-key=
"name
"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input"
>
{{
warehouse_id_data
[
warehouse_id_index
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
...
...
@@ -25,18 +25,14 @@
</picker>
</view>
</view>
<view
class=
"form-input row verCenter"
>
<view
class=
"form-input row verCenter"
:class=
"
{ 'error-style': !is_submit }"
>
<text
class=
"text row verCenter"
>
库 位
</text>
<view
class=
"row bothSide verCenter select-wrap"
>
<picker
@
change=
"bindPickerChange(2, $event)"
:value=
"position_id_index"
:range=
"position_id_data"
:range-key=
"'name'"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input"
>
{{
position_id_data
[
position_id_index
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
<view
class=
"row bothSide verCenter input-wrap"
>
<input
type=
"text"
placeholder=
"请输入库位"
placeholder-style=
"color:#919399"
class=
"uni-input"
v-model=
"formParams.position_code"
@
input=
"handleInput(3, $event)"
/>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput(3)"
v-if=
"input_position"
></text>
</view>
</view>
<view
class=
"fix-btn row rowCenter verCenter"
@
click=
"search()"
>
查询
</view>
<view
class=
"fix-btn row rowCenter verCenter"
@
click=
"search()"
:class=
"
{ 'btn-disabled': !is_submit }"
>查询
</view>
</view>
</
template
>
...
...
@@ -47,32 +43,29 @@ import debounce from 'lodash/debounce';
export
default
{
data
()
{
return
{
is_submit
:
true
,
index
:
0
,
array
:
[
'深圳现货仓'
,
'深圳自营仓'
],
input_goods_sn
:
false
,
input_goods_name
:
false
,
input_position
:
false
,
warehouse_id_index
:
0
,
position_id_index
:
0
,
warehouse_id_data
:
[{
name
:
'深圳现货仓'
,
value
:
1
},
{
name
:
'深圳自营仓'
,
value
:
2
}],
position_id_data
:
[{
name
:
'库位1'
,
value
:
1
},
{
name
:
'库位2'
,
value
:
2
}],
warehouse_id_data
:
[],
formParams
:
{
goods_sn
:
''
,
goods_name
:
''
,
warehouse_id
:
''
,
position_
id
:
''
position_
code
:
''
}
};
},
onLoad
()
{},
onShow
()
{
this
.
getData
();
},
methods
:
{
bindPickerChange
:
function
(
type
,
e
)
{
if
(
type
==
1
)
{
this
.
warehouse_id_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_id_data
[
e
.
detail
.
value
].
value
;
}
else
if
(
type
==
2
)
{
this
.
position_id_index
=
e
.
detail
.
value
;
this
.
formParams
.
position_id
=
this
.
position_id_data
[
e
.
detail
.
value
].
value
;
}
bindPickerChange
:
function
(
e
)
{
this
.
warehouse_id_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_id_data
[
e
.
detail
.
value
].
value
;
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
},
/**
...
...
@@ -85,6 +78,9 @@ export default {
}
else
if
(
type
==
2
)
{
this
.
formParams
.
goods_name
=
''
;
this
.
input_goods_name
=
false
;
}
else
if
(
type
==
3
)
{
this
.
formParams
.
position_code
=
''
;
this
.
input_position
=
false
;
}
},
/**
...
...
@@ -97,12 +93,17 @@ export default {
this
.
input_goods_sn
=
true
;
}
else
if
(
type
==
2
)
{
this
.
input_goods_name
=
true
;
}
else
if
(
type
==
3
)
{
this
.
input_position
=
true
;
this
.
getWhPositionList
(
this
.
formParams
.
warehouse_id
,
0
);
}
}
else
{
if
(
type
==
1
)
{
this
.
input_goods_sn
=
false
;
}
else
if
(
type
==
2
)
{
this
.
input_goods_name
=
false
;
}
else
if
(
type
==
3
)
{
this
.
input_position
=
false
;
}
}
},
500
),
...
...
@@ -110,9 +111,34 @@ export default {
* 获取库存数据
*/
getData
()
{
this
.
request
(
API
.
stockInMobileRegisterList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
is_register
:
0
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
this
.
request
(
API
.
getWareHouselist
,
'POST'
,
{
warehouse_status
:
1
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
this
.
formParams
.
warehouse_id
=
res
.
data
.
list
[
0
].
warehouse_id
;
this
.
warehouse_id_data
=
res
.
data
.
list
.
map
(
function
(
item
)
{
return
{
name
:
item
.
warehouse_name
,
value
:
item
.
warehouse_id
};
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
/**
* 获取库位
*/
getWhPositionList
(
warehouse_id
,
stock_in_type
)
{
this
.
request
(
API
.
getWhPositionList
,
'POST'
,
{
warehouse_id
:
warehouse_id
,
stock_in_type
:
stock_in_type
},
false
).
then
(
res
=>
{
var
position_code
=
this
.
formParams
.
position_code
;
if
(
res
.
code
===
0
)
{
this
.
is_submit
=
res
.
data
.
list
.
some
(
function
(
obj
)
{
return
obj
.
position_code
===
position_code
;
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
...
...
@@ -122,6 +148,13 @@ export default {
});
},
search
()
{
if
(
!
this
.
is_submit
)
{
uni
.
showToast
({
title
:
'请选择合适库位'
,
icon
:
'error'
});
return
false
;
}
uni
.
navigateTo
({
url
:
'/pages/immediatelyStockIn/list?goods_sn='
+
this
.
formParams
.
goods_sn
+
'&goods_name='
+
this
.
formParams
.
goods_name
+
'&warehouse_id='
+
this
.
formParams
.
warehouse_id
+
'&position_id='
+
this
.
formParams
.
position_id
});
...
...
pages/immediatelyStockIn/list.vue
View file @
dd3ec76a
<
template
>
<view
class=
"immediatelyStockIn"
>
<view
class=
"top row bothSide verCenter"
>
<view
class=
"top row bothSide verCenter"
v-if=
"countList"
>
<view
class=
"column rowCenter verCenter box"
>
<text
class=
"t1"
>
60990
</text>
<text
class=
"t1"
>
{{
countList
.
useable_qtys
||
0
}}
</text>
<text
class=
"t2"
>
可用库存数量
</text>
</view>
<view
class=
"column rowCenter verCenter box"
>
<text
class=
"t1"
>
103290
</text>
<text
class=
"t1"
>
{{
countList
.
total_qtys
||
0
}}
</text>
<text
class=
"t2"
>
库存总数量
</text>
</view>
</view>
...
...
@@ -15,65 +15,65 @@
<view
class=
"row wrap"
>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
库 位:
</text>
<text
class=
"text"
>
A65512
</text>
<text
class=
"text"
>
{{
item
.
position_name
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
容器:
</text>
<text
class=
"text"
>
RQ0001
</text>
<text
class=
"text"
>
{{
item
.
container_sn
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
入库批次号:
</text>
<text
class=
"text"
>
L-ASN2201010001
</text>
<text
class=
"text"
>
{{
item
.
stock_in_batch_sn
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
库 存 I D:
</text>
<text
class=
"text"
>
A65512
</text>
<text
class=
"text"
>
{{
item
.
id
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
入 仓 号:
</text>
<text
class=
"text"
>
C12345
</text>
<text
class=
"text"
>
--
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
识 别 码:
</text>
<text
class=
"text"
>
2121
</text>
<text
class=
"text"
style=
"max-width: 205rpx;"
>
{{
item
.
identify_sn
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
货品编码:
</text>
<text
class=
"text"
>
C12345
</text>
<text
class=
"text"
>
{{
item
.
goods_sn
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
货品名称:
</text>
<text
class=
"text"
>
2121
</text>
<text
class=
"text"
>
{{
item
.
goods_name
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
标准品牌:
</text>
<text
class=
"text"
>
C12345
</text>
<text
class=
"text"
>
{{
item
.
brand_name
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
D / C:
</text>
<text
class=
"text"
>
2121
</text>
<text
class=
"text"
>
{{
item
.
date_code
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
产 地:
</text>
<text
class=
"text"
>
美国
</text>
<text
class=
"text"
>
{{
item
.
coo
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
货品品质:
</text>
<text
class=
"text"
>
良品
</text>
<text
class=
"text"
>
{{
item
.
quality_format
}}
</text>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
其他批次属性:
</text>
<text
class=
"text"
>
-
</text>
<text
class=
"text"
>
{{
item
.
other_batch_attr
}}
</text>
</view>
</view>
<view
class=
"bottom row"
>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
库存总数量:
</text>
<text
class=
"tt"
>
10000
</text>
<text
class=
"tt"
>
{{
item
.
total_qty
}}
</text>
</view>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
可用库存数量:
</text>
<text
class=
"tt"
>
1000
</text>
<text
class=
"tt"
>
{{
item
.
useable_qty
}}
</text>
</view>
</view>
</view>
...
...
@@ -92,11 +92,12 @@ export default {
data
()
{
return
{
list
:
[],
countList
:
''
,
formParams
:
{
goods_sn
:
''
,
goods_name
:
''
,
warehouse_id
:
''
,
position_
id
:
''
position_
code
:
''
}
};
},
...
...
@@ -104,7 +105,7 @@ export default {
this
.
formParams
.
goods_sn
=
options
.
goods_sn
||
''
;
this
.
formParams
.
goods_name
=
options
.
goods_name
||
''
;
this
.
formParams
.
warehouse_id
=
options
.
warehouse_id
||
''
;
this
.
formParams
.
position_
id
=
options
.
position_id
||
''
;
this
.
formParams
.
position_
code
=
options
.
position_code
||
''
;
},
onShow
()
{
this
.
getData
();
...
...
@@ -114,9 +115,10 @@ export default {
* 获取列表数据
*/
getData
()
{
this
.
request
(
API
.
getToPrintList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
fals
e
).
then
(
res
=>
{
this
.
request
(
API
.
searchStockList
,
'POST'
,
this
.
formParams
,
tru
e
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
this
.
countList
=
res
.
data
.
countList
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
...
...
pages/putaway/pack.vue
View file @
dd3ec76a
...
...
@@ -12,65 +12,56 @@
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<input
class=
"uni-input"
placeholder=
"请扫描或输入容器码"
placeholder-style=
"color:#919399"
/>
<input
class=
"uni-input"
placeholder=
"请扫描或输入容器码"
placeholder-style=
"color:#919399"
v-model=
"searchParams.container_sn"
@
input=
"handleInput"
/>
</view>
<text
class=
"iconfont icon-a-juxing11"
></text>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
</view>
</view>
<view
class=
"list row bothSide"
>
<view
class=
"box curr"
>
<view
class=
"check-box-icon"
></view>
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
容器:
</text>
<text
class=
"t1"
>
A00001
</text>
<text
class=
"t1"
>
{{
item
.
container_sn
}}
</text>
</view>
<view
class=
"bor row"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
任 务 数:
</text>
<text
class=
"tt"
>
8
</text>
<text
class=
"tt"
>
{{
item
.
total_tally_ids
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
理货数量:
</text>
<text
class=
"tt"
>
500
</text>
<text
class=
"tt"
>
{{
item
.
total_tally_qty
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
待上架数量:
</text>
<text
class=
"tt"
>
500
</text>
<text
class=
"tt"
>
{{
item
.
total_pending_shelf_qty
}}
</text>
</view>
<navigator
class=
"btn-box row"
url=
"/pages/putaway/packSingle"
hover-class=
"none"
><view
class=
"btn row rowCenter verCenter"
>
选择
</view></navigator>
</view>
<view
class=
"box"
v-for=
"(item, index) in 10"
>
<view
class=
"check-box-icon"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
容器:
</text>
<text
class=
"t1"
>
A00001
</text>
</view>
<view
class=
"bor row"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
任 务 数:
</text>
<text
class=
"tt"
>
8
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
理货数量:
</text>
<text
class=
"tt"
>
500
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
待上架数量:
</text>
<text
class=
"tt"
>
500
</text>
</view>
<navigator
class=
"btn-box row"
url=
"/pages/putaway/packSingle"
hover-class=
"none"
><view
class=
"btn row rowCenter verCenter"
>
选择
</view></navigator>
<navigator
class=
"btn-box row"
:url=
"'/pages/putaway/packSingle?container_id=' + item.container_id + '&container_sn=' + item.container_sn"
hover-class=
"none"
><view
class=
"btn row rowCenter verCenter"
>
选择
</view></navigator>
</view>
</view>
<!-- 无数据展示 -->
<view
class=
"no-date column rowCenter verCenter"
v-else
>
<text
class=
"iconfont icon-a-juxing21"
></text>
<text
class=
"text"
>
查不到当前数据
</text>
</view>
</view>
</
template
>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
debounce
from
'lodash/debounce'
;
export
default
{
data
()
{
return
{
input_flag
:
false
,
page
:
1
,
limit
:
1000
,
index
:
0
,
array
:
[
'容器'
]
array
:
[
'容器'
],
list
:
[],
searchParams
:
{
container_sn
:
''
}
};
},
onNavigationBarButtonTap
(
e
)
{
...
...
@@ -81,10 +72,49 @@ export default {
});
}
},
onShow
()
{
this
.
getData
();
},
methods
:
{
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
},
/**
* 清空数据
*/
clearInput
()
{
this
.
input_flag
=
false
;
this
.
searchParams
.
container_sn
=
''
;
this
.
getData
();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput
:
debounce
(
function
(
event
)
{
var
val
=
event
.
target
.
value
;
if
(
val
)
{
this
.
input_flag
=
true
;
}
else
{
this
.
input_flag
=
false
;
}
this
.
getData
();
},
500
),
/**
* 获取列表数据
*/
getData
()
{
this
.
request
(
API
.
onShelfByContainerCountList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
}
}
};
...
...
pages/putaway/packSingle.vue
View file @
dd3ec76a
This diff is collapsed.
Click to expand it.
uni.scss
View file @
dd3ec76a
...
...
@@ -127,3 +127,11 @@ image {
color
:
#484b59
;
}
}
.error-style
{
border
:
1px
solid
#f00000
!
important
;
}
.btn-disabled
{
opacity
:
0
.5
;
}
util/api.js
View file @
dd3ec76a
...
...
@@ -202,7 +202,23 @@ const API = {
/**
* 提交上架
* */
submitOnShelf
:
API_BASE
+
'/api/h5/stockIn/submitOnShelf'
submitOnShelf
:
API_BASE
+
'/api/h5/stockIn/submitOnShelf'
,
/**
* 按容器上架列表
* */
onShelfByContainerCountList
:
API_BASE
+
'/api/h5/stockIn/onShelfByContainerCountList'
,
/**
* 按容器上架操作页面
* */
onShelfByContainerListAction
:
API_BASE
+
'/api/h5/stockIn/onShelfByContainerListAction'
,
/**
* 获取仓库
* */
getWareHouselist
:
API_BASE
+
'/api/warehouse/getWareHouselist'
,
/**
* 库存查询
* */
searchStockList
:
API_BASE
+
'/api/h5/stockIn/searchStockList'
}
...
...
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