MrShi
2024-11-15 30cfb2b836a8a3d609518cc295753b58b17a9bc7
company/src/views/business/applyChange.vue
@@ -14,8 +14,14 @@
          <el-option label="已关闭" value="6"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="投保类型" prop="solutionType">
        <el-select v-model="searchForm.solutionType" placeholder="请选择" @change="search">
          <el-option label="直保投保" :value="0"></el-option>
          <el-option label="委托投保" :value="1"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="投保企业" prop="companyId">
        <el-select v-model="searchForm.companyId" placeholder="请选择" @change="search">
        <el-select v-model="searchForm.companyId" filterable placeholder="请选择" @change="search">
          <el-option
              v-for="item in companyList"
              :key="item.id"
@@ -25,7 +31,7 @@
        </el-select>
      </el-form-item>
      <el-form-item label="保险方案" prop="baseSolutionsId">
        <el-select v-model="searchForm.baseSolutionsId" placeholder="请选择" @change="search">
        <el-select v-model="searchForm.baseSolutionsId" filterable placeholder="请选择" @change="search">
          <el-option
              v-for="item in solutionList"
              :key="item.baseId"
@@ -52,6 +58,9 @@
    </el-form>
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar">
        <li><el-button type="primary" @click="$refs.chooseCompany.open('选择企业')">新增</el-button></li>
      </ul>
      <el-table
          v-loading="isWorking.search"
          :data="tableData.list"
@@ -85,7 +94,7 @@
            fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaApplyChangeDetailWindow.open('加减保详情', row)">查看详情</el-button>
            <el-button type="text" @click="openEdit(row)">查看详情</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -98,6 +107,11 @@
    </template>
    <!-- 详情 -->
    <OperaApplyChangeDetailWindow ref="operaApplyChangeDetailWindow" @success="handlePageChange"/>
    <OperaUnionChangeDetailWindow ref="OperaUnionChangeDetailWindow" @success="handlePageChange"/>
    <!--    选择企业    -->
    <chooseCompany ref="chooseCompany" @submit="getCompany" />
    <!--    选择保单    -->
    <selectPolicy ref="selectPolicy" @success="handlePageChange" />
  </TableLayout>
</template>
@@ -105,13 +119,16 @@
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaUnionChangeDetailWindow from '@/components/business/OperaUnionChangeDetailWindow'
import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
import {all as solutionAll, all} from '@/api/business/solutions'
import {pageAll as companyAll} from "@/api/business/company";
import chooseCompany from '@/components/common/chooseCompany'
import selectPolicy from '@/components/business/selectPolicy'
export default {
  name: 'add_subtract',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaApplyChangeDetailWindow },
  components: { TableLayout, Pagination, OperaApplyChangeDetailWindow, OperaUnionChangeDetailWindow, chooseCompany, selectPolicy },
  data () {
    return {
      // 搜索
@@ -122,7 +139,7 @@
        createDateE: '',
        createDateS: '',
        companyId: '',
        solutionType: 0,
        solutionType: '',
        baseSolutionsId: '',
        time: []
      },
@@ -141,6 +158,17 @@
    this.loadSelectList()
  },
  methods: {
    getCompany(e) {
      this.$refs.selectPolicy.open('选择保单', e.companyId, 1)
    },
    openEdit(row) {
      this.$refs.operaApplyChangeDetailWindow.open('加减保详情', row)
      // if (row.solutionType === 0) {
      //   this.$refs.operaApplyChangeDetailWindow.open('加减保详情', row)
      // } else if (row.solutionType === 1) {
      //   this.$refs.OperaUnionChangeDetailWindow.open('加减保详情', row)
      // }
    },
    loadSelectList() {
      solutionAll({dataType:2,type:0}).then(res => {
        this.solutionList = res