|
|
|
@ -1,109 +1,120 @@ |
|
|
|
<template> |
|
|
|
<div class="box"> |
|
|
|
<div style="width: 95%"> |
|
|
|
<el-card> |
|
|
|
<div class="publiccss">支付方式</div> |
|
|
|
<el-table |
|
|
|
:data="tableData" border |
|
|
|
style="width: 100%; height: 500px; margin-top: 20px" |
|
|
|
row-key="id" |
|
|
|
:height="tableHeight" |
|
|
|
class="el-table__body-wrapper tbody" |
|
|
|
@row-click="rowick" |
|
|
|
highlight-current-row |
|
|
|
> |
|
|
|
<el-table-column prop="id" label="编号" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="displayName" label="名称" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="simpleCode" label="快捷码" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="isActive" label="启用" min-width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isActive == 'Y' ? '是':'否'}}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
class="move" |
|
|
|
style=" |
|
|
|
cursor: move; |
|
|
|
margin-left: 15px; |
|
|
|
background-color: rgb(245, 245, 245); |
|
|
|
border: none; |
|
|
|
" |
|
|
|
draggable="true" |
|
|
|
> |
|
|
|
<i |
|
|
|
class="el-icon-d-caret" |
|
|
|
style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)" |
|
|
|
></i> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 新增或者编辑 --> |
|
|
|
<el-dialog |
|
|
|
title="修改" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="40%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="编号"> |
|
|
|
<el-input v-model="form.id" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="名称"> |
|
|
|
<el-input v-model="form.displayName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="addoredit" class="bulletcommit" |
|
|
|
>确 定</el-button |
|
|
|
<div> |
|
|
|
<el-card> |
|
|
|
<div slot="header">支付方式</div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 45 - 110) + 'px;'"> |
|
|
|
<el-table |
|
|
|
:data="tableData" border |
|
|
|
row-key="id" |
|
|
|
:height="window.pageHeight - 150" |
|
|
|
class="el-table__body-wrapper tbody" |
|
|
|
@row-click="rowick" |
|
|
|
highlight-current-row |
|
|
|
> |
|
|
|
<el-table-column prop="id" label="编号" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="displayName" label="名称" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="simpleCode" label="快捷码" min-width="80" align="center"/> |
|
|
|
<el-table-column prop="isActive" label="启用" min-width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isActive == 'Y' ? '是':'否'}}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
class="move" |
|
|
|
style=" |
|
|
|
cursor: move; |
|
|
|
margin-left: 15px; |
|
|
|
background-color: rgb(245, 245, 245); |
|
|
|
border: none; |
|
|
|
" |
|
|
|
draggable="true" |
|
|
|
> |
|
|
|
<i |
|
|
|
class="el-icon-d-caret" |
|
|
|
style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)" |
|
|
|
></i> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 按钮 --> |
|
|
|
<div style="margin-left: 10px; margin-top: 50px;"> |
|
|
|
<div> |
|
|
|
<el-button type="" @click="editpopup" class="btnClass">编辑</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="" @click="topping" class="btnClass" |
|
|
|
>置顶</el-button |
|
|
|
> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
<!-- --> |
|
|
|
<div style="margin-left: 10px; margin-top: 5%" class="buttonarea"> |
|
|
|
<el-button type="" @click="editpopup" class="commonbutton" |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="topping" class="commonbutton" |
|
|
|
>置顶</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="toppings" class="commonbutton" |
|
|
|
>置底</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="assertion" |
|
|
|
class="commonbutton" |
|
|
|
>排序</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="" @click="toppings" class="btnClass" |
|
|
|
>置底</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="assertion" |
|
|
|
class="btnClass" |
|
|
|
>排序</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="cancellation" |
|
|
|
class="btnClass" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="cancellation" |
|
|
|
class="commonbutton" |
|
|
|
>取消</el-button |
|
|
|
|
|
|
|
</el-card> |
|
|
|
<!-- 新增或者编辑 --> |
|
|
|
<el-dialog |
|
|
|
title="修改" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="600px" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="编号"> |
|
|
|
<el-input v-model="form.id" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="名称"> |
|
|
|
<el-input v-model="form.displayName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="启用"> |
|
|
|
<el-radio v-model="form.isActive" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="form.isActive" label="N">否</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="addoredit" class="bulletcommit" |
|
|
|
>确 定</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -114,16 +125,16 @@ import { |
|
|
|
paytopandbottom, |
|
|
|
paymentdraganddrop, |
|
|
|
} from "@/request/commonapi"; |
|
|
|
import { mapState } from "vuex" |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isshow: true, |
|
|
|
tableHeight: window.innerHeight - 180, //表格动态高度 |
|
|
|
screenHeight: window.innerHeight, //内容区域高度 1 |
|
|
|
initTableData: [], |
|
|
|
tableData: [], |
|
|
|
form: { |
|
|
|
displayName: "", |
|
|
|
isActive: "Y", |
|
|
|
}, |
|
|
|
dialogVisible: false, |
|
|
|
}; |
|
|
|
@ -133,21 +144,13 @@ export default { |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.rowDrop(); |
|
|
|
// window.onresize:浏览器尺寸变化响应事件 |
|
|
|
window.onresize = () => { |
|
|
|
return (() => { |
|
|
|
// window.innerHeight:浏览器的可用高度 |
|
|
|
window.screenHeight = window.innerHeight; |
|
|
|
this.screenHeight = window.screenHeight; |
|
|
|
})(); |
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
watch: { |
|
|
|
// 监听screenHeight从而改变table的高度 |
|
|
|
screenHeight(val) { |
|
|
|
this.screenHeight = val; |
|
|
|
this.tableHeight = this.screenHeight - 180; |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
...mapState(['window']) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//取消排序 |
|
|
|
@ -232,6 +235,7 @@ export default { |
|
|
|
} else { |
|
|
|
paymentediting(this.form.id, { |
|
|
|
displayName: this.form.displayName, |
|
|
|
isActive:this.form.isActive |
|
|
|
}).then((res) => { |
|
|
|
this.$message.success("修改成功"); |
|
|
|
this.getlist(); |
|
|
|
@ -245,16 +249,10 @@ export default { |
|
|
|
this.$message.warning("请点击选择操作的数据"); |
|
|
|
} else { |
|
|
|
this.dialogVisible = true; |
|
|
|
let copy = Object.assign({}, this.form); |
|
|
|
this.form = copy; |
|
|
|
// invoiceidquery(this.form.payModeId).then((res) => { |
|
|
|
// console.log(res); |
|
|
|
// this.form = res.data; |
|
|
|
// }); |
|
|
|
} |
|
|
|
}, |
|
|
|
rowick(row) { |
|
|
|
this.form = row; |
|
|
|
this.form = Object.assign({},row); |
|
|
|
}, |
|
|
|
getlist() { |
|
|
|
paymodelist().then((res) => { |
|
|
|
@ -267,12 +265,16 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
::v-deep .el-table__header th { |
|
|
|
/* font-size: px; */ |
|
|
|
background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */ |
|
|
|
color: rgb(113, 113, 113); /* 设置表头文字颜色 */ |
|
|
|
} |
|
|
|
.box { |
|
|
|
display: flex; |
|
|
|
@import '../../assets/css/global_button.css'; |
|
|
|
@import '../../assets/css/global_card.css'; |
|
|
|
@import '../../assets/css/global_dialog.css'; |
|
|
|
@import '../../assets/css/global_form.css'; |
|
|
|
@import '../../assets/css/global_input.css'; |
|
|
|
@import '../../assets/css/global_table.css'; |
|
|
|
@import '../../assets/css/global.css'; |
|
|
|
|
|
|
|
.btnClass { |
|
|
|
width: 100px; |
|
|
|
margin-top: 10px |
|
|
|
} |
|
|
|
</style> |