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
19263432
authored
Jul 02, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
09986e63
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
475 additions
and
181 deletions
assets/css/arrivalRegister/index.scss
assets/css/arrivalRegister/splitGoods.scss
pages/arrivalRegister/splitGoods.vue
pages/preCheck/list.vue
util/api.js
assets/css/arrivalRegister/index.scss
View file @
19263432
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
}
}
}
}
.print-btn
{
.print-btn
{
font-size
:
2
4
rpx
;
font-size
:
2
3
rpx
;
color
:
#1969f9
;
color
:
#1969f9
;
}
}
.preCheck
{
.preCheck
{
...
...
assets/css/arrivalRegister/splitGoods.scss
View file @
19263432
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
}
}
}
}
.print-btn
{
.print-btn
{
font-size
:
2
4
rpx
;
font-size
:
2
3
rpx
;
color
:
#1969f9
;
color
:
#1969f9
;
}
}
.search-box
{
.search-box
{
...
@@ -210,6 +210,19 @@
...
@@ -210,6 +210,19 @@
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
.p-text
{
margin-top
:
38rpx
;
margin-bottom
:
25rpx
;
.tt
{
font-size
:
20rpx
;
color
:
#484b59
;
}
.ed
{
font-weight
:
bold
;
font-size
:
20rpx
;
color
:
#1969f9
;
}
}
.pp
{
.pp
{
font-size
:
20rpx
;
font-size
:
20rpx
;
color
:
#292b33
;
color
:
#292b33
;
...
@@ -271,60 +284,6 @@
...
@@ -271,60 +284,6 @@
}
}
}
}
}
}
.drawer-list
{
.box
{
position
:
relative
;
padding
:
18rpx
18rpx
18rpx
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
;
.top
{
margin-bottom
:
10rpx
;
.t1
{
font-size
:
17rpx
;
color
:
#1969f9
;
font-weight
:
bold
;
}
.t2
{
font-size
:
20rpx
;
color
:
#292b33
;
font-weight
:
bold
;
margin-left
:
8rpx
;
}
.t3
{
font-size
:
16rpx
;
color
:
#919399
;
}
.t4
{
font-size
:
16rpx
;
color
:
#484b59
;
}
}
.bar
{
line-height
:
26rpx
;
.tt
{
font-size
:
16rpx
;
color
:
#919399
;
white-space
:
nowrap
;
}
.yy
{
max-width
:
55%
;
font-size
:
16rpx
;
color
:
#484b59
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
}
}
.time
{
margin-top
:
8rpx
;
font-size
:
16rpx
;
color
:
#919399
;
}
.btn
{
.btn
{
position
:
absolute
;
position
:
absolute
;
bottom
:
0
;
bottom
:
0
;
...
@@ -345,27 +304,10 @@
...
@@ -345,27 +304,10 @@
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
.tip-box
{
margin-top
:
36rpx
;
margin-bottom
:
23rpx
;
height
:
60rpx
;
background
:
#fff5ec
;
border-radius
:
30rpx
30rpx
30rpx
30rpx
;
.iconfont
{
font-size
:
30rpx
;
color
:
#f98119
;
margin-left
:
23rpx
;
}
.tt
{
margin-left
:
12rpx
;
font-size
:
20rpx
;
color
:
#f98119
;
}
}
.input-wrap
{
.input-wrap
{
margin-bottom
:
25rpx
;
margin-bottom
:
25rpx
;
.label-title
{
.label-title
{
font-size
:
20
rpx
;
font-size
:
17
rpx
;
color
:
#484b59
;
color
:
#484b59
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
10rpx
;
margin-bottom
:
10rpx
;
...
@@ -396,112 +338,126 @@
...
@@ -396,112 +338,126 @@
padding
:
18rpx
;
padding
:
18rpx
;
}
}
}
}
.sel-box
{
.select-box
{
height
:
55rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
border
:
1px
solid
#1969f9
;
border
:
1px
solid
#1969f9
;
font-size
:
17rpx
;
.wrap
{
padding-left
:
18rpx
;
padding-left
:
15rpx
;
padding-right
:
25rpx
;
height
:
40rpx
;
}
.uni-input
{
font-size
:
17rpx
;
color
:
#484b59
;
}
.uni-arrow
{
.uni-arrow
{
width
:
14rpx
;
width
:
14rpx
;
height
:
9rpx
;
height
:
9rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png')
no-repeat
center
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png')
no-repeat
center
;
background-size
:
contain
;
background-size
:
contain
;
margin-
righ
t
:
12rpx
;
margin-
lef
t
:
12rpx
;
}
}
}
}
}
}
.uni-swiper-wrap
{
.pack
{
margin-top
:
15rpx
;
.h2
{
.uni-swiper-input
{
font-size
:
17rpx
;
margin-bottom
:
15rpx
;
color
:
#484b59
;
.label
{
font-weight
:
bold
;
width
:
24%
;
margin-bottom
:
10rpx
;
font-size
:
16rpx
;
.tt
{
font-size
:
17rpx
;
color
:
#919399
;
color
:
#919399
;
&
.required
:before
{
font-weight
:
normal
;
content
:
' *'
;
color
:
red
;
}
}
}
.select-box
{
.num
{
position
:
relative
;
.t1
{
width
:
76%
;
font-size
:
13rpx
;
height
:
45rpx
;
color
:
#1969f9
;
.uni-arrow
{
position
:
absolute
;
right
:
14rpx
;
width
:
14rpx
;
height
:
9rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png')
no-repeat
center
;
background-size
:
contain
;
}
}
.uni-input
{
.t2
{
width
:
100%
;
font-size
:
13rpx
;
height
:
45rpx
;
color
:
#919399
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
#1969f9
;
font-size
:
17rpx
;
padding-left
:
18rpx
;
}
}
}
}
.input-box
{
}
position
:
relative
;
.icon-box
{
width
:
76%
;
width
:
75rpx
;
.uni-input
{
height
:
55rpx
;
width
:
100%
;
border-radius
:
10rpx
;
height
:
45rpx
;
border
:
1px
solid
#c6c7cc
;
background
:
#ffffff
;
.iconfont
{
border-radius
:
10rpx
;
font-size
:
30rpx
;
border
:
1px
solid
#1969f9
;
color
:
#56585e
;
font-size
:
17rpx
;
padding-left
:
18rpx
;
}
}
}
}
}
.uni-swiper-input-multipl
{
.pic-list
{
margin-bottom
:
15rpx
;
flex-wrap
:
wrap
;
.label
{
margin-bottom
:
18rpx
;
width
:
24%
;
.default
{
.uni-arrow
{
width
:
120rpx
;
width
:
14rpx
;
height
:
120rpx
;
height
:
9rpx
;
background
:
#f5f5f7
;
background
:
url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png')
no-repeat
center
;
border-radius
:
10rpx
;
background-size
:
contain
;
margin-right
:
15rpx
;
margin-right
:
10rpx
;
.iconfont
{
}
font-size
:
60rpx
;
.uni-input
{
color
:
#c6c7cc
;
font-size
:
17rpx
;
}
}
}
}
.multipl-input
{
.box
{
width
:
76%
;
position
:
relative
;
.uni-input
{
width
:
120rpx
;
width
:
100%
;
height
:
120rpx
;
height
:
45rpx
;
background
:
#f5f5f7
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
margin-right
:
15rpx
;
border
:
1px
solid
#1969f9
;
margin-bottom
:
15rpx
;
font-size
:
17rpx
;
image
{
padding-left
:
18rpx
;
width
:
120rpx
;
height
:
120rpx
;
}
}
.timesSymbol
{
.iconfont
{
padding
:
0
14rpx
;
position
:
absolute
;
font-size
:
24rpx
;
right
:
0
;
color
:
#292b33
;
top
:
0
;
font-weight
:
bold
;
font-size
:
30rpx
;
color
:
#ff3700
;
z-index
:
9
;
}
}
.unit
{
}
margin-left
:
10rpx
;
}
color
:
#919399
;
.textarea-box
{
font-size
:
25rpx
;
width
:
100%
;
textarea
{
width
:
100%
;
height
:
85rpx
;
padding
:
10rpx
15rpx
;
background
:
#f5f5f7
;
border-radius
:
10rpx
;
font-size
:
16rpx
;
box-sizing
:
border-box
;
}
}
.print
{
margin-bottom
:
27rpx
;
.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
;
}
}
}
}
.tt
{
font-size
:
17rpx
;
color
:
#484b59
;
margin-left
:
10rpx
;
}
}
}
}
}
.swiper
{
height
:
790rpx
;
}
}
}
pages/arrivalRegister/splitGoods.vue
View file @
19263432
...
@@ -20,23 +20,27 @@
...
@@ -20,23 +20,27 @@
</view>
</view>
<view
class=
"total-text"
v-if=
"list.length > 0"
>
共
<text>
{{
total
}}
</text>
条数据
</view>
<view
class=
"total-text"
v-if=
"list.length > 0"
>
共
<text>
{{
total
}}
</text>
条数据
</view>
</view>
</view>
<view
class=
"search-all-box row verCenter"
>
<view
class=
"search-all row verCenter bothSide"
>
<view
class=
"row verCenter"
style=
"width: 90%;"
>
<view
class=
"search-all-box row verCenter"
style=
"width: 80%;"
>
<text
class=
"iconfont icon-juxing1"
></text>
<view
class=
"row verCenter"
style=
"width: 90%;"
>
<!-- 全量搜索 -->
<text
class=
"iconfont icon-juxing1"
></text>
<template
v-if=
"index == 0"
>
<!-- 全量搜索 -->
<input
class=
"uni-input"
placeholder=
"请扫描或输入物流单号"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.shipment_number"
@
input=
"handleInput(1, $event)"
maxlength=
"-1"
/>
<template
v-if=
"index == 0"
>
</
template
>
<input
class=
"uni-input"
placeholder=
"请扫描或输入物流单号"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.shipment_number"
@
input=
"handleInput(1, $event)"
maxlength=
"-1"
/>
<!-- 货品名称 -->
</
template
>
<
template
v-if=
"index == 1"
>
<!-- 货品名称 -->
<input
class=
"uni-input"
placeholder=
"请输入货品名称"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.goods_name"
@
input=
"handleInput(2, $event)"
maxlength=
"-1"
/>
<
template
v-if=
"index == 1"
>
</
template
>
<input
class=
"uni-input"
placeholder=
"请输入货品名称"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.goods_name"
@
input=
"handleInput(2, $event)"
maxlength=
"-1"
/>
<!-- fedex -->
</
template
>
<
template
v-else-if=
"index == 2"
>
<!-- fedex -->
<input
class=
"uni-input"
placeholder=
"请输入FedEx"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.shipment_number"
@
input=
"handleInput(3, $event)"
maxlength=
"-1"
/>
<
template
v-else-if=
"index == 2"
>
</
template
>
<input
class=
"uni-input"
placeholder=
"请输入FedEx"
placeholder-style=
"color:#919399"
:focus=
"is_focus"
v-model=
"searchParams.shipment_number"
@
input=
"handleInput(3, $event)"
maxlength=
"-1"
/>
</
template
>
</view>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
</view>
</view>
<
text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text
>
<
view
class=
"print-btn"
@
click=
"print()"
>
打印入仓号
</view
>
</view>
</view>
<!-- 列表数据 -->
<!-- 列表数据 -->
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
...
@@ -70,8 +74,105 @@
...
@@ -70,8 +74,105 @@
<text
class=
"check-box-icon"
:class=
"{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"
></text>
<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>
<text
class=
"text"
>
{{ filter_id.length == 0 ? '全选' : filter_id.length }}
</text>
</view>
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"
print()"
>
打印入仓号
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"
registration()"
>
分货登记
</view>
</view>
</view>
<!-- 新增登记 -->
<uni-drawer
ref=
"showRight"
mode=
"right"
>
<view
class=
"uni-drawer-layer"
>
<view
class=
"title row rowCenter verCenter"
>
<text
class=
"iconfont icon-juxing2"
@
click=
"closeDrawer()"
></text>
<text
class=
"text"
>
新增登记
</text>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"label-title"
><text
style=
"color: red;"
>
*
</text>
仓库:
</view>
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange($event,1)"
:value=
"warehouse_index"
:range=
"warehouse_arr"
:range-key=
"'name'"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{ warehouse_index == -1 ? '请选择仓库' : warehouse_arr[warehouse_index].name }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"label-title"
><text
style=
"color: red;"
>
*
</text>
到货时间:
</view>
<view
class=
"select-box row"
>
<picker
mode=
"date"
:value=
"formParams.register_time"
@
change=
"bindDateChange($event,1)"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{ formParams.register_time }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"label-title"
><text
style=
"color: red;"
>
*
</text>
类型:
</view>
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange($event,2)"
:value=
"register_type_index"
:range=
"register_type"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{ register_type_index == -1 ? '请选择类型' : register_type[register_type_index] }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"label-title"
><text
style=
"color: red;"
>
*
</text>
物流公司:
</view>
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange($event,3)"
:value=
"logistics_company_index"
:range=
"logistics_company"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{ logistics_company_index == -1 ? '请选择物流公司' : logistics_company[logistics_company_index] }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"row"
>
<
template
v-if=
"formParams.logistics_company != '自提' && formParams.logistics_company != '供应商配送'"
>
<text
style=
"color: red;font-size: 17rpx;"
>
*
</text>
</
template
>
<text
class=
"label-title"
>
物流单号:
</text>
</view>
<view
class=
"input-box"
>
<input
type=
"text"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入物流单号"
v-model=
"formParams.logistics_sn"
/>
</view>
</view>
<view
class=
"input-wrap column"
style=
"margin-top: 20rpx;"
>
<view
class=
"row"
>
<text
class=
"label-title"
>
其他信息:
</text>
</view>
<view
class=
"input-box"
>
<input
type=
"text"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入其他信息"
v-model=
"formParams.other_info"
/>
</view>
</view>
<view
class=
"pack"
>
<view
class=
"h2 row bothSide verCenter"
style=
"margin-top: 25rpx;"
>
<view
class=
"row verCenter"
>
<text
style=
"color: red;"
>
*
</text>
<text>
登记照片:
</text>
<text
class=
"tt"
>
最多只支持{{ maxNum }}张图
</text>
</view>
<view
class=
"num"
>
<text
class=
"t1"
>
{{ image_list.length }}
</text>
<text
class=
"t2"
>
/10
</text>
</view>
</view>
<view
class=
"pic-list row"
>
<
template
v-if=
"image_list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in image_list"
:key=
"index"
>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
<view
class=
"default row rowCenter verCenter"
@
click=
"chooseImageChange()"
v-if=
"image_list.length < maxNum"
><text
class=
"iconfont icon-a-juxing3"
></text></view>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
>
<view
class=
"row btn1 row rowCenter verCenter"
style=
"width:100%"
@
click=
"addSeparateStockInRegister()"
>
确认登记
</view>
</view>
</view>
</uni-drawer>
</view>
</view>
</template>
</template>
...
@@ -83,6 +184,14 @@
...
@@ -83,6 +184,14 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
img_upload_url
:
uni
.
getStorageSync
(
'img_upload_url'
)
||
'http://image.liexindev.net'
,
//oss系统
noexebshowFalg
:
true
,
//控制是否会触发生命周期
warehouse_arr
:
[],
warehouse_index
:
0
,
register_type
:
[
'正常登记'
,
'异常登记'
],
register_type_index
:
0
,
logistics_company
:
[
'联邦快递'
,
'DHL国际快递'
,
'顺丰速运'
,
'供应商配送'
,
'快递送货'
,
'韵达快递'
,
'速尔快递'
,
'TNT快递'
,
'自提'
,
'京东快递'
,
'优速物流'
,
'顺丰特惠'
,
'UPS'
,
'Air'
,
'其他'
],
logistics_company_index
:
-
1
,
user_email
:
uni
.
getStorageSync
(
'name'
),
user_email
:
uni
.
getStorageSync
(
'name'
),
is_focus
:
true
,
//获取焦点动态化
is_focus
:
true
,
//获取焦点动态化
input_flag
:
false
,
input_flag
:
false
,
...
@@ -94,18 +203,76 @@
...
@@ -94,18 +203,76 @@
list
:
[],
list
:
[],
filter_list
:
[],
//筛选已选中的列表
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//过滤处理的id
filter_id
:
[],
//过滤处理的id
image_list
:
[],
//图片列表
maxNum
:
10
,
//最大上传图片数量
curr
:
0
,
curr
:
0
,
formParams
:
{
warehouse_id
:
''
,
register_time
:
this
.
getCurrentDate
(),
register_type
:
1
,
logistics_company
:
''
,
logistics_sn
:
''
,
other_info
:
''
,
register_pic
:
''
},
searchParams
:
{
searchParams
:
{
shipment_number
:
''
,
//物流单号
shipment_number
:
''
,
//物流单号
goods_name
:
''
goods_name
:
''
}
}
};
};
},
},
watch
:
{
image_list
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
formParams
.
register_pic
=
arr
.
join
(
','
);
}
else
{
this
.
formParams
.
register_pic
=
''
;
}
}
},
onShow
()
{
onShow
()
{
this
.
resetChange
();
this
.
resetChange
();
let
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
if
(
company_id
==
1
)
{
this
.
warehouse_arr
=
[{
name
:
'深圳现货仓'
,
value
:
7
},
{
name
:
'深圳自营仓'
,
value
:
9
}];
this
.
formParams
.
warehouse_id
=
7
;
}
else
if
(
company_id
==
2
)
{
this
.
warehouse_arr
=
[{
name
:
'香港仓'
,
value
:
'10'
}];
this
.
formParams
.
warehouse_id
=
10
;
}
else
if
(
company_id
==
3
)
{
this
.
warehouse_arr
=
[{
name
:
'华云现货仓'
,
value
:
'11'
}];
this
.
formParams
.
warehouse_id
=
11
;
}
},
},
methods
:
{
methods
:
{
/**
/**
* 获取日期
*/
getCurrentDate
()
{
const
today
=
new
Date
();
const
year
=
today
.
getFullYear
();
const
month
=
String
(
today
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
);
const
day
=
String
(
today
.
getDate
()).
padStart
(
2
,
'0'
);
return
`
${
year
}
-
${
month
}
-
${
day
}
`
;
},
bindDateChange
(
e
,
type
)
{
if
(
type
==
1
)
{
this
.
formParams
.
register_time
=
e
.
detail
.
value
;
}
},
bindPickerChange
(
e
,
type
)
{
if
(
type
==
1
)
{
this
.
warehouse_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_arr
[
e
.
detail
.
value
].
value
;
}
else
if
(
type
==
2
)
{
this
.
register_type_index
=
e
.
detail
.
value
;
this
.
formParams
.
register_type
=
Number
(
e
.
detail
.
value
)
+
1
;
}
else
if
(
type
==
3
)
{
this
.
logistics_company_index
=
e
.
detail
.
value
;
this
.
formParams
.
logistics_company
=
this
.
logistics_company
[
e
.
detail
.
value
];
}
},
/**
* 搜索条件切换
* 搜索条件切换
* @param {Object} e
* @param {Object} e
*/
*/
...
@@ -211,6 +378,170 @@
...
@@ -211,6 +378,170 @@
});
});
},
},
/**
/**
* 选择图片
*/
chooseImageChange
()
{
this
.
noexebshowFalg
=
false
;
// 使用 chooseImage选择图片
uni
.
chooseImage
({
count
:
this
.
maxNum
,
sizeType
:
[
'original'
,
'compressed'
],
sourceType
:
[
'album'
,
'camera'
],
success
:
chooseImageRes
=>
{
console
.
log
(
'选择图片成功:'
,
chooseImageRes
);
// 显示loading
uni
.
showLoading
({
title
:
'上传中...'
});
// 获取选择的图片路径数组
const
imagePaths
=
chooseImageRes
.
tempFilePaths
;
// 判断选择的图片数量是否超过最大限制数量
let
maxNum
=
Number
(
imagePaths
.
length
)
+
Number
(
this
.
image_list
.
length
);
//当前上传的+已经上传的
if
(
maxNum
>
this
.
maxNum
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'图片不超过'
+
this
.
maxNum
+
'张'
,
icon
:
'none'
});
return
false
;
}
// 遍历图片路径数组,对每张图片进行压缩
imagePaths
.
forEach
(
imagePath
=>
{
// 使用compressImage 压缩图片
uni
.
compressImage
({
src
:
imagePath
,
quality
:
60
,
//压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success
:
compressedRes
=>
{
console
.
log
(
'压缩图片成功:'
,
compressedRes
);
// 获取压缩后的图片路径
const
compressedImagePath
=
compressedRes
.
tempFilePath
;
// 在这里处理压缩后的图片,上传到服务器
uni
.
uploadFile
({
url
:
this
.
img_upload_url
+
'/uploadImage?sys_type=4'
,
filePath
:
compressedImagePath
,
name
:
'file'
,
timeout
:
10000
,
header
:
{
'Content-Type'
:
'multipart/form-data'
},
success
:
uploadFileRes
=>
{
console
.
log
(
'服务器上传图片成功:'
,
uploadFileRes
);
uni
.
hideLoading
();
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
this
.
image_list
.
push
(
data
.
data
.
oss_image_url
);
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
icon
:
'none'
});
}
},
fail
:
error
=>
{
uni
.
showToast
({
title
:
'上传图片失败'
,
icon
:
'none'
});
uni
.
hideLoading
();
}
});
},
fail
:
err
=>
{
console
.
log
(
'压缩图片失败:'
,
err
);
}
});
});
}
});
},
/**
* 删除图片
* @param {Object} index
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange
(
arr
,
index
)
{
this
.
noexebshowFalg
=
false
;
uni
.
previewImage
({
current
:
index
,
urls
:
arr
});
},
/**
* 分货登记弹窗
*/
registration
()
{
this
.
$refs
.
showRight
.
open
();
this
.
image_list
=
[];
this
.
warehouse_index
=
0
;
//仓库清空
this
.
formParams
.
warehouse_id
=
this
.
warehouse_arr
[
0
].
value
;
this
.
formParams
.
register_time
=
this
.
getCurrentDate
();
this
.
formParams
.
register_type
=
1
;
this
.
register_type_index
=
0
;
this
.
formParams
.
logistics_company
=
''
;
this
.
logistics_company_index
=
-
1
;
this
.
formParams
.
logistics_sn
=
''
;
this
.
formParams
.
other_info
=
''
;
this
.
formParams
.
register_pic
=
''
;
},
/**
* 确认登记
*/
addSeparateStockInRegister
()
{
if
(
!
this
.
formParams
.
logistics_company
)
{
uni
.
showToast
({
title
:
'请选择物流公司'
,
icon
:
'none'
});
return
false
;
}
if
(
this
.
formParams
.
logistics_company
!==
'自提'
&&
this
.
formParams
.
logistics_company
!==
'供应商配送'
)
{
if
(
!
this
.
formParams
.
logistics_sn
)
{
uni
.
showToast
({
title
:
'请输入物流单号'
,
icon
:
'none'
});
return
false
;
}
}
if
(
!
this
.
formParams
.
register_pic
)
{
uni
.
showToast
({
title
:
'请上传登记照片'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
API
.
addSeparateStockInRegister
,
'POST'
,
this
.
formParams
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'登记成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
$refs
.
showRight
.
close
();
this
.
resetChange
();
},
2000
)
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 打印入仓号
* 打印入仓号
*/
*/
print
()
{
print
()
{
...
@@ -258,6 +589,9 @@
...
@@ -258,6 +589,9 @@
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
is_focus
=
true
;
this
.
is_focus
=
true
;
},
200
);
},
200
);
},
closeDrawer
()
{
this
.
$refs
.
showRight
.
close
();
}
}
}
}
};
};
...
...
pages/preCheck/list.vue
View file @
19263432
...
@@ -632,13 +632,13 @@
...
@@ -632,13 +632,13 @@
stockPreCheckTally
(
precheck_ids
)
{
stockPreCheckTally
(
precheck_ids
)
{
if
(
precheck_ids
)
{
if
(
precheck_ids
)
{
this
.
stockPreCheckTallyParams
.
precheck_ids
=
precheck_ids
;
this
.
stockPreCheckTallyParams
.
precheck_ids
=
precheck_ids
;
}
if
(
!
this
.
stockPreCheckTallyParams
.
tally_num
)
{
if
(
!
this
.
stockPreCheckTallyParams
.
tally_num
)
{
uni
.
showToast
(
{
uni
.
showToast
({
title
:
'理货数量必填'
,
title
:
'理货数量必填'
,
icon
:
'none'
icon
:
'none'
});
})
;
return
false
;
return
false
;
}
}
}
if
(
!
this
.
stockPreCheckTallyParams
.
preckeck_imgs
)
{
if
(
!
this
.
stockPreCheckTallyParams
.
preckeck_imgs
)
{
uni
.
showToast
({
uni
.
showToast
({
...
...
util/api.js
View file @
19263432
...
@@ -379,7 +379,11 @@ const API = {
...
@@ -379,7 +379,11 @@ const API = {
/**
/**
* 预检单-理货
* 预检单-理货
* */
* */
stockPreCheckTally
:
API_BASE
+
'/api/stockIn/stockPreCheck/stockPreCheckTally'
stockPreCheckTally
:
API_BASE
+
'/api/stockIn/stockPreCheck/stockPreCheckTally'
,
/**
* 新增分货登记
* */
addSeparateStockInRegister
:
API_BASE
+
'/api/stockIn/stockInRegister/addSeparateStockInRegister'
}
}
...
...
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