diff --git a/src/views/activity/component/showActiveOrder.vue b/src/views/activity/component/showActiveOrder.vue index 3470fff..4ab2f61 100644 --- a/src/views/activity/component/showActiveOrder.vue +++ b/src/views/activity/component/showActiveOrder.vue @@ -11,7 +11,7 @@ - + @@ -44,6 +44,7 @@ data() { return { isFullScreen: false, + showTable:false, statusNames:[{ id:0, name:'申请取消' @@ -167,6 +168,66 @@ width: 120 } + ], + replaceTable:[], + tableField: [{ + prop: "created_at", + label: "报名时间", + width: 180 + }, { + prop: "used_time_name", + label: "状态", + width: 120, + // formatter(value){ + // return value=='申请取消'?( + //
{value}
+ // ):value + // } + customFn:(row)=>{ + if(row.used_time_name=='申请取消'||row.used_time_name=='待核销'){ + return (
{ + this.cancelUser(row.id) + } + } + } + >{row.used_time_name}
) + }else{ + return ( +
{row.used_time_name}
+ ) + } + } + }, { + prop: "code", + label: "核销码", + width: 120 + }, + { + prop: "spread_member_name", + label: "推广渠道", + width: 120 + }, + { + prop: "spread_member_phone", + label: "推广人号码", + width: 120 + }, + { + prop: "remark", + label: "备注", + width: 120 + } + ], } }, @@ -190,7 +251,9 @@ } }); }, - async getOrder() { + async getOrder() { + var _arrT = [] + this.replaceTable = this.table await show({ id: this.id, state:this.state @@ -204,8 +267,28 @@ if(k.state==s.id){ k.used_time_name = s.name } + } + if(k.field_value && k.field_value.length>0){ + this.replaceTable = [] + this.replaceTable.push(...this.tableField) + k.field_value.map(item=>{ + _arrT.push({ + prop: 'field_'+item.field, + label: item.name, + width: 120 + }) + k['field_'+item.field] = item.value + }) + // this.$nextTick(function(){ + + // }) + this.replaceTable.push(..._arrT) + this.$forceUpdate() + console.log("this.replaceTable",this.replaceTable) } - } + } + + this.showTable = true this.list = res.apply }) @@ -233,7 +316,8 @@ this.id='' this.name='' this.state = '' - + this.showTable = false + this.replaceTable = [] } } }