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
3f4db0f7
authored
Aug 22, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
移动端--理货照片、拣货照片、复核照片上传效率优化
parent
764012aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
57 deletions
pages/picking/sort.vue
pages/stockRecheck/sort.vue
pages/tallyReceive/index.vue
pages/tallyReceive/operate.vue
pages/picking/sort.vue
View file @
3f4db0f7
...
...
@@ -343,7 +343,7 @@
<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
.small_image_url
"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
...
...
@@ -558,7 +558,7 @@
<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
.small_image_url
"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
...
...
@@ -697,7 +697,8 @@
detail
:
{},
//按货品拣货详情
detailContainer
:
{},
//按容器拣货详情
picked_num
:
''
,
//应拣数量
image_list
:
[],
//图片列表
image_list
:
[],
//本地图片路径列表
server_image_list
:
[],
//服务器图片路径列表
maxNum
:
10
,
//最大上传图片数量
warehouse_id
:
''
,
//仓库id
print_style
:
[
'基本样式'
,
'不带D/C'
],
...
...
@@ -1131,6 +1132,9 @@
// 获取压缩后的图片路径
const
compressedImagePath
=
compressedRes
.
tempFilePath
;
// 将本地压缩路径添加到 image_list 中
this
.
image_list
.
push
(
compressedImagePath
);
// 在这里处理压缩后的图片,上传到服务器
uni
.
uploadFile
({
url
:
this
.
img_upload_url
+
'/uploadImage?sys_type=4'
,
...
...
@@ -1145,13 +1149,13 @@
uni
.
hideLoading
();
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
this
.
$forceUpdate
();
this
.
noexebshowFalg
=
true
;
this
.
image_list
.
push
({
this
.
server_
image_list
.
push
({
pic_id
:
data
.
data
.
oss_image_id
,
small_image_url
:
data
.
data
.
small_image_url
,
big_image_url
:
data
.
data
.
big_image_url
});
this
.
$forceUpdate
();
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
...
...
@@ -1182,20 +1186,18 @@
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
this
.
server_image_list
.
splice
(
index
,
1
);
// 同时删除对应的服务器图片路径
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange
(
arr
,
index
)
{
previewChange
(
img
,
index
)
{
this
.
noexebshowFalg
=
false
;
var
data
=
arr
.
map
(
item
=>
{
return
item
.
big_image_url
;
});
uni
.
previewImage
({
current
:
index
,
urls
:
data
urls
:
img
});
},
/**
...
...
@@ -1349,22 +1351,10 @@
var
pick_qty_num
=
pick_qty
*
1
;
//真实拣货数量
//拣货图片集合
var
pic_ids
=
this
.
image_list
.
map
(
item
=>
{
var
pic_ids
=
this
.
server_
image_list
.
map
(
item
=>
{
return
item
.
pic_id
;
});
//当前登录组织为深贸电子才必填
// if (this.company_id == 2) {
// if (pic_ids
<=
0
)
{
// uni.showToast({
// title: '请至少上传一张拣货图片',
// icon: 'none'
// });
// return false;
// }
// }
this
.
request
(
API
.
pick
,
'POST'
,
{
lock_id
:
lock_id
,
pick_qty
:
pick_qty
,
...
...
@@ -1415,22 +1405,9 @@
*/
makeMultiPickingFinish
()
{
//图片集合
var
pic_ids
=
this
.
image_list
.
map
(
item
=>
{
var
pic_ids
=
this
.
server_
image_list
.
map
(
item
=>
{
return
item
.
pic_id
;
});
//当前登录组织为深贸电子才必填
// if (this.company_id == 2) {
// if (pic_ids
<=
0
)
{
// uni.showToast({
// title: '请至少上传一张拣货图片',
// icon: 'none'
// });
// return false;
// }
// }
var
lock_ids
=
''
;
var
flag
=
false
;
if
(
this
.
filter_id
.
length
>
0
&&
this
.
lock_ids
.
length
==
0
)
{
...
...
pages/stockRecheck/sort.vue
View file @
3f4db0f7
...
...
@@ -351,7 +351,7 @@
<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
.small_image_url
"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
...
...
@@ -442,7 +442,7 @@
<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
.small_image_url
"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
...
...
@@ -570,7 +570,7 @@
<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
.small_image_url
"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<image
:src=
"item"
mode=
"aspectFill"
@
click=
"previewChange(image_list, index)"
></image>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"deletePic(index)"
></text>
</view>
</
template
>
...
...
@@ -707,7 +707,8 @@
stock_out_item_ids
:
''
,
//复核任务ids
packList
:
[],
//箱信息
packConfigList
:
[],
//箱配置列表
image_list
:
[],
//图片列表
image_list
:
[],
//本地图片路径列表
server_image_list
:
[],
//服务器图片路径列表
maxNum
:
10
,
//最大上传图片数量
maxlength
:
15
,
//输入框长度15
custome_box_info_index
:
0
,
//箱规格设置
...
...
@@ -949,6 +950,9 @@
// 获取压缩后的图片路径
const
compressedImagePath
=
compressedRes
.
tempFilePath
;
// 将本地压缩路径添加到 image_list 中
this
.
image_list
.
push
(
compressedImagePath
);
// 在这里处理压缩后的图片,上传到服务器
uni
.
uploadFile
({
url
:
this
.
img_upload_url
+
'/uploadImage?sys_type=4'
,
...
...
@@ -963,12 +967,13 @@
uni
.
hideLoading
();
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
this
.
image_list
.
push
({
this
.
noexebshowFalg
=
true
;
this
.
server_image_list
.
push
({
pic_id
:
data
.
data
.
oss_image_id
,
small_image_url
:
data
.
data
.
small_image_url
,
big_image_url
:
data
.
data
.
big_image_url
});
this
.
noexebshowFalg
=
true
;
this
.
$forceUpdate
()
;
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
...
...
@@ -999,20 +1004,18 @@
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
this
.
server_image_list
.
splice
(
index
,
1
);
// 同时删除对应的服务器图片路径
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange
(
arr
,
index
)
{
var
data
=
arr
.
map
(
item
=>
{
return
item
.
big_image_url
;
});
previewChange
(
img
,
index
)
{
this
.
noexebshowFalg
=
false
;
uni
.
previewImage
({
current
:
index
,
urls
:
data
urls
:
img
});
},
/**
...
...
@@ -1255,7 +1258,7 @@
}
//图片集合
var
pic_ids
=
this
.
image_list
.
map
(
item
=>
{
var
pic_ids
=
this
.
server_
image_list
.
map
(
item
=>
{
return
item
.
pic_id
;
});
...
...
@@ -1299,7 +1302,7 @@
}
//图片集合
var
pic_ids
=
this
.
image_list
.
map
(
item
=>
{
var
pic_ids
=
this
.
server_
image_list
.
map
(
item
=>
{
return
item
.
pic_id
;
});
...
...
pages/tallyReceive/index.vue
View file @
3f4db0f7
...
...
@@ -234,7 +234,8 @@
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//入库单列表的入库登记
detail
:
{},
//详情的数据
image_list
:
[],
//图片列表
image_list
:
[],
//本地图片路径列表
server_image_list
:
[],
//服务器图片路径列表
maxNum
:
10
,
//最大上传图片数量
hasMoreData
:
true
,
//是否分页加载
is_watch
:
false
,
//是否看货
...
...
@@ -265,7 +266,7 @@
};
},
watch
:
{
image_list
(
arr
)
{
server_
image_list
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
formParams
.
image_ids
=
arr
.
join
(
','
);
}
else
{
...
...
@@ -863,6 +864,9 @@
// 获取压缩后的图片路径
const
compressedImagePath
=
compressedRes
.
tempFilePath
;
// 将本地压缩路径添加到 image_list 中
this
.
image_list
.
push
(
compressedImagePath
);
// 在这里处理压缩后的图片,上传到服务器
uni
.
uploadFile
({
url
:
this
.
img_upload_url
+
'/uploadImage?sys_type=4'
,
...
...
@@ -877,7 +881,8 @@
uni
.
hideLoading
();
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
this
.
image_list
.
push
(
data
.
data
.
oss_image_url
);
// 将服务器返回的图片地址保存到 server_image_list 中
this
.
server_image_list
.
push
(
data
.
data
.
oss_image_url
);
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
...
...
@@ -908,6 +913,7 @@
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
this
.
server_image_list
.
splice
(
index
,
1
);
// 同时删除对应的服务器图片路径
},
/**
* 预览图片
...
...
pages/tallyReceive/operate.vue
View file @
3f4db0f7
...
...
@@ -393,7 +393,8 @@
array
:
[
'物流单号'
,
'入库单号'
,
'入仓号'
],
tallyContainer
:
[],
//容器列表
detail
:
{},
//详情的数据
image_list
:
[],
//图片列表
image_list
:
[],
//本地图片路径列表
server_image_list
:
[],
//服务器图片路径列表
maxNum
:
10
,
//最大上传图片数量
useOptionIndex
:
-
1
,
useOption
:
[],
//产地
...
...
@@ -443,7 +444,7 @@
}
},
watch
:
{
image_list
(
arr
)
{
server_
image_list
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
formParams
.
image_ids
=
arr
.
join
(
','
);
}
else
{
...
...
@@ -783,12 +784,15 @@
// 获取压缩后的图片路径
const
compressedImagePath
=
compressedRes
.
tempFilePath
;
// 将本地压缩路径添加到 image_list 中
this
.
image_list
.
push
(
compressedImagePath
);
// 在这里处理压缩后的图片,上传到服务器
uni
.
uploadFile
({
url
:
this
.
img_upload_url
+
'/uploadImage?sys_type=4'
,
filePath
:
compressedImagePath
,
name
:
'file'
,
timeout
:
10
000
,
timeout
:
6
000
,
header
:
{
'Content-Type'
:
'multipart/form-data'
},
...
...
@@ -797,7 +801,8 @@
uni
.
hideLoading
();
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
0
)
{
this
.
image_list
.
push
(
data
.
data
.
oss_image_url
);
// 将服务器返回的图片地址保存到 server_image_list 中
this
.
server_image_list
.
push
(
data
.
data
.
oss_image_url
);
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
...
...
@@ -828,6 +833,7 @@
*/
deletePic
(
index
)
{
this
.
image_list
.
splice
(
index
,
1
);
this
.
server_image_list
.
splice
(
index
,
1
);
// 同时删除对应的服务器图片路径
},
/**
* 预览图片
...
...
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