|
@@ -1,150 +1,14 @@
|
|
<template>
|
|
<template>
|
|
- <div class="app-container">
|
|
|
|
- <div class="screen-container">
|
|
|
|
- <Collapse :screen-form="screenForm">
|
|
|
|
- <template #right_btn>
|
|
|
|
- <el-button icon="el-icon-search" type="primary" size="mini" @click="submitScreenForm">搜索</el-button>
|
|
|
|
- <el-button type="primary" size="mini" @click="resetScreenForm">清空</el-button>
|
|
|
|
- </template>
|
|
|
|
- <template #search>
|
|
|
|
- <el-form ref="screenForm" :model="screenForm" size="mini" label-position="left" label-width="120px">
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
- <!-- <el-col :xs="24" :ms="6" :lg="6">
|
|
|
|
- <el-form-item label="" prop="mainName">
|
|
|
|
- <el-input
|
|
|
|
- v-model="screenForm.mainName"
|
|
|
|
- placeholder="返利品类"
|
|
|
|
- size="mini"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :xs="24" :ms="6" :lg="6">
|
|
|
|
- <el-form-item label="销售类型编码" prop="saleTypeCode">
|
|
|
|
- <el-input v-model="screenForm.saleTypeCode" placeholder="销售类型编码" size="mini"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :ms="6" :lg="6">
|
|
|
|
- <el-form-item label="销售类型名称" prop="saleTypeName">
|
|
|
|
- <el-input v-model="screenForm.saleTypeName" placeholder="销售类型名称" size="mini"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :ms="6" :lg="6">
|
|
|
|
- <el-form-item prop="status" label="状态">
|
|
|
|
- <el-select v-model="screenForm.status" placeholder="请选择" size="mini">
|
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </el-form>
|
|
|
|
- </template>
|
|
|
|
- </Collapse>
|
|
|
|
- <div>
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="mini"
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
- v-if="$checkBtnRole('add', $route.meta.roles)"
|
|
|
|
- @click=";(dialogVisible = true), (type = 1), getDictList()"
|
|
|
|
- >新增</el-button
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
- <!-- <el-button type="primary" size="mini" @click="delfn"
|
|
|
|
- >批量删除</el-button
|
|
|
|
- > -->
|
|
|
|
- <el-popconfirm
|
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
|
- class="delClass"
|
|
|
|
- @onConfirm="delfn"
|
|
|
|
- title="这是一段内容确定删除吗?"
|
|
|
|
- >
|
|
|
|
- <el-button :disabled="ids.length < 1" slot="reference" type="danger" icon="el-icon-minus" size="mini"
|
|
|
|
- >批量删除</el-button
|
|
|
|
- >
|
|
|
|
- </el-popconfirm>
|
|
|
|
-
|
|
|
|
- <ExportButton
|
|
|
|
- style="display: inline-block; margin-left: 10px"
|
|
|
|
- :exUrl="'wallet/rebate_saletype/export'"
|
|
|
|
- :exParams="exParams"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="mymain-container">
|
|
|
|
- <div class="table">
|
|
|
|
- <el-table
|
|
|
|
- v-loading="listLoading"
|
|
|
|
- :data="dataList"
|
|
|
|
- element-loading-text="Loading"
|
|
|
|
- border
|
|
|
|
- fit
|
|
|
|
- highlight-current-row
|
|
|
|
- stripe
|
|
|
|
- @selection-change="selectionhangeFn"
|
|
|
|
- >
|
|
|
|
- <!-- <div v-for="(col, i) in columns" :key="i"> -->
|
|
|
|
- <el-table-column type="selection" width="55" align="center"> </el-table-column>
|
|
|
|
- <template v-for="col in columns">
|
|
|
|
- <el-table-column
|
|
|
|
- align="left"
|
|
|
|
- :label="col.lable"
|
|
|
|
- :prop="col.prop"
|
|
|
|
- :min-width="col.widht"
|
|
|
|
- show-overflow-tooltip
|
|
|
|
- v-if="col.prop == 'status'"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-switch
|
|
|
|
- v-model="scope.row.status"
|
|
|
|
- @change="handleSwitch($event, scope.row.walletRebateSaleTypeId)"
|
|
|
|
- :active-text="scope.row.status ? '已启用' : '已禁用'"
|
|
|
|
- >
|
|
|
|
- </el-switch>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- v-else
|
|
|
|
- align="left"
|
|
|
|
- :label="col.lable"
|
|
|
|
- :prop="col.prop"
|
|
|
|
- :min-width="col.widht"
|
|
|
|
- show-overflow-tooltip
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- </template>
|
|
|
|
- <!-- </div> -->
|
|
|
|
-
|
|
|
|
- <el-table-column align="center" fixed="right" label="操作" min-width="160">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button type="text" size="mini" @click="hanleDateil(scope.row)">查看</el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- size="mini"
|
|
|
|
- @click="hanleEdit(scope.row)"
|
|
|
|
- v-if="$checkBtnRole('edit', $route.meta.roles)"
|
|
|
|
- >编辑</el-button
|
|
|
|
- >
|
|
|
|
- <!-- <el-button type="text" size="mini">编辑</el-button> -->
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- <!-- 分页 -->
|
|
|
|
- <div class="fr">
|
|
|
|
- <el-pagination
|
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page="currentPage"
|
|
|
|
- :page-sizes="[10, 20, 30, 50]"
|
|
|
|
- :page-size="10"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="listTotal"
|
|
|
|
- >
|
|
|
|
- </el-pagination>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <template-page
|
|
|
|
+ ref="pageRef"
|
|
|
|
+ :getList="getList"
|
|
|
|
+ :operation="operation()"
|
|
|
|
+ :optionsEvensGroup="optionsEvensGroup"
|
|
|
|
+ :exportList="exportList"
|
|
|
|
+ :columnParsing="columnParsing"
|
|
|
|
+ :tableAttributes="tableAttributes"
|
|
|
|
+ :tableEvents="tableEvents"
|
|
|
|
+ >
|
|
<div>
|
|
<div>
|
|
<el-dialog :visible.sync="dialogVisible" width="30%" @close="hanelclose" title="返利类型">
|
|
<el-dialog :visible.sync="dialogVisible" width="30%" @close="hanelclose" title="返利类型">
|
|
<el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="120px" :inline="false" size="normal">
|
|
<el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="120px" :inline="false" size="normal">
|
|
@@ -222,26 +86,15 @@
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <!-- <template-page
|
|
|
|
- ref="pageRef"
|
|
|
|
- :getList="getList"
|
|
|
|
- :operation="operation()"
|
|
|
|
- :optionsEvensGroup="optionsEvensGroup"
|
|
|
|
- :exportList="exportList"
|
|
|
|
- :columnParsing="columnParsing"
|
|
|
|
- :tableAttributes="tableAttributes"
|
|
|
|
- :tableEvents="tableEvents"
|
|
|
|
- >
|
|
|
|
- </template-page> -->
|
|
|
|
|
|
+ </template-page>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
-import add_callback_mixin from '@/components/template/add_callback_mixin.js'
|
|
|
|
|
|
+// import add_callback_mixin from '@/components/template/add_callback_mixin.js'
|
|
|
|
|
|
import Mixin from '@/mixin/index'
|
|
import Mixin from '@/mixin/index'
|
|
-import Pagination from '@/components/Pagination'
|
|
|
|
|
|
+// import Pagination from '@/components/Pagination'
|
|
import {
|
|
import {
|
|
getDictList,
|
|
getDictList,
|
|
getTypeList,
|
|
getTypeList,
|
|
@@ -249,11 +102,13 @@ import {
|
|
getWalletRebateSaletypeAdd,
|
|
getWalletRebateSaletypeAdd,
|
|
getWalletRebateSaletypeDelete,
|
|
getWalletRebateSaletypeDelete,
|
|
getWalletRebateSaletypelist,
|
|
getWalletRebateSaletypelist,
|
|
- getWalletRebateSaletypeUpdate
|
|
|
|
|
|
+ getWalletRebateSaletypeUpdate,
|
|
|
|
+ walletRebateSaletypeListV2,
|
|
|
|
+ walletRebateSaletypeListV2Export
|
|
} from '@/api/policy_list'
|
|
} from '@/api/policy_list'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- mixins: [Mixin, add_callback_mixin],
|
|
|
|
|
|
+ mixins: [],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 事件组合
|
|
// 事件组合
|
|
@@ -262,7 +117,7 @@ export default {
|
|
[
|
|
[
|
|
{
|
|
{
|
|
name: '新增',
|
|
name: '新增',
|
|
- click: this.addOn(() => {})
|
|
|
|
|
|
+ click: () => {}
|
|
}
|
|
}
|
|
]
|
|
]
|
|
],
|
|
],
|
|
@@ -401,9 +256,9 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 列表请求函数
|
|
// 列表请求函数
|
|
- // getList: levelList,
|
|
|
|
|
|
+ getList: walletRebateSaletypeListV2,
|
|
// 列表导出函数
|
|
// 列表导出函数
|
|
- // exportList: exportLevelList,
|
|
|
|
|
|
+ exportList: walletRebateSaletypeListV2Export,
|
|
// 表格列解析渲染数据更改
|
|
// 表格列解析渲染数据更改
|
|
columnParsing(item, defaultData) {
|
|
columnParsing(item, defaultData) {
|
|
return defaultData
|
|
return defaultData
|
|
@@ -453,29 +308,29 @@ export default {
|
|
})
|
|
})
|
|
this.walletList = res.data.records
|
|
this.walletList = res.data.records
|
|
},
|
|
},
|
|
- getList() {
|
|
|
|
- this.listLoading = true
|
|
|
|
- const params = {
|
|
|
|
- pageNum: this.currentPage,
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
- // mainName: this.screenForm.mainName,
|
|
|
|
- saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
|
- saleTypeName: this.screenForm.saleTypeName,
|
|
|
|
- status: this.screenForm.status
|
|
|
|
- }
|
|
|
|
|
|
+ // getList() {
|
|
|
|
+ // this.listLoading = true
|
|
|
|
+ // const params = {
|
|
|
|
+ // pageNum: this.currentPage,
|
|
|
|
+ // pageSize: this.pageSize,
|
|
|
|
+ // // mainName: this.screenForm.mainName,
|
|
|
|
+ // saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
|
+ // saleTypeName: this.screenForm.saleTypeName,
|
|
|
|
+ // status: this.screenForm.status
|
|
|
|
+ // }
|
|
|
|
|
|
- getWalletRebateSaletypelist(params).then(res => {
|
|
|
|
- this.dataList = res.data.records
|
|
|
|
- this.listTotal = res.data.total
|
|
|
|
- this.listLoading = false
|
|
|
|
- })
|
|
|
|
- // getProductList({
|
|
|
|
- // productCategoryName: "",
|
|
|
|
- // productCategoryNumber: "",
|
|
|
|
- // }).then((res) => {
|
|
|
|
- // this.productList = res.data;
|
|
|
|
- // });
|
|
|
|
- },
|
|
|
|
|
|
+ // getWalletRebateSaletypelist(params).then(res => {
|
|
|
|
+ // this.dataList = res.data.records
|
|
|
|
+ // this.listTotal = res.data.total
|
|
|
|
+ // this.listLoading = false
|
|
|
|
+ // })
|
|
|
|
+ // // getProductList({
|
|
|
|
+ // // productCategoryName: "",
|
|
|
|
+ // // productCategoryNumber: "",
|
|
|
|
+ // // }).then((res) => {
|
|
|
|
+ // // this.productList = res.data;
|
|
|
|
+ // // });
|
|
|
|
+ // },
|
|
|
|
|
|
handleChange(e) {
|
|
handleChange(e) {
|
|
console.log(e, this.typeList)
|
|
console.log(e, this.typeList)
|
|
@@ -619,8 +474,7 @@ export default {
|
|
this.getWalletList()
|
|
this.getWalletList()
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
- Pagination,
|
|
|
|
- Pagination
|
|
|
|
|
|
+ TemplatePage
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|