parent
34985bb95b
commit
282462bd1f
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getList(params,isLoading){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/pay_unit/get-list',
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function getForm(id,params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:`/api/admin/pay_unit/get-form/${id}`,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:'/api/admin/pay_unit/save',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(id,data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:`/api/admin/pay_unit/delete/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
<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>
|
||||
Loading…
Reference in new issue