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
374d4d02
authored
May 09, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
364b6029
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
4 deletions
pages/tally/fixBox.vue
pages/tally/index.vue
pages/tally/unboxing.vue
pages/tally/fixBox.vue
View file @
374d4d02
<
template
>
<view
class=
"tally-fixBox"
>
<view
class=
"input-box row bothSide verCenter"
>
<input
class=
"uni-input"
placeholder=
"输入或扫描
入
箱号"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event)"
:focus=
"is_focus"
/>
<input
class=
"uni-input"
placeholder=
"输入或扫描箱号"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event)"
:focus=
"is_focus"
/>
<view
class=
"btn row rowCenter verCenter"
@
click=
"add()"
>
添 加
</view>
</view>
<view
class=
"list"
v-if=
"list.length > 0"
>
...
...
pages/tally/index.vue
View file @
374d4d02
...
...
@@ -130,7 +130,14 @@
</view>
<view
class=
"pb16 row verCenter bothSide"
style=
"margin-top: 24rpx;"
>
<view
class=
"row verCenter"
>
<text
class=
"t3 w130"
>
已入库数量:
</text>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<text
class=
"t3 w130"
>
已入库数量:
</text>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<text
class=
"t3 w130"
>
入库数量:
</text>
</
template
>
<view
class=
"input-text"
>
<input
class=
"uni-input"
:disabled=
"item.tally_status == 3"
type=
"number"
inputmode=
"numeric"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].tally_num"
/>
</view>
...
...
@@ -734,7 +741,7 @@
if
(
res
.
confirm
)
{
this
.
request
(
API
.
cancelTallyDetail
,
'POST'
,
{
wstydl_id
:
this
.
form
[
index
].
wstydl_id
,
wsty_id
:
this
.
form
[
index
].
wsty_id
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
getTallyData
(
1
);
this
.
getTallyData
();
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
...
...
pages/tally/unboxing.vue
View file @
374d4d02
<
template
>
<view
class=
"unboxing"
>
<view
class=
"input-box row bothSide verCenter"
>
<input
class=
"uni-input"
placeholder=
"输入或扫描
入
箱号"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"box_sn"
@
input=
"handleInput($event,1)"
/>
<input
class=
"uni-input"
placeholder=
"输入或扫描箱号"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"box_sn"
@
input=
"handleInput($event,1)"
/>
<template
v-if=
"tallyData.detail && tallyData.detail.length > 0"
>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"closeBox()"
>
重新封箱
</view>
</
template
>
...
...
@@ -262,6 +262,7 @@
chooseImageChange
(
key
)
{
this
.
noexebshowFalg
=
false
;
// 使用 chooseImage选择图片
// #ifdef MP-WEIXIN
uni
.
chooseMedia
({
count
:
5
,
mediaType
:
[
'image'
],
...
...
@@ -339,6 +340,86 @@
});
}
});
// #endif
// #ifdef APP-PLUS
uni
.
chooseImage
({
count
:
5
,
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
>
5
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'图片不超过5张'
,
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
:
API
.
uploadImageHk
+
'?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
[
key
].
push
(
data
.
data
.
oss_image_url
);
this
.
$forceUpdate
();
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
icon
:
'none'
});
}
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'上传图片失败'
,
icon
:
'none'
});
}
});
},
fail
:
err
=>
{
console
.
log
(
'压缩图片失败:'
,
err
);
}
});
});
}
});
// #endif
},
/**
* 预览图片
...
...
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