k94314517
2024-05-08 0f409b25f91717e00e10c37738740b22583cb4ff
company/src/views/enterprise/myPolicy.vue
@@ -152,129 +152,129 @@
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
    import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
    import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
    import renewalInsurance from '@/components/enterprise/renewalInsurance'
    import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
import renewalInsurance from '@/components/enterprise/renewalInsurance'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
    import { all as solutionAll} from '@/api/business/solutions'
    import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
    export default {
        name: 'myPolicy',
        extends: BaseTable,
        components: {
            TableLayout,
            Pagination,
            OperaInsuranceApplyWindow,
            OperaInsuranceApplyDetails,
            renewalInsurance,
            additionSubtractionApplication,
          OperaWtbApplyShopWindow
        },
        data () {
            return {
                // 搜索
                searchForm: {
                    code: '',
                    endTimeE: '',
                    endTimeS: '',
                    startTimeE: '',
                    startTimeS: '',
                    baseSolutionId: '',
                    statusCollect: '2'
                },
                obj: {
                    renewalNum: 0,
                    waitSignNum: 0
                },
                time1: [],
                time2: [],
                solutionList:[]
            }
        },
        created () {
            this.config({
                module: '投保申请信息表',
                api: '/business/insuranceApply',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
            this.loadSelectList()
            this.getNum()
        },
        methods:{
          godetail (row) {
            if (row.solutionType == 1) {
              this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: row.id })
            } else {
              this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })
            }
          },
            see() {
                this.searchForm.statusCollect = '7'
                this.search()
            },
            closeRemind(type) {
                this.$confirm('确定关闭此提示吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    closeApplyNotice(type)
                        .then(res => {
                            this.getNum()
                        })
                }).catch(() => {
                });
            },
            getNum() {
                getCaptcha()
                    .then(res => {
                        this.obj.renewalNum = res.renewalNum
                        this.obj.waitSignNum = res.waitSignNum
                    })
            },
            reset() {
                this.time1 = []
                this.time2 = []
                this.searchForm.endTimeE = ''
                this.searchForm.endTimeS = ''
                this.searchForm.startTimeE = ''
                this.searchForm.startTimeS = ''
                this.$refs.searchForm.resetFields()
                this.search()
            },
            changeE(e) {
                if (e.length > 0) {
                    this.searchForm.endTimeS = e[0]
                    this.searchForm.endTimeE = e[1]
                } else {
                    this.searchForm.endTimeS = ''
                    this.searchForm.endTimeE = ''
                }
                this.search()
            },
            changeS(e) {
                if (e.length > 0) {
                    this.searchForm.startTimeS = e[0]
                    this.searchForm.startTimeE = e[1]
                } else {
                    this.searchForm.startTimeS = ''
                    this.searchForm.startTimeE = ''
                }
                this.search()
            },
            loadSelectList() {
                solutionAll({ dataType: 0 }).then(res => {
                    this.solutionList = res
                })
            }
        }
import { all as solutionAll } from '@/api/business/solutions'
import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
export default {
  name: 'myPolicy',
  extends: BaseTable,
  components: {
    TableLayout,
    Pagination,
    OperaInsuranceApplyWindow,
    OperaInsuranceApplyDetails,
    renewalInsurance,
    additionSubtractionApplication,
    OperaWtbApplyShopWindow
  },
  data () {
    return {
      // 搜索
      searchForm: {
        code: '',
        endTimeE: '',
        endTimeS: '',
        startTimeE: '',
        startTimeS: '',
        baseSolutionId: '',
        statusCollect: '2'
      },
      obj: {
        renewalNum: 0,
        waitSignNum: 0
      },
      time1: [],
      time2: [],
      solutionList: []
    }
  },
  created () {
    this.config({
      module: '投保申请信息表',
      api: '/business/insuranceApply',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.loadSelectList()
    this.getNum()
  },
  methods: {
    godetail (row) {
      if (row.solutionType == 1) {
        this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: row.id })
      } else {
        this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })
      }
    },
    see () {
      this.searchForm.statusCollect = '7'
      this.search()
    },
    closeRemind (type) {
      this.$confirm('确定关闭此提示吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        closeApplyNotice(type)
          .then(res => {
            this.getNum()
          })
      }).catch(() => {
      })
    },
    getNum () {
      getCaptcha()
        .then(res => {
          this.obj.renewalNum = res.renewalNum
          this.obj.waitSignNum = res.waitSignNum
        })
    },
    reset () {
      this.time1 = []
      this.time2 = []
      this.searchForm.endTimeE = ''
      this.searchForm.endTimeS = ''
      this.searchForm.startTimeE = ''
      this.searchForm.startTimeS = ''
      this.$refs.searchForm.resetFields()
      this.search()
    },
    changeE (e) {
      if (e.length > 0) {
        this.searchForm.endTimeS = e[0]
        this.searchForm.endTimeE = e[1]
      } else {
        this.searchForm.endTimeS = ''
        this.searchForm.endTimeE = ''
      }
      this.search()
    },
    changeS (e) {
      if (e.length > 0) {
        this.searchForm.startTimeS = e[0]
        this.searchForm.startTimeE = e[1]
      } else {
        this.searchForm.startTimeS = ''
        this.searchForm.startTimeE = ''
      }
      this.search()
    },
    loadSelectList () {
      solutionAll({ dataType: 0 }).then(res => {
        this.solutionList = res
      })
    }
  }
}
</script>