Commit e25b7e29 authored by zhengke's avatar zhengke

修改

parent 3fb650bc
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<thead> <thead>
<tr style="height:60px;"> <tr style="height:60px;">
<td colspan="5" style="text-align:right;"> <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> </td>
</tr> </tr>
<tr> <tr>
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
<tbody v-for="(sItem, sIndex) in objOption.DetailsList" :key="sIndex"> <tbody v-for="(sItem, sIndex) in objOption.DetailsList" :key="sIndex">
<tr> <tr>
<td style="height:50px"> <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 ref="PriceDiscountType_Id" :options="taskTypeData" label="任务类型" style="width:160px" dense
emit-value map-options /> emit-value map-options />
</td> </td>
...@@ -427,6 +427,10 @@ ...@@ -427,6 +427,10 @@
getChild(cateObj,index) { getChild(cateObj,index) {
this.objOption.DetailsList[index].TargetIdList = cateObj.split(','); this.objOption.DetailsList[index].TargetIdList = cateObj.split(',');
}, },
//清除
clearTarget(item){
item.TargetIdList=[];
}
}, },
} }
......
...@@ -25,39 +25,46 @@ ...@@ -25,39 +25,46 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-TaskType="props">
<template v-slot:body-cell-DetailsList="props"> <q-td :props="props" style="padding-right: 0px">
<q-td auto-width :props="props"> <div v-for="(x,index) in props.value" :key="index">
<template v-if="props.row.DetailsList"> <div class="border-bottom">
<template v-if="props.row.DetailsList.length==1"> {{ x.TaskTypeName }}
{{props.row.DetailsList[0].TargetName}} </div>
</div>
</q-td>
</template> </template>
<template v-if="props.row.DetailsList.length>1"> <template v-slot:body-cell-TaskConditions="props">
{{props.row.DetailsList[0].TargetName}} <q-td :props="props" style="padding-right: 0px">
<span class="otherTask"> <div v-for="(x,index) in props.value" :key="index">
{{props.row.DetailsList.length}} <template v-if="x.TargetList.length>0">
<q-popup-proxy> <div class="border-bottom">
<q-banner> <span v-for="(sItem,sIndex) in x.TargetList" :key="sIndex">
<table class="saleTaskTable" style="border-collapse:collapse;"> {{sItem.TargetName}}<span v-if="sIndex!=x.TargetList.length-1">,</span>
<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> </span>
</div>
</template> </template>
<template v-if="props.row.DetailsList.length==0"> </div>
</q-td>
</template> </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>
<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> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td> <q-td>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
...@@ -115,10 +122,32 @@ ...@@ -115,10 +122,32 @@
align: 'left', align: 'left',
}, },
{ {
name: 'DetailsList', name: 'TaskType',
label: '关联其他课程', label: '任务类型',
field: 'DetailsList', required: true,
align: 'left', 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', name: 'CreateByName',
...@@ -250,5 +279,10 @@ ...@@ -250,5 +279,10 @@
height: 40px; height: 40px;
background-color: rgb(238, 238, 239); background-color: rgb(238, 238, 239);
} }
.border-bottom {
border-bottom: 1px dashed #eee;
padding-bottom: 5px;
margin-bottom: 5px;
}
</style> </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