Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
dfe4cbb6
Commit
dfe4cbb6
authored
Jan 26, 2024
by
hiyonx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售订单
parent
15f9f23b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
150 additions
and
105 deletions
+150
-105
index.vue
src/components/SapPropertyData/index.vue
+29
-11
index.vue
src/views/mes/md/sapproperty/index.vue
+1
-5
index.vue
src/views/mes/order/sales/index.vue
+1
-1
index.vue
src/views/mes/order/salesdetail/index.vue
+119
-88
No files found.
src/components/SapPropertyData/index.vue
View file @
dfe4cbb6
...
...
@@ -4,7 +4,7 @@
<el-row
class=
"form-wrap"
:gutter=
"gutter"
>
<div>
<template
v-for=
"(sapProperties, key) in sapPropertyMap"
>
<
div
class=
"separator"
>
{{
getViewTypeName
(
key
)
}}
</div
>
<
el-col
v-if=
"showSubTitle"
:span=
"24"
class=
"separator"
>
{{
getViewTypeName
(
key
)
}}
</el-col
>
<template
v-for=
"item in sapProperties"
>
<el-col
:span=
"span"
:key=
"item.id"
>
<el-form-item
:label=
"item.name"
:prop=
"key + '.' + item.sapField"
...
...
@@ -34,6 +34,7 @@ export default {
props
:
{
gutter
:
{
type
:
Number
,
default
:
10
},
span
:
{
type
:
Number
,
default
:
8
},
showSubTitle
:
{
type
:
Boolean
,
default
:
true
},
},
data
()
{
return
{
...
...
@@ -106,8 +107,30 @@ export default {
return
viewType
},
setData
(
data
,
sapData
,
sapPropertyMap
)
{
let
keys
=
Object
.
keys
(
sapPropertyMap
)
setData
(
data
,
sapData
,
propertyViews
)
{
let
newSapData
=
{}
for
(
const
propertyView
of
propertyViews
)
{
let
propertyList
=
propertyView
.
propertyList
switch
(
propertyView
.
dataType
)
{
case
0
:
// 属性
for
(
const
property
of
propertyList
)
{
newSapData
[
property
.
sapField
]
=
data
[
property
.
relationField
]
||
sapData
[
property
.
sapField
]
||
''
}
case
1
:
// 对象
let
viewObj
=
{}
for
(
const
property
of
propertyList
)
{
viewObj
[
property
.
sapField
]
=
data
[
propertyView
.
viewType
][
property
.
relationField
]
||
data
[
property
.
relationField
]
||
sapData
[
propertyView
.
viewType
][
property
.
sapField
]
||
''
}
newSapData
[
propertyView
.
viewType
]
=
viewObj
case
2
:
// 列表
let
viewArr
=
sapData
[
propertyView
.
viewType
]
||
[]
data
for
(
const
property
of
propertyList
)
{
}
}
}
for
(
const
key
of
keys
)
{
if
(
!
sapPropertyMap
.
hasOwnProperty
(
key
))
continue
if
(
!
sapData
[
key
])
sapData
[
key
]
=
{}
...
...
@@ -131,12 +154,7 @@ export default {
let
sapData
=
{}
// 获取sap特性列表
listByType
({
type
,
viewType
}).
then
(
res
=>
{
let
sapProperties
=
res
.
data
||
[]
let
sapPropertyMap
=
sapProperties
.
reduce
((
sapPropertyMap
,
item
)
=>
{
if
(
!
sapPropertyMap
[
item
.
viewType
])
sapPropertyMap
[
item
.
viewType
]
=
[]
sapPropertyMap
[
item
.
viewType
].
push
(
item
)
return
sapPropertyMap
},
{})
let
propertyViews
=
res
.
data
||
[]
if
(
relationId
)
{
// 获取sap特性值
listData
({
type
,
viewType
,
relationId
}).
then
(
resp
=>
{
...
...
@@ -144,10 +162,10 @@ export default {
this
.
form
.
id
=
row
.
id
sapData
=
JSON
.
parse
(
row
.
sapData
)
// 再次赋值
this
.
setData
(
data
,
sapData
,
sapPropertyMap
)
this
.
setData
(
data
,
sapData
,
propertyViews
)
})
}
else
{
this
.
setData
(
data
,
sapData
,
sapPropertyMap
)
this
.
setData
(
data
,
sapData
,
propertyViews
)
}
})
}
...
...
src/views/mes/md/sapproperty/index.vue
View file @
dfe4cbb6
...
...
@@ -156,9 +156,7 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"关联属性"
prop=
"relationField"
>
<el-select
v-model=
"form.relationField"
placeholder=
"请选择关联客户属性"
clearable
filterable
>
<el-option
v-for=
"item in relationFields"
:key=
"item.value"
v-bind=
"item"
/>
</el-select>
<el-input
v-model
.
trim=
"form.relationField"
placeholder=
"请选择关联客户属性"
clearable
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
...
...
@@ -237,7 +235,6 @@ export default {
enableFlag
:
'Y'
,
},
viewTypes
:
[],
relationFields
:
[],
// 表单校验
rules
:
{
type
:
[{
required
:
true
,
message
:
'特性类型不能为空'
,
trigger
:
[
'blur'
,
'change'
]}],
...
...
@@ -257,7 +254,6 @@ export default {
methods
:
{
onChangeType
(
val
)
{
this
.
viewTypes
=
this
.
dict
.
type
.
sap_property_view
.
filter
(
item
=>
item
.
value
===
val
).
map
(
item
=>
({
label
:
item
.
label
,
value
:
item
.
raw
.
cssClass
}))
this
.
relationFields
=
this
.
dict
.
type
.
sap_property_relation
.
filter
(
item
=>
item
.
value
===
val
).
map
(
item
=>
({
label
:
item
.
label
,
value
:
item
.
raw
.
cssClass
}))
},
toDataType
()
{
this
.
$router
.
push
({
path
:
'/mes/md/propertytype'
})
...
...
src/views/mes/order/sales/index.vue
View file @
dfe4cbb6
...
...
@@ -115,7 +115,7 @@
icon=
"el-icon-search"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['od:salesOrder:edit']"
>
查看
>
详情
</el-button>
<el-button
size=
"mini"
...
...
src/views/mes/order/salesdetail/index.vue
View file @
dfe4cbb6
This diff is collapsed.
Click to expand it.
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