Commit efc4d815 by 李伟康

增加分页

1 parent 56c36e4e
...@@ -10,6 +10,26 @@ ...@@ -10,6 +10,26 @@
@onCancel="handleClose" @onCancel="handleClose"
> >
<div class="dialog_body"> <div class="dialog_body">
<template v-if="isOil">
<glsx-combi-form
ref="showSearch"
labelWidth="105px"
:formObj="dialogSearchForm"
:formData="dialogFormData"
>
<span slot="footer">
<el-button
:size="size"
type="primary"
@click="handleOk"
>查询</el-button>
<el-button
:size="size"
@click="handleRest"
>重置</el-button>
</span>
</glsx-combi-form>
</template>
<!-- <GLCombiForm :rowNumber="1" class="dialog_search" ref="searchRef" :formObj="dialogSearchForm" :formData="dialogFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm> --> <!-- <GLCombiForm :rowNumber="1" class="dialog_search" ref="searchRef" :formObj="dialogSearchForm" :formData="dialogFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm> -->
<div class="dialog_table"> <div class="dialog_table">
<GLTable <GLTable
...@@ -59,7 +79,7 @@ export default { ...@@ -59,7 +79,7 @@ export default {
copyList: [], copyList: [],
couponList: [], couponList: [],
directChargeList: [], directChargeList: [],
pageSizes: [5, 10, 20, 30, 40], pageSizes: [10, 20, 30, 40],
dialogSearchForm: { dialogSearchForm: {
merchantName: '', merchantName: '',
merchantId: '' merchantId: ''
...@@ -69,13 +89,18 @@ export default { ...@@ -69,13 +89,18 @@ export default {
label: '商户名称', label: '商户名称',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
isClear: true placeholder: '请输入商户名称',
width: '300px',
labelWidth: '10px'
}, },
{ {
label: '商户ID', label: '商户ID',
name: 'merchantId', name: 'merchantId',
type: 'input', type: 'input',
isClear: true inputType: 'number',
placeholder: '请输入商户ID',
width: '300px',
labelWidth: '10px'
} }
], ],
getListApi: null, getListApi: null,
...@@ -108,6 +133,7 @@ export default { ...@@ -108,6 +133,7 @@ export default {
}, },
methods: { methods: {
handleOk () { handleOk () {
console.log(this.dialogSearchForm)
this.$refs.tableRef.refreshTable() this.$refs.tableRef.refreshTable()
}, },
handleRest () { handleRest () {
...@@ -119,8 +145,8 @@ export default { ...@@ -119,8 +145,8 @@ export default {
}, },
beforeSearchFn () { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.dialogSearchForm = { if (!this.isOil) this.dialogSearchForm = {
id: this.goodsId id: this.goodsId,
} }
resolve() resolve()
}) })
...@@ -144,7 +170,7 @@ export default { ...@@ -144,7 +170,7 @@ export default {
const KEY = this.isOil ? 'merchantNo' : 'merchantId' const KEY = this.isOil ? 'merchantNo' : 'merchantId'
this.copyList.forEach(row => { this.copyList.forEach(row => {
this.$nextTick(() => { this.$nextTick(() => {
let idx = this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item =>item[KEY] == row[KEY]) let idx = this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item[KEY] == row[KEY])
if (idx > -1) { if (idx > -1) {
try { try {
this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true) this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!