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
acab798e
authored
Mar 25, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
产地拆分
parent
6992d7d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
manifest.json
pages/tallyGoods/originSplit.vue
manifest.json
View file @
acab798e
...
@@ -42,7 +42,8 @@
...
@@ -42,7 +42,8 @@
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
],
"minSdkVersion"
:
21
},
},
/*
ios打包配置
*/
/*
ios打包配置
*/
"ios"
:
{
"ios"
:
{
...
...
pages/tallyGoods/originSplit.vue
View file @
acab798e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</view>
</view>
<view
class=
"pick-list row bothSide verCenter"
>
<view
class=
"pick-list row bothSide verCenter"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"goods_index"
:range=
"goods_list"
:range-key=
"'model'"
style=
"width: 80%;"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"goods_index"
:range=
"goods_list"
:range-key=
"'model'"
style=
"width: 80%;"
>
<view
class=
"uni-text"
>
{{
goods_list
[
goods_index
].
model
||
'请选择型号'
}}
</view>
<view
class=
"uni-text"
>
{{
(
goods_list
[
goods_index
]
&&
goods_list
[
goods_index
].
model
)
||
'请选择型号'
}}
</view>
</picker>
</picker>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
</view>
</view>
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<view
class=
"uni-text"
@
click=
"open(index)"
>
{{
detail_json
[
index
].
origin
?
detail_json
[
index
].
origin
:
'请选择国家地区'
}}
</view>
<view
class=
"uni-text"
@
click=
"open(index)"
>
{{
detail_json
[
index
].
origin
?
detail_json
[
index
].
origin
:
'请选择国家地区'
}}
</view>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
</view>
</view>
<view
class=
"input-wrap"
><input
@
input=
"onInputNum"
type=
"number"
inputmode=
"numeric"
placeholder=
"请输入拆分数量"
class=
"uni-input"
placeholder-style=
"color:#404547;font-weight:bold;"
v-model=
"detail_json[index].tally_num"
/></view>
<view
class=
"input-wrap"
><input
@
input=
"onInputNum"
type=
"number"
placeholder=
"请输入拆分数量"
class=
"uni-input"
placeholder-style=
"color:#404547;font-weight:bold;"
v-model=
"detail_json[index].tally_num"
/></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
* @param {Object} target
* @param {Object} target
*/
*/
findIndex
(
arr
,
target
)
{
findIndex
(
arr
,
target
)
{
const
result
=
[];
var
result
=
[];
arr
.
map
((
item
,
index
)
=>
{
arr
.
map
((
item
,
index
)
=>
{
if
(
item
===
target
)
{
if
(
item
===
target
)
{
result
.
push
(
index
);
result
.
push
(
index
);
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
return
result
;
return
result
;
},
},
onInputNum
()
{
onInputNum
()
{
const
total
=
this
.
detail_json
.
reduce
((
sum
,
item
)
=>
{
var
total
=
this
.
detail_json
.
reduce
((
sum
,
item
)
=>
{
if
(
item
.
tally_num
)
{
if
(
item
.
tally_num
)
{
return
sum
+
item
.
tally_num
*
1
;
return
sum
+
item
.
tally_num
*
1
;
}
else
{
}
else
{
...
@@ -265,7 +265,7 @@
...
@@ -265,7 +265,7 @@
return
false
;
return
false
;
});
});
const
hasDuplicates
=
this
.
hasDuplicateOrigin
(
this
.
detail_json
);
var
hasDuplicates
=
this
.
hasDuplicateOrigin
(
this
.
detail_json
);
if
(
hasDuplicates
)
{
if
(
hasDuplicates
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'不允许有相同产地,请重新选择产地'
,
title
:
'不允许有相同产地,请重新选择产地'
,
...
@@ -275,8 +275,8 @@
...
@@ -275,8 +275,8 @@
}
}
if
(
shouldContinue
)
{
if
(
shouldContinue
)
{
const
totalTallyNum
=
this
.
detail_json
.
reduce
((
total
,
item
)
=>
total
+
parseInt
(
item
.
tally_num
),
0
);
var
totalTallyNum
=
this
.
detail_json
.
reduce
((
total
,
item
)
=>
total
+
parseFloat
(
item
.
tally_num
||
0
),
0
);
const
total
=
this
.
goods_list
[
this
.
goods_index
].
qty
*
1
;
var
total
=
this
.
goods_list
[
this
.
goods_index
].
qty
*
1
;
if
(
totalTallyNum
!=
total
)
{
if
(
totalTallyNum
!=
total
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'错误提示'
,
title
:
'错误提示'
,
...
...
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