Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
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
6cc13f41
authored
Mar 28, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复api
parent
cf08ab1b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
pages/goods/addExectionReceiving.vue
pages/goods/addReceiving.vue
pages/goods/warehouseOperationConfirm.vue
pages/tallyGoods/addException.vue
pages/goods/addExectionReceiving.vue
View file @
6cc13f41
This diff is collapsed.
Click to expand it.
pages/goods/addReceiving.vue
View file @
6cc13f41
...
@@ -178,14 +178,16 @@
...
@@ -178,14 +178,16 @@
this
.
noexebshowFalg
=
false
;
//不允许再次触发onshow这个生命周期
this
.
noexebshowFalg
=
false
;
//不允许再次触发onshow这个生命周期
var
self
=
this
;
var
self
=
this
;
var
time
=
parseInt
(
new
Date
().
getTime
()
/
1000
);
var
time
=
parseInt
(
new
Date
().
getTime
()
/
1000
);
uni
.
choose
Image
({
uni
.
choose
Media
({
count
:
4
,
count
:
4
,
mediaType
:
[
'image'
],
sizeType
:
[
'original'
,
'compressed'
],
sourceType
:
[
'album'
,
'camera'
],
sourceType
:
[
'album'
,
'camera'
],
success
:
chooseImageRes
=>
{
success
:
chooseImageRes
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'上传中...'
title
:
'上传中...'
});
});
const
tempFilePaths
=
chooseImageRes
.
tempFile
Path
s
;
const
tempFilePaths
=
chooseImageRes
.
tempFiles
;
let
maxNum
=
tempFilePaths
.
length
*
1
+
self
.
form
.
check_in_pic
.
length
*
1
;
let
maxNum
=
tempFilePaths
.
length
*
1
+
self
.
form
.
check_in_pic
.
length
*
1
;
if
(
maxNum
>
4
)
{
if
(
maxNum
>
4
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
@@ -195,10 +197,9 @@
...
@@ -195,10 +197,9 @@
return
false
;
return
false
;
}
}
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
console
.
log
(
tempFilePaths
[
i
]);
uni
.
uploadFile
({
uni
.
uploadFile
({
url
:
API
.
upload
,
url
:
API
.
upload
,
filePath
:
tempFilePaths
[
i
],
filePath
:
tempFilePaths
[
i
]
.
tempFilePath
,
name
:
'upload'
,
name
:
'upload'
,
formData
:
{
formData
:
{
source
:
'1'
,
source
:
'1'
,
...
@@ -208,7 +209,6 @@
...
@@ -208,7 +209,6 @@
success
:
uploadFileRes
=>
{
success
:
uploadFileRes
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
var
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
var
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
console
.
log
(
data
);
if
(
data
.
code
===
200
)
{
if
(
data
.
code
===
200
)
{
self
.
form
.
check_in_pic
.
push
(
data
.
data
[
0
]);
self
.
form
.
check_in_pic
.
push
(
data
.
data
[
0
]);
}
else
{
}
else
{
...
@@ -220,7 +220,6 @@
...
@@ -220,7 +220,6 @@
},
},
fail
:
error
=>
{
fail
:
error
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
console
.
log
(
error
);
}
}
});
});
}
}
...
...
pages/goods/warehouseOperationConfirm.vue
View file @
6cc13f41
This diff is collapsed.
Click to expand it.
pages/tallyGoods/addException.vue
View file @
6cc13f41
...
@@ -171,20 +171,20 @@
...
@@ -171,20 +171,20 @@
chooseImageChange
()
{
chooseImageChange
()
{
this
.
noexebshowFalg
=
false
;
this
.
noexebshowFalg
=
false
;
// 使用 chooseImage选择图片
// 使用 chooseImage选择图片
uni
.
choose
Image
({
uni
.
choose
Media
({
count
:
this
.
maxNum
,
count
:
this
.
maxNum
,
mediaType
:
[
'image'
],
sizeType
:
[
'original'
,
'compressed'
],
sizeType
:
[
'original'
,
'compressed'
],
sourceType
:
[
'album'
,
'camera'
],
sourceType
:
[
'album'
,
'camera'
],
success
:
chooseImageRes
=>
{
success
:
chooseImageRes
=>
{
console
.
log
(
'选择图片成功:'
,
chooseImageRes
);
console
.
log
(
'选择图片成功:'
,
chooseImageRes
);
// 显示loading
// 显示loading
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'上传中...'
title
:
'上传中...'
});
});
// 获取选择的图片路径数组
// 获取选择的图片路径数组
const
imagePaths
=
chooseImageRes
.
tempFile
Path
s
;
const
imagePaths
=
chooseImageRes
.
tempFiles
;
// 判断选择的图片数量是否超过最大限制数量
// 判断选择的图片数量是否超过最大限制数量
let
maxNum
=
Number
(
imagePaths
.
length
)
+
Number
(
this
.
image_list
.
length
);
//当前上传的+已经上传的
let
maxNum
=
Number
(
imagePaths
.
length
)
+
Number
(
this
.
image_list
.
length
);
//当前上传的+已经上传的
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
imagePaths
.
forEach
(
imagePath
=>
{
imagePaths
.
forEach
(
imagePath
=>
{
// 使用compressImage 压缩图片
// 使用compressImage 压缩图片
uni
.
compressImage
({
uni
.
compressImage
({
src
:
imagePath
,
src
:
imagePath
.
tempFilePath
,
quality
:
50
,
//压缩质量,范围0~100,数值越小,质量越低,压缩率越高
quality
:
50
,
//压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success
:
compressedRes
=>
{
success
:
compressedRes
=>
{
console
.
log
(
'压缩图片成功:'
,
compressedRes
);
console
.
log
(
'压缩图片成功:'
,
compressedRes
);
...
...
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