|
@@ -1,39 +1,27 @@
|
|
|
<template>
|
|
|
-<!-- <div>
|
|
|
-
|
|
|
+ <div>
|
|
|
<div class="flex-align-center normal-margin">
|
|
|
- <add class="inline-16" :data="data" @insertSuccess="onSuccess" v-if="tool.checkAuth($route.name,'customerAddressManage') && data.disabled"></add>
|
|
|
- <el-input
|
|
|
- style="width:300px"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="search"
|
|
|
- clearable
|
|
|
- @clear="clearData()"
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="queryClick()">
|
|
|
- <i slot="prefix" class="el-icon-search" @click="queryClick()"></i>
|
|
|
+ <add class="inline-16" :data="data" v-if="tool.checkAuth($route.name,'bankCardInfor') && data.disabled" @addSuccess="listData"></add>
|
|
|
+ <el-input style="width:200px;" placeholder="搜索"
|
|
|
+ :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
|
|
|
+ v-model="param.content.where.condition"
|
|
|
+ @keyup.native.enter="listData(param.content.pageNumber = 1)"
|
|
|
+ @clear="listData(param.content.pageNumber = 1)" size="small"
|
|
|
+ class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght" fixedName="operation">
|
|
|
<template v-slot:customcol="scope">
|
|
|
- <div v-if="scope.column.columnname === 'province'">
|
|
|
- <p>{{ scope.column.data.province + scope.column.data.city + scope.column.data.county}}</p>
|
|
|
- </div>
|
|
|
- <div v-else-if="scope.column.columnname === 'isdefault'">
|
|
|
- <p>{{ scope.column.data.isdefault === 0?'否':'是'}}</p>
|
|
|
- </div>
|
|
|
- <div v-else-if="scope.column.columnname === 'type'">
|
|
|
- <div v-for="item in scope.column.data.tag" :key="item.index" style="float: left;margin-left: 5px">
|
|
|
- <el-tag color="#FAAB16" size="mini" type="warning" effect="dark">
|
|
|
- <span>{{item}}</span>
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
+ <p >{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <edit :data="scope.data" @updateSuccess="onSuccess" :disable="data.disabled"></edit>
|
|
|
- <toVoid :data="scope.data" @toVoidSuccess="onSuccess" :disable="data.disabled"></toVoid>
|
|
|
+ <edit class="inline-16" :data="scope.data" @updateSuccess="listData" :disable="data.disabled"></edit>
|
|
|
+ <el-popconfirm
|
|
|
+ title="确定删除该银行卡信息吗?"
|
|
|
+ @confirm="onDel(scope.data)"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" size="mini" type="text" :disabled="!tool.checkAuth($route.name,'bankCardInfor') || !data.disabled">删 除</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
|
<div style="margin-top:16px;text-align:right">
|
|
@@ -43,18 +31,21 @@
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
- :page-size="params.content.pageSize"
|
|
|
+ :page-size="param.content.pageSize"
|
|
|
layout="total, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
- </div>-->
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import add from './add'
|
|
|
+import edit from './edit'
|
|
|
export default {
|
|
|
name: "index",
|
|
|
props:["data"],
|
|
|
+ components:{add,edit},
|
|
|
data(){
|
|
|
return {
|
|
|
tableHieght:"600px",
|
|
@@ -62,33 +53,55 @@ export default {
|
|
|
list:[],
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
- params:{
|
|
|
+ param:{
|
|
|
"id": 20221022165803,
|
|
|
"content": {
|
|
|
+ "pageNumber":1,
|
|
|
+ "pageSize":20,
|
|
|
"sys_enterpriseid":"1",//不传,查当前账号
|
|
|
- "condition":""
|
|
|
+ "where":{
|
|
|
+ "condition":""
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
async listData(){
|
|
|
- this.params.content.sys_enterpriseid = this.data.sys_enterpriseid
|
|
|
- const res = await this.$api.requested(this.params)
|
|
|
+ this.param.content.sys_enterpriseid = this.data.sys_enterpriseid
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
this.total = res.total
|
|
|
this.currentPage = res.pageNumber
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
- this.params.content.pageSize = val
|
|
|
+ this.param.content.pageSize = val
|
|
|
this.listData()
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
// console.log(`当前页: ${val}`);
|
|
|
- this.params.content.pageNumber = val
|
|
|
+ this.param.content.pageNumber = val
|
|
|
this.listData()
|
|
|
},
|
|
|
+ async onDel(row){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221022165903,
|
|
|
+ "content": {
|
|
|
+ "sys_enterprise_bankids":[row.sys_enterprise_bankid]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.listData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).bankInfoTable.tablecols
|
|
|
}
|
|
|
}
|
|
|
</script>
|