You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.2 KiB
92 lines
2.2 KiB
|
3 years ago
|
<template>
|
||
|
|
<div>
|
||
|
|
<div ref="lxHeader">
|
||
|
|
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="第三方结算对象">
|
||
|
|
<div slot="content"></div>
|
||
|
|
<slot>
|
||
|
|
<div>
|
||
|
|
<Input v-model="select.keyword" placeholder="关键字搜索" style="width: 200px; margin-right: 10px"/>
|
||
|
|
<Button style="margin-left: 10px" type="primary" @click="select.page = 1,getList()">查询</Button>
|
||
|
|
<Button style="margin-left: 10px" type="primary" @click="$refs['addobjects'].type = 'add',$refs['addobjects'].isShow = true">新建</Button>
|
||
|
|
</div>
|
||
|
|
</slot>
|
||
|
|
</lx-header>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<xy-table
|
||
|
|
:total="total"
|
||
|
|
:list="list"
|
||
|
|
:table-item="table"
|
||
|
|
@editor="editor"
|
||
|
|
@delete="destroy"></xy-table>
|
||
|
|
|
||
|
|
<add ref="addobjects" @refresh="getList" :types="types" :areas="areas"/>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import {getList,destroy} from '@/api/payUnit'
|
||
|
|
import {getList as typeList} from '@/api/productType'
|
||
|
|
import {getparameter} from '@/api/system/dictionary'
|
||
|
|
|
||
|
|
import add from "./component/addobjects"
|
||
|
|
|
||
|
|
export default {
|
||
|
|
components:{
|
||
|
|
add
|
||
|
|
},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
select:{
|
||
|
|
page:1,
|
||
|
|
page_size:10,
|
||
|
|
keyword:''
|
||
|
|
},
|
||
|
|
types:[],
|
||
|
|
areas:[],
|
||
|
|
|
||
|
|
total:0,
|
||
|
|
list:[],
|
||
|
|
table:[]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
async getTypes(){
|
||
|
|
const res = await typeList({page:1,page_size:9999},false)
|
||
|
|
this.types = res.data
|
||
|
|
},
|
||
|
|
async getAreas(){
|
||
|
|
const res = await getparameter({number:'serveArea'},false)
|
||
|
|
this.areas = res.detail
|
||
|
|
},
|
||
|
|
|
||
|
|
async getList(){
|
||
|
|
const res = await getList(this.select)
|
||
|
|
this.total = res.total
|
||
|
|
this.list = res.data
|
||
|
|
console.log(this.list)
|
||
|
|
},
|
||
|
|
|
||
|
|
editor(row){
|
||
|
|
this.$refs['addobjects'].type = 'editor'
|
||
|
|
this.$refs['addobjects'].id = row.id
|
||
|
|
this.$refs['addobjects'].isShow = true
|
||
|
|
},
|
||
|
|
destroy(row){
|
||
|
|
destroy(row.id).then(res => {
|
||
|
|
this.$successMessage('destroy','')
|
||
|
|
this.getList()
|
||
|
|
})
|
||
|
|
}
|
||
|
|
},
|
||
|
|
mounted() {
|
||
|
|
this.getTypes()
|
||
|
|
this.getAreas()
|
||
|
|
this.getList()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped lang="scss">
|
||
|
|
</style>
|