|
|
@@ -1,46 +1,162 @@
|
|
|
<template>
|
|
|
<div style="position: relative" ref="commonTable">
|
|
|
<!--表格栏-->
|
|
|
- <el-table id="commonTable" ref="doLayout" :data="data.content" :highlight-current-row="highlightCurrentRow"
|
|
|
- @selection-change="selectionChange" @row-click="rowClick" @current-change="handleCurrentChange"
|
|
|
- :element-loading-text="$t('action.loading')" :border="border" :stripe="stripe" :show-summary="showSummary"
|
|
|
- :summary-method="getSummaries" :show-overflow-tooltip="showOverflowTooltip" :height="tableHeights? tableHeights:tableHeight" :size="size"
|
|
|
- :align="align" :header-cell-style="{
|
|
|
+ <el-table
|
|
|
+ id="commonTable"
|
|
|
+ ref="doLayout"
|
|
|
+ :data="data.content"
|
|
|
+ :highlight-current-row="highlightCurrentRow"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @row-click="rowClick"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :element-loading-text="$t('action.loading')"
|
|
|
+ :border="border"
|
|
|
+ :stripe="stripe"
|
|
|
+ :show-summary="showSummary"
|
|
|
+ :summary-method="getSummaries"
|
|
|
+ :show-overflow-tooltip="showOverflowTooltip"
|
|
|
+ :height="tableHeights ? tableHeights : tableHeight"
|
|
|
+ :size="size"
|
|
|
+ :align="align"
|
|
|
+ :header-cell-style="{
|
|
|
background: '#F2F7FC',
|
|
|
fontWeight: '900',
|
|
|
color: '#606266',
|
|
|
- }" style="width: 100%" :row-class-name="tableRowClassName">
|
|
|
- <el-table-column type="selection" width="50" fixed align="center"
|
|
|
- v-if="showBatchDelete || showBatchSettled || showBatchPrint || customToolseletted"></el-table-column>
|
|
|
- <el-table-column v-if="SerialShow" label="序号" type="index" width="50" align="center"></el-table-column>
|
|
|
+ }"
|
|
|
+ style="width: 100%"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ >
|
|
|
+ <el-table-column type="expand" v-if="showSysUserAccountCardList" style="display: flex;">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-table
|
|
|
+ :data="scope.row.sysUserAccountCardList"
|
|
|
+ size="small"
|
|
|
+ :header-cell-style="{
|
|
|
+ background: '#ccc',
|
|
|
+ fontWeight: '900',
|
|
|
+ color: '#606266',
|
|
|
+ }"
|
|
|
+ style="width: 55%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ label="序号"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bankAccount" label="银行" style="flex: 1">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bankAddress" label="开户行" style="flex: 1">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bankNumber" label="银行卡号" style="flex: 1">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="50"
|
|
|
+ fixed
|
|
|
+ align="center"
|
|
|
+ v-if="
|
|
|
+ showBatchDelete ||
|
|
|
+ showBatchSettled ||
|
|
|
+ showBatchPrint ||
|
|
|
+ customToolseletted
|
|
|
+ "
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="SerialShow"
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+
|
|
|
<template v-for="column in columns">
|
|
|
- <el-table-column header-align="center" align="center" :prop="column.prop" :label="column.label"
|
|
|
- :width="column.width" :min-width="column.minWidth" :fixed="column.fixed" :key="column.prop" :type="column.type"
|
|
|
- :formatter="column.formatter" :sortable="column.sortable ? column.sortable : false"
|
|
|
- v-if="column.signIcon || column.isImg || column.isBtn">
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ :prop="column.prop"
|
|
|
+ :label="column.label"
|
|
|
+ :width="column.width"
|
|
|
+ :min-width="column.minWidth"
|
|
|
+ :fixed="column.fixed"
|
|
|
+ :key="column.prop"
|
|
|
+ :type="column.type"
|
|
|
+ :formatter="column.formatter"
|
|
|
+ :sortable="column.sortable ? column.sortable : false"
|
|
|
+ v-if="column.signIcon || column.isImg || column.isBtn"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch :disabled="column.isDisabled" v-if="column.signIcon" v-model="scope.row[column.prop]"
|
|
|
- active-value="1" inactive-value="0" @change="signStateChanged(scope.$index, scope.row)"></el-switch>
|
|
|
- <img v-if="column.isImg" :width="column.imgWidth" :height="column.imgHeight" :src="scope.row[column.prop]" />
|
|
|
- <kt-button v-if="column.isBtn" icon="fa fa-edit" :label="column.btnName" :size="size"
|
|
|
- :perms="column.permsEdit" @click="handleBtnEdit(scope.$index, scope.row)" />
|
|
|
+ <el-switch
|
|
|
+ :disabled="column.isDisabled"
|
|
|
+ v-if="column.signIcon"
|
|
|
+ v-model="scope.row[column.prop]"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ @change="signStateChanged(scope.$index, scope.row)"
|
|
|
+ ></el-switch>
|
|
|
+ <img
|
|
|
+ v-if="column.isImg"
|
|
|
+ :width="column.imgWidth"
|
|
|
+ :height="column.imgHeight"
|
|
|
+ :src="scope.row[column.prop]"
|
|
|
+ />
|
|
|
+ <kt-button
|
|
|
+ v-if="column.isBtn"
|
|
|
+ icon="fa fa-edit"
|
|
|
+ :label="column.btnName"
|
|
|
+ :size="size"
|
|
|
+ :perms="column.permsEdit"
|
|
|
+ @click="handleBtnEdit(scope.$index, scope.row)"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column header-align="center" align="center" :prop="column.prop" :label="column.label"
|
|
|
- :width="column.width" :min-width="column.minWidth" :fixed="column.fixed" :key="column.prop" :type="column.type"
|
|
|
- :formatter="column.formatter" :sortable="column.sortable ? column.sortable : false" v-else>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ :prop="column.prop"
|
|
|
+ :label="column.label"
|
|
|
+ :width="column.width"
|
|
|
+ :min-width="column.minWidth"
|
|
|
+ :fixed="column.fixed"
|
|
|
+ :key="column.prop"
|
|
|
+ :type="column.type"
|
|
|
+ :formatter="column.formatter"
|
|
|
+ :sortable="column.sortable ? column.sortable : false"
|
|
|
+ v-else
|
|
|
+ >
|
|
|
<template v-for="columnchildren in column.children">
|
|
|
- <el-table-column v-if="columnchildren" header-align="center" align="center" :prop="columnchildren.prop"
|
|
|
- :label="columnchildren.label" :width="columnchildren.width" :min-width="columnchildren.minWidth"
|
|
|
- :fixed="columnchildren.fixed" :key="columnchildren.prop" :type="columnchildren.type"
|
|
|
- :formatter="columnchildren.formatter" :sortable="columnchildren.sortable == null ? true : columnchildren.sortable
|
|
|
- ">
|
|
|
+ <el-table-column
|
|
|
+ v-if="columnchildren"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ :prop="columnchildren.prop"
|
|
|
+ :label="columnchildren.label"
|
|
|
+ :width="columnchildren.width"
|
|
|
+ :min-width="columnchildren.minWidth"
|
|
|
+ :fixed="columnchildren.fixed"
|
|
|
+ :key="columnchildren.prop"
|
|
|
+ :type="columnchildren.type"
|
|
|
+ :formatter="columnchildren.formatter"
|
|
|
+ :sortable="
|
|
|
+ columnchildren.sortable == null ? true : columnchildren.sortable
|
|
|
+ "
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
- <el-table-column :label="$t('action.operation')" :width="operationWidth" fixed="right" v-if="showOperation"
|
|
|
- header-align="center" align="center">
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('action.operation')"
|
|
|
+ :width="operationWidth"
|
|
|
+ fixed="right"
|
|
|
+ v-if="showOperation"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<kt-button
|
|
|
type="primary"
|
|
|
@@ -121,20 +237,57 @@
|
|
|
<!--分页栏-->
|
|
|
<!-- 底部分页 -->
|
|
|
<div class="bottomFixed" ref="bottomFixed">
|
|
|
- <kt-button :label="customToolName" :perms="permscustomTool" :size="size" type="danger"
|
|
|
- @click="customToolMethod()" :disabled="selections.length === 0" style="float: left"
|
|
|
- v-if="customToolseletted" />
|
|
|
- <kt-button class="debutton" :label="deleteName" :perms="permsDelete" :size="size" type="danger"
|
|
|
- @click="handleBatchDelete()" :disabled="selections.length === 0" style="float: left"
|
|
|
- v-if="showBatchDelete & showOperation" />
|
|
|
- <kt-button :label="settledName" :perms="permsSettled" :size="size" type="danger" @click="handleBatchSettled()"
|
|
|
- :disabled="selections.length === 0" style="float: left" v-if="showBatchSettled" />
|
|
|
- <kt-button label="导出Excel" :perms="permsExcel" :size="size" type="danger" @click="handleBatchPrint()"
|
|
|
- style="float: left" v-if="showBatchPrint" />
|
|
|
- <el-pagination @size-change="handleSizeChange" layout="total, sizes, prev, pager, next, jumper"
|
|
|
- @current-change="refreshPageRequest" :current-page="data.pageNum" :page-size="data.pageSize"
|
|
|
- :page-sizes="[10, 20, 50, 100, 200, 300, 400, 500]" :total="data.totalSize" style="float: left; margin-left: 20px"
|
|
|
- v-if="isshowpagination">
|
|
|
+ <kt-button
|
|
|
+ :label="customToolName"
|
|
|
+ :perms="permscustomTool"
|
|
|
+ :size="size"
|
|
|
+ type="danger"
|
|
|
+ @click="customToolMethod()"
|
|
|
+ :disabled="selections.length === 0"
|
|
|
+ style="float: left"
|
|
|
+ v-if="customToolseletted"
|
|
|
+ />
|
|
|
+ <kt-button
|
|
|
+ class="debutton"
|
|
|
+ :label="deleteName"
|
|
|
+ :perms="permsDelete"
|
|
|
+ :size="size"
|
|
|
+ type="danger"
|
|
|
+ @click="handleBatchDelete()"
|
|
|
+ :disabled="selections.length === 0"
|
|
|
+ style="float: left"
|
|
|
+ v-if="showBatchDelete & showOperation"
|
|
|
+ />
|
|
|
+ <kt-button
|
|
|
+ :label="settledName"
|
|
|
+ :perms="permsSettled"
|
|
|
+ :size="size"
|
|
|
+ type="danger"
|
|
|
+ @click="handleBatchSettled()"
|
|
|
+ :disabled="selections.length === 0"
|
|
|
+ style="float: left"
|
|
|
+ v-if="showBatchSettled"
|
|
|
+ />
|
|
|
+ <kt-button
|
|
|
+ label="导出Excel"
|
|
|
+ :perms="permsExcel"
|
|
|
+ :size="size"
|
|
|
+ type="danger"
|
|
|
+ @click="handleBatchPrint()"
|
|
|
+ style="float: left"
|
|
|
+ v-if="showBatchPrint"
|
|
|
+ />
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ @current-change="refreshPageRequest"
|
|
|
+ :current-page="data.pageNum"
|
|
|
+ :page-size="data.pageSize"
|
|
|
+ :page-sizes="[10, 20, 50, 100, 200, 300, 400, 500]"
|
|
|
+ :total="data.totalSize"
|
|
|
+ style="float: left; margin-left: 20px"
|
|
|
+ v-if="isshowpagination"
|
|
|
+ >
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -148,7 +301,7 @@ export default {
|
|
|
KtButton,
|
|
|
},
|
|
|
props: {
|
|
|
- tableHeights:{
|
|
|
+ tableHeights: {
|
|
|
type: Number,
|
|
|
},
|
|
|
operationWidth: {
|
|
|
@@ -180,8 +333,8 @@ export default {
|
|
|
//批量按钮name
|
|
|
type: String,
|
|
|
},
|
|
|
- deleteName:{
|
|
|
- type:String,
|
|
|
+ deleteName: {
|
|
|
+ type: String,
|
|
|
},
|
|
|
showBatchPrint: {
|
|
|
//显示批量导出
|
|
|
@@ -290,14 +443,14 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: true,
|
|
|
},
|
|
|
- showSummaryFieldList: Array,//自定义合计列配置
|
|
|
+ showSummaryFieldList: Array, //自定义合计列配置
|
|
|
keyName: String, //主键字段名
|
|
|
columns: Array, // 表格列配置
|
|
|
data: {}, // 表格分页数据
|
|
|
permsEdit: String, // 编辑权限标识
|
|
|
permsDelete: String, // 底部按钮标识
|
|
|
- permsSettled:String,// 底部按钮标识
|
|
|
- permsExcel:String,// 底部按钮标识
|
|
|
+ permsSettled: String, // 底部按钮标识
|
|
|
+ permsExcel: String, // 底部按钮标识
|
|
|
size: {
|
|
|
// 尺寸样式
|
|
|
type: String,
|
|
|
@@ -346,7 +499,11 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
-
|
|
|
+ showSysUserAccountCardList: {
|
|
|
+ // 是否显示二级列组件
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -356,15 +513,15 @@ export default {
|
|
|
pageRequest: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
methods: {
|
|
|
- tableRowClassName( row, rowIndex ) {
|
|
|
+ tableRowClassName(row, rowIndex) {
|
|
|
// if (!!row.fieldName24 && row.fieldName24.indexOf("未") >= 0) {
|
|
|
// return "warningRow";
|
|
|
// } else if (!!row.fieldName24 && row.fieldName24.indexOf("已") >= 0) {
|
|
|
- // return "successRow";
|
|
|
+ // return "successRow";
|
|
|
// }
|
|
|
this.$emit("tableRowClassName", row);
|
|
|
// return '';
|
|
|
@@ -437,12 +594,12 @@ export default {
|
|
|
refreshPageRequest: function (pageNum) {
|
|
|
this.pageRequest.pageNum = pageNum;
|
|
|
this.pageRequest.pageSize = 20;
|
|
|
- this.findPage()
|
|
|
+ this.findPage();
|
|
|
},
|
|
|
// 每页条数发生改变
|
|
|
handleSizeChange(pageSize) {
|
|
|
this.pageRequest.pageSize = pageSize;
|
|
|
- this.findPage()
|
|
|
+ this.findPage();
|
|
|
},
|
|
|
signStateChanged(index, row) {
|
|
|
this.$emit("signStateChanged", {
|
|
|
@@ -568,7 +725,7 @@ export default {
|
|
|
this.$emit("handleDelete", idlist);
|
|
|
},
|
|
|
//自定义批量操作按钮
|
|
|
- customToolMethod(){
|
|
|
+ customToolMethod() {
|
|
|
let idlist = [];
|
|
|
this.selections.map((item) => idlist.push(item.id));
|
|
|
this.$emit("customTool", idlist);
|
|
|
@@ -611,7 +768,7 @@ export default {
|
|
|
callback: callback,
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
//批量结算
|
|
|
handleBatchSettled: function () {
|