Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
达摩4.0重构
welfare
Commits
b05c3cff
Commit
b05c3cff
authored
Jul 19, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 添加组件
parent
6e34305c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
237 additions
and
21 deletions
+237
-21
main.js
src/main.js
+3
-4
list.vue
src/views/card/card-package/list.vue
+46
-4
card-list.vue
src/views/card/gic-card/card-list.vue
+77
-3
real-gift.vue
src/views/gift-manage/real-gift.vue
+43
-5
virtual-gift.vue
src/views/gift-manage/virtual-gift.vue
+68
-5
No files found.
src/main.js
View file @
b05c3cff
import
'@/assets/styles/reset.less'
;
import
'@/assets/styles/general.scss'
;
import
'@/assets/styles/index.scss'
;
import
ElementUI
,
{
Message
}
from
'element-ui'
;
import
{
Message
}
from
'element-ui'
;
import
axios
from
'axios'
;
import
Vue
from
'vue'
;
import
App
from
'./App.vue'
;
...
...
@@ -17,7 +17,7 @@ import itemCode from '@/utils/item-code.js';
import
{
itemPerm
,
permission
}
from
'@/utils/permission.js'
;
import
{
_throttle
}
from
'@/utils/index'
;
Vue
.
use
(
ElementUI
);
//
Vue.use(ElementUI);
axios
.
defaults
.
withCredentials
=
true
;
Vue
.
prototype
.
axios
=
axios
;
Vue
.
config
.
productionTip
=
false
;
...
...
@@ -63,4 +63,4 @@ permission({
render
:
h
=>
h
(
App
)
}).
$mount
(
'#app'
);
}
});
\ No newline at end of file
});
src/views/card/card-package/list.vue
View file @
b05c3cff
...
...
@@ -100,11 +100,12 @@
<span
class=
"state-point state-point-default"
v-if=
"scope.row.useStatus == 3"
>
未生效
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"left"
width=
"
18
0px"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"left"
width=
"
24
0px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<dm-perm-button
type=
"text"
v-if=
"scope.row.useStatus != 2 && scope.row.edit == 1"
@
click=
"$router.push(`/card-package/edit?id=$
{scope.row.couponPackageId}`)">编辑
</dm-perm-button>
<dm-dropdown
:scope-data=
"scope.row"
:configs=
"operationButtons"
/>
<!--
<dm-perm-button
type=
"text"
v-if=
"scope.row.useStatus != 2 && scope.row.edit == 1"
@
click=
"$router.push(`/card-package/edit?id=$
{scope.row.couponPackageId}`)">编辑
</dm-perm-button>
-->
<!-- statusFlag 1正常(生效状态),0卡券张数不正常(失效状态) -->
<el-button
v-if=
"!(scope.row.useStatus == 2 && scope.row.statusFlag == 0)"
type=
"text"
@
click=
"$router.push(`/card-package/send-list?id=$
{scope.row.couponPackageId}`)">发放记录
</el-button>
<
!--
<
el-button
v-if=
"!(scope.row.useStatus == 2 && scope.row.statusFlag == 0)"
type=
"text"
@
click=
"$router.push(`/card-package/send-list?id=$
{scope.row.couponPackageId}`)">发放记录
</el-button>
<el-popover
popper-class=
"option-dropdown"
trigger=
"hover"
>
<ul>
<li
v-if=
"!(scope.row.useStatus == 2 && scope.row.statusFlag == 0)"
>
...
...
@@ -115,7 +116,7 @@
</li>
</ul>
<el-button
:class=
"
{'ml20': !(scope.row.useStatus == 2
&&
scope.row.statusFlag == 0)}" type="text" slot="reference">
<i
class=
"el-icon-more"
></i></el-button>
</el-popover>
</el-popover>
-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -194,6 +195,47 @@ export default {
tableCardPackage
:
[],
// 调整卡券包库存展示的slot table list
isOpen
:
false
,
cardType
,
operationButtons
:
[
{
text
:
'编辑'
,
visible
(
row
)
{
return
row
.
useStatus
!=
2
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
$router
.
push
(
`/card-package/edit?id=
${
row
.
couponPackageId
}
`
);
},
},
{
text
:
'发放记录'
,
visible
(
row
)
{
return
!
(
row
.
useStatus
==
2
&&
row
.
statusFlag
==
0
);
},
handler
:
(
row
)
=>
{
this
.
$router
.
push
(
`/card-package/send-list?id=
${
row
.
couponPackageId
}
`
);
},
},
{
text
:
'库存记录'
,
visible
(
row
)
{
return
!
(
row
.
useStatus
==
2
&&
row
.
statusFlag
==
0
);
},
handler
:
(
row
)
=>
{
this
.
$router
.
push
(
`/card-package/stock-list?id=
${
row
.
couponPackageId
}
`
);
}
},
{
text
:
'删除'
,
visible
(
row
)
{
return
row
.
edit
==
1
;
},
disabled
:
(
row
)
=>
{
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicDeletePackage
);
},
handler
:
(
row
)
=>
{
this
.
delOne
(
row
);
}
},
]
};
},
created
()
{
...
...
src/views/card/gic-card/card-list.vue
View file @
b05c3cff
...
...
@@ -117,9 +117,10 @@
</
template
>
<span
slot-scope=
"scope"
v-html=
"renderStatus(scope.row)"
></span>
</el-table-column>
<el-table-column
label=
"操作"
align=
"left"
width=
"180px"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"left"
min-
width=
"180px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<mk-button
:option=
"
{ perm: $itemPerm($itemCode.gicCardFormCopy), deleteFlag: scope.row.deleteFlag, deleteRemark: scope.row.remark }" type="text" @click="handler(6, scope.row)">复制
</mk-button>
<dm-dropdown
:scope-data=
"scope.row"
:configs=
"operationButtons"
/>
<!--
<mk-button
:option=
"
{ perm: $itemPerm($itemCode.gicCardFormCopy), deleteFlag: scope.row.deleteFlag, deleteRemark: scope.row.remark }" type="text" @click="handler(6, scope.row)">复制
</mk-button>
<mk-button
:option=
"
{ perm: $itemPerm($itemCode.gicCardGroupBtn), deleteFlag: scope.row.deleteFlag, deleteRemark: scope.row.remark }" type="text" @click="handler(8, scope.row)" class="mr20">领取记录
</mk-button>
<el-popover
popper-class=
"option-dropdown"
trigger=
"hover"
>
<ul>
...
...
@@ -140,7 +141,7 @@
</li>
</ul>
<el-button
type=
"text"
slot=
"reference"
><i
class=
"el-icon-more"
></i></el-button>
</el-popover>
</el-popover>
-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -208,6 +209,79 @@ export default {
{
name
:
'抵金券'
,
text
:
'例:满100元减20元<br/>便于合理控制活动成本'
,
type
:
0
},
{
name
:
'折扣券'
,
text
:
'例:满100元打9折<br/>提高店铺销量和客单价'
,
type
:
1
},
{
name
:
'兑换券'
,
text
:
'用于兑换指定商品<br/>吸引顾客消费'
,
type
:
2
},
],
operationButtons
:
[
{
text
:
'复制'
,
disabled
:
(
row
)
=>
{
console
.
log
(
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardFormCopy
));
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardFormCopy
);
},
handler
:
(
row
)
=>
{
console
.
log
(
1
);
this
.
handler
(
6
,
row
);
},
},
{
text
:
'领取记录'
,
disabled
:
(
row
)
=>
{
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardGroupBtn
);
},
handler
:
(
row
)
=>
{
this
.
handler
(
8
,
row
);
},
},
{
text
:
'库存记录'
,
visible
(
row
)
{
return
[
1
,
2
].
includes
(
row
.
_status
);
},
handler
:
(
row
)
=>
{
this
.
handler
(
9
,
row
);
}
},
{
text
:
'编辑'
,
visible
(
row
)
{
return
[
1
,
2
].
includes
(
row
.
_status
)
&&
row
.
edit
==
1
;
},
disabled
:
(
row
)
=>
{
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardFormEdit
);
},
handler
:
(
row
)
=>
{
this
.
handler
(
3
,
row
);
}
},
{
text
:
'详情'
,
disabled
:
(
row
)
=>
{
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardFormInfo
);
},
handler
:
(
row
)
=>
{
this
.
handler
(
5
,
row
);
}
},
{
text
:
'禁用'
,
visible
(
row
)
{
return
row
.
_status
==
2
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
handler
(
10
,
row
);
}
},
{
text
:
'删除'
,
visible
(
row
)
{
return
row
.
edit
==
1
;
},
disabled
:
(
row
)
=>
{
return
this
.
$itemPerm
(
this
.
$itemCode
.
gicCardFormDel
);
},
handler
:
(
row
)
=>
{
this
.
handler
(
4
,
row
);
}
},
]
};
},
...
...
src/views/gift-manage/real-gift.vue
View file @
b05c3cff
...
...
@@ -159,16 +159,17 @@
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"170px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<div
style=
"font-size:0px"
>
<dm-dropdown
:scope-data=
"scope.row"
:configs=
"operationButtons"
/>
<!--
<div
style=
"font-size:0px"
>
<el-button
type=
"text"
@
click=
"edit(scope.row, 2)"
v-if=
"scope.row.edit==1"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/gift-manage/real-stock-list?id=' + scope.row.giftId)"
>
库存记录
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/gift-manage/real-stock-list?id=' + scope.row.giftId)"
>
库存记录
</el-button>
-->
<!--
<dm-perm-button
type=
"text"
@
click=
"edit(scope.row, 2)"
>
编辑
</dm-perm-button>
<dm-perm-button
type=
"text"
@
click=
"$router.push('/gift-manage/real-stock-list?id=' + scope.row.giftId)"
>
库存记录
</dm-perm-button>
-->
<dm-delete
v-if=
"scope.row.statusFlag === 0 && scope.row.edit==1"
@
confirm=
"changeStatus(scope.row)"
tips=
"是否启用?"
>
<
!--
<
dm-delete
v-if=
"scope.row.statusFlag === 0 && scope.row.edit==1"
@
confirm=
"changeStatus(scope.row)"
tips=
"是否启用?"
>
<el-button
type=
"text"
>
启用
</el-button>
</dm-delete>
<el-button
type=
"text"
v-if=
"scope.row.statusFlag === 1 && scope.row.edit==1"
@
click=
"changeStatus(scope.row)"
>
禁用
</el-button>
</div>
</div>
-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -258,7 +259,44 @@ export default {
placeholderText
:
'请输入礼品名称'
,
isShow
:
false
,
timeValue
:
''
,
changeName
:
''
changeName
:
''
,
operationButtons
:
[
{
text
:
'编辑'
,
visible
(
row
)
{
return
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
edit
(
row
,
2
);
},
},
{
text
:
'库存记录'
,
handler
:
(
row
)
=>
{
this
.
$router
.
push
(
'/gift-manage/real-stock-list?id='
+
row
.
giftId
);
},
},
{
text
:
'启用'
,
visible
(
row
)
{
return
row
.
statusFlag
===
0
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
$confirm
(
'是否启用?'
).
then
(()
=>
{
this
.
changeStatus
(
row
);
});
}
},
{
text
:
'禁用'
,
visible
(
row
)
{
return
row
.
statusFlag
===
1
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
changeStatus
(
row
);
}
},
]
};
},
created
()
{
...
...
src/views/gift-manage/virtual-gift.vue
View file @
b05c3cff
...
...
@@ -165,12 +165,13 @@
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"210px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<div
style=
"font-size:0px"
>
<dm-dropdown
:scope-data=
"scope.row"
:configs=
"operationButtons"
/>
<!--
<div
style=
"font-size:0px"
>
<el-button
type=
"text"
v-if=
"scope.row.edit === 1"
@
click=
"edit(scope.row, 2)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)"
>
库存记录
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)"
>
库存记录
</el-button>
-->
<!--
<dm-perm-button
type=
"text"
@
click=
"edit(scope.row, 2)"
>
编辑
</dm-perm-button>
<dm-perm-button
type=
"text"
@
click=
"$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)"
>
库存记录
</dm-perm-button>
-->
<el-dropdown
style=
"margin-left:20px;"
@
command=
"command => handleCommand(command, scope.row)"
placement=
"bottom-start"
>
<
!--
<
el-dropdown
style=
"margin-left:20px;"
@
command=
"command => handleCommand(command, scope.row)"
placement=
"bottom-start"
>
<span
class=
"el-dropdown-link"
style=
"color:#2f54ed;cursor: pointer;"
>
<i
class=
"el-icon-more"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
style=
"width:110px;"
>
<el-dropdown-item
command=
"1"
>
查看内容
</el-dropdown-item>
...
...
@@ -178,7 +179,7 @@
<el-dropdown-item
command=
"3"
v-if=
"scope.row.statusFlag === 1 && scope.row.edit === 1"
>
禁用
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
-->
</
template
>
</el-table-column>
</el-table>
...
...
@@ -288,7 +289,69 @@ export default {
dialogId
:
''
,
forbiddenDialog
:
false
,
forbiddenTitle
:
'禁用'
,
changeName
:
''
changeName
:
''
,
operationButtons
:
[
{
text
:
'编辑'
,
visible
(
row
)
{
return
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
this
.
edit
(
row
,
2
);
},
},
{
text
:
'库存记录'
,
handler
:
(
row
)
=>
{
this
.
$router
.
push
(
'/gift-manage/virtual-stock-list?id='
+
row
.
giftId
);
},
},
{
text
:
'查看内容'
,
handler
:
(
row
)
=>
{
this
.
dialogVisible
=
true
;
this
.
dialogId
=
row
.
giftId
;
}
},
{
text
:
'启用'
,
visible
(
row
)
{
return
row
.
statusFlag
===
0
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
let
params
=
{
giftIdList
:
[
row
.
giftId
],
type
:
3
};
this
.
$confirm
(
'确认启用?'
,
''
,
{
confirmButtonText
:
'启用'
,
}).
then
(()
=>
{
this
.
batchRequest
(
params
);
}).
catch
(()
=>
{
return
;
});
}
},
{
text
:
'禁用'
,
visible
(
row
)
{
return
row
.
statusFlag
===
1
&&
row
.
edit
==
1
;
},
handler
:
(
row
)
=>
{
let
params
=
{
giftIdList
:
[
row
.
giftId
],
type
:
2
};
this
.
$confirm
(
'已添加被禁用礼品的活动将会失效,确认禁用?'
,
''
,
{
confirmButtonText
:
'禁用'
,
}).
then
(()
=>
{
this
.
batchRequest
(
params
);
}).
catch
(()
=>
{
return
;
});
}
},
]
};
},
created
()
{
...
...
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