Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
sso-equity
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 0c82cb8d
authored
Feb 20, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改单词
1 parent
f4d03d85
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
70 deletions
src/api/modules/goodsConponApi.js → src/api/modules/goodsCouponApi.js
src/assets/conpon.png → src/assets/coupon.png
src/router/routes.js
src/views/goodsConpon/addConpon.vue → src/views/goodsCoupon/addCoupon.vue
src/views/goodsConpon/goodsDialog.vue → src/views/goodsCoupon/goodsDialog.vue
src/views/goodsConpon/index.vue → src/views/goodsCoupon/index.vue
src/views/goodsConpon/receivedDetail.vue → src/views/goodsCoupon/receivedDetail.vue
src/api/modules/goodsCo
n
ponApi.js
→
src/api/modules/goodsCo
u
ponApi.js
View file @
0c82cb8
File moved
src/assets/co
n
pon.png
→
src/assets/co
u
pon.png
View file @
0c82cb8
2.71 KB
src/router/routes.js
View file @
0c82cb8
...
...
@@ -101,23 +101,23 @@ const staticRoutes = Object.freeze([
},
{
//商品优惠券
name
:
'goodsCo
n
pon'
,
path
:
'/goodsCo
n
pon/index'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
n
pon/index.vue`
],
resolve
),
name
:
'goodsCo
u
pon'
,
path
:
'/goodsCo
u
pon/index'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
u
pon/index.vue`
],
resolve
),
meta
:
{}
},
{
//增加商品优惠券
name
:
'addCo
n
pon'
,
path
:
'/goodsCo
npon/addCon
pon'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
npon/addCon
pon.vue`
],
resolve
),
name
:
'addCo
u
pon'
,
path
:
'/goodsCo
upon/addCou
pon'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
upon/addCou
pon.vue`
],
resolve
),
meta
:
{}
},
{
//商品优惠券领取详情页
name
:
'receivedDetail'
,
path
:
'/goodsCo
n
pon/receivedDetail'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
n
pon/receivedDetail.vue`
],
resolve
),
path
:
'/goodsCo
u
pon/receivedDetail'
,
component
:
resolve
=>
require
([
`@/views/goodsCo
u
pon/receivedDetail.vue`
],
resolve
),
meta
:
{}
}
])
...
...
src/views/goodsCo
npon/addCon
pon.vue
→
src/views/goodsCo
upon/addCou
pon.vue
View file @
0c82cb8
<
template
>
<div
class=
"container"
>
<glsx-combi-form
:isInline=
"false"
ref=
"couponRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formObj
.
sync=
"co
nponFormObj"
:formData=
"conponFormData"
:formRules=
"con
ponRule"
>
<glsx-combi-form
:isInline=
"false"
ref=
"couponRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formObj
.
sync=
"co
uponFormObj"
:formData=
"couponFormData"
:formRules=
"cou
ponRule"
>
<div
slot=
"selectGoods"
>
<el-button
icon=
"el-icon-plus"
size=
"small"
@
click=
"openCo
n
ponDialog"
>
选择商品
</el-button>
<GLTable
v-if=
"co
nponFormObj.selectedGoodsList.length"
class=
"selected_table"
:hasPage=
"false"
ref=
"selectedRef"
:tableParams=
"selectedtableParams"
:tableData=
"con
ponFormObj.selectedGoodsList"
>
<el-button
icon=
"el-icon-plus"
size=
"small"
@
click=
"openCo
u
ponDialog"
>
选择商品
</el-button>
<GLTable
v-if=
"co
uponFormObj.selectedGoodsList.length"
class=
"selected_table"
:hasPage=
"false"
ref=
"selectedRef"
:tableParams=
"selectedtableParams"
:tableData=
"cou
ponFormObj.selectedGoodsList"
>
<div
class=
"good_name"
slot=
"goodName"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/co
n
pon.png"
alt=
""
/>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/co
u
pon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
{{
scope
.
scope
.
appearance
==
2
?
scope
.
scope
.
productName
+
(
scope
.
scope
.
denomination
||
''
)
:
scope
.
scope
.
productName
}}
</div>
<div
class=
"co
npon_cost"
slot=
"con
ponCost"
slot-scope=
"scope"
>
<div
class=
"co
upon_cost"
slot=
"cou
ponCost"
slot-scope=
"scope"
>
<el-input
:class=
"
{ lowerZero: Number(scope.scope.newCost)
<
= 0 || Number(scope.scope.newCost) >= Number(scope.scope.salesPrice) }" v-model="scope.scope.newCost" @input="formatNum(scope.scope.id, scope.scope.newCost)" />
</div>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
...
...
@@ -18,10 +18,10 @@
</GLTable>
</div>
<div
slot=
"validityDate"
>
<el-input
class=
"date_input"
v-model
.
number=
"co
n
ponFormObj.effectiveDays"
oninput=
"value=value.replace(/^0/g,'').replace(/[^\d]/g,'')"
type=
"text"
/>
<el-input
class=
"date_input"
v-model
.
number=
"co
u
ponFormObj.effectiveDays"
oninput=
"value=value.replace(/^0/g,'').replace(/[^\d]/g,'')"
type=
"text"
/>
</div>
</glsx-combi-form>
<gooods-dialog
@
confirmDialog=
"confirmDialog"
@
closeDialog=
"closeDialog"
:selectedGoodsList=
"co
n
ponFormObj.selectedGoodsList"
v-if=
"isVisible"
:isVisible=
"isVisible"
></gooods-dialog>
<gooods-dialog
@
confirmDialog=
"confirmDialog"
@
closeDialog=
"closeDialog"
:selectedGoodsList=
"co
u
ponFormObj.selectedGoodsList"
v-if=
"isVisible"
:isVisible=
"isVisible"
></gooods-dialog>
<div
class=
"btn"
>
<el-button
type=
"primary"
@
click=
"commit()"
>
创建优惠券
</el-button>
</div>
...
...
@@ -31,9 +31,9 @@
<i
class=
"el-icon-warning icon"
></i>
<div
class=
"tip"
>
以下品牌商品优惠券面额已存在,请修改面额或删除
</div>
</div>
<div
class=
"error_co
n
pon"
>
<div
class=
"co
npon_item"
v-for=
"(item, index) in errorCon
ponList"
:key=
"index"
>
<img
v-if=
"item.appearance == 1"
src=
"@/assets/co
n
pon.png"
alt=
""
/>
<div
class=
"error_co
u
pon"
>
<div
class=
"co
upon_item"
v-for=
"(item, index) in errorCou
ponList"
:key=
"index"
>
<img
v-if=
"item.appearance == 1"
src=
"@/assets/co
u
pon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<span
class=
"info"
>
【
{{
item
.
brandName
}}{{
item
.
productName
}}{{
item
.
appearance
==
2
?
item
.
denomination
:
''
}}
】
{{
item
.
newCost
}}
元
</span>
</div>
...
...
@@ -54,8 +54,8 @@ export default {
return
{
isVisible
:
false
,
errorVisible
:
false
,
errorCo
n
ponList
:
[],
co
n
ponFormData
:
[
errorCo
u
ponList
:
[],
co
u
ponFormData
:
[
{
label
:
'选择产品'
,
name
:
'selectedGoodsList'
,
...
...
@@ -67,11 +67,11 @@ export default {
addHtml
:
'validityDate'
}
],
co
n
ponFormObj
:
{
co
u
ponFormObj
:
{
selectedGoodsList
:
[],
effectiveDays
:
''
},
co
n
ponRule
:
{
co
u
ponRule
:
{
selectedGoodsList
:
[{
required
:
true
,
message
:
'请选择商品'
,
trigger
:
'change'
}],
effectiveDays
:
[{
required
:
true
,
message
:
'请输入有效期'
,
trigger
:
'change'
}]
},
...
...
@@ -105,7 +105,7 @@ export default {
},
{
label
:
'券面额'
,
addHtml
:
'co
n
ponCost'
,
addHtml
:
'co
u
ponCost'
,
width
:
110
},
{
...
...
@@ -154,13 +154,13 @@ export default {
.
replace
(
'$#$'
,
'.'
)
temp
=
temp
.
replace
(
/^
(
-
)
*
(\d
+
)\.(\d\d)
.*$/
,
'$1$2.$3'
)
//只能输入两个小数
this
.
$nextTick
(()
=>
{
const
target
=
this
.
co
n
ponFormObj
.
selectedGoodsList
.
find
(
item
=>
item
.
id
==
id
)
const
target
=
this
.
co
u
ponFormObj
.
selectedGoodsList
.
find
(
item
=>
item
.
id
==
id
)
target
.
newCost
=
temp
})
},
delSelectedGoods
(
row
)
{
const
idx
=
this
.
co
n
ponFormObj
.
selectedGoodsList
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
this
.
co
n
ponFormObj
.
selectedGoodsList
.
splice
(
idx
,
1
)
const
idx
=
this
.
co
u
ponFormObj
.
selectedGoodsList
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
this
.
co
u
ponFormObj
.
selectedGoodsList
.
splice
(
idx
,
1
)
this
.
validateGoods
()
},
validateGoods
()
{
...
...
@@ -170,10 +170,10 @@ export default {
this
.
isVisible
=
false
},
confirmDialog
(
e
)
{
this
.
co
n
ponFormObj
.
selectedGoodsList
=
e
||
[]
this
.
co
u
ponFormObj
.
selectedGoodsList
=
e
||
[]
this
.
validateGoods
()
},
openCo
n
ponDialog
()
{
openCo
u
ponDialog
()
{
this
.
isVisible
=
true
},
closeErrorDialog
()
{
...
...
@@ -182,7 +182,7 @@ export default {
commit
()
{
this
.
$refs
.
couponRef
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
!
valid
)
return
let
{
selectedGoodsList
,
effectiveDays
}
=
this
.
co
n
ponFormObj
let
{
selectedGoodsList
,
effectiveDays
}
=
this
.
co
u
ponFormObj
const
target
=
selectedGoodsList
.
find
(
item
=>
Number
(
item
.
newCost
)
<=
0
||
Number
(
item
.
newCost
)
>=
Number
(
item
.
salesPrice
))
console
.
log
(
target
)
if
(
target
)
return
this
.
$message
.
error
(
'请填写大于0,小于会员价的券面额'
)
...
...
@@ -194,12 +194,12 @@ export default {
effectiveDays
,
equityCouponRequestList
}
this
.
$apis
.
goodsCo
n
ponApi
.
createCoupons
(
params
).
then
(
res
=>
{
this
.
$apis
.
goodsCo
u
ponApi
.
createCoupons
(
params
).
then
(
res
=>
{
if
(
res
&&
res
.
length
===
0
)
{
this
.
$message
.
success
(
'创建成功'
)
this
.
$router
.
push
({
path
:
'/goodsCo
n
pon/index'
})
this
.
$router
.
push
({
path
:
'/goodsCo
u
pon/index'
})
}
else
if
(
res
&&
res
.
length
>
0
)
{
this
.
errorCo
n
ponList
=
selectedGoodsList
.
filter
(
item
=>
res
.
indexOf
(
item
.
id
)
>
-
1
)
this
.
errorCo
u
ponList
=
selectedGoodsList
.
filter
(
item
=>
res
.
indexOf
(
item
.
id
)
>
-
1
)
this
.
errorVisible
=
true
}
})
...
...
@@ -228,7 +228,7 @@ export default {
margin-top
:
10px
;
width
:
100%
;
max-width
:
1100px
;
.co
n
pon_cost
{
.co
u
pon_cost
{
/deep/
.el-input__inner
{
width
:
80px
;
color
:
#2cca74
;
...
...
@@ -274,11 +274,11 @@ export default {
color
:
#333333
;
}
}
.error_co
n
pon
{
.error_co
u
pon
{
margin
:
20px
0
0
74px
;
height
:
124px
;
overflow-y
:
auto
;
.co
n
pon_item
{
.co
u
pon_item
{
margin-bottom
:
8px
;
img
{
width
:
40px
;
...
...
src/views/goodsCo
n
pon/goodsDialog.vue
→
src/views/goodsCo
u
pon/goodsDialog.vue
View file @
0c82cb8
...
...
@@ -2,14 +2,14 @@
<GLDialog
bigTitle=
"选择商品优惠券"
mode=
"big"
:visible
.
sync=
"isVisible"
:show-close=
"true"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
@
onOk=
"onOk"
@
onCancel=
"onCancel"
>
<div
class=
"dialog_body"
>
<GLCombiForm
:rowNumber=
"1"
class=
"dialog_search"
ref=
"searchRef"
:formObj=
"dialogSearchForm"
:formData=
"dialogFormData"
@
handleOk=
"handleOk"
@
handleRest=
"handleRest"
></GLCombiForm>
<div
class=
"co
n
pon_type"
>
<span
:class=
"['type',
{ active_type: curType == '1' }]" @click="changeCo
n
ponType(1)">卡券
</span>
<span
:class=
"['type',
{ active_type: curType == '2' }]" @click="changeCo
n
ponType(2)">直充
</span>
<div
class=
"co
u
pon_type"
>
<span
:class=
"['type',
{ active_type: curType == '1' }]" @click="changeCo
u
ponType(1)">卡券
</span>
<span
:class=
"['type',
{ active_type: curType == '2' }]" @click="changeCo
u
ponType(2)">直充
</span>
</div>
<div
class=
"dialog_table"
>
<GLTable
v-if=
"showTable"
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"dialogSearchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<div
class=
"good_name"
slot=
"goodName"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/co
n
pon.png"
alt=
""
/>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/co
u
pon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<!--
{{
scope
.
scope
.
appearance
==
2
?
scope
.
scope
.
productName
+
(
scope
.
scope
.
denomination
||
''
)
:
scope
.
scope
.
productName
}}
-->
{{
scope
.
scope
.
productName
}}
...
...
@@ -125,7 +125,7 @@ export default {
curType
:
1
,
showTable
:
true
,
copyList
:
[],
co
n
ponList
:
[],
co
u
ponList
:
[],
directChargeList
:
[],
pageSizes
:
[
5
,
10
,
20
,
30
,
40
],
dialogSearchForm
:
{
...
...
@@ -186,7 +186,7 @@ export default {
this
.
resetParam
(
type
)
this
.
handleOk
()
},
changeCo
n
ponType
(
type
)
{
changeCo
u
ponType
(
type
)
{
if
(
this
.
curType
==
type
)
return
this
.
getBeforeChangeList
(
type
)
this
.
showTable
=
false
...
...
@@ -202,10 +202,10 @@ export default {
},
getBeforeChangeList
(
type
=
1
)
{
let
list
=
this
.
$refs
.
tableRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[]
this
[
type
==
2
?
'co
n
ponList'
:
'directChargeList'
]
=
[...
list
]
this
[
type
==
2
?
'co
u
ponList'
:
'directChargeList'
]
=
[...
list
]
},
onOk
()
{
let
selectedList
=
this
.
curType
==
2
?
this
.
co
n
ponList
:
this
.
directChargeList
let
selectedList
=
this
.
curType
==
2
?
this
.
co
u
ponList
:
this
.
directChargeList
let
list
=
this
.
$refs
.
tableRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[]
list
=
[...
selectedList
,
...
list
]
for
(
let
i
=
0
;
i
<
this
.
selectedGoodsList
.
length
;
i
++
)
{
...
...
@@ -225,7 +225,7 @@ export default {
this
.
$emit
(
'closeDialog'
)
},
setTableFinishFun
()
{
this
.
copyList
=
[...
this
.
selectedGoodsList
,
...
this
[
this
.
curType
==
1
?
'co
n
ponList'
:
'directChargeList'
]]
this
.
copyList
=
[...
this
.
selectedGoodsList
,
...
this
[
this
.
curType
==
1
?
'co
u
ponList'
:
'directChargeList'
]]
this
.
copyList
.
forEach
(
row
=>
{
this
.
$nextTick
(()
=>
{
let
idx
=
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
...
...
@@ -270,7 +270,7 @@ export default {
width
:
312px
;
}
}
.co
n
pon_type
{
.co
u
pon_type
{
width
:
100%
;
display
:
inline-block
;
border-bottom
:
1px
solid
#eee
;
...
...
src/views/goodsCo
n
pon/index.vue
→
src/views/goodsCo
u
pon/index.vue
View file @
0c82cb8
...
...
@@ -4,14 +4,14 @@
<div
class=
"operate_wrap"
>
<span
class=
"table_title"
>
商品优惠券列表
</span>
<div
class=
"operate_btn"
>
<GLButton
fn=
"新增商品优惠券"
plain
size=
"small"
@
click=
"addCo
n
pon"
>
创建优惠券
</GLButton>
<GLButton
fn=
"新增商品优惠券"
plain
size=
"small"
@
click=
"addCo
u
pon"
>
创建优惠券
</GLButton>
<el-button
class=
"export_btn"
size=
"small"
@
click=
"handleExport"
>
导出
</el-button>
</div>
</div>
<GLTable
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<div
class=
"good_name"
slot=
"goodsName"
slot-scope=
"scope"
>
<img
class=
"co
npon_type"
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/con
pon.png"
alt=
""
/>
<img
class=
"co
n
pon_type"
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<img
class=
"co
upon_type"
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/cou
pon.png"
alt=
""
/>
<img
class=
"co
u
pon_type"
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
{{
scope
.
scope
.
appearance
==
2
?
scope
.
scope
.
goodsName
+
(
scope
.
scope
.
rechargeDenomination
||
''
)
:
scope
.
scope
.
goodsName
}}
</div>
<div
class=
"good_status"
slot=
"goodStatus"
slot-scope=
"scope"
>
...
...
@@ -32,7 +32,7 @@ export default {
name
:
'index'
,
data
()
{
return
{
getListApi
:
this
.
$apis
.
goodsCo
n
ponApi
.
getCouponsList
,
getListApi
:
this
.
$apis
.
goodsCo
u
ponApi
.
getCouponsList
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
searchForm
:
{
brandName
:
''
,
...
...
@@ -235,7 +235,7 @@ export default {
const
params
=
{
couponId
:
row
.
id
}
this
.
secondConfirm
(
'删除'
,
'确定删除此优惠券?'
,
'goodsCo
n
ponApi'
,
'deleteCouponApi'
,
params
)
this
.
secondConfirm
(
'删除'
,
'确定删除此优惠券?'
,
'goodsCo
u
ponApi'
,
'deleteCouponApi'
,
params
)
},
takeEffect
(
row
,
key
)
{
...
...
@@ -244,7 +244,7 @@ export default {
status
:
key
}
const
title
=
key
==
2
?
'生效'
:
'失效'
this
.
secondConfirm
(
title
,
`确定要
${
title
}
该优惠券?`
,
'goodsCo
n
ponApi'
,
'effectiveCouponApi'
,
params
)
this
.
secondConfirm
(
title
,
`确定要
${
title
}
该优惠券?`
,
'goodsCo
u
ponApi'
,
'effectiveCouponApi'
,
params
)
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
...
...
@@ -281,7 +281,7 @@ export default {
// 导出
handleExport
()
{
var
params
=
{
...
this
.
searchForm
}
this
.
$apis
.
goodsCo
n
ponApi
.
getExportApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
goodsCo
u
ponApi
.
getExportApi
(
params
).
then
(
res
=>
{
let
tempaa
=
this
.
getExplorer
()
if
(
tempaa
==
'QQ'
)
{
window
.
open
(
res
)
...
...
@@ -294,11 +294,11 @@ export default {
})
},
goDetailPage
(
row
)
{
this
.
$router
.
push
({
path
:
'/goodsCo
n
pon/receivedDetail'
,
query
:
{
id
:
row
.
scope
.
id
}
})
this
.
$router
.
push
({
path
:
'/goodsCo
u
pon/receivedDetail'
,
query
:
{
id
:
row
.
scope
.
id
}
})
},
changeStatus
()
{},
addCo
n
pon
()
{
this
.
$router
.
push
(
'/goodsCo
npon/addCon
pon'
)
addCo
u
pon
()
{
this
.
$router
.
push
(
'/goodsCo
upon/addCou
pon'
)
}
}
}
...
...
@@ -308,7 +308,7 @@ export default {
background-color
:
#fff
;
padding
:
20px
;
.good_name
{
.co
n
pon_type
{
.co
u
pon_type
{
width
:
40px
;
height
:
20px
;
vertical-align
:
text-bottom
;
...
...
src/views/goodsCo
n
pon/receivedDetail.vue
→
src/views/goodsCo
u
pon/receivedDetail.vue
View file @
0c82cb8
<
template
>
<div
class=
"container"
>
<div
class=
"info_ctnr"
>
<glsx-combi-form
:isInline=
"true"
ref=
"couponInfoRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formObj
.
sync=
"co
nponInfoFormObj"
:formData=
"conponInfoFormData"
:formRules=
"con
ponInfoRule"
>
<glsx-combi-form
:isInline=
"true"
ref=
"couponInfoRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formObj
.
sync=
"co
uponInfoFormObj"
:formData=
"couponInfoFormData"
:formRules=
"cou
ponInfoRule"
>
<div
slot=
"goodsName"
class=
"txt"
>
{{
co
nponInfoFormObj
.
appearance
==
2
?
conponInfoFormObj
.
goodsName
+
(
conponInfoFormObj
.
goodsName
||
''
)
:
con
ponInfoFormObj
.
goodsName
}}
{{
co
uponInfoFormObj
.
appearance
==
2
?
couponInfoFormObj
.
goodsName
+
(
couponInfoFormObj
.
goodsName
||
''
)
:
cou
ponInfoFormObj
.
goodsName
}}
</div>
<div
slot=
"appearance"
class=
"txt"
>
{{
co
n
ponInfoFormObj
.
appearance
==
1
?
'卡券'
:
'直充'
}}
{{
co
u
ponInfoFormObj
.
appearance
==
1
?
'卡券'
:
'直充'
}}
</div>
</glsx-combi-form>
</div>
...
...
@@ -81,7 +81,7 @@ export default {
cancelRules
:
{
cancelReason
:
[{
required
:
true
,
message
:
'请输入作废原因'
,
trigger
:
'change'
}]
},
co
n
ponInfoFormObj
:
{
co
u
ponInfoFormObj
:
{
brandName
:
''
,
goodsName
:
''
,
appearance
:
''
,
...
...
@@ -108,7 +108,7 @@ export default {
}
}
],
co
n
ponInfoFormData
:
[
co
u
ponInfoFormData
:
[
{
label
:
'品牌'
,
name
:
'brandName'
,
...
...
@@ -145,8 +145,8 @@ export default {
type
:
'showTxt'
}
],
co
n
ponInfoRule
:
{},
getListApi
:
this
.
$apis
.
goodsCo
n
ponApi
.
getListReceiveRecordApi
,
co
u
ponInfoRule
:
{},
getListApi
:
this
.
$apis
.
goodsCo
u
ponApi
.
getListReceiveRecordApi
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
tableParams
:
{
listName
:
'list'
,
...
...
@@ -253,25 +253,25 @@ export default {
getInfo
(
couponId
)
{
var
params
=
{}
params
.
couponId
=
couponId
this
.
$apis
.
goodsCo
n
ponApi
.
getCouponDetailApi
(
params
).
then
(
res
=>
{
this
.
co
n
ponInfoFormObj
=
res
this
.
$apis
.
goodsCo
u
ponApi
.
getCouponDetailApi
(
params
).
then
(
res
=>
{
this
.
co
u
ponInfoFormObj
=
res
//有效期
if
(
res
.
effectiveType
==
1
)
{
this
.
co
n
ponInfoFormObj
.
effectiveTxt
=
res
.
effectiveDays
+
'天'
this
.
co
u
ponInfoFormObj
.
effectiveTxt
=
res
.
effectiveDays
+
'天'
}
else
if
(
res
.
effectiveType
==
2
)
{
//时间段
this
.
co
n
ponInfoFormObj
.
effectiveTxt
=
res
.
effectiveStartTime
+
' - '
+
res
.
effectiveEndTime
this
.
co
u
ponInfoFormObj
.
effectiveTxt
=
res
.
effectiveStartTime
+
' - '
+
res
.
effectiveEndTime
}
else
if
(
res
.
effectiveType
==
3
)
{
//永久有效
this
.
co
n
ponInfoFormObj
.
effectiveTxt
=
'永久有效'
this
.
co
u
ponInfoFormObj
.
effectiveTxt
=
'永久有效'
}
})
},
// 导出
handleExport
()
{
let
params
=
this
.
getParams
()
this
.
$apis
.
goodsCo
n
ponApi
.
detailExportApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
goodsCo
u
ponApi
.
detailExportApi
(
params
).
then
(
res
=>
{
let
tempaa
=
this
.
getExplorer
()
if
(
tempaa
==
'QQ'
)
{
window
.
open
(
res
)
...
...
@@ -304,7 +304,7 @@ export default {
handleCancelConfirm
()
{
this
.
$refs
.
cancelRef
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$apis
.
goodsCo
n
ponApi
.
couponUserCancelApi
(
this
.
cancelForm
).
then
(
res
=>
{
this
.
$apis
.
goodsCo
u
ponApi
.
couponUserCancelApi
(
this
.
cancelForm
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
...
...
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