@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询列表 | |||
export function getTable(query) { | |||
return request({ | |||
url: '/admin/wechatusercarporttab/listpage', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 全量列表 | |||
export function getAll(query) { | |||
return request({ | |||
url: '/admin/wechatusercarporttab/selectall', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询详细 | |||
export function getDeatils(params) { | |||
return request({ | |||
url: '/admin/wechatusercarporttab/selectinfo', | |||
method: 'get', | |||
params: params | |||
}) | |||
} | |||
// 新增 | |||
export function add(data) { | |||
return request({ | |||
url: '/admin/wechatusercarporttab/addinfo', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改 | |||
export function update(data) { | |||
return request({ | |||
url: '/admin/wechatusercarporttab/upinfo', | |||
method: 'put', | |||
data: data | |||
}) | |||
} | |||
// 删除 | |||
export function del(data) { | |||
return request({ | |||
url: `/admin/wechatusercarporttab/del`, | |||
method: 'delete', | |||
data: data | |||
}) | |||
} |
@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询列表 | |||
export function getTable(query) { | |||
return request({ | |||
url: '/admin/wechatuserpropertytab/listpage', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 全量列表 | |||
export function getAll(query) { | |||
return request({ | |||
url: '/admin/wechatuserpropertytab/selectall', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询详细 | |||
export function getDeatils(params) { | |||
return request({ | |||
url: '/admin/wechatuserpropertytab/selectinfo', | |||
method: 'get', | |||
params: params | |||
}) | |||
} | |||
// 新增 | |||
export function add(data) { | |||
return request({ | |||
url: '/admin/wechatuserpropertytab/addinfo', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改 | |||
export function update(data) { | |||
return request({ | |||
url: '/admin/wechatuserpropertytab/upinfo', | |||
method: 'put', | |||
data: data | |||
}) | |||
} | |||
// 删除 | |||
export function del(data) { | |||
return request({ | |||
url: `/admin/wechatuserpropertytab/del`, | |||
method: 'delete', | |||
data: data | |||
}) | |||
} |
@ -0,0 +1,289 @@ | |||
<template> | |||
<div class="app-container"> | |||
<el-form ref="queryForm" :model="queryParams" :inline="true"> | |||
<el-form-item :label="getColumnName('carportid')"> | |||
<el-input | |||
v-model="queryParams.carportid" | |||
placeholder="请输入" | |||
clearable | |||
size="small" | |||
style="width: 200px" | |||
@keyup.enter.native="handleQuery" | |||
/> | |||
</el-form-item> | |||
<el-form-item> | |||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |||
<!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> --> | |||
</el-form-item> | |||
</el-form> | |||
<el-table v-loading="loading" :data="dataList" border> | |||
<el-table-column | |||
v-for="item of columnList" | |||
align="center" | |||
:label="getColumnName(item)" | |||
:prop="item" | |||
:show-overflow-tooltip="true" | |||
> | |||
<template slot-scope="scope"> | |||
<span v-if="item == 'status'">{{ getText(scope.row[item]) }}</span> | |||
<span v-else>{{ scope.row[item] }}</span> | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="Operation" align="center" fixed="right" width="128"> | |||
<template slot-scope="scope"> | |||
<el-button | |||
size="mini" | |||
type="text" | |||
icon="el-icon-edit" | |||
@click="handleUpdate(scope.row)" | |||
>处理</el-button> | |||
<!-- <el-button | |||
size="mini" | |||
type="text" | |||
icon="el-icon-delete" | |||
@click="handleDelete(scope.row)" | |||
>删除</el-button> --> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<pagination | |||
v-show="total>0" | |||
:total="total" | |||
:page.sync="queryParams.pageIndex" | |||
:limit.sync="queryParams.pageSize" | |||
@pagination="getList" | |||
/> | |||
<!-- 添加或修改角色配置对话框 --> | |||
<el-dialog :title="title" :visible.sync="open" width="640px"> | |||
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('carportid')" prop="carportid"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['carportid']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> | |||
<!-- <el-col :span="24"> | |||
<el-form-item :label="getColumnName('relation')" prop="relation"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['relation']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> --> | |||
<!-- <el-col :span="24"> | |||
<el-form-item :label="getColumnName('phone')" prop="phone"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['phone']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> --> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('status')" prop="status"> | |||
<el-radio-group v-model="form['status']"> | |||
<el-radio | |||
v-for="dict in statusOptions" | |||
:key="dict.id" | |||
:label="dict.id" | |||
>{{ dict.descr }}</el-radio> | |||
</el-radio-group> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('options')" prop="options"> | |||
<el-input | |||
:rows="2" | |||
type="textarea" | |||
v-model="form['options']" | |||
placeholder="请输入" | |||
resize="none" | |||
/> | |||
</el-form-item> | |||
</el-col> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button type="primary" @click="submitForm">确 定</el-button> | |||
<el-button @click="cancel">取 消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<script> | |||
import { getWorkshopList } from '@/common/workshop' | |||
import { getTable, getDeatils, del, add, update } from '@/api/weChatParkingPaymentRequest' | |||
export default { | |||
name: 'weChatParkingPaymentRequest', | |||
data() { | |||
return { | |||
// 遮罩层 | |||
loading: true, | |||
// 工厂列表 | |||
options: [], | |||
// 总条数 | |||
total: 0, | |||
// 表格数据 | |||
dataList: [], | |||
// 弹出层标题 | |||
title: '', | |||
// 是否显示弹出层 | |||
open: false, | |||
// 是否更新 | |||
isAdd: false, | |||
worklineid: '', | |||
// 查询参数 | |||
queryParams: { | |||
pageIndex: 1, | |||
pageSize: 10, | |||
statid: undefined | |||
}, | |||
columnList:[ | |||
"openid", | |||
"carportid", | |||
"options", | |||
"status", | |||
"phone", | |||
"fullname", | |||
"createtime", | |||
"lastmodifytime", | |||
"lastmodifyby" | |||
], | |||
statusOptions: [ | |||
{ id: -1, descr: '拒绝' }, | |||
{ id: 0, descr: '未处理' }, | |||
{ id: 1, descr: '通过' }, | |||
], | |||
// 表单参数 | |||
form: {}, | |||
// 表单校验 | |||
rules: { | |||
'carportid': [ | |||
{ required: true, message: '此项不能为空', trigger: 'blur' } | |||
] | |||
}, | |||
buildingList:[] | |||
} | |||
}, | |||
created() { | |||
this.options = getWorkshopList() | |||
this.getList(); | |||
}, | |||
methods: { | |||
getText(value){ | |||
let text = value; | |||
const item = this.statusOptions.find(item=>item.id == value); | |||
if(item){ | |||
text=item.descr | |||
} | |||
return text | |||
}, | |||
/** 查询数据列表 */ | |||
getList() { | |||
this.loading = true | |||
getTable(this.queryParams).then( | |||
response => { | |||
this.dataList = (response.data.data || []).map(item=>{ | |||
return{ | |||
...item, | |||
// ...item.Wechatusertab, | |||
...item.Wechatusercarporttab, | |||
Wechatusercarporttab:undefined, | |||
Wechatusertab:undefined, | |||
phone:item.Wechatusertab.phone || '', | |||
fullname:item.Wechatusertab.fullname || '', | |||
} | |||
}) | |||
this.total = response.data.count | |||
this.loading = false | |||
} | |||
) | |||
}, | |||
// 取消按钮 | |||
cancel() { | |||
this.open = false | |||
this.reset() | |||
}, | |||
// 表单重置 | |||
reset() { | |||
this.isAdd = true | |||
this.form = {}; | |||
this.resetForm('form') | |||
}, | |||
/** 搜索按钮操作 */ | |||
handleQuery() { | |||
this.queryParams.pageIndex = 1 | |||
this.getList() | |||
}, | |||
/** 重置按钮操作 */ | |||
resetQuery() { | |||
this.resetForm('queryForm') | |||
this.handleQuery() | |||
}, | |||
/** 新增按钮操作 */ | |||
handleAdd() { | |||
this.reset() | |||
this.open = true | |||
this.title = '添加' | |||
}, | |||
/** 修改按钮操作 */ | |||
handleUpdate(row) { | |||
this.reset() | |||
this.isAdd = false | |||
getDeatils(row).then(response => { | |||
this.form = response.data | |||
this.open = true | |||
this.title = '修改' | |||
}) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm: function() { | |||
this.$refs['form'].validate(valid => { | |||
if (valid) { | |||
if (!this.isAdd) { | |||
update(this.form).then(response => { | |||
if (response.code === 200) { | |||
this.msgSuccess('修改成功') | |||
this.open = false | |||
this.getList() | |||
} else { | |||
this.msgError(response.msg) | |||
} | |||
}) | |||
} else { | |||
add(this.form).then(response => { | |||
if (response.code === 200) { | |||
this.msgSuccess('新增成功') | |||
this.open = false | |||
this.getList() | |||
} else { | |||
this.msgError(response.msg) | |||
} | |||
}) | |||
} | |||
} | |||
}) | |||
}, | |||
/** 删除按钮操作 */ | |||
handleDelete(row) { | |||
this.$confirm('是否确认删除"' + row['noticeid'] + '"的数据项?', '警告', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(function() { | |||
return del(row) | |||
}).then(() => { | |||
this.getList() | |||
this.msgSuccess('删除成功') | |||
}).catch(function() {}) | |||
} | |||
} | |||
} | |||
</script> |
@ -0,0 +1,290 @@ | |||
<template> | |||
<div class="app-container"> | |||
<el-form ref="queryForm" :model="queryParams" :inline="true"> | |||
<el-form-item :label="getColumnName('propertyid')"> | |||
<el-input | |||
v-model="queryParams.propertyid" | |||
placeholder="请输入" | |||
clearable | |||
size="small" | |||
style="width: 200px" | |||
@keyup.enter.native="handleQuery" | |||
/> | |||
</el-form-item> | |||
<el-form-item> | |||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |||
<!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> --> | |||
</el-form-item> | |||
</el-form> | |||
<el-table v-loading="loading" :data="dataList" border> | |||
<el-table-column | |||
v-for="item of columnList" | |||
align="center" | |||
:label="getColumnName(item)" | |||
:prop="item" | |||
:show-overflow-tooltip="true" | |||
> | |||
<template slot-scope="scope"> | |||
<span v-if="item == 'status'">{{ getText(scope.row[item]) }}</span> | |||
<span v-else>{{ scope.row[item] }}</span> | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="Operation" align="center" fixed="right" width="128"> | |||
<template slot-scope="scope"> | |||
<el-button | |||
size="mini" | |||
type="text" | |||
icon="el-icon-edit" | |||
@click="handleUpdate(scope.row)" | |||
>处理</el-button> | |||
<!-- <el-button | |||
size="mini" | |||
type="text" | |||
icon="el-icon-delete" | |||
@click="handleDelete(scope.row)" | |||
>删除</el-button> --> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<pagination | |||
v-show="total>0" | |||
:total="total" | |||
:page.sync="queryParams.pageIndex" | |||
:limit.sync="queryParams.pageSize" | |||
@pagination="getList" | |||
/> | |||
<!-- 添加或修改角色配置对话框 --> | |||
<el-dialog :title="title" :visible.sync="open" width="640px"> | |||
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('propertyid')" prop="propertyid"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['propertyid']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('relation')" prop="relation"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['relation']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> | |||
<!-- <el-col :span="24"> | |||
<el-form-item :label="getColumnName('phone')" prop="phone"> | |||
<el-input | |||
:disabled="true" | |||
v-model="form['phone']" | |||
placeholder="请输入" | |||
/> | |||
</el-form-item> | |||
</el-col> --> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('status')" prop="status"> | |||
<el-radio-group v-model="form['status']"> | |||
<el-radio | |||
v-for="dict in statusOptions" | |||
:key="dict.id" | |||
:label="dict.id" | |||
>{{ dict.descr }}</el-radio> | |||
</el-radio-group> | |||
</el-form-item> | |||
</el-col> | |||
<el-col :span="24"> | |||
<el-form-item :label="getColumnName('options')" prop="options"> | |||
<el-input | |||
:rows="2" | |||
type="textarea" | |||
v-model="form['options']" | |||
placeholder="请输入" | |||
resize="none" | |||
/> | |||
</el-form-item> | |||
</el-col> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button type="primary" @click="submitForm">确 定</el-button> | |||
<el-button @click="cancel">取 消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<script> | |||
import { getWorkshopList } from '@/common/workshop' | |||
import { getTable, getDeatils, del, add, update } from '@/api/weChatPropertyPaymentRequest' | |||
export default { | |||
name: 'weChatPropertyPaymentRequest', | |||
data() { | |||
return { | |||
// 遮罩层 | |||
loading: true, | |||
// 工厂列表 | |||
options: [], | |||
// 总条数 | |||
total: 0, | |||
// 表格数据 | |||
dataList: [], | |||
// 弹出层标题 | |||
title: '', | |||
// 是否显示弹出层 | |||
open: false, | |||
// 是否更新 | |||
isAdd: false, | |||
worklineid: '', | |||
// 查询参数 | |||
queryParams: { | |||
pageIndex: 1, | |||
pageSize: 10, | |||
statid: undefined | |||
}, | |||
columnList:[ | |||
"openid", | |||
"propertyid", | |||
"options", | |||
"relation", | |||
"status", | |||
"phone", | |||
"fullname", | |||
"createtime", | |||
"lastmodifytime", | |||
"lastmodifyby" | |||
], | |||
statusOptions: [ | |||
{ id: -1, descr: '拒绝' }, | |||
{ id: 0, descr: '未处理' }, | |||
{ id: 1, descr: '通过' }, | |||
], | |||
// 表单参数 | |||
form: {}, | |||
// 表单校验 | |||
rules: { | |||
'propertyid': [ | |||
{ required: true, message: '此项不能为空', trigger: 'blur' } | |||
] | |||
}, | |||
buildingList:[] | |||
} | |||
}, | |||
created() { | |||
this.options = getWorkshopList() | |||
this.getList(); | |||
}, | |||
methods: { | |||
getText(value){ | |||
let text = value; | |||
const item = this.statusOptions.find(item=>item.id == value); | |||
if(item){ | |||
text=item.descr | |||
} | |||
return text | |||
}, | |||
/** 查询数据列表 */ | |||
getList() { | |||
this.loading = true | |||
getTable(this.queryParams).then( | |||
response => { | |||
this.dataList = (response.data.data || []).map(item=>{ | |||
return{ | |||
...item, | |||
// ...item.Wechatusertab, | |||
...item.Wechatuserpropertytab, | |||
Wechatuserpropertytab:undefined, | |||
Wechatusertab:undefined, | |||
phone:item.Wechatusertab.phone || '', | |||
fullname:item.Wechatusertab.fullname || '', | |||
} | |||
}) | |||
this.total = response.data.count | |||
this.loading = false | |||
} | |||
) | |||
}, | |||
// 取消按钮 | |||
cancel() { | |||
this.open = false | |||
this.reset() | |||
}, | |||
// 表单重置 | |||
reset() { | |||
this.isAdd = true | |||
this.form = {}; | |||
this.resetForm('form') | |||
}, | |||
/** 搜索按钮操作 */ | |||
handleQuery() { | |||
this.queryParams.pageIndex = 1 | |||
this.getList() | |||
}, | |||
/** 重置按钮操作 */ | |||
resetQuery() { | |||
this.resetForm('queryForm') | |||
this.handleQuery() | |||
}, | |||
/** 新增按钮操作 */ | |||
handleAdd() { | |||
this.reset() | |||
this.open = true | |||
this.title = '添加' | |||
}, | |||
/** 修改按钮操作 */ | |||
handleUpdate(row) { | |||
this.reset() | |||
this.isAdd = false | |||
getDeatils(row).then(response => { | |||
this.form = response.data | |||
this.open = true | |||
this.title = '修改' | |||
}) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm: function() { | |||
this.$refs['form'].validate(valid => { | |||
if (valid) { | |||
if (!this.isAdd) { | |||
update(this.form).then(response => { | |||
if (response.code === 200) { | |||
this.msgSuccess('修改成功') | |||
this.open = false | |||
this.getList() | |||
} else { | |||
this.msgError(response.msg) | |||
} | |||
}) | |||
} else { | |||
add(this.form).then(response => { | |||
if (response.code === 200) { | |||
this.msgSuccess('新增成功') | |||
this.open = false | |||
this.getList() | |||
} else { | |||
this.msgError(response.msg) | |||
} | |||
}) | |||
} | |||
} | |||
}) | |||
}, | |||
/** 删除按钮操作 */ | |||
handleDelete(row) { | |||
this.$confirm('是否确认删除"' + row['noticeid'] + '"的数据项?', '警告', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(function() { | |||
return del(row) | |||
}).then(() => { | |||
this.getList() | |||
this.msgSuccess('删除成功') | |||
}).catch(function() {}) | |||
} | |||
} | |||
} | |||
</script> |