Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pda-scan
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes-pda-scan
Commits
5bfce159
Commit
5bfce159
authored
Jul 24, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
e704ecea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
62 deletions
+72
-62
FactorySelect.vue
components/FactorySelect/FactorySelect.vue
+72
-62
No files found.
components/FactorySelect/FactorySelect.vue
View file @
5bfce159
<
template
>
<view
class=
"factoryBox"
>
<zxz-uni-data-select
filterable
v-model=
"warehouseCode"
dataKey=
"label"
placeholder=
"请选择仓库别"
dataValue=
"value"
:localdata=
"warehouseData"
@
change=
'onWarehouseChange'
/>
</view>
<view
class=
"factoryBox"
>
<zxz-uni-data-select
filterable
v-model=
"warehouseCode"
dataKey=
"label"
placeholder=
"请选择仓库别"
dataValue=
"value"
:localdata=
"warehouseData"
@
change=
"onWarehouseChange"
/>
</view>
</
template
>
<
script
>
export
default
{
model
:
{
prop
:
'value'
,
event
:
'update'
},
props
:
{
value
:
{
type
:
String
,
defualt
:
''
}
},
data
()
{
return
{
warehouseData
:
[]
}
},
computed
:
{
warehouseCode
:
{
get
()
{
return
this
.
value
},
set
(
v
)
{
this
.
$emit
(
'update'
,
v
)
}
}
},
created
()
{
this
.
getDepotLists
()
},
methods
:
{
onWarehouseChange
(
e
)
{
this
.
$emit
(
'change'
,
e
);
},
getDepotLists
()
{
this
.
$u
.
api
.
sapApi
.
sapDict
({
FIELDNAME
:
'T001L'
})
.
then
((
res
)
=>
{
if
(
res
)
{
res
.
forEach
((
ele
)
=>
{
ele
.
label
=
ele
.
LGORT
+
"-"
+
ele
.
LGOBE
;
ele
.
value
=
ele
.
LGORT
});
this
.
warehouseData
=
res
;
}
else
{
this
.
warehouseData
=
[];
}
});
},
}
}
export
default
{
model
:
{
prop
:
"value"
,
event
:
"update"
,
},
props
:
{
value
:
{
type
:
String
,
defualt
:
""
,
},
},
data
()
{
return
{
warehouseData
:
[],
};
},
computed
:
{
warehouseCode
:
{
get
()
{
return
this
.
value
;
},
set
(
v
)
{
this
.
$emit
(
"update"
,
v
);
},
},
},
created
()
{
this
.
getDepotLists
();
},
methods
:
{
onWarehouseChange
(
e
)
{
this
.
$emit
(
"change"
,
e
);
},
getDepotLists
()
{
this
.
$u
.
api
.
sapApi
.
sapDict
({
FIELDNAME
:
"T001L"
,
})
.
then
((
res
)
=>
{
if
(
res
)
{
// 过滤当前工厂下的库存地点
this
.
warehouseData
=
res
.
filter
((
ele
)
=>
ele
.
WERKS
==
this
.
vuex_user_factory
)
.
map
((
item
)
=>
{
item
.
label
=
item
.
LGORT
+
"-"
+
item
.
LGOBE
;
item
.
value
=
item
.
LGORT
;
return
item
;
});
}
else
{
this
.
warehouseData
=
[];
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
>
.factoryBox
{
padding
:
10rpx
20rpx
0
;
.factoryBox
{
padding
:
10rpx
20rpx
0
;
.item-select
{
margin-bottom
:
20rpx
;
}
}
.item-select
{
margin-bottom
:
20rpx
;
}
}
</
style
>
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