Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
freemud.be.toolbox
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈宁
freemud.be.toolbox
Commits
69160f37
Commit
69160f37
authored
Jul 11, 2020
by
陈宁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 商品信息查询 开发
parent
46ec5aa1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
141 additions
and
46 deletions
+141
-46
freemud.be.toolboxview/src/views/requestresource/CouponProductSearch.vue
+2
-2
freemud.be.toolboxview/src/views/requestresource/ProductSearch.vue
+139
-44
No files found.
freemud.be.toolboxview/src/views/requestresource/CouponProductSearch.vue
View file @
69160f37
...
...
@@ -41,7 +41,7 @@
</Col>
<Col
span=
"12"
>
<FormItem
label=
"时间"
>
<TimePicker
:value
=
"time"
format=
"HH:mm:ss"
placeholder=
"时间"
style=
"width: 168px"
></TimePicker>
<TimePicker
v-model
=
"time"
format=
"HH:mm:ss"
placeholder=
"时间"
style=
"width: 168px"
></TimePicker>
</FormItem>
</Col>
<Col
span=
"12"
>
...
...
@@ -167,7 +167,7 @@ export default {
loadingSearch
:
false
,
channel
:
'delivery'
,
env
:
'prod'
,
time
:
'
12:34:56
'
,
time
:
''
,
couponCode
:
'385438604009450,527577357365398,QQQ'
,
storeId
:
'99998'
,
metaData
:
[],
...
...
freemud.be.toolboxview/src/views/requestresource/ProductSearch.vue
View file @
69160f37
...
...
@@ -41,7 +41,7 @@
</Col>
<Col
span=
"12"
>
<FormItem
label=
"时间"
>
<TimePicker
:value
=
"time"
format=
"HH:mm:ss"
placeholder=
"时间"
style=
"width: 168px"
></TimePicker>
<TimePicker
v-model
=
"time"
format=
"HH:mm:ss"
placeholder=
"时间"
style=
"width: 168px"
></TimePicker>
</FormItem>
</Col>
<Col
span=
"12"
>
...
...
@@ -68,6 +68,7 @@
<Table
v-if=
"item.product.data"
border
disabled-hover
size=
"small"
:columns=
"colCoupons"
:data=
"item.product.data.data"
...
...
@@ -102,12 +103,12 @@
<div
v-for=
"pg in row.val"
:key=
"pg.name"
style=
"margin: 5px 0px;"
>
<List
border
size=
"small"
>
<ListItem>
<Tag
color=
"
blue"
>
#
商品组名:
{{
pg
.
name
}}
</Tag>
<Tag
color=
"
blue"
>
#
商品组ID:
{{
pg
.
pgid
}}
</Tag>
<Tag
color=
"
blue"
>
#
是否必选:
{{
pg
.
must
}}
</Tag>
<Tag
color=
"
blue"
>
#
最大选择数量:
{{
pg
.
maxNumber
}}
</Tag>
<Tag
color=
"
blue"
>
#
备注:
{{
pg
.
remark
}}
</Tag>
<Tag
color=
"
blue"
>
#
类型:
{{
pg
.
type
}}
</Tag>
<Tag
color=
"
purple"
>
商品组名:
{{
pg
.
name
}}
</Tag>
<Tag
color=
"
purple"
>
商品组ID:
{{
pg
.
pgid
}}
</Tag>
<Tag
color=
"
purple"
>
是否必选:
{{
pg
.
must
}}
</Tag>
<Tag
color=
"
purple"
>
最大选择数量:
{{
pg
.
maxNumber
}}
</Tag>
<Tag
color=
"
purple"
>
备注:
{{
pg
.
remark
}}
</Tag>
<Tag
color=
"
purple"
>
类型:
{{
pg
.
type
}}
</Tag>
</ListItem>
<ListItem
v-for=
"product in buildGroupProductData(pg.groupDetail)"
...
...
@@ -169,6 +170,82 @@
</List>
</div>
</div>
<div
v-else-if=
"row.field === 'productSpecification'"
>
<List
v-if=
"row.val.length > 0"
border
size=
"small"
style=
"margin: 5px 0px;"
>
<ListItem
v-for=
"p in buildSpecificationProductData(row.val)"
:key=
"p.productId"
>
<Table
border
size=
"small"
:columns=
"colCoupons"
:data=
"p.data"
:show-header=
"false"
>
<
template
slot-scope=
"{ row }"
slot=
"name"
>
<div
class=
"xxx"
>
<strong>
{{
row
.
name
}}
</strong>
<Tag
color=
"geekblue"
>
{{
row
.
field
}}
</Tag>
</div>
</
template
>
<
template
slot-scope=
"{ row }"
slot=
"val"
>
<div
v-if=
"row.field === 'customizes'"
>
<div
v-for=
"customize in row.val"
:key=
"customize.id"
style=
"margin: 5px 0px;"
>
<List
border
size=
"small"
>
<ListItem>
<Tag
color=
"blue"
>
{{
customize
.
group
}}
</Tag>
</ListItem>
<ListItem
v-for=
"spec in customize.spec"
:key=
"spec.code"
>
<Tag
color=
"geekblue"
>
{{
spec
.
name
}}
-
{{
spec
.
code
}}
</Tag>
<br
/>
<Table
border
size=
"small"
:columns=
"colGrills"
:data=
"spec.grill"
></Table>
</ListItem>
</List>
</div>
</div>
<div
v-else
>
{{
row
.
val
}}
<Tooltip
v-if=
"row.descriptor"
max-width=
"200"
placement=
"right"
transfer
>
<span
style=
"color:#ed4014"
>
(
{{
row
.
descriptor
.
memo
}}
)
</span>
<Icon
type=
"md-information-circle"
/>
<div
slot=
"content"
>
{{
row
.
descriptor
.
desc
}}
</div>
</Tooltip>
</div>
</
template
>
</Table>
</ListItem>
</List>
</div>
<div
v-else-if=
"row.field === 'productExendsions'"
>
<Table
v-if=
"row.val.props.length > 0"
border
size=
"small"
:columns=
"colExtendsions"
:data=
"row.val.props"
style=
"margin: 5px 0px;"
>
<
template
slot-scope=
"{ row }"
slot=
"propKey"
>
<Tag>
{{
row
.
propCode
}}
</Tag>
<Tag>
{{
row
.
propDetailName
}}
</Tag>
</
template
>
</Table>
</div>
<div
v-else
>
{{ row.val }}
<Tooltip
v-if=
"row.descriptor"
max-width=
"200"
placement=
"right"
transfer
>
...
...
@@ -213,8 +290,8 @@ export default {
loadingSearch
:
false
,
channel
:
'delivery'
,
env
:
'dev'
,
time
:
'
12:34:56
'
,
productId
:
'123470098,123472924,123471941,123472439,123470930,123'
,
time
:
''
,
productId
:
'12347
3149,12347
0098,123472924,123471941,123472439,123470930,123'
,
storeId
:
'1450217'
,
metaData
:
[],
vData
:
[],
...
...
@@ -225,32 +302,22 @@ export default {
model
:
'text/javascript'
,
theme
:
'the-matrix'
},
colCoupons
:
[{
slot
:
'name'
,
maxWidth
:
250
},
{
slot
:
'val'
}],
colCoupons
:
[
{
slot
:
'name'
,
maxWidth
:
280
},
{
slot
:
'val'
}
],
colGrills
:
[
{
title
:
'des'
,
key
:
'des'
},
{
title
:
'modifier'
,
key
:
'modifier'
},
{
title
:
'pid'
,
key
:
'pid'
},
{
title
:
'price'
,
key
:
'price'
},
{
title
:
'qty'
,
key
:
'qty'
},
{
title
:
'selected'
,
key
:
'selected'
}
{
title
:
'des'
,
key
:
'des'
},
{
title
:
'modifier'
,
key
:
'modifier'
},
{
title
:
'pid'
,
key
:
'pid'
},
{
title
:
'price'
,
key
:
'price'
},
{
title
:
'qty'
,
key
:
'qty'
},
{
title
:
'selected'
,
key
:
'selected'
}
],
colExtendsions
:
[
{
title
:
'名称'
,
key
:
'propDetailDesc'
,
maxWidth
:
150
},
{
title
:
'键'
,
slot
:
'propKey'
},
{
title
:
'值'
,
key
:
'value'
}
]
}
},
...
...
@@ -288,20 +355,24 @@ export default {
bindData
(
data
)
{
const
products
=
[]
const
responseProducts
=
JSON
.
parse
(
data
[
0
].
responseContent
)
const
responseExendsions
=
JSON
.
parse
(
data
[
1
].
responseContent
)
responseProducts
.
data
.
products
.
forEach
(
p
=>
{
const
pExendsions
=
this
.
_
.
find
(
responseExendsions
.
data
,
{
productId
:
parseInt
(
p
.
pid
)
})
const
data
=
[
{
name
:
'编号'
,
field
:
'pid'
,
val
:
p
.
pid
},
{
name
:
'名称'
,
field
:
'name'
,
val
:
p
.
name
},
{
name
:
'customerCode'
,
field
:
'customerCode'
,
val
:
p
.
customerCode
},
{
name
:
'业务类型'
,
field
:
'businessType'
,
val
:
p
.
businessType
},
{
name
:
'价格'
,
field
:
'finalPrice'
,
val
:
p
.
finalPrice
},
{
name
:
'外带价格'
,
field
:
'finalPriceTakeout'
,
val
:
p
.
finalPriceTakeout
},
{
name
:
'原价'
,
field
:
'originalPrice'
,
val
:
p
.
originalPrice
},
{
name
:
'外带原价'
,
field
:
'originalPriceTakeout'
,
val
:
p
.
originalPriceTakeout
},
{
name
:
'价格
(单位: 分)
'
,
field
:
'finalPrice'
,
val
:
p
.
finalPrice
},
{
name
:
'外带价格
(单位: 分)
'
,
field
:
'finalPriceTakeout'
,
val
:
p
.
finalPriceTakeout
},
{
name
:
'原价
(单位: 分)
'
,
field
:
'originalPrice'
,
val
:
p
.
originalPrice
},
{
name
:
'外带原价
(单位: 分)
'
,
field
:
'originalPriceTakeout'
,
val
:
p
.
originalPriceTakeout
},
{
name
:
'状态'
,
field
:
'status'
,
val
:
p
.
status
},
{
name
:
'菜品类型'
,
field
:
'type'
,
val
:
p
.
type
},
{
name
:
'子品信息'
,
field
:
'productGroupList'
,
val
:
p
.
productGroupList
},
{
name
:
'特制信息'
,
field
:
'customizes'
,
val
:
p
.
customizes
}
{
name
:
'特制信息'
,
field
:
'customizes'
,
val
:
p
.
customizes
},
{
name
:
'套餐信息'
,
field
:
'productGroupList'
,
val
:
p
.
productGroupList
},
{
name
:
'多规格信息'
,
field
:
'productSpecification'
,
val
:
p
.
productSpecification
},
{
name
:
'扩展信息'
,
field
:
'productExendsions'
,
val
:
pExendsions
}
]
products
.
push
({
id
:
p
.
pid
,
name
:
p
.
name
,
data
:
data
})
})
...
...
@@ -355,10 +426,34 @@ export default {
{
name
:
'编号'
,
field
:
'productId'
,
val
:
p
.
productId
},
{
name
:
'名称'
,
field
:
'productName'
,
val
:
p
.
productName
},
{
name
:
'customerCode'
,
field
:
'customerCode'
,
val
:
p
.
customerCode
},
{
name
:
'价格'
,
field
:
'productFinalPrice'
,
val
:
p
.
productFinalPrice
},
{
name
:
'外带价格'
,
field
:
'productFinalPriceTakeout'
,
val
:
p
.
productFinalPriceTakeout
},
{
name
:
'原价'
,
field
:
'productPrice'
,
val
:
p
.
productPrice
},
{
name
:
'外带原价'
,
field
:
'productPriceTakeout'
,
val
:
p
.
productPriceTakeout
},
{
name
:
'价格(单位: 分)'
,
field
:
'productFinalPrice'
,
val
:
p
.
productFinalPrice
},
{
name
:
'外带价格(单位: 分)'
,
field
:
'productFinalPriceTakeout'
,
val
:
p
.
productFinalPriceTakeout
},
{
name
:
'原价(单位: 分)'
,
field
:
'productPrice'
,
val
:
p
.
productPrice
},
{
name
:
'外带原价(单位: 分)'
,
field
:
'productPriceTakeout'
,
val
:
p
.
productPriceTakeout
},
{
name
:
'状态'
,
field
:
'status'
,
val
:
p
.
status
},
{
name
:
'特制信息'
,
field
:
'customizes'
,
val
:
p
.
customizes
}
]
products
.
push
({
id
:
p
.
pid
,
name
:
p
.
name
,
data
:
data
})
})
products
.
forEach
(
p
=>
{
p
.
data
.
forEach
(
d
=>
{
d
.
descriptor
=
this
.
buildProductDescriptor
(
d
.
field
,
d
.
val
)
})
})
return
products
},
buildSpecificationProductData
(
data
)
{
const
products
=
[]
data
.
forEach
(
p
=>
{
const
data
=
[
{
name
:
'编号'
,
field
:
'productId'
,
val
:
p
.
productId
},
{
name
:
'customerCode'
,
field
:
'customerCode'
,
val
:
p
.
customerCode
},
{
name
:
'类型'
,
field
:
'productType'
,
val
:
p
.
productType
},
{
name
:
'价格(单位: 分)'
,
field
:
'finalPrice'
,
val
:
p
.
finalPrice
},
{
name
:
'外带价格(单位: 分)'
,
field
:
'finalPriceTakeout'
,
val
:
p
.
finalPriceTakeout
},
{
name
:
'原价(单位: 分)'
,
field
:
'originalPrice'
,
val
:
p
.
originalPrice
},
{
name
:
'外带原价(单位: 分)'
,
field
:
'originalPriceTakeout'
,
val
:
p
.
originalPriceTakeout
},
{
name
:
'状态'
,
field
:
'status'
,
val
:
p
.
status
},
{
name
:
'特制信息'
,
field
:
'customizes'
,
val
:
p
.
customizes
}
]
...
...
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