|
@@ -114,12 +114,95 @@
|
|
|
v-hasPermi="['basicdata:fees:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <div class="tabSetting">
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
+ <div style="margin: 0 12px">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="列设置"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-setting"
|
|
|
+ size="mini"
|
|
|
+ circle
|
|
|
+ @click="showSetting = !showSetting"
|
|
|
+ ></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
+ <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
|
|
|
+ <div>配置排序列数据(拖动调整顺序)</div>
|
|
|
+ <div style="margin-left: 17px">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="allCheck"
|
|
|
+ label="全选"
|
|
|
+ @change="allChecked"
|
|
|
+ ></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 4px; display: flex; justify-content: center">
|
|
|
+ <draggable
|
|
|
+ v-model="setRowList"
|
|
|
+ group="site"
|
|
|
+ animation="300"
|
|
|
+ @start="onStart"
|
|
|
+ @end="onEnd"
|
|
|
+ handle=".indraggable"
|
|
|
+ >
|
|
|
+ <transition-group>
|
|
|
+ <div
|
|
|
+ v-for="item in setRowList"
|
|
|
+ :key="item.surface"
|
|
|
+ class="listStyle"
|
|
|
+ >
|
|
|
+ <div style="width: 500px" class="indraggable">
|
|
|
+ <div class="progress" :style="{ width: item.width + 'px' }">
|
|
|
+ <el-checkbox
|
|
|
+ :label="item.name"
|
|
|
+ v-model="item.checked"
|
|
|
+ :true-label="0"
|
|
|
+ :false-label="1"
|
|
|
+ >{{ item.name }}
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input-number
|
|
|
+ v-model.number="item.width"
|
|
|
+ controls-position="right"
|
|
|
+ :min="1"
|
|
|
+ :max="500"
|
|
|
+ size="mini"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ </transition-group>
|
|
|
+ </draggable>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showSetting = false">取 消</el-button>
|
|
|
+ <el-button @click="delRow" type="danger">重 置</el-button>
|
|
|
+ <el-button type="primary" @click="save()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-table v-loading="loading" :data="feesList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column type="index" label="序号" align="center"/>
|
|
|
- <el-table-column label="编号" align="center" prop="fNo" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in getRowList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :width="item.width"
|
|
|
+ :prop="item.label"
|
|
|
+ align="center"
|
|
|
+ :fixed="item.fixed"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ sortable
|
|
|
+ />
|
|
|
+ <!-- <el-table-column label="编号" align="center" prop="fNo" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="名称" align="center" prop="fName" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="费用属性" align="center" prop="fFeetype" :formatter="fFeetypeFormat" />
|
|
|
<el-table-column label="收付方向" align="center" prop="fDc">
|
|
@@ -132,7 +215,7 @@
|
|
|
<el-table-column label="计量单位" align="center" prop="fFeeunitid" :formatter="fFeeunitidFormat" />
|
|
|
<el-table-column label="币种" align="center" prop="fCurrency" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="状态" align="center" prop="fStatus" :formatter="statusFormat" />
|
|
|
- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -268,6 +351,10 @@
|
|
|
<script>
|
|
|
import { listFees, getFees, delFees, addFees, updateFees, exportFees } from "../../../api/basicdata/fees";
|
|
|
import Vue from 'vue'
|
|
|
+import { addSet, select, resetModule } from "@/api/system/set";
|
|
|
+import Cookies from "js-cookie";
|
|
|
+import draggable from "vuedraggable";
|
|
|
+
|
|
|
Vue.directive('dialogDrag', {
|
|
|
bind(el, binding, vnode, oldVnode) {
|
|
|
const dialogHeaderEl = el.querySelector('.el-dialog__header')
|
|
@@ -324,7 +411,7 @@ Vue.directive('dialogDrag', {
|
|
|
})
|
|
|
export default {
|
|
|
name: "Fees",
|
|
|
- components: {
|
|
|
+ components: {draggable
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -375,10 +462,75 @@ export default {
|
|
|
fName: [
|
|
|
{ required: true, message: "名称不能为空", trigger: "blur" }
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
+ showSetting: false,
|
|
|
+ drag: false,
|
|
|
+ setRowList: [],
|
|
|
+ getRowList: [],
|
|
|
+ tableDate: [
|
|
|
+ {
|
|
|
+ surface: "1",
|
|
|
+ label: "fTypename",
|
|
|
+ name: "编号",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "2",
|
|
|
+ label: "fName",
|
|
|
+ name: "名称",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "3",
|
|
|
+ label: "fFeetype",
|
|
|
+ name: "费用属性",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "4",
|
|
|
+ label: "fDc",
|
|
|
+ name: "收付方向",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "5",
|
|
|
+ label: "fFeeunitid",
|
|
|
+ name: "计量单位",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "6",
|
|
|
+ label: "fCurrency",
|
|
|
+ name: "币种",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "7",
|
|
|
+ label: "fStatus",
|
|
|
+ name: "状态",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "8",
|
|
|
+ label: "remark",
|
|
|
+ name: "备注",
|
|
|
+ checked: 0,
|
|
|
+ width:null,
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ allCheck: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ this.setRowList = this.tableDate;
|
|
|
+ this.getRowList = this.tableDate;
|
|
|
this.getList();
|
|
|
this.getDicts("data_cost_attribute").then(response => {
|
|
|
this.fFeetypeOptions = response.data;
|
|
@@ -389,8 +541,83 @@ export default {
|
|
|
this.getDicts("data_unitfees").then(response => {
|
|
|
this.fFeeunitidOptions = response.data;
|
|
|
});
|
|
|
+ this.getRow();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //列设置全选
|
|
|
+ allChecked() {
|
|
|
+ if (this.allCheck == true) {
|
|
|
+ this.setRowList.map((e) => {
|
|
|
+ return (e.checked = 0);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setRowList.map((e) => {
|
|
|
+ return (e.checked = 1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //查询列数据
|
|
|
+ getRow() {
|
|
|
+ let that = this;
|
|
|
+ this.data = {
|
|
|
+ tableName: "我的审核",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ select(this.data).then((res) => {
|
|
|
+ if (res.data.length != 0) {
|
|
|
+ this.getRowList = res.data.filter((e) => e.checked == 0);
|
|
|
+ this.setRowList = res.data;
|
|
|
+ this.setRowList = this.setRowList.reduce((res, item) => {
|
|
|
+ res.push({
|
|
|
+ surface: item.surface,
|
|
|
+ label: item.label,
|
|
|
+ name: item.name,
|
|
|
+ checked: item.checked,
|
|
|
+ width: item.width,
|
|
|
+ fixed: item.fixed,
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //重置列表
|
|
|
+ delRow() {
|
|
|
+ this.data = {
|
|
|
+ tableName: "我的审核",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ resetModule(this.data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting = false;
|
|
|
+ this.setRowList = this.tableDate;
|
|
|
+ this.getRowList = this.tableDate;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //保存列设置
|
|
|
+ save() {
|
|
|
+ this.showSetting = false;
|
|
|
+ this.data = {
|
|
|
+ tableName: "我的审核",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ sysTableSetList: this.setRowList,
|
|
|
+ };
|
|
|
+ addSet(this.data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting = false;
|
|
|
+ this.getRowList = this.setRowList.filter((e) => e.checked == 0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //开始拖拽事件
|
|
|
+ onStart() {
|
|
|
+ this.drag = true;
|
|
|
+ },
|
|
|
+ //拖拽结束事件
|
|
|
+ onEnd() {
|
|
|
+ this.drag = false;
|
|
|
+ },
|
|
|
full(){
|
|
|
this.dialogFull = !this.dialogFull
|
|
|
},
|
|
@@ -559,3 +786,25 @@ export default {
|
|
|
content: "\e719";
|
|
|
}
|
|
|
</style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tabSetting {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+.listStyle {
|
|
|
+ display: flex;
|
|
|
+ border-top: 1px solid #dcdfe6;
|
|
|
+ border-left: 1px solid #dcdfe6;
|
|
|
+ border-right: 1px solid #dcdfe6;
|
|
|
+}
|
|
|
+.listStyle:last-child {
|
|
|
+ border-bottom: 1px solid #dcdfe6;
|
|
|
+}
|
|
|
+.progress {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 2px;
|
|
|
+ background-color: rgba(0, 0, 0, 0.05);
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+</style>
|