|
@@ -1,12 +1,78 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
-
|
|
|
+ <el-dialog title="添加经销商" :visible.sync="dialogTableVisible">
|
|
|
+ <tableLayout :layout="tablecols" :data="list" :custom="true" height="calc(100vh - 452px)">
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <p>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <slot name="del" :data="scope"></slot>
|
|
|
+ </template>
|
|
|
+ </tableLayout>
|
|
|
+ <div style="margin-top:16px;text-align:right">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ small
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="params.content.pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
-
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ dialogTableVisible:false,
|
|
|
+ params:{
|
|
|
+ "classname":"webmanage.saletool.orderclue.ordercluerule",
|
|
|
+ "method": "queryAgent",
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "where":{
|
|
|
+ "condition":""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tablecols:[],
|
|
|
+ list:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ onShow () {
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ async listData () {
|
|
|
+ const res = await this.$api.requested(this.params)
|
|
|
+ this.list = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.currentPage = res.pageNumber
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.params.content.pageSize = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.params.content.pageNumber = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ //获取表结构
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name)['agentTable'].tablecols
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</script>
|