This commit is contained in:
@fawn-nine
2024-10-16 09:49:30 +08:00
parent 633215dc80
commit ce2574a60b
2 changed files with 22 additions and 15 deletions

View File

@@ -78,12 +78,14 @@
<el-table-column prop="id" label="名称">
<template slot-scope="scope">{{scope.row.couponEntity.couponName}}</template>
</el-table-column>
<!-- <el-table-column prop="id" label="作用时间">
<el-table-column prop="id" label="获得途径">
<template slot-scope="scope">
生效时间{{scope.row.couponEntity.effectTime}}<br/>
结束时间{{scope.row.couponEntity.expireTime}}
<span v-if="scope.row.getType == 0">后台赠送<br/>
<i>原因{{scope.row.remark}}</i>
</span>
<span v-if="scope.row.getType == 1">主动获取</span>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column prop="id" label="使用上限x张">
<template slot-scope="scope">
{{scope.row.couponEntity.limitedCollar}}
@@ -160,7 +162,7 @@
</el-form-item>
<el-form-item label="赠送原因">
<el-input
v-model="youForm.reason" type="textarea"
v-model="youForm.remark" type="textarea"
placeholder="请输入"
clearable
></el-input>
@@ -230,7 +232,7 @@ export default {
dataListLoading: false,
youForm: {
couponName:'',
reason:'后台客服操作赠送',
remark:'后台客服操作赠送',
ids:undefined
},
loading: false,
@@ -278,12 +280,14 @@ export default {
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/common/coupon/delCoupon'),
url: this.$http.adornUrl('/common/coupon/delCouponHistory'),
method: 'post',
data: this.$http.adornData({
id: id
couponHistoryId: id
})
}).then(({data}) => {
if(data.code!== 0) return this.$message.error(data.msg)
if (data && data.code === 0) {
this.$message({
message: '操作成功',
@@ -302,6 +306,7 @@ export default {
dialogHandleClose(){
this.youVisible = false
this.youForm.ids = undefined
this.youForm.remark = ''
},
surYou() {
@@ -315,6 +320,7 @@ export default {
}
var data = {
"couponId": this.youForm.ids,
"remark": this.youForm.remark,
"userId": this.userId,
"getType":0 //获取类型 0 后台赠送 1 主动获取
}
@@ -335,13 +341,14 @@ export default {
})
this.dialogHandleClose()
this.getDataList()
}else{
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
})
}
// else{
// this.$message({
// message: data.msg,
// type: 'error',
// duration: 1500,
// })
// }
})
},
givePersonCoupon() {

View File

@@ -110,7 +110,7 @@
<el-button type="text" size="small">/扣天医币记录</el-button>
</router-link>
</el-dropdown-item>
<el-dropdown-item><el-button type="text" size="small" @click=" thisUserID = scope.row.id; youVisible = true">优惠券列表</el-button></el-dropdown-item>
<el-dropdown-item><el-button type="text" size="small" @click=" thisUserID = scope.row.id; youVisible = true">优惠券管理</el-button></el-dropdown-item>
<el-dropdown-item><el-button type="text" size="small" @click="resetPassword(scope.row)">修改密码</el-button></el-dropdown-item>
<el-dropdown-item>
<router-link :to="{ path: '/userCourse', query: {id:scope.row.id} }">