Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-ai-manager
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bc5a8ead
authored
Jan 29, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
s
1 parent
56b0a7fb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
62 deletions
src/api/voice.js
src/views/customer/components/src/manufacturers.vue
src/views/customer/voice/Edit.vue
src/views/customer/voice/gift.vue
src/views/customer/voice/index.vue
src/api/voice.js
View file @
bc5a8ea
...
@@ -26,7 +26,12 @@ const voiceList = {
...
@@ -26,7 +26,12 @@ const voiceList = {
*/
*/
const
manufacturers
=
{
const
manufacturers
=
{
p
:
[
__sGetManufacturer
],
p
:
[
__sGetManufacturer
],
req
:
params
=>
GlAxios
.
get
(
__sGetManufacturer
,
params
)
req
:
params
=>
GlAxios
.
post
(
__sGetManufacturer
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
}
}
/**
/**
...
@@ -34,7 +39,12 @@ const manufacturers = {
...
@@ -34,7 +39,12 @@ const manufacturers = {
*/
*/
const
merchants
=
{
const
merchants
=
{
p
:
[
__sGetMerchant
],
p
:
[
__sGetMerchant
],
req
:
params
=>
GlAxios
.
get
(
__sGetMerchant
,
params
)
req
:
params
=>
GlAxios
.
post
(
__sGetMerchant
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
}
}
/**
/**
...
@@ -42,8 +52,11 @@ const merchants = {
...
@@ -42,8 +52,11 @@ const merchants = {
*/
*/
const
addActivity
=
{
const
addActivity
=
{
p
:
[
__sAdd
],
p
:
[
__sAdd
],
req
:
params
=>
GlAxios
.
post
(
__sAdd
,
{
req
:
params
=>
GlAxios
.
post
(
__sAdd
,
params
,
{
params
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
})
}
}
/**
/**
...
@@ -51,8 +64,11 @@ const addActivity = {
...
@@ -51,8 +64,11 @@ const addActivity = {
*/
*/
const
mergeActivity
=
{
const
mergeActivity
=
{
p
:
[
__sMerge
],
p
:
[
__sMerge
],
req
:
params
=>
GlAxios
.
post
(
__sMerge
,
{
req
:
params
=>
GlAxios
.
post
(
__sMerge
,
params
,
{
params
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
},
requestType
:
'jsonString'
})
})
}
}
/**
/**
...
...
src/views/customer/components/src/manufacturers.vue
View file @
bc5a8ea
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
>
>
<gl-option
<gl-option
v-for=
"item in manufacturer_list"
v-for=
"item in manufacturer_list"
:key=
"item.manufacturer"
:key=
"item.manufacturer
Name
"
:label=
"item.manufacturerName"
:label=
"item.manufacturerName"
:value=
"item.manufacturer"
:value=
"item.manufacturer"
/>
/>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
>
>
<gl-option
<gl-option
v-for=
"item in merchant_list"
v-for=
"item in merchant_list"
:key=
"item.merchant
Id
"
:key=
"item.merchant
Name
"
:label=
"item.merchantName"
:label=
"item.merchantName"
:value=
"item.merchantId"
:value=
"item.merchantId"
/>
/>
...
@@ -160,7 +160,7 @@ export default {
...
@@ -160,7 +160,7 @@ export default {
handler
(
__eventBus
)
{
handler
(
__eventBus
)
{
if
(
__eventBus
)
{
if
(
__eventBus
)
{
__eventBus
.
$on
(
'submit'
,
callback
=>
{
__eventBus
.
$on
(
'submit'
,
callback
=>
{
this
.
$validator
.
validate
All
().
then
(
result
=>
{
this
.
$validator
.
validate
().
then
(
result
=>
{
this
.
result
.
manufacturers
=
this
.
manufacturer_list
.
filter
(
this
.
result
.
manufacturers
=
this
.
manufacturer_list
.
filter
(
obj
=>
this
.
model
.
manufacturerId
===
obj
.
manufacturer
obj
=>
this
.
model
.
manufacturerId
===
obj
.
manufacturer
)[
0
]
)[
0
]
...
@@ -168,7 +168,16 @@ export default {
...
@@ -168,7 +168,16 @@ export default {
obj
=>
this
.
model
.
merchantId
===
obj
.
merchantId
obj
=>
this
.
model
.
merchantId
===
obj
.
merchantId
)[
0
]
)[
0
]
this
.
$emit
(
'update:value'
,
this
.
result
)
this
.
$emit
(
'update:value'
,
this
.
result
)
let
__back__data__
=
null
// console.log(result, this.result, this.errorBags)
if
(
this
.
manufactureOnly
)
{
callback
&&
callback
(
this
.
result
)
callback
&&
callback
(
this
.
result
)
}
else
{
if
(
result
)
{
__back__data__
=
this
.
result
}
callback
&&
__back__data__
&&
callback
(
__back__data__
)
}
})
})
}),
}),
__eventBus
.
$on
(
'clear_error'
,
()
=>
{
__eventBus
.
$on
(
'clear_error'
,
()
=>
{
...
@@ -232,7 +241,7 @@ export default {
...
@@ -232,7 +241,7 @@ export default {
resolve
(
manufacturer_list_back_up
)
resolve
(
manufacturer_list_back_up
)
}
}
manufacturers
manufacturers
.
req
({})
.
req
({
pageNum
:
1
,
pageSize
:
999
})
.
then
(
res
=>
resolve
(
res
))
.
then
(
res
=>
resolve
(
res
))
.
catch
(
err
=>
reject
(
err
))
.
catch
(
err
=>
reject
(
err
))
})
})
...
@@ -243,7 +252,7 @@ export default {
...
@@ -243,7 +252,7 @@ export default {
resolve
(
merchant_list_back_up
)
resolve
(
merchant_list_back_up
)
}
}
merchants
merchants
.
req
({
merchantType
:
401
,
merchantStatus
:
0
})
.
req
({
merchantType
:
401
})
.
then
(
res
=>
resolve
(
res
))
.
then
(
res
=>
resolve
(
res
))
.
catch
(
err
=>
reject
(
err
))
.
catch
(
err
=>
reject
(
err
))
})
})
...
@@ -281,7 +290,7 @@ export default {
...
@@ -281,7 +290,7 @@ export default {
grayscaleUserList
:
null
,
//灰度用户列表
grayscaleUserList
:
null
,
//灰度用户列表
influenceScope
:
''
//用户类型
influenceScope
:
''
//用户类型
}
}
this
.
$emit
(
'update:value'
,
this
.
result
)
//
this.$emit('update:value', this.result)
},
},
__setDefault
(
__default
)
{
__setDefault
(
__default
)
{
this
.
model
.
merchantId
=
__default
.
merchantId
this
.
model
.
merchantId
=
__default
.
merchantId
...
...
src/views/customer/voice/Edit.vue
View file @
bc5a8ea
This diff is collapsed.
Click to expand it.
src/views/customer/voice/gift.vue
View file @
bc5a8ea
...
@@ -62,7 +62,14 @@
...
@@ -62,7 +62,14 @@
</gl-pagination>
</gl-pagination>
</gl-col>
</gl-col>
<gl-col
:span=
"12"
>
<gl-col
:span=
"12"
>
<gl-tag
type=
"success"
>
已选择优惠券编号:
{{
checked
.
id
}}
名称:
{{
checked
.
name
}}
</gl-tag>
<gl-tag
type=
"success"
v-if=
"checked.giftId"
>
已选择优惠券编号:
{{
checked
.
giftId
}}
名称:
{{
checked
.
giftName
}}
</gl-tag>
<gl-tag
type=
"success"
v-else
>
暂无选择
</gl-tag>
</gl-col>
</gl-col>
</gl-row>
</gl-row>
</gl-card>
</gl-card>
...
@@ -125,11 +132,20 @@ export default {
...
@@ -125,11 +132,20 @@ export default {
eventBus
:
Object
eventBus
:
Object
},
},
mixins
:
[
NoticeMixin
],
mixins
:
[
NoticeMixin
],
watch
:
{
eventBus
(
__eventBus
)
{
if
(
__eventBus
)
{
__eventBus
.
$on
(
'checked_gift'
,
value
=>
{
this
.
checked
=
value
})
}
}
},
data
()
{
data
()
{
return
{
return
{
submiting
:
false
,
submiting
:
false
,
tableLoading
:
false
,
tableLoading
:
false
,
checked
:
{
id
:
274
,
name
:
'3.98优惠券'
,
type
:
1
},
checked
:
{},
searchCondition
:
{
searchCondition
:
{
name
:
''
,
name
:
''
,
type
:
''
type
:
''
...
@@ -147,29 +163,17 @@ export default {
...
@@ -147,29 +163,17 @@ export default {
giftTable
:
{
giftTable
:
{
highlightCurrentRow
:
true
,
highlightCurrentRow
:
true
,
rowClick
:
(
row
,
event
,
column
)
=>
{
rowClick
:
(
row
,
event
,
column
)
=>
{
this
.
checked
=
row
const
{
id
,
name
,
type
}
=
row
this
.
checked
=
{
giftId
:
id
,
giftName
:
name
,
giftType
:
type
}
},
},
selectionChange
:
this
.
handleGiftTableSelectionChange
,
selectionChange
:
this
.
handleGiftTableSelectionChange
,
height
:
330
,
height
:
330
,
border
:
true
,
border
:
true
,
data
:
[
data
:
[],
{
name
:
'嘀嘀虎1'
,
id
:
'001'
},
{
name
:
'嘀嘀虎2'
,
id
:
'002'
},
{
name
:
'嘀嘀虎3'
,
id
:
'003'
},
{
name
:
'嘀嘀虎4'
,
id
:
'004'
}
],
column
:
[
column
:
[
{
{
label
:
'优惠券编号'
,
label
:
'优惠券编号'
,
...
@@ -312,6 +316,7 @@ export default {
...
@@ -312,6 +316,7 @@ export default {
margin
:
4px
;
margin
:
4px
;
.el-tag--success
{
.el-tag--success
{
width
:
100%
;
width
:
100%
;
text-align
:
center
;
}
}
}
}
.current-row
{
.current-row
{
...
...
src/views/customer/voice/index.vue
View file @
bc5a8ea
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
import
Edit
from
'./Edit'
import
Edit
from
'./Edit'
import
{
Manufacturers
}
from
'../components'
import
{
Manufacturers
}
from
'../components'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
voiceList
,
manufacturers
}
from
'@/api'
import
{
voiceList
,
manufacturers
,
mergeActivity
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
import
{
NoticeMixin
}
from
'@/mixins'
import
Vue
from
'vue'
import
Vue
from
'vue'
export
default
{
export
default
{
...
@@ -174,11 +174,11 @@ export default {
...
@@ -174,11 +174,11 @@ export default {
label
:
'上架'
,
label
:
'上架'
,
type
:
'text'
,
type
:
'text'
,
formatter
:
row
=>
formatter
:
row
=>
row
.
status
===
{
ON
:
'上架'
,
OF
:
'下架'
}[
row
.
status
],
row
.
status
===
{
ON
:
'上架'
,
OF
:
'下架'
}[
row
s
.
status
],
callback
:
(
index
,
row
)
=>
callback
:
(
index
,
row
s
)
=>
this
.
$confirm
(
this
.
$confirm
(
`确定
${
`确定
${
{
ON
:
'上架'
,
OF
:
'下架'
}
[row[index].status]
{
ON
:
'上架'
,
OF
:
'下架'
}
[row
s
[index].status]
}该活动?`
,
}该活动?`
,
''
,
''
,
{
{
...
@@ -187,6 +187,10 @@ export default {
...
@@ -187,6 +187,10 @@ export default {
)
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
tableLoading
=
true
this
.
tableLoading
=
true
this
.
updateActivity
({
id
:
rows
[
index
].
id
,
status
:
{
ON
:
'OF'
,
OF
:
'ON'
}[
rows
.
status
]
})
})
})
.
catch
(
err
=>
console
.
log
(
err
))
.
catch
(
err
=>
console
.
log
(
err
))
},
},
...
@@ -204,7 +208,10 @@ export default {
...
@@ -204,7 +208,10 @@ export default {
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
tableLoading
=
true
this
.
tableLoading
=
true
this
.
deleteChannel
(
rows
[
index
].
id
)
this
.
updateActivity
({
id
:
rows
[
index
].
id
,
deletedFlag
:
'true'
})
})
})
.
catch
(
err
=>
this
.
error
(
err
))
.
catch
(
err
=>
this
.
error
(
err
))
}
}
...
@@ -230,13 +237,17 @@ export default {
...
@@ -230,13 +237,17 @@ export default {
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
var
__p
=
{
condition
:
{}
}
var
__p
=
{
condition
:
{}
}
this
.
eventBus
.
$emit
(
'submit'
,
data
=>
{
this
.
eventBus
.
$emit
(
'submit'
,
data
=>
{
if
(
data
.
manufacturers
)
{
try
{
if
(
data
&&
data
.
manufacturers
)
{
__p
.
condition
.
manufacturerId
=
data
.
manufacturers
.
manufacturerId
__p
.
condition
.
manufacturerId
=
data
.
manufacturers
.
manufacturerId
}
}
if
(
this
.
searchCondition
.
activityTitle
)
{
if
(
this
.
searchCondition
.
activityTitle
)
{
__p
.
condition
.
activityTitle
=
this
.
searchCondition
.
activityTitle
__p
.
condition
.
activityTitle
=
this
.
searchCondition
.
activityTitle
}
}
resolve
(
__p
)
resolve
(
__p
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
})
})
})
})
},
},
...
@@ -253,29 +264,14 @@ export default {
...
@@ -253,29 +264,14 @@ export default {
this
.
error
(
err
)
this
.
error
(
err
)
})
})
},
},
updateChannel
(
params
)
{
updateActivity
(
param
)
{
// updateChannel
mergeActivity
// .req(params)
.
req
(
param
)
// .then(res => {
.
then
(
res
=>
{
// notice.okTips()
console
.
log
(
res
)
// this.loadingGetList()
this
.
loadingGetList
()
// this.updateVisibleChange()
})
// })
.
catch
(
err
=>
console
.
log
(
err
))
// .catch(err => {
// this.updateLoading = false
// notice.errorTips(err)
// })
},
deleteChannel
(
params
)
{
// deleteChannel
// .req({ id: params })
// .then(res => {
// notice.okTips(res)
// this.loadingGetList()
// })
// .catch(err => {
// notice.errorTips(err)
// })
},
},
getManufacturer
()
{
getManufacturer
()
{
manufacturers
manufacturers
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment