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
0616f59a
authored
Feb 20, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
移动端--库存查询--查询结果页--增加货品标签补打功能
parent
46790d93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
274 additions
and
9 deletions
assets/css/immediatelyStockIn/index.scss
pages/immediatelyStockIn/list.vue
util/api.js
assets/css/immediatelyStockIn/index.scss
View file @
0616f59a
.immediatelyStockIn
{
padding
:
22rpx
;
.list-total
{
margin-bottom
:
15rpx
;
.checkbox-box
{
label
{
font-size
:
23rpx
;
color
:
#484b59
;
}
}
.num
{
font-size
:
23rpx
;
color
:
#484b59
;
text
{
font-size
:
23rpx
;
color
:
#1969f9
;
margin
:
0
5rpx
;
}
}
}
.form-input
{
height
:
60rpx
;
background
:
#ffffff
;
...
...
@@ -95,11 +113,30 @@
}
.list
{
.box
{
position
:
relative
;
padding
:
15rpx
17rpx
10rpx
17rpx
;
background
:
#ffffff
;
box-shadow
:
0px
3rpx
3rpx
0px
rgba
(
198
,
199
,
204
,
0
.3
);
border-radius
:
10rpx
;
margin-bottom
:
15rpx
;
border
:
1px
solid
transparent
;
.check-box-icon
{
position
:
absolute
;
right
:
18rpx
;
top
:
17rpx
;
width
:
20rpx
;
height
:
20rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png')
no-repeat
center
;
background-size
:
contain
;
display
:
block
;
}
&
.curr
{
border
:
1px
solid
#1969f9
;
.check-box-icon
{
background
:
url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png')
no-repeat
center
;
background-size
:
contain
;
}
}
.wrap
{
flex-wrap
:
wrap
;
}
...
...
@@ -130,4 +167,59 @@
}
}
}
.fix-search-btn
{
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
left
:
0
;
background-color
:
#ffffff
;
z-index
:
999
;
.btn1
{
width
:
20%
;
height
:
75rpx
;
background
:
#ffffff
;
.check-box-icon
{
width
:
20rpx
;
height
:
20rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png')
no-repeat
center
;
background-size
:
contain
;
display
:
block
;
&
.curr
{
background
:
url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png')
no-repeat
center
;
background-size
:
contain
;
}
}
.text
{
margin-left
:
10rpx
;
font-size
:
20rpx
;
color
:
#484b59
;
}
}
.print-type-box
{
width
:
30%
;
height
:
75rpx
;
background
:
#ffffff
;
picker
{
width
:
100%
;
height
:
100%
;
}
.uni-input
{
font-size
:
23rpx
;
color
:
#484b59
;
}
.iconfont
{
margin-left
:
17rpx
;
font-size
:
18rpx
;
color
:
#919399
;
}
}
.btn2
{
width
:
50%
;
height
:
75rpx
;
background
:
#1969f9
;
font-size
:
23rpx
;
color
:
#ffffff
;
}
}
}
pages/immediatelyStockIn/list.vue
View file @
0616f59a
...
...
@@ -10,8 +10,18 @@
<text
class=
"t2"
>
库存总数量
</text>
</view>
</view>
<view
class=
"list-total row bothSide verCenter"
v-if=
"list.length > 0"
>
<checkbox-group
class=
"checkbox-box row verCenter"
@
change=
"checkboxChange"
>
<label
class=
"row verCenter"
>
<checkbox
value=
"1"
style=
"transform:scale(0.7)"
iconColor=
"#1969f9"
backgroundColor=
"#1969f9"
color=
"#1969f9"
/>
补打标签
</label>
</checkbox-group>
<view
class=
"num"
>
共
<text>
{{
count
}}
</text>
条数据
</view>
</view>
<!-- 列表 -->
<view
class=
"list"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
:class=
"
{ curr: filter_list[index]
&&
checked }">
<view
class=
"check-box-icon"
@
click=
"filterChange(index)"
v-if=
"checked"
></view>
<view
class=
"row wrap"
>
<view
class=
"input-box row verCenter"
>
<text
class=
"label"
>
库 位:
</text>
...
...
@@ -88,19 +98,63 @@
<text
class=
"iconfont icon-a-juxing21"
></text>
<text
class=
"text"
>
查不到当前数据
</text>
</view>
<!-- 底部bar -->
<view
class=
"fix-search-btn row verCenter"
v-if=
"checked"
>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"allChnage()"
>
<text
class=
"check-box-icon"
:class=
"
{ curr: filter_list.length > 0
&&
filter_list.length == filter_id.length }">
</text>
<text
class=
"text"
>
{{
filter_id
.
length
==
0
?
'全选'
:
filter_id
.
length
}}
</text>
</view>
<view
class=
"print-type-box row rowCenter verCenter"
>
<!-- 深圳自营仓 -->
<template
v-if=
"warehouse_id == 9"
>
<picker
@
change=
"bindPickerChange($event)"
:value=
"print_style_index"
:range=
"print_style"
class=
"row rowCenter verCenter"
>
<view
class=
"row rowCenter verCenter"
>
<view
class=
"uni-input"
>
{{
print_style
[
print_style_index
]
}}
</view>
<view
class=
"iconfont icon-sanjiaoxing"
></view>
</view>
</picker>
</
template
>
<!-- 非自营仓 -->
<
template
v-else
>
<picker
@
change=
"bindPickerChange($event,1)"
:value=
"print_language_index"
:range=
"print_language"
class=
"row rowCenter verCenter"
>
<view
class=
"row rowCenter verCenter"
>
<view
class=
"uni-input"
>
{{
print_language
[
print_language_index
]
}}
</view>
<view
class=
"iconfont icon-sanjiaoxing"
></view>
</view>
</picker>
</
template
>
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"print()"
>
打印
</view>
</view>
</view>
</template>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
createArray
}
from
'@/util/util.js'
;
export
default
{
data
()
{
return
{
list
:
[],
checked
:
true
,
countList
:
''
,
page
:
1
,
limit
:
30
,
count
:
0
,
hasMoreData
:
true
,
//是否分页加载
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//过滤处理的id
all_flag
:
false
,
//全选标记
warehouse_id
:
''
,
//区分仓库
print_style
:
[
'基本样式'
,
'不带D/C'
],
print_style_index
:
1
,
print_language
:
[
'中文标签'
,
'英文标签'
],
print_language_index
:
0
,
printParams
:
{
stock_ids
:
''
,
style
:
'2'
,
//1基本样式,2不带DC
print_language
:
1
//1中文,2英文
},
formParams
:
{
goods_sn
:
''
,
goods_name
:
''
,
...
...
@@ -111,6 +165,15 @@
}
};
},
watch
:
{
filter_id
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
printParams
.
stock_ids
=
arr
.
join
(
','
);
}
else
{
this
.
printParams
.
stock_ids
=
''
;
}
}
},
onReachBottom
()
{
if
(
!
this
.
hasMoreData
)
{
return
;
...
...
@@ -138,15 +201,80 @@
},
methods
:
{
/**
* 打印货品标签样式切换监听
* @param {Object} e
* @param {Object} type
*/
bindPickerChange
:
function
(
e
,
type
)
{
if
(
type
==
1
)
{
//非自营仓
this
.
print_language_index
=
e
.
detail
.
value
;
this
.
printParams
.
print_language
=
Number
(
e
.
detail
.
value
)
+
1
;
}
else
{
//深圳自营仓
this
.
print_style_index
=
e
.
detail
.
value
;
this
.
printParams
.
style
=
Number
(
e
.
detail
.
value
)
+
1
;
}
},
checkboxChange
(
e
)
{
var
value
=
e
.
detail
.
value
;
if
(
value
.
indexOf
(
"1"
)
!==
-
1
)
{
this
.
checked
=
true
;
}
else
{
this
.
checked
=
false
;
}
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex
(
arr
,
target
)
{
const
result
=
[];
arr
.
map
((
item
,
index
)
=>
{
if
(
item
===
target
)
{
result
.
push
(
index
);
}
});
return
result
;
},
/**
* 筛选过滤出选中的元素
*/
filterChange
(
index
)
{
this
.
$set
(
this
.
filter_list
,
index
,
(
this
.
filter_list
[
index
]
=
!
this
.
filter_list
[
index
]));
let
filter_arr
=
this
.
findIndex
(
this
.
filter_list
,
true
);
this
.
filter_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
].
id
);
},
/**
* 全选
*/
allChnage
()
{
this
.
all_flag
=
!
this
.
all_flag
;
this
.
filter_list
=
createArray
(
this
.
list
.
length
,
this
.
all_flag
);
if
(
this
.
all_flag
)
{
this
.
filter_id
=
this
.
list
.
map
(
function
(
item
)
{
return
item
.
id
;
});
}
else
{
this
.
filter_id
=
[];
}
},
/**
* 获取列表数据
*/
getData
()
{
this
.
request
(
API
.
searchStockList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
formParams
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
this
.
warehouse_id
=
res
.
data
.
list
[
0
].
warehouse_id
;
this
.
hasMoreData
=
true
;
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
list
);
this
.
count
=
res
.
data
.
count
;
this
.
countList
=
res
.
data
.
countList
;
if
(
this
.
filter_list
.
length
==
0
)
{
this
.
filter_list
=
createArray
(
this
.
list
.
length
,
false
);
//创建状态数组
}
}
else
{
this
.
hasMoreData
=
false
;
}
...
...
@@ -157,6 +285,47 @@
});
}
});
},
/**
* 库存查询-打印标签
*/
print
()
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请勾选货品'
,
icon
:
'error'
});
return
false
;
}
if
(
this
.
filter_id
.
length
>
30
)
{
uni
.
showToast
({
title
:
'一次最多勾选30条库存进行打印'
,
icon
:
'none'
});
return
false
;
}
//参数处理
if
(
this
.
warehouse_id
==
9
)
{
//如果是自营仓那么语言置为空
this
.
printParams
.
print_language
=
''
;
}
else
{
//如果是非自营仓那么样式置为空
this
.
printParams
.
style
=
''
;
}
this
.
request
(
API
.
stockQueryPrint
,
'POST'
,
this
.
printParams
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
"打印成功"
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
}
}
};
...
...
util/api.js
View file @
0616f59a
//
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
//
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
//
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
//
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const
API_BASE_USER
=
'http://user.liexindev.net'
;
//用户系统
const
API_BASE_PUR
=
'http://pur.liexindev.net'
;
//采购系统
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
const
API_BASE_OSS
=
'http://image.liexindev.net'
;
//oss系统
const
API_BASE_USER
=
'https://user.ichunt.net'
;
//用户系统
const
API_BASE_PUR
=
'https://purchase.ichunt.net'
;
//采购系统
const
API_BASE
=
'https://wms.ichunt.net'
;
//WMS系统
const
API_BASE_OSS
=
'https://image.ichunt.net'
;
//oss系统
//
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
//
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
//
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
//
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const
API
=
{
...
...
@@ -284,6 +284,10 @@ const API = {
* */
searchStockList
:
API_BASE
+
'/api/h5/stockIn/searchStockList'
,
/**
* 库存查询-打印标签
* */
stockQueryPrint
:
API_BASE
+
'/api/label/stockQueryPrint'
,
/**
* 箱信息
* */
getPackList
:
API_BASE
+
'/api/stockRecheck/getPackList'
,
...
...
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