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
6454d6ee
authored
Apr 19, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
理货
parent
029b2358
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
381 additions
and
144 deletions
assets/css/tallyReceive/index.scss
pages/arrivalRegister/index.vue
pages/arrivalRegister/registered.vue
pages/tallyReceive/index.vue
util/api.js
assets/css/tallyReceive/index.scss
View file @
6454d6ee
...
...
@@ -44,41 +44,43 @@
margin-top
:
10rpx
;
height
:
60rpx
;
border-radius
:
10rpx
;
.left
{
background-color
:
#ffffff
;
.text
{
padding-left
:
30rpx
;
width
:
164rpx
;
height
:
35rpx
;
line-height
:
35rpx
;
border-right
:
1px
solid
#f0f0f2
;
font-size
:
18rpx
;
color
:
#292b33
;
font-weight
:
bold
;
}
.search-width
{
width
:
calc
(
100%
-
164rpx
);
padding-right
:
22rpx
;
height
:
100%
;
background-color
:
#ffffff
;
.text
{
padding-left
:
30rpx
;
width
:
164rpx
;
height
:
35rpx
;
line-height
:
35rpx
;
border-right
:
1px
solid
#f0f0f2
;
.icon-juxing1
{
font-size
:
30rpx
;
color
:
#919399
;
margin-left
:
17rpx
;
margin-right
:
13rpx
;
}
.uni-input
{
width
:
80%
;
height
:
60rpx
;
font-size
:
18rpx
;
color
:
#292b33
;
font-weight
:
bold
;
color
:
#484b59
;
}
.search-width
{
width
:
360rpx
;
.icon-juxing1
{
font-size
:
30rpx
;
color
:
#919399
;
margin-left
:
17rpx
;
margin-right
:
13rpx
;
}
.uni-input
{
font-size
:
18rpx
;
color
:
#484b59
;
}
.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
;
}
}
.icon-box
{
width
:
75rpx
;
height
:
60rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
.iconfont
{
font-size
:
30rpx
;
color
:
#56585e
;
.wrap
{
width
:
100%
;
height
:
100%
;
}
}
}
...
...
@@ -88,11 +90,11 @@
flex-wrap
:
wrap
;
.box
{
position
:
relative
;
padding
:
15rpx
17rpx
0
17rpx
;
padding
:
15rpx
17rpx
17rpx
17rpx
;
width
:
345rpx
;
height
:
252rpx
;
background
:
#ffffff
;
box-shadow
:
0px
3rpx
3rpx
0px
rgba
(
198
,
199
,
204
,
0
.3
);
border
:
1px
solid
transparent
;
border-radius
:
10rpx
;
margin-right
:
15rpx
;
margin-bottom
:
15rpx
;
...
...
@@ -295,9 +297,17 @@
color
:
#c6c7cc
;
}
.uni-input
{
height
:
100%
;
font-size
:
18rpx
;
color
:
#484b59
;
}
.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
;
}
}
.icon-box
{
width
:
75rpx
;
...
...
pages/arrivalRegister/index.vue
View file @
6454d6ee
...
...
@@ -63,6 +63,7 @@
</view>
</view>
</view>
<!-- 无数据展示 -->
<view
class=
"no-date column rowCenter verCenter"
v-else
>
<text
class=
"iconfont icon-a-juxing21"
></text>
<text
class=
"text"
>
查不到当前数据
</text>
...
...
@@ -168,6 +169,7 @@ export default {
array
:
[
'物流单号'
,
'入库单号'
,
'入仓号'
],
list
:
[],
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//入库单列表的入库登记
detail
:
{},
//详情的数据
searchParams
:
{
stock_in_sn
:
''
,
//入库单号
...
...
@@ -178,8 +180,7 @@ export default {
logistics_company
:
''
,
logistics_sn
:
''
,
other_info
:
''
},
filter_id
:
[]
//入库单列表的入库登记
}
};
},
onNavigationBarButtonTap
(
e
)
{
...
...
@@ -225,7 +226,7 @@ export default {
}
else
if
(
this
.
index
==
1
)
{
this
.
searchParams
.
stock_in_sn
=
''
;
}
else
if
(
this
.
index
==
2
)
{
this
.
searchParams
.
other_info
=
''
;
this
.
searchParams
.
stock_in_with_stock_in_items_inhouses
=
''
;
}
this
.
getData
();
},
...
...
@@ -302,6 +303,7 @@ export default {
});
setTimeout
(()
=>
{
this
.
getData
();
this
.
closeDrawer
();
},
2000
);
}
else
{
uni
.
showToast
({
...
...
@@ -313,7 +315,7 @@ export default {
},
/**
* 到货登记
* @param {Object} type 1
列表
登记 2详情登记
* @param {Object} type 1
无单号
登记 2详情登记
* @param {Object} id
*/
addStockInRegister
(
type
,
id
)
{
...
...
@@ -336,8 +338,11 @@ export default {
title
:
'登记成功'
,
icon
:
'success'
});
s
;
setTimeout
(()
=>
{
this
.
getData
();
this
.
closeDrawer
();
this
.
filter_id
=
[];
},
2000
);
}
else
{
uni
.
showToast
({
...
...
pages/arrivalRegister/registered.vue
View file @
6454d6ee
...
...
@@ -63,6 +63,11 @@
</view>
</view>
</view>
<!-- 无数据展示 -->
<view
class=
"no-date column rowCenter verCenter"
v-else
>
<text
class=
"iconfont icon-a-juxing21"
></text>
<text
class=
"text"
>
查不到当前数据
</text>
</view>
<view
class=
"fix-btn row verCenter"
>
<view
class=
"btn3 row rowCenter verCenter"
@
click=
"allChnage()"
>
<text
class=
"check-box-icon"
:class=
"{ curr: this.filter_list.length == this.filter_id.length }"
></text>
...
...
@@ -214,7 +219,7 @@ export default {
}
else
if
(
this
.
index
==
1
)
{
this
.
searchParams
.
stock_in_sn
=
''
;
}
else
if
(
this
.
index
==
2
)
{
this
.
searchParams
.
other_info
=
''
;
this
.
searchParams
.
stock_in_with_stock_in_items_inhouse
=
''
;
}
this
.
getData
();
},
...
...
@@ -290,6 +295,8 @@ export default {
});
setTimeout
(()
=>
{
this
.
getData
();
this
.
closeDrawer
();
this
.
filter_id
=
[];
},
2000
);
}
else
{
uni
.
showToast
({
...
...
@@ -307,9 +314,6 @@ export default {
this
.
$refs
.
showRight
.
open
();
this
.
getDetail
(
stock_in_sn
);
},
showDrawers
()
{
this
.
$refs
.
showRightAdd
.
open
();
},
closeDrawer
()
{
this
.
$refs
.
showRight
.
close
();
}
...
...
pages/tallyReceive/index.vue
View file @
6454d6ee
...
...
@@ -14,100 +14,71 @@
<text
class=
"iconfont icon-juxing1"
></text>
<input
class=
"uni-input"
placeholder=
"请输入物流单号"
placeholder-style=
"color:#919399"
/>
</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=
"search-type row verCenter bothSide"
>
<view
class=
"left row verCenter"
>
<view
class=
"text"
>
容 器
</view>
<view
class=
"search-width row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<input
class=
"uni-input"
placeholder=
"请输入容器"
placeholder-style=
"color:#919399"
/>
</view>
</view>
<view
class=
"row verCenter"
>
<view
class=
"icon-box row rowCenter verCenter"
style=
"margin-right: 15rpx;"
><text
class=
"iconfont icon-juxing3"
></text></view>
<view
class=
"icon-box row rowCenter verCenter"
><text
class=
"iconfont icon-a-juxing12"
></text></view>
<view
class=
"text"
>
容 器
</view>
<view
class=
"search-width row verCenter"
v-if=
"tallyContainer.length > 0"
>
<text
class=
"iconfont icon-juxing1"
></text>
<picker
@
change=
"bindPickerContainChange"
:value=
"indexContainer"
:range=
"tallyContainer"
range-key=
"name"
style=
"width: 100%;height: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input row verCenter"
>
{{
tallyContainer
[
indexContainer
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"list row bothSide"
>
<
navigator
class=
"box curr"
url=
"/pages/tallyReceive/operate"
hover-class=
"none
"
>
<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"
:class=
"
{ curr: filter_list[index] }
">
<view
class=
"check-box-icon"
@
click=
"filterChange(index)"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
入库单号:
</text>
<text
class=
"t1"
>
ASN2201010001
</text>
<text
class=
"t1"
>
--
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
物流单号:
</text>
<text
class=
"t1"
>
SF2135661465161
</text>
<text
class=
"t1"
>
--
</text>
</view>
<view
class=
"bor row"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
入仓号:
</text>
<text
class=
"tt"
>
A65512、A65512、A65512、A65512、A65512、
</text>
<text
class=
"tt"
>
{{
item
.
inhouse
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
货品名称:
</text>
<text
class=
"tt"
>
TI
</text>
<text
class=
"tt"
>
{{
item
.
goods_name
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
标准品牌:
</text>
<text
class=
"tt"
>
TI
</text>
<text
class=
"tt"
>
{{
item
.
brand_name
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
预期数量:
</text>
<text
class=
"tt"
>
1000
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
待理货数量:
</text>
<text
class=
"ttt"
>
3000
</text>
</view>
<view
class=
"btn-box row"
><view
class=
"btn row rowCenter verCenter"
>
理货
</view></view>
</navigator>
<navigator
class=
"box"
v-for=
"(item, index) in 20"
:key=
"index"
url=
"/pages/tallyReceive/operate"
hover-class=
"none"
>
<view
class=
"check-box-icon"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
入库单号:
</text>
<text
class=
"t1"
>
ASN2201010001
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
物流单号:
</text>
<text
class=
"t1"
>
SF2135661465161
</text>
</view>
<view
class=
"bor row"
></view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
入仓号:
</text>
<text
class=
"tt"
>
A65512、A65512、A65512、A65512、A65512、
</text>
<text
class=
"tt"
>
{{
item
.
expect_qty
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
货品名称:
</text>
<text
class=
"tt"
>
TI
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
标准品牌:
</text>
<text
class=
"tt"
>
TI
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
预期数量:
</text>
<text
class=
"tt"
>
预期数量:
</text>
<text
class=
"label"
>
销售员:
</text>
<text
class=
"tt"
>
{{
item
.
sale_user
}}
</text>
</view>
<view
class=
"text-item row verCenter"
>
<text
class=
"label"
>
待理货数量:
</text>
<text
class=
"ttt"
>
3000
</text>
<text
class=
"ttt"
>
{{
item
.
wait_tally_qty
}}
</text>
</view>
<
view
class=
"btn-box row"
><view
class=
"btn row rowCenter verCenter"
>
理货
</view></view
>
</
navigator
>
<
navigator
class=
"btn-box row"
url=
"/pages/tallyReceive/operate"
hover-class=
"none"
><view
class=
"btn row rowCenter verCenter"
>
理货
</view></navigator
>
</
view
>
</view>
<view
class=
"no-date column rowCenter verCenter"
>
<view
class=
"no-date column rowCenter verCenter"
v-else
>
<text
class=
"iconfont icon-a-juxing21"
></text>
<text
class=
"text"
>
查不到当前数据
</text>
</view>
<view
class=
"fix-btn row verCenter"
>
<view
class=
"btn1 row rowCenter verCenter"
>
<text
class=
"check-box-icon
curr
"
></text>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"allChnage()"
>
<text
class=
"check-box-icon
"
:class=
"
{ curr: this.filter_list.length == this.filter_id.length }
">
</text>
<text
class=
"text"
>
全选
</text>
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"
showDrawer
()"
>
一键理货
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"
createTallyReceive
()"
>
一键理货
</view>
</view>
<!-- 一键理货弹窗 -->
<uni-drawer
ref=
"showRight"
mode=
"right"
>
...
...
@@ -118,71 +89,51 @@
</view>
<view
class=
"p-text"
>
<text
class=
"tt"
>
您已选中
</text>
<text
class=
"ed"
>
5
</text>
<text
class=
"ed"
>
{{
filter_id
.
length
}}
</text>
<text
class=
"tt"
>
个理货任务
</text>
</view>
<view
class=
"pack"
>
<view
class=
"h2"
>
容器:
</view>
<view
class=
"row verCenter bothSide"
>
<view
class=
"search row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<input
class=
"uni-input"
placeholder=
"请输入物流单号"
placeholder-style=
"color:#919399"
/>
</view>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"row verCenter"
>
<view
class=
"icon-box row rowCenter verCenter"
style=
"margin-right: 15rpx;"
><text
class=
"iconfont icon-juxing3"
></text></view>
<view
class=
"icon-box row rowCenter verCenter"
><text
class=
"iconfont icon-a-juxing12"
></text></view>
<view
class=
"row verCenter bothSide"
v-if=
"tallyContainer.length > 0"
>
<view
class=
"search row bothSide verCenter"
style=
"width: 100%;"
v-if=
"tallyContainer.length > 0"
>
<text
class=
"iconfont icon-juxing1"
></text>
<picker
@
change=
"bindPickerContainChange"
:value=
"indexContainer"
:range=
"tallyContainer"
: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"
>
{{
tallyContainer
[
indexContainer
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"h2 row bothSide verCenter"
style=
"margin-top: 25rpx;"
>
<view>
<text>
理货照片:
</text>
<text
class=
"tt"
>
最多只支持
10
张图
</text>
<text
class=
"tt"
>
最多只支持
{{
maxNum
}}
张图
</text>
</view>
<view
class=
"num"
>
<text
class=
"t1"
>
0
</text>
<text
class=
"t1"
>
{{
image_list
.
length
}}
</text>
<text
class=
"t2"
>
/10
</text>
</view>
</view>
<view
class=
"pic-list row"
>
<view
class=
"default row rowCenter verCenter"
><text
class=
"iconfont icon-a-juxing3"
></text></view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<view
class=
"box"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202304/11/372bae650d699de8b3008cace4e4f081.jpg"
mode=
"aspectFill"
></image>
<text
class=
"iconfont icon-a-juxing11"
></text>
</view>
<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
class=
"print row verCenter"
>
<text
class=
"check-box-icon
curr
"
></text>
<view
class=
"print row verCenter"
@
click=
"toggle()"
>
<text
class=
"check-box-icon
"
:class=
"{ curr: print_flag }
"
></text>
<text
class=
"tt"
>
打印入库标签
</text>
</view>
<view
class=
"h2"
>
理货备注:
</view>
<view
class=
"textarea-box"
><textarea
placeholder-style=
"color:#919399"
placeholder=
"请输入"
/></view>
<view
class=
"textarea-box"
><textarea
placeholder-style=
"color:#919399"
placeholder=
"请输入"
v-model=
"formParams.tally_remark"
/></view>
</view>
<view
class=
"btn row verCenter bothSide"
>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"closeDrawer()"
>
取 消
</view>
<view
class=
"btn2 row rowCenter verCenter"
>
一键理货
</view>
<view
class=
"btn2 row rowCenter verCenter"
@
click=
"createTallyReceiveSubmit()"
>
一键理货
</view>
</view>
</view>
</uni-drawer>
...
...
@@ -191,31 +142,277 @@
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
createArray
}
from
'@/util/util.js'
;
import
debounce
from
'lodash/debounce'
;
import
w_md5
from
'@/util/md5.js'
;
export
default
{
data
()
{
return
{
noexebshowFalg
:
true
,
//控制是否会触发生命周期
print_flag
:
true
,
//是否打印
input_flag
:
false
,
all_flag
:
false
,
//全选标记
page
:
1
,
limit
:
1000
,
index
:
0
,
array
:
[
'物流单号'
,
'入库单号'
,
'入仓号'
]
indexContainer
:
0
,
array
:
[
'物流单号'
,
'入库单号'
,
'入仓号'
],
tallyContainer
:
[],
//容器列表
list
:
[],
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//入库单列表的入库登记
detail
:
{},
//详情的数据
image_list
:
[],
//图片列表
maxNum
:
10
,
//最大上传图片数量
searchParams
:
{
stock_in_sn
:
''
,
//入库单号
tracking_no
:
''
,
//物流单号
stock_in_with_stock_in_items_inhouse
:
''
//入仓单号
},
formParams
:
{
container_id
:
''
,
tally_remark
:
''
,
image_ids
:
''
,
is_print
:
1
}
};
},
onNavigationBarButtonTap
(
e
)
{
console
.
log
(
e
);
if
(
e
.
index
==
0
)
{
uni
.
navigateTo
({
url
:
'/pages/tallyReceive/record'
});
}
},
watch
:
{
image_list
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
formParams
.
image_ids
=
JSON
.
stringify
(
arr
);
}
}
},
onShow
()
{
this
.
getData
();
this
.
getTallyContainer
();
},
methods
:
{
/**
* 是否打印
*/
toggle
()
{
this
.
print_flag
=
!
this
.
print_flag
;
if
(
this
.
print_flag
)
{
this
.
formParams
.
is_print
=
1
;
}
else
{
this
.
formParams
.
is_print
=
0
;
}
},
/**
* 找出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
].
stock_in_item_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
.
stock_in_item_id
;
});
}
else
{
this
.
filter_id
=
[];
}
},
/**
* 清空数据
*/
clearInput
()
{
this
.
input_flag
=
false
;
if
(
this
.
index
==
0
)
{
this
.
searchParams
.
tracking_no
=
''
;
}
else
if
(
this
.
index
==
1
)
{
this
.
searchParams
.
stock_in_sn
=
''
;
}
else
if
(
this
.
index
==
2
)
{
this
.
searchParams
.
stock_in_with_stock_in_items_inhouse
=
''
;
}
this
.
getData
();
},
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
},
bindPickerContainChange
(
e
)
{
this
.
indexContainer
=
e
.
detail
.
value
;
this
.
formParams
.
container_id
=
this
.
tallyContainer
[
e
.
detail
.
value
].
id
;
},
/**
* 获取列表数据
*/
getData
()
{
this
.
request
(
API
.
waitTallyReceiveList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
stock_in_sn
:
'S-ASN202304170001'
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
this
.
filter_list
=
createArray
(
this
.
list
.
length
,
false
);
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
/**
* 获取容器列表数据
*/
getTallyContainer
()
{
this
.
request
(
API
.
getTallyContainer
,
'GET'
,
{},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
tallyContainer
=
res
.
data
.
list
;
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
/**
* 一键理货
*/
createTallyReceive
()
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请选择货品'
,
icon
:
'error'
});
return
false
;
}
this
.
formParams
.
container_id
=
this
.
tallyContainer
[
this
.
indexContainer
].
id
;
this
.
showDrawer
();
},
/**
* 一键理货提交
*/
createTallyReceiveSubmit
()
{
var
params
=
Object
.
assign
(
this
.
formParams
,
{
stock_in_item_id
:
JSON
.
stringify
(
this
.
filter_id
)
});
this
.
request
(
API
.
createTallyReceive
,
'POST'
,
params
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'一键理货成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
closeDrawer
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'error'
});
}
});
},
showDrawer
()
{
this
.
$refs
.
showRight
.
open
();
},
closeDrawer
()
{
this
.
$refs
.
showRight
.
close
();
},
/**
* 选择图片
*/
chooseImageChange
()
{
this
.
noexebshowFalg
=
false
;
var
self
=
this
;
var
time
=
parseInt
(
new
Date
().
getTime
()
/
1000
);
uni
.
chooseImage
({
count
:
self
.
maxNums
,
sourceType
:
[
'album'
,
'camera'
],
success
:
chooseImageRes
=>
{
uni
.
showLoading
({
title
:
'上传中...'
});
const
tempFilePaths
=
chooseImageRes
.
tempFilePaths
;
let
maxNum
=
tempFilePaths
.
length
*
1
+
self
.
image_list
.
length
*
1
;
if
(
maxNum
>
self
.
maxNum
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'图片不超过'
+
self
.
maxNum
+
'张'
,
icon
:
'error'
});
return
false
;
}
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
uni
.
uploadFile
({
url
:
API
.
upload
,
filePath
:
tempFilePaths
[
i
],
name
:
'upload'
,
formData
:
{
source
:
'1'
,
k1
:
time
,
k2
:
w_md5
.
hex_md5_32
(
w_md5
.
hex_md5_32
(
String
(
time
))
+
'fh6y5t4rr351d2c3bryi'
)
},
success
:
uploadFileRes
=>
{
uni
.
hideLoading
();
var
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
200
)
{
self
.
image_list
.
push
(
data
.
data
[
0
]);
}
else
{
uni
.
showToast
({
title
:
data
.
message
,
icon
:
'error'
});
}
},
fail
:
error
=>
{
uni
.
hideLoading
();
}
});
}
}
});
},
/**
* 删除图片
* @param {Object} index
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange
(
img
,
index
)
{
this
.
noexebshowFalg
=
false
;
uni
.
previewImage
({
current
:
index
,
urls
:
img
});
}
}
};
...
...
util/api.js
View file @
6454d6ee
...
...
@@ -4,6 +4,7 @@ const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const
API_BASE_SUPPLIER
=
'http://supplier.liexin.net'
;
//供应商系统
const
API_BASE_CRM
=
'http://crmnew.liexindev.net'
;
//CRM系统
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
const
API_BASE_LIEXIN
=
'http://api.liexin.com'
;
//api系统
const
API
=
{
/**
...
...
@@ -30,6 +31,26 @@ const API = {
* 删除到货登记
* */
delStockInRegister
:
API_BASE
+
'/api/stockIn/stockInRegister/delStockInRegister'
,
/**
* 待理货列表
* */
waitTallyReceiveList
:
API_BASE
+
'/api/stockIn/tallyReceive/waitTallyReceiveList'
,
/**
* 已理货列表
* */
haveTallyReceiveList
:
API_BASE
+
'/api/stockIn/tallyReceive/haveTallyReceiveList'
,
/**
* 获取容器下拉列表
* */
getTallyContainer
:
API_BASE
+
'/api/stockIn/tallyReceive/getTallyContainer'
,
/**
* 新增理货
* */
createTallyReceive
:
API_BASE
+
'/api/stockIn/tallyReceive/createTallyReceive'
,
/**
* 上传文件
* */
upload
:
API_BASE_LIEXIN
+
'/oss/upload'
,
}
...
...
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