Commit e25b7e29 authored by zhengke's avatar zhengke

修改

parent 3fb650bc
......@@ -134,7 +134,7 @@
<thead>
<tr style="height:60px;">
<td colspan="5" style="text-align:right;">
<q-btn color="accent" size="sm" icon="add" label="新增优惠" @click="addCourse()" />
<q-btn color="accent" size="sm" icon="add" label="新增任务" @click="addCourse()" />
</td>
</tr>
<tr>
......@@ -158,7 +158,7 @@
<tbody v-for="(sItem, sIndex) in objOption.DetailsList" :key="sIndex">
<tr>
<td style="height:50px">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="sItem.TaskType"
<q-select filled stack-label option-value="Id" @input="clearTarget(sItem)" option-label="Name" v-model="sItem.TaskType"
ref="PriceDiscountType_Id" :options="taskTypeData" label="任务类型" style="width:160px" dense
emit-value map-options />
</td>
......@@ -427,6 +427,10 @@
getChild(cateObj,index) {
this.objOption.DetailsList[index].TargetIdList = cateObj.split(',');
},
//清除
clearTarget(item){
item.TargetIdList=[];
}
},
}
......
......@@ -25,39 +25,46 @@
</div>
</q-td>
</template>
<template v-slot:body-cell-DetailsList="props">
<q-td auto-width :props="props">
<template v-if="props.row.DetailsList">
<template v-if="props.row.DetailsList.length==1">
{{props.row.DetailsList[0].TargetName}}
</template>
<template v-if="props.row.DetailsList.length>1">
{{props.row.DetailsList[0].TargetName}}
<span class="otherTask">
{{props.row.DetailsList.length}}
<q-popup-proxy>
<q-banner>
<table class="saleTaskTable" style="border-collapse:collapse;">
<tr>
<th>课程名称</th>
</tr>
<tr v-for="(sItem,sIndex) in props.row.DetailsList" :key="sIndex"
style="border-bottom:1px dashed #d1d1d1;">
<td>{{sItem.TargetName}}</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</template>
<template v-if="props.row.DetailsList.length==0">
<template v-slot:body-cell-TaskType="props">
<q-td :props="props" style="padding-right: 0px">
<div v-for="(x,index) in props.value" :key="index">
<div class="border-bottom">
{{ x.TaskTypeName }}
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-TaskConditions="props">
<q-td :props="props" style="padding-right: 0px">
<div v-for="(x,index) in props.value" :key="index">
<template v-if="x.TargetList.length>0">
<div class="border-bottom">
<span v-for="(sItem,sIndex) in x.TargetList" :key="sIndex">
{{sItem.TargetName}}<span v-if="sIndex!=x.TargetList.length-1">,</span>
</span>
</div>
</template>
</template>
</div>
</q-td>
</template>
<template v-slot:body-cell-CompleteType="props">
<q-td :props="props" style="padding-right: 0px">
<div v-for="(x,index) in props.value" :key="index">
<div class="border-bottom">
{{ x.TaskFinishType==1?'人数':'成交金额' }}
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-CompleteValue="props">
<q-td :props="props" style="padding-right: 0px">
<div v-for="(x,index) in props.value" :key="index">
<div class="border-bottom">
{{ x.TaskFinishValue }}
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
......@@ -115,10 +122,32 @@
align: 'left',
},
{
name: 'DetailsList',
label: '关联其他课程',
field: 'DetailsList',
align: 'left',
name: 'TaskType',
label: '任务类型',
required: true,
align: "left",
field: (row) => row.DetailsList
},
{
name: 'TaskConditions',
label: '任务条件',
required: true,
align: "left",
field: (row) => row.DetailsList
},
{
name: 'CompleteType',
label: '完成类型',
required: true,
align: "left",
field: (row) => row.DetailsList
},
{
name: 'CompleteValue',
label: '完成值',
required: true,
align: "left",
field: (row) => row.DetailsList
},
{
name: 'CreateByName',
......@@ -250,5 +279,10 @@
height: 40px;
background-color: rgb(238, 238, 239);
}
.border-bottom {
border-bottom: 1px dashed #eee;
padding-bottom: 5px;
margin-bottom: 5px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment