|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <m-search :items="searchItems" v-model="searchValues" @search="onSearch" class="mb-3">
|
|
|
+ <m-search ref="search" :items="searchItems" v-model="searchValues" @search="onSearch" class="mb-3">
|
|
|
<template #button>
|
|
|
<m-button type="primary" icon="el-icon-plus" @click="onAdd">新增</m-button>
|
|
|
</template>
|
|
@@ -22,7 +22,7 @@
|
|
|
<m-button text type="danger" size="small" @click="onDelete(row)">删除</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
- <welfareListEdit ref="welfareListEditRefs" :title="title"></welfareListEdit>
|
|
|
+ <welfareListEdit ref="welfareListEditRefs" :title="title" @refresh="init"></welfareListEdit>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
headers: [
|
|
|
{
|
|
|
label: '福利名称',
|
|
|
- prop: 'name'
|
|
|
+ prop: 'subsidyName'
|
|
|
},
|
|
|
{
|
|
|
label: '福利类别',
|
|
@@ -92,8 +92,19 @@ export default {
|
|
|
label: '福利类别',
|
|
|
prop: 'subsidyPersonnelCategoryId',
|
|
|
type: 'select',
|
|
|
+ handles: {
|
|
|
+ focus: (v) => {
|
|
|
+ if (!this.searchValues.subsidyPersonnelCategoryId) {
|
|
|
+ this.$refs.search.$refs.select.remoteMethod(null)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
option: {
|
|
|
+ ref: 'select',
|
|
|
placeholder: '请输入福利类别',
|
|
|
+ labelText: 'title',
|
|
|
+ labelValue: 'subsidyPersonnelCategoryId',
|
|
|
+ valueKey: 'subsidyPersonnelCategoryId',
|
|
|
filterable: true,
|
|
|
remote: true,
|
|
|
remoteMethod: this.remoteMethod,
|
|
@@ -113,7 +124,7 @@ export default {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const { data } = await getWelfarePage({
|
|
|
- entity: this.searchValues,
|
|
|
+ subsidyCategory: this.searchValues,
|
|
|
page: {
|
|
|
...this.pageInfo,
|
|
|
orders: this.orders
|
|
@@ -168,7 +179,7 @@ export default {
|
|
|
async onEdit (item) {
|
|
|
this.title = '编辑福利'
|
|
|
try {
|
|
|
- const { data } = await getWelfareDetail({ id: item.subsidyCategoryId })
|
|
|
+ const { data } = await getWelfareDetail({ subsidyCategoryId: item.subsidyCategoryId })
|
|
|
this.$refs.welfareListEditRefs.open({
|
|
|
subsidyCategoryId: data.subsidyCategoryId,
|
|
|
subsidyPersonnelCategoryId: data.subsidyPersonnelCategoryId,
|