Commit a26b6947 by 张权

UI更多按钮修改

1 parent 2a03a17a
......@@ -23,13 +23,7 @@
<div class="table_wrapper">
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> -->
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2].includes(scope.scope.orderStatus)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
......@@ -72,6 +66,102 @@ export default {
data() {
return {
size: 'small',
buttonList: [
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [2, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '打印'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '编辑'
},
condition: row => {
return [0].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '修改'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '修改'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '退单'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleBack(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提单'
},
condition: row => {
return [3, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '重新提单'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
}
],
noCancel: true,
isBlock: true,
isTipVisible: false,
......@@ -1028,14 +1118,14 @@ export default {
/* margin-bottom: 18px; */
}
.before-sale .el-table .cell {
line-height: 16px;
}
.before-sale .table-btns {
display: grid;
grid-template-columns: repeat(auto-fill, 33.33%);
grid-row-gap: 10px;
}
// .before-sale .el-table .cell {
// line-height: 16px;
// }
// .before-sale .table-btns {
// display: grid;
// grid-template-columns: repeat(auto-fill, 33.33%);
// grid-row-gap: 10px;
// }
.before-sale .table-btns .el-button {
// padding: 0 0 0 5px;
border-radius: 0;
......
......@@ -21,9 +21,10 @@
<el-button style="float:right;margin-bottom:10px;" size="small" @click="exportList">导出</el-button>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<!-- <GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
......@@ -62,6 +63,56 @@ export default {
data() {
return {
orderCount: {},
buttonList: [
{
type: 'GLButton',
name: row => {
return '去处理'
},
condition: row => {
return [0].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '去处理'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [1, 3, 4].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提交'
},
condition: row => {
return [2].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '重新提交'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
}
],
getListApi: this.$apis.claims.getclaimsList,
sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!