Commit 494bb368 authored by 黄奎's avatar 黄奎

页面修改

parent f211ab6e
...@@ -8,24 +8,18 @@ ...@@ -8,24 +8,18 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
class="sticky-right-column-table sticky-column-table" separator="none" :data="dataList" :columns="columns" separator="none" :data="dataList" :columns="columns" row-key="name">
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">返佣管理</div> <div class="col-2 q-table__title">返佣管理</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增任务" @click="EditTask(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-ClassName="props">
<q-td> <q-td :props="props" style="padding-right: 0px">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" {{props.row.ClassName}}{{props.row.ClassNo}}
@click="EditTask(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
@click="RemoveTask(props.row.Id)" />
<q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="详情"
@click="iShowEdit(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -52,109 +46,67 @@ ...@@ -52,109 +46,67 @@
data() { data() {
return { return {
columns: [{ columns: [{
name: 'AccountMoney',
label: 'AccountMoney',
align: 'left',
field: 'AccountMoney'
},
{
name: 'BalanceTypeStr', name: 'BalanceTypeStr',
label: 'BalanceTypeStr', label: '类型',
field: 'BalanceTypeStr', field: 'BalanceTypeStr',
align: 'left' align: 'left'
}, },
{ {
name: 'ClassId', name: 'Money',
label: 'ClassId', label: '变更金额',
field: 'ClassId',
align: 'left',
},
{
name: 'CustomerId',
label: 'CustomerId',
field: 'CustomerId',
align: 'left', align: 'left',
field: 'Money'
}, },
{ {
name: 'Description', name: 'Description',
label: '描述', label: '变更详情',
field: 'Description', field: 'Description',
align: 'left', align: 'left',
}, },
{ {
name: 'EmployeeId', name: 'ClassName',
label: 'EmployeeId', label: '班级信息',
field: 'EmployeeId', field: 'ClassName',
align: 'left',
},
{
name: 'Group_Id',
label: 'Group_Id',
field: 'Group_Id',
align: 'left',
},
{
name: 'Money',
label: '金额',
field: 'Money',
align: 'left', align: 'left',
}, },
{ {
name: 'OrderId', name: 'OrderId',
label: 'OrderId', label: '订单编号',
field: 'OrderId', field: 'OrderId',
align: 'left', align: 'left',
}, },
{
name: 'OrderSource',
label: 'OrderSource',
field: 'OrderSource',
align: 'left',
},
{ {
name: 'PeopleNum', name: 'PeopleNum',
label: '人数', label: '订单人数',
field: 'PeopleNum', field: 'PeopleNum',
align: 'left', align: 'left',
}, },
{
name: 'RebateTypeStr',
label: 'RebateTypeStr',
field: 'RebateTypeStr',
align: 'left',
},
{
name: 'School_Id',
label: 'School_Id',
field: 'School_Id',
align: 'left',
},
{ {
name: 'UpdateTime', name: 'UpdateTime',
label: '更新时间', label: '更新时间',
field: 'UpdateTime', field: 'UpdateTime',
align: 'left', align: 'left',
}, },
{
name: 'Id',
label: '操作',
field: 'Id'
}
], ],
dataList: [], dataList: [],
loading: true, loading: true,
msg: { msg: {
CustomerId: 0,
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
// TaskName: "" //任务 RebateType: 1,
}, },
pageCount: 0, pageCount: 0,
taskOption: null, taskOption: null,
isShowTask: false, isShowTask: false,
} }
}, },
created() {}, created() {
if (this.$route.query && this.$route.query.CustomerId) {
//this.msg.CustomerId = this.$route.query.CustomerId
}
},
mounted() { mounted() {
this.getList() this.getList()
}, },
...@@ -164,37 +116,6 @@ ...@@ -164,37 +116,6 @@
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList(); this.getList();
}, },
//删除
RemoveTask(id) {
let that = this
this.$q.dialog({
title: "删除营销任务",
message: "你正在进行删除任务行为,一旦执行无法找回,是否确认执行?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
RemoveCustomerTask({
Id: id
}).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据删除成功!',
position: 'top'
})
this.getList()
})
});
},
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.loading = true; this.loading = true;
...@@ -203,32 +124,11 @@ ...@@ -203,32 +124,11 @@
RefreshPage() { RefreshPage() {
this.getList() this.getList()
}, },
//新增修改
EditTask(obj) {
if (obj) {
this.taskOption = obj;
} else {
this.taskOption = null
}
this.isShowTask = true
},
iShowEdit(obj){
if (obj) {
this.taskOption = obj;
} else {
this.taskOption = null
}
this.isShowRight = true
},
closeSaleForm() {
this.isShowTask = false;
this.isShowRight = false;
},
//获取数据 //获取数据
getList() { getList() {
this.loading = true; this.loading = true;
GetCustomerBalanceDetailPage(this.msg).then(res => { GetCustomerBalanceDetailPage(this.msg).then(res => {
console.log(res,'数据'); console.log(res, '数据');
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
...@@ -240,14 +140,8 @@ ...@@ -240,14 +140,8 @@
} }
}, },
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
<style lang="scss">
</style> </style>
\ No newline at end of file
...@@ -8,24 +8,17 @@ ...@@ -8,24 +8,17 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
class="sticky-right-column-table sticky-column-table" separator="none" :data="dataList" :columns="columns" separator="none" :data="dataList" :columns="columns" row-key="name">
row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">幸福存折</div> <div class="col-2 q-table__title">幸福存折</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增任务" @click="EditTask(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-ClassName="props">
<q-td> <q-td :props="props" style="padding-right: 0px">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" {{props.row.ClassName}}{{props.row.ClassNo}}
@click="EditTask(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
@click="RemoveTask(props.row.Id)" />
<q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="详情"
@click="iShowEdit(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -52,109 +45,67 @@ ...@@ -52,109 +45,67 @@
data() { data() {
return { return {
columns: [{ columns: [{
name: 'AccountMoney',
label: 'AccountMoney',
align: 'left',
field: 'AccountMoney'
},
{
name: 'BalanceTypeStr', name: 'BalanceTypeStr',
label: 'BalanceTypeStr', label: '类型',
field: 'BalanceTypeStr', field: 'BalanceTypeStr',
align: 'left' align: 'left'
}, },
{ {
name: 'ClassId', name: 'Money',
label: 'ClassId', label: '变更金额',
field: 'ClassId',
align: 'left',
},
{
name: 'CustomerId',
label: 'CustomerId',
field: 'CustomerId',
align: 'left', align: 'left',
field: 'Money'
}, },
{ {
name: 'Description', name: 'Description',
label: '描述', label: '变更详情',
field: 'Description', field: 'Description',
align: 'left', align: 'left',
}, },
{ {
name: 'EmployeeId', name: 'ClassName',
label: 'EmployeeId', label: '班级信息',
field: 'EmployeeId', field: 'ClassName',
align: 'left',
},
{
name: 'Group_Id',
label: 'Group_Id',
field: 'Group_Id',
align: 'left',
},
{
name: 'Money',
label: '金额',
field: 'Money',
align: 'left', align: 'left',
}, },
{ {
name: 'OrderId', name: 'OrderId',
label: 'OrderId', label: '订单编号',
field: 'OrderId', field: 'OrderId',
align: 'left', align: 'left',
}, },
{
name: 'OrderSource',
label: 'OrderSource',
field: 'OrderSource',
align: 'left',
},
{ {
name: 'PeopleNum', name: 'PeopleNum',
label: '人数', label: '订单人数',
field: 'PeopleNum', field: 'PeopleNum',
align: 'left', align: 'left',
}, },
{
name: 'RebateTypeStr',
label: 'RebateTypeStr',
field: 'RebateTypeStr',
align: 'left',
},
{
name: 'School_Id',
label: 'School_Id',
field: 'School_Id',
align: 'left',
},
{ {
name: 'UpdateTime', name: 'UpdateTime',
label: '更新时间', label: '更新时间',
field: 'UpdateTime', field: 'UpdateTime',
align: 'left', align: 'left',
}, },
{
name: 'Id',
label: '操作',
field: 'Id'
}
], ],
dataList: [], dataList: [],
loading: true, loading: true,
msg: { msg: {
CustomerId: 0,
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
// TaskName: "" //任务 RebateType: 2,
}, },
pageCount: 0, pageCount: 0,
taskOption: null, taskOption: null,
isShowTask: false, isShowTask: false,
} }
}, },
created() {}, created() {
if (this.$route.query && this.$route.query.CustomerId) {
//this.msg.CustomerId = this.$route.query.CustomerId
}
},
mounted() { mounted() {
this.getList() this.getList()
}, },
...@@ -164,37 +115,7 @@ ...@@ -164,37 +115,7 @@
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList(); this.getList();
}, },
//删除
RemoveTask(id) {
let that = this
this.$q.dialog({
title: "删除营销任务",
message: "你正在进行删除任务行为,一旦执行无法找回,是否确认执行?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
RemoveCustomerTask({
Id: id
}).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据删除成功!',
position: 'top'
})
this.getList()
})
});
},
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.loading = true; this.loading = true;
...@@ -203,32 +124,11 @@ ...@@ -203,32 +124,11 @@
RefreshPage() { RefreshPage() {
this.getList() this.getList()
}, },
//新增修改
EditTask(obj) {
if (obj) {
this.taskOption = obj;
} else {
this.taskOption = null
}
this.isShowTask = true
},
iShowEdit(obj){
if (obj) {
this.taskOption = obj;
} else {
this.taskOption = null
}
this.isShowRight = true
},
closeSaleForm() {
this.isShowTask = false;
this.isShowRight = false;
},
//获取数据 //获取数据
getList() { getList() {
this.loading = true; this.loading = true;
GetCustomerBalanceDetailPage(this.msg).then(res => { GetCustomerBalanceDetailPage(this.msg).then(res => {
console.log(res,'数据'); console.log(res, '数据');
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
...@@ -240,14 +140,7 @@ ...@@ -240,14 +140,7 @@
} }
}, },
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
<style lang="scss">
</style> </style>
\ No newline at end of file
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