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
1e5b25ab
authored
Apr 19, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复产地未选中bug
parent
272774c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
pages/tallyReceive/operate.vue
pages/tallyReceive/operate.vue
View file @
1e5b25ab
...
...
@@ -606,13 +606,22 @@
}
},
500
),
/**
* 获取产地
* @param {Object} value
* 获取产地 是否选中产地
*/
getUseOption
()
{
getUseOption
(
value
)
{
this
.
request
(
API
.
getUseOption
,
'GET'
,
{
type
:
'coo'
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
length
>
0
)
{
this
.
useOption
=
res
.
data
;
//上游传入过来有产地则选中
if
(
value
)
{
var
index
=
this
.
useOption
.
findIndex
(
item
=>
item
.
name
.
split
(
'|'
).
includes
(
value
));
if
(
index
!=
-
1
)
{
this
.
useOptionIndex
=
index
;
this
.
formParams
.
coo
=
res
.
data
[
this
.
useOptionIndex
].
value
;
}
}
//如果携带产地就自动赋值
if
(
this
.
fastParams
.
origin
)
{
var
index
=
res
.
data
.
findIndex
(
item
=>
item
.
name
.
split
(
'|'
).
includes
(
this
.
fastParams
.
origin
));
...
...
@@ -641,9 +650,7 @@
this
.
detail
=
res
.
data
.
list
[
0
];
this
.
formParams
.
tally_qty
=
res
.
data
.
list
[
0
].
wait_tally_qty
;
this
.
formParams
.
date_code
=
res
.
data
.
list
[
0
].
expect_date_code
;
this
.
coo
=
res
.
data
.
list
[
0
].
coo_key
;
//产地
this
.
is_watch
=
res
.
data
.
list
[
0
].
is_watch
==
1
?
true
:
false
;
//是否看货
if
(
res
.
data
.
list
[
0
].
mobile_default_img
)
{
this
.
image_list
=
res
.
data
.
list
[
0
].
mobile_default_img
.
split
(
','
);
}
else
{
...
...
@@ -666,7 +673,7 @@
this
.
getOrderIsPrintLabel
(
res
.
data
.
list
[
0
].
order_items_id
);
this
.
getUseOption
();
//初始化产地
this
.
getUseOption
(
res
.
data
.
list
[
0
].
coo_key
);
//初始化产地
}
}
else
{
uni
.
showToast
({
...
...
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