jiangping
2025-05-28 ffa268a0585b4a1f7dac573c2c443bae97ac9a47
提交一把订单
已添加1个文件
已修改11个文件
2308 ■■■■■ 文件已修改
company/.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/.env.developmentCom 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/insurance.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/assets/style/style.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OpearaCaseEntryWindow.vue 718 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsBaseWindow.vue 950 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/setCompany.vue 219 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/onlineReporting.vue 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/caseEntry.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/insurance.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/settleClaims.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/settleClaimsCom.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/.env.development
@@ -12,4 +12,4 @@
# VUE_APP_API = 'https://dmtest.ahapp.net/yyb_admin_api/'
# ä»»åº·
VUE_APP_API = 'http://192.168.0.129:10030/'
VUE_APP_API = 'http://192.168.0.131:10030/'
company/.env.developmentCom
@@ -9,6 +9,6 @@
# VUE_APP_API = 'https://dmtest.ahapp.net/yyb_web_api/'
VUE_APP_API = 'http://192.168.0.129:10031/'
VUE_APP_API = 'http://192.168.0.131:10031/'
# VUE_APP_API = 'https://www.yyb.red/yyb_web_api/'
company/src/api/business/insurance.js
@@ -2,45 +2,48 @@
// æŸ¥è¯¢
export function fetchList (data) {
    return request.post('/business/insurance/page', data, {
        trim: true
    })
  return request.post('/business/insurance/page', data, {
    trim: true
  })
}
// å¯¼å‡ºExcel
export function exportExcel (data) {
    return request.post('/business/insurance/exportExcel', data, {
        trim: true,
        download: true
    })
  return request.post('/business/insurance/exportExcel', data, {
    trim: true,
    download: true
  })
}
// åˆ›å»º
export function create (data) {
    return request.post('/business/insurance/create', data)
  return request.post('/business/insurance/create', data)
}
// å­˜å‚¨ç†èµ”配置
export function saveLpInfo (data) {
    return request.post('/business/insurance/saveLpInfo', data)
  return request.post('/business/insurance/saveLpInfo', data)
}
// æŸ¥è¯¢å…¨éƒ¨
export function all (data) {
    return request.post('/business/insurance/list', data)
  return request.post('/business/insurance/list', data)
}
// ä¿®æ”¹
export function updateById (data) {
    return request.post('/business/insurance/updateById', data)
  return request.post('/business/insurance/updateById', data)
}
// ä¿®æ”¹çŠ¶æ€
export function updateStatus (data) {
    return request.post('/business/insurance/updateStatus', data)
  return request.post('/business/insurance/updateStatus', data)
}
// æ ¹æ®ID查询
export function getById (id) {
    return request.get(`/business/insurance/${id}`)
export function getById (id, type) {
  if (type && type === 1) {
    return request.get(`/business/insurance/${id}?type=${type}`)
  }
  return request.get(`/business/insurance/${id}`)
}
company/src/assets/style/style.scss
@@ -86,7 +86,7 @@
.apply-status21,.apply-status22,
.apply-status23,.apply-status2 , .apply-status3, .apply-status10,
.change-status0,.change-status1,.change-status9,
.settle-status0,.settle-status2,.settle-status3,
.settle-status0,.settle-status1,.settle-status2,.settle-status3,.settle-status4,.settle-status5,.settle-status9,.settle-status10,.settle-status11,.settle-status12,
.tax-status0,.change-status7,
.union-apply-status0,.union-apply-status1,.union-apply-status2,
.du-status0 {
@@ -96,12 +96,12 @@
.apply-status1 ,.apply-status24,.apply-status25, .apply-status4, .apply-status6,
.apply-status7, .apply-status9, .apply-status8, .apply-status11,
.change-status3,.change-status4,.change-status5,.change-status8,
.settle-status1,.change-status6,
.settle-status13,.change-status6,
.tax-status2,.union-apply-status4,
.du-status2 {
  color: #f95601 !important;
}
.settle-status6,.settle-status8,.settle-status14,
.change-status6 {
  color: #999 !important;
}
company/src/components/business/OpearaCaseEntryWindow.vue
@@ -182,20 +182,20 @@
                            </el-form-item>
                        </div>
                        <div class="box_item_list_row">
                            <el-form-item label="报案时间" prop="happenTime">
                            <el-form-item label="报案时间" prop="reportDate">
                                <el-date-picker
                                    v-model="ruleForm.happenTime"
                                    v-model="ruleForm.extData.reportDate"
                                    type="date"
                                    placeholder="选择日期"
                                    format="yyyy-MM-dd"
                                    value-format="yyyy-MM-dd">
                                    format="yyyy-MM-dd HH:mm:ss"
                                    value-format="yyyy-MM-dd HH:mm:ss">
                                </el-date-picker>
                            </el-form-item>
                        </div>
                        <div class="box_item_list_row">
                            <el-form-item label="出险时间" prop="createDate">
                            <el-form-item label="出险时间" prop="happenTime">
                                <el-date-picker
                                    v-model="ruleForm.createDate"
                                    v-model="ruleForm.happenTime"
                                    type="datetime"
                                    placeholder="选择日期"
                                    format="yyyy-MM-dd hh:mm:ss"
@@ -227,8 +227,8 @@
                                    v-model="ruleForm.extData.logoffDate"
                                    type="date"
                                    placeholder="选择日期"
                                    format="yyyy å¹´ MM æœˆ dd æ—¥"
                                    value-format="yyyy-MM-dd">
                                    format="yyyy-MM-dd HH:mm:ss"
                                    value-format="yyyy-MM-dd HH:mm:ss">
                                </el-date-picker>
                            </el-form-item>
                        </div>
@@ -710,368 +710,368 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import upload from '@/components/common/upload'
    import { getCompensation } from '@/api/business/settleRisk'
    import { createSys } from '@/api/business/settleClaims'
    import { findById } from '@/api/business/settleClaimsMovement'
    export default {
        name: 'OpearaCaseEntryWindow',
        extends: BaseOpera,
        components: { GlobalWindow, upload },
        data () {
            return {
                ruleForm: {
                    id: null,
                    extData: {
                        memberName: '',
                        memberIdcardType: '',
                        memberIdcard: '',
                        memberBirthday: '',
                        memberAge: '',
                        memberSex: 0,
                        memberPhone: '',
                        memberAddr: '',
                        bxName: '',
                        bxCode: '',
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import upload from '@/components/common/upload'
import { getCompensation } from '@/api/business/settleRisk'
import { createSys } from '@/api/business/settleClaims'
import { findById } from '@/api/business/settleClaimsMovement'
export default {
  name: 'OpearaCaseEntryWindow',
  extends: BaseOpera,
  components: { GlobalWindow, upload },
  data () {
    return {
      ruleForm: {
        id: null,
        extData: {
          memberName: '',
          memberIdcardType: '',
          memberIdcard: '',
          memberBirthday: '',
          memberAge: '',
          memberSex: 0,
          memberPhone: '',
          memberAddr: '',
          bxName: '',
          bxCode: '',
          reportDate:null,
          bxDate: [],
          bxStartdate: '',
          bxEnddate: '',
          bxTbName: '',
          bxBbName: '',
          bxOrg: '',
          bxYsMoney: '',
          bxSsMoney: '',
                        bxDate: [],
                        bxStartdate: '',
                        bxEnddate: '',
                        bxTbName: '',
                        bxBbName: '',
                        bxOrg: '',
                        bxYsMoney: '',
                        bxSsMoney: '',
          rsAttr: '',
          rsInfo: '',
          rsZlStatus: '',
          rsLossMoney: '',
          rsJzInfo: '',
          rsCyDate: '',
          rsYlOrg: '',
          rsDeathDate: '',
                        rsAttr: '',
                        rsInfo: '',
                        rsZlStatus: '',
                        rsLossMoney: '',
                        rsJzInfo: '',
                        rsCyDate: '',
                        rsYlOrg: '',
                        rsDeathDate: '',
          jzHospital: '',
          jzZyCode: '',
          jzZyKs: '',
          jzZyDate: '',
          jzCyDate: '',
          jzZyDays: '',
                        jzHospital: '',
                        jzZyCode: '',
                        jzZyKs: '',
                        jzZyDate: '',
                        jzCyDate: '',
                        jzZyDays: '',
          zdZlInfo: '',
          zdSqInfo: '',
          zdLczd: '',
          zdSsName: '',
          zdHxProject: '',
          zdJwb: '',
                        zdZlInfo: '',
                        zdSqInfo: '',
                        zdLczd: '',
                        zdSsName: '',
                        zdHxProject: '',
                        zdJwb: '',
          hzBdhCl: '',
          hzDutyRate: '',
                        hzBdhCl: '',
                        hzDutyRate: '',
          jdInfo: '',
          jdChannel: '',
          jdOrg: '',
          jdUser: '',
          jdPdDate: '',
          jdScLevel: '',
          jdTerms: '',
          jdXishu: '',
          jdJsldht: 1,
          jdZrpctkRel: 0,
                        jdInfo: '',
                        jdChannel: '',
                        jdOrg: '',
                        jdUser: '',
                        jdPdDate: '',
                        jdScLevel: '',
                        jdTerms: '',
                        jdXishu: '',
                        jdJsldht: 1,
                        jdZrpctkRel: 0,
                        logoff: 1,
                        logoffUser: '',
                        logoffDate: ''
                    },
                    informantName: '',
                    informantPhone: '',
                    reportNum: '',
                    areaInfo: '',
                    type: 0,
                    hospital: '',
                    inHospital: 1,
                    hurtType: 0,
                    payForYbwyy: 1,
                    relationFileList: [],
                    outpatientFileList: [],
                    hospitalFileList: [],
                    disabilityFileList: [],
                    otherFileList: [],
                    reportFileList: [],
                    accountList: [],
                    dzbdFileList: [],
                    status: '',
                    medicalInsurance: 1,
                    content: '',
                    happenTime: '',
                    createDate: ''
                },
                rules: {
                    'extData.memberName': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.memberIdcardType': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.memberIdcard': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.memberSex': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.memberPhone': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxName': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxCode': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxDate': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxTbName': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxBbName': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    'extData.bxOrg': [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ],
                    informantPhone: [
                        { required: true, message: '不能为空', trigger: 'blur' }
                    ]
                },
                uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=settle',
                totalPrice: 0,
                list1: [],
                list2: [],
                list3: [],
            }
          logoff: 1,
          logoffUser: '',
          logoffDate: ''
        },
        created () {
            this.config({
                api: '/business/company',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, id) {
                this.title = title
                if (id) {
                    findById(id)
                        .then(res => {
                            console.log(res)
                            this.ruleForm.id = id
                            this.$nextTick(() => {
                                for (const key in this.ruleForm) {
                                    this.ruleForm[key] = res[key]
                                }
                                if (this.ruleForm.accountList && this.ruleForm.accountList.length > 0) {
                                    this.list1 = this.ruleForm.accountList.filter(item => item.type === 0)
                                    this.list2 = this.ruleForm.accountList.filter(item => item.type === 1)
                                    this.list3 = this.ruleForm.accountList.filter(item => item.type === 2)
                                    this.changeFee()
                                }
                                if (res.extData.bxStartdate && res.extData.bxEnddate) {
                                    this.ruleForm.extData.bxDate = [res.extData.bxStartdate, res.extData.bxEnddate]
                                }
                            })
                            this.visible = true
                        })
                } else {
                    this.visible = true
                    this.ruleForm = {
                        id: null,
                        extData: {
                            memberName: '',
                            memberIdcardType: '',
                            memberIdcard: '',
                            memberBirthday: '',
                            memberAge: '',
                            memberSex: 0,
                            memberPhone: '',
                            memberAddr: '',
                            bxName: '',
                            bxCode: '',
        informantName: '',
        informantPhone: '',
        reportNum: '',
        areaInfo: '',
        type: 0,
        hospital: '',
        inHospital: 1,
        hurtType: 0,
        payForYbwyy: 1,
                            bxDate: [],
                            bxStartdate: '',
                            bxEnddate: '',
                            bxTbName: '',
                            bxBbName: '',
                            bxOrg: '',
                            bxYsMoney: '',
                            bxSsMoney: '',
        relationFileList: [],
        outpatientFileList: [],
        hospitalFileList: [],
        disabilityFileList: [],
        otherFileList: [],
        reportFileList: [],
                            rsAttr: '',
                            rsInfo: '',
                            rsZlStatus: '',
                            rsLossMoney: '',
                            rsJzInfo: '',
                            rsCyDate: '',
                            rsYlOrg: '',
                            rsDeathDate: '',
        accountList: [],
        dzbdFileList: [],
                            jzHospital: '',
                            jzZyCode: '',
                            jzZyKs: '',
                            jzZyDate: '',
                            jzCyDate: '',
                            jzZyDays: '',
                            zdZlInfo: '',
                            zdSqInfo: '',
                            zdLczd: '',
                            zdSsName: '',
                            zdHxProject: '',
                            zdJwb: '',
                            hzBdhCl: '',
                            hzDutyRate: '',
                            jdInfo: '',
                            jdChannel: '',
                            jdOrg: '',
                            jdUser: '',
                            jdPdDate: '',
                            jdScLevel: '',
                            jdTerms: '',
                            jdXishu: '',
                            jdJsldht: 1,
                            jdZrpctkRel: 0,
                            logoff: 1,
                            logoffUser: '',
                            logoffDate: ''
                        },
                        informantName: '',
                        informantPhone: '',
                        reportNum: '',
                        areaInfo: '',
                        type: 0,
                        hospital: '',
                        inHospital: 1,
                        hurtType: 0,
                        payForYbwyy: 1,
                        relationFileList: [],
                        outpatientFileList: [],
                        hospitalFileList: [],
                        disabilityFileList: [],
                        otherFileList: [],
                        reportFileList: [],
                        accountList: [],
                        dzbdFileList: [],
                        status: '',
                        medicalInsurance: 1,
                        content: '',
                        happenTime: '',
                        createDate: ''
                    }
                }
                this.getCompensations()
            },
            confirm() {
                this.$refs.ruleForm.validate((valid) => {
                    if (!valid) return
                    this.isWorking = true
                    let obj = JSON.parse(JSON.stringify(this.ruleForm))
                    obj.accountList = [...this.list1, ...this.list2, ...this.list3]
                    createSys(obj)
                        .then(() => {
                            this.visible = false
                            if (!obj.id) {
                                this.$tip.apiSuccess('新建成功')
                            } else {
                                this.$tip.apiSuccess('编辑成功')
                            }
                            this.$emit('success')
                        })
                        .catch(e => {
                            this.$tip.apiFailed(e)
                        })
                        .finally(() => {
                            this.isWorking = false
                        })
                })
            },
            changeFee() {
                let arr = [...this.list1, ...this.list2]
                let price = 0
                arr.forEach(item => {
                    if (item.fee) {
                        price += Number(item.fee)
                    }
                })
                this.totalPrice = price
            },
            delFile (index, type) {
                if (type === 1) {
                    this.ruleForm.relationFileList.splice(index, 1)
                } else if (type === 2) {
                    this.ruleForm.outpatientFileList.splice(index, 1)
                } else if (type === 3) {
                    this.ruleForm.hospitalFileList.splice(index, 1)
                } else if (type === 4) {
                    this.ruleForm.disabilityFileList.splice(index, 1)
                } else if (type === 5) {
                    this.ruleForm.otherFileList.splice(index, 1)
                } else if (type === 6) {
                    this.ruleForm.reportFileList.splice(index, 1)
                } else if (type === 7) {
                    this.ruleForm.dzbdFileList.splice(index, 1)
                }
            },
            claimsUploadFile(file, type) {
                file.fileurl = file.imgaddr
                file.name = file.originname
                if (type === 1) {
                    this.ruleForm.relationFileList.push(file)
                } else if (type === 2) {
                    this.ruleForm.outpatientFileList.push(file)
                } else if (type === 3) {
                    this.ruleForm.hospitalFileList.push(file)
                } else if (type === 4) {
                    this.ruleForm.disabilityFileList.push(file)
                } else if (type === 5) {
                    this.ruleForm.otherFileList.push(file)
                } else if (type === 6) {
                    this.ruleForm.reportFileList.push(file)
                } else if (type === 7) {
                    this.ruleForm.dzbdFileList.push(file)
                }
            },
            changeBxDate(e) {
                if (e.length > 1) {
                    this.ruleForm.extData.bxStartdate = e[0]
                    this.ruleForm.extData.bxEnddate = e[1]
                } else {
                    this.ruleForm.extData.bxStartdate = ''
                    this.ruleForm.extData.bxEnddate = ''
                }
            },
            getCompensations() {
                getCompensation({ type: 1 })
                    .then(res => {
                        console.log(res)
                        this.list1 = res.filter(item => item.type === 0)
                        this.list2 = res.filter(item => item.type === 1)
                        this.list3 = res.filter(item => item.type === 2)
                    })
            }
        }
        status: '',
        medicalInsurance: 1,
        content: '',
        happenTime: '',
        createDate: ''
      },
      rules: {
        'extData.memberName': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.memberIdcardType': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.memberIdcard': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.memberSex': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.memberPhone': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxName': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxCode': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxDate': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxTbName': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxBbName': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        'extData.bxOrg': [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        informantPhone: [
          { required: true, message: '不能为空', trigger: 'blur' }
        ]
      },
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=settle',
      totalPrice: 0,
      list1: [],
      list2: [],
      list3: []
    }
  },
  created () {
    this.config({
      api: '/business/company',
      'field.id': 'id'
    })
  },
  methods: {
    open (title, id) {
      this.title = title
      if (id) {
        findById(id)
          .then(res => {
            console.log(res)
            this.ruleForm.id = id
            this.$nextTick(() => {
              for (const key in this.ruleForm) {
                this.ruleForm[key] = res[key]
              }
              if (this.ruleForm.accountList && this.ruleForm.accountList.length > 0) {
                this.list1 = this.ruleForm.accountList.filter(item => item.type === 0)
                this.list2 = this.ruleForm.accountList.filter(item => item.type === 1)
                this.list3 = this.ruleForm.accountList.filter(item => item.type === 2)
                this.changeFee()
              }
              if (res.extData.bxStartdate && res.extData.bxEnddate) {
                this.ruleForm.extData.bxDate = [res.extData.bxStartdate, res.extData.bxEnddate]
              }
            })
            this.visible = true
          })
      } else {
        this.visible = true
        this.ruleForm = {
          id: null,
          extData: {
            memberName: '',
            memberIdcardType: '',
            memberIdcard: '',
            memberBirthday: '',
            memberAge: '',
            memberSex: 0,
            memberPhone: '',
            memberAddr: '',
            bxName: '',
            bxCode: '',
            bxDate: [],
            bxStartdate: '',
            bxEnddate: '',
            bxTbName: '',
            bxBbName: '',
            bxOrg: '',
            bxYsMoney: '',
            bxSsMoney: '',
            rsAttr: '',
            rsInfo: '',
            rsZlStatus: '',
            rsLossMoney: '',
            rsJzInfo: '',
            rsCyDate: '',
            rsYlOrg: '',
            rsDeathDate: '',
            jzHospital: '',
            jzZyCode: '',
            jzZyKs: '',
            jzZyDate: '',
            jzCyDate: '',
            jzZyDays: '',
            zdZlInfo: '',
            zdSqInfo: '',
            zdLczd: '',
            zdSsName: '',
            zdHxProject: '',
            zdJwb: '',
            hzBdhCl: '',
            hzDutyRate: '',
            jdInfo: '',
            jdChannel: '',
            jdOrg: '',
            jdUser: '',
            jdPdDate: '',
            jdScLevel: '',
            jdTerms: '',
            jdXishu: '',
            jdJsldht: 1,
            jdZrpctkRel: 0,
            logoff: 1,
            logoffUser: '',
            logoffDate: ''
          },
          informantName: '',
          informantPhone: '',
          reportNum: '',
          areaInfo: '',
          type: 0,
          hospital: '',
          inHospital: 1,
          hurtType: 0,
          payForYbwyy: 1,
          relationFileList: [],
          outpatientFileList: [],
          hospitalFileList: [],
          disabilityFileList: [],
          otherFileList: [],
          reportFileList: [],
          accountList: [],
          dzbdFileList: [],
          status: '',
          medicalInsurance: 1,
          content: '',
          happenTime: '',
          createDate: ''
        }
      }
      this.getCompensations()
    },
    confirm () {
      this.$refs.ruleForm.validate((valid) => {
        if (!valid) return
        this.isWorking = true
        const obj = JSON.parse(JSON.stringify(this.ruleForm))
        obj.accountList = [...this.list1, ...this.list2, ...this.list3]
        createSys(obj)
          .then(() => {
            this.visible = false
            if (!obj.id) {
              this.$tip.apiSuccess('新建成功')
            } else {
              this.$tip.apiSuccess('编辑成功')
            }
            this.$emit('success')
          })
          .catch(e => {
            this.$tip.apiFailed(e)
          })
          .finally(() => {
            this.isWorking = false
          })
      })
    },
    changeFee () {
      const arr = [...this.list1, ...this.list2]
      let price = 0
      arr.forEach(item => {
        if (item.fee) {
          price += Number(item.fee)
        }
      })
      this.totalPrice = price
    },
    delFile (index, type) {
      if (type === 1) {
        this.ruleForm.relationFileList.splice(index, 1)
      } else if (type === 2) {
        this.ruleForm.outpatientFileList.splice(index, 1)
      } else if (type === 3) {
        this.ruleForm.hospitalFileList.splice(index, 1)
      } else if (type === 4) {
        this.ruleForm.disabilityFileList.splice(index, 1)
      } else if (type === 5) {
        this.ruleForm.otherFileList.splice(index, 1)
      } else if (type === 6) {
        this.ruleForm.reportFileList.splice(index, 1)
      } else if (type === 7) {
        this.ruleForm.dzbdFileList.splice(index, 1)
      }
    },
    claimsUploadFile (file, type) {
      file.fileurl = file.imgaddr
      file.name = file.originname
      if (type === 1) {
        this.ruleForm.relationFileList.push(file)
      } else if (type === 2) {
        this.ruleForm.outpatientFileList.push(file)
      } else if (type === 3) {
        this.ruleForm.hospitalFileList.push(file)
      } else if (type === 4) {
        this.ruleForm.disabilityFileList.push(file)
      } else if (type === 5) {
        this.ruleForm.otherFileList.push(file)
      } else if (type === 6) {
        this.ruleForm.reportFileList.push(file)
      } else if (type === 7) {
        this.ruleForm.dzbdFileList.push(file)
      }
    },
    changeBxDate (e) {
      if (e.length > 1) {
        this.ruleForm.extData.bxStartdate = e[0]
        this.ruleForm.extData.bxEnddate = e[1]
      } else {
        this.ruleForm.extData.bxStartdate = ''
        this.ruleForm.extData.bxEnddate = ''
      }
    },
    getCompensations () {
      getCompensation({ type: 1 })
        .then(res => {
          console.log(res)
          this.list1 = res.filter(item => item.type === 0)
          this.list2 = res.filter(item => item.type === 1)
          this.list3 = res.filter(item => item.type === 2)
        })
    }
  }
}
</script>
<style lang="scss" scoped>
company/src/components/business/OperaSolutionsBaseWindow.vue
@@ -6,519 +6,559 @@
        :confirm-working="isWorking"
        @confirm="confirm"
    >
      <div>
        <el-form :model="form" ref="form" :rules="rules">
        <el-tabs type="border-card"    :before-leave="beforeTabClick"  v-model="form.saveType">
          <el-tab-pane label="方案基础信息" name="0">
            <el-form-item label="方案名称" prop="name">
                <el-input v-model="form.name" placeholder="请输入" v-trim/>
              <el-input v-model="form.name" placeholder="请输入" v-trim/>
            </el-form-item>
            <el-form-item label="保险公司" prop="insuranceId">
                <el-select v-model="form.insuranceId" filterable @change="getAllWorktype1" placeholder="请选择">
                    <el-option
                        v-for="item in company"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id">
                    </el-option>
                </el-select>
              <el-select v-model="form.insuranceId" filterable @change="getAllWorktype1" placeholder="请选择">
                <el-option
                    v-for="item in company"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="承保公司" prop="companyName">
                <el-input v-model="form.companyName" placeholder="请输入" v-trim/>
              <el-input v-model="form.companyName" placeholder="请输入" v-trim/>
            </el-form-item>
            <el-form-item label="投保年龄" prop="minAge">
                <div style="display: flex; align-items: center;">
                    <el-select v-model="form.minAge" @change="changeMinAge" style="flex: 1;" placeholder="请选择">
                        <el-option
                            v-for="item in 80"
                            :key="item"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
                    <span style="margin: 0 30px;">至</span>
                    <el-select v-model="form.maxAge" @change="changeMaxAge" style="flex: 1;" placeholder="请选择">
                        <el-option
                            v-for="item in 80"
                            :key="item"
                            :label="item"
                            :value="item">
                        </el-option>
                    </el-select>
                </div>
            <el-form-item label="投保年龄" required="true" >
              <div style="display: flex; align-items: center;">
                <el-form-item label="" prop="minAge" style="flex: 1;">
                <el-select v-model="form.minAge" @change="changeMinAge" style="flex: 1;" placeholder="请选择">
                  <el-option
                      v-for="item in 80"
                      :key="item"
                      :label="item"
                      :value="item">
                  </el-option>
                </el-select>
                </el-form-item>
                <span style="margin: 0 30px;padding-bottom: 20px;">至</span>
                <el-form-item label="" prop="maxAge" style="flex: 1;">
                <el-select v-model="form.maxAge" @change="changeMaxAge"  placeholder="请选择">
                  <el-option
                      v-for="item in 80"
                      :key="item"
                      :label="item"
                      :value="item">
                  </el-option>
                </el-select>
                </el-form-item>
              </div>
            </el-form-item>
            <el-form-item label="生效时间" prop="validTypeNum">
                <div style="width: 100%; display: flex; align-items: center;">
                    <div style="flex-shrink: 0;">
                        <el-radio-group v-model="form.validType" @change="changeValidType">
                            <el-radio :label="0">日后生效</el-radio>
                            <el-radio :label="1">次月生效</el-radio>
                        </el-radio-group>
                    </div>
                    <el-input style="margin-left: 20px;" type="number" v-model="form.validTypeNum"   placeholder="请输入延迟天数" v-if="form.validType === 0"></el-input>
              <div style="width: 100%; display: flex; align-items: center;">
                <div style="flex-shrink: 0;">
                  <el-radio-group v-model="form.validType" @change="changeValidType">
                    <el-radio :label="0">日后生效</el-radio>
                    <el-radio :label="1">次月生效</el-radio>
                  </el-radio-group>
                </div>
                <el-input style="margin-left: 20px;" type="number" v-model="form.validTypeNum"   placeholder="请输入延迟天数" v-if="form.validType === 0"></el-input>
              </div>
            </el-form-item>
            <el-form-item label="批改支持" prop="canAdd">
                <div style="width: 100%; display: flex; align-items: center;">
                    <el-checkbox :true-label="1" :false-label="0" v-model="form.canAdd">加保</el-checkbox>
                    <el-checkbox :true-label="1" :false-label="0" v-model="form.canReduce">减保</el-checkbox>
                    <el-checkbox :true-label="1" :false-label="0" v-model="form.canChangeUnit">更换派遣单位</el-checkbox>
                </div>
              <div style="width: 100%; display: flex; align-items: center;">
                <el-checkbox :true-label="1" :false-label="0" v-model="form.canAdd">加保</el-checkbox>
                <el-checkbox :true-label="1" :false-label="0" v-model="form.canReduce">减保</el-checkbox>
                <el-checkbox :true-label="1" :false-label="0" v-model="form.canChangeUnit">更换派遣单位</el-checkbox>
              </div>
            </el-form-item>
            <el-form-item label="批减仅支持替换(减保批改仅支持替换人员即减保人员少于加保人员)" prop="delOnlyReplace">
                <div style="width: 100%; display: flex; align-items: center;">
                    <el-radio-group v-model="form.delOnlyReplace">
                        <el-radio :label="1">是</el-radio>
                        <el-radio :label="0">否</el-radio>
                    </el-radio-group>
                </div>
              <div style="width: 100%; display: flex; align-items: center;">
                <el-radio-group v-model="form.delOnlyReplace">
                  <el-radio :label="1">是</el-radio>
                  <el-radio :label="0">否</el-radio>
                </el-radio-group>
              </div>
            </el-form-item>
            <el-form-item label="批增生效(天数)" prop="addValidDays" v-if="form.delOnlyReplace != 1">
                <div style="width: 100%; display: flex; align-items: center;">
                    <el-input style="margin-left: 0px;" type="number" v-model="form.addValidDays"   placeholder="请输入批增生效时间(天数)" ></el-input>
                </div>
              <div style="width: 100%; display: flex; align-items: center;">
                <el-input style="margin-left: 0px;" type="number" v-model="form.addValidDays"   placeholder="请输入批增生效时间(天数)" ></el-input>
              </div>
            </el-form-item>
            <el-form-item label="批减生效(天数)" prop="delValidDays">
                <div style="width: 100%; display: flex; align-items: center;">
                    <el-input style="margin-left: 0px;" type="number" v-model="form.delValidDays"   placeholder="请输入批减生效时间(天数)" ></el-input>
                </div>
              <div style="width: 100%; display: flex; align-items: center;">
                <el-input style="margin-left: 0px;" type="number" v-model="form.delValidDays"   placeholder="请输入批减生效时间(天数)" ></el-input>
              </div>
            </el-form-item>
            <el-form-item label="批改提醒时间" prop="correctWarnTime">
                <el-time-picker
                    value-format="HH:mm"
                    v-model="form.correctWarnTime"
                    placeholder="请选择批改提醒时间">
                </el-time-picker>
              <el-time-picker
                  value-format="HH:mm"
                  v-model="form.correctWarnTime"
                  placeholder="请选择批改提醒时间">
              </el-time-picker>
            </el-form-item>
            <div style="width: 100%; padding: 10px; box-sizing: border-box; border: 1px solid #ececec;">
                <div style="display: flex; align-items: center; margin-bottom: 10px;">
                    <el-select filterable multiple style="width: 800px;" v-model="worktypeId" placeholder="请选择">
                        <el-option
                            v-for="item in typeWorkCopy"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id">
                        </el-option>
                    </el-select>
                    <el-button type="primary" @click="add" :disabled="worktypeId.length === 0" style="margin-left: 10px;">添加工种</el-button>
                    <el-button type="primary" @click="impor">导入工种</el-button>
                    <el-button type="text" @click="exprot">导入模版xls</el-button>
                </div>
              <div style="display: flex; align-items: center; margin-bottom: 10px;">
                <el-select filterable multiple style="width: 800px;" v-model="worktypeId" placeholder="请选择">
                  <el-option
                      v-for="item in typeWorkCopy"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id">
                  </el-option>
                </el-select>
                <el-button type="primary" @click="add" :disabled="worktypeId.length === 0" style="margin-left: 10px;">添加工种</el-button>
                <el-button type="primary" @click="impor">导入工种</el-button>
                <el-button type="text" @click="exprot">导入模版xls</el-button>
              </div>
              <el-form-item label="已添加工种" prop="worktypeIdList">
                <u-table
                    :data="form.worktypeIdList"
                    border
                    use-virtual
                    style="width: 100%; margin-bottom: 20px;">
                    <u-table-column
                        label="序号"
                        width="80">
                        <template slot-scope="scope">
                            <span>{{scope.$index + 1}}</span>
                        </template>
                    </u-table-column>
                    <u-table-column
                        prop="worktypeName"
                        label="所属工种">
                    </u-table-column>
                    <u-table-column
                        label="操作"
                        width="100">
                        <template slot-scope="scope">
                            <el-button type="text" size="small" style="color: red;" @click="dele(scope.$index)">删除</el-button>
                        </template>
                    </u-table-column>
                  <u-table-column
                      label="序号"
                      width="80">
                    <template slot-scope="scope">
                      <span>{{scope.$index + 1}}</span>
                    </template>
                  </u-table-column>
                  <u-table-column
                      prop="worktypeName"
                      label="所属工种">
                  </u-table-column>
                  <u-table-column
                      label="操作"
                      width="100">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" style="color: red;" @click="dele(scope.$index)">删除</el-button>
                    </template>
                  </u-table-column>
                </u-table>
              </el-form-item>
            </div>
            <el-form-item label="风险设置" prop="risk">
                <div class="tx">
                    <div class="tx_item">
                        <div class="tx_item_head">
                            <span>延迟报案提醒</span>
                            <el-switch :active-value="1" :inactive-value="0" v-model="form.riskDelayStatus"></el-switch>
                        </div>
                        <div class="tx_item_content">
                            <span>规则设置:当报案时间超过案发时间</span>
                            <el-input-number style="margin: 0 15px;" :disabled="form.riskDelayStatus === 0" v-model="form.riskDelayTime" :min="1"></el-input-number>
                            <el-select v-model="form.riskDelayUnit" :disabled="form.riskDelayStatus === 0" style="width: 100px; margin-right: 15px;" placeholder="请选择">
                                <el-option label="分钟" :value="0"></el-option>
                                <el-option label="小时" :value="1"></el-option>
                                <el-option label="天" :value="2"></el-option>
                            </el-select>
                            <span>时,进行提醒。</span>
                        </div>
                    </div>
                    <div class="tx_item">
                        <div class="tx_item_head">
                            <span>允许对新员工已投保未生效保险进行保障</span>
                            <el-switch :active-value="1" :inactive-value="0" v-model="form.riskNewUserStatus"></el-switch>
                        </div>
                        <div class="tx_item_content">
                            <span>规则设置:允许出险时间在保单生效前</span>
                            <el-input-number style="margin: 0 15px;" :disabled="form.riskNewUserStatus === 0"   v-model="form.riskNewUserTime" :min="1"></el-input-number>
                            <el-select v-model="form.riskNewUserUnit"  :disabled="form.riskNewUserStatus === 0"  style="width: 100px; margin-right: 15px;" placeholder="请选择">
                                <el-option label="小时" :value="1"></el-option>
                                <el-option label="天" :value="2"></el-option>
                            </el-select>
                        </div>
                    </div>
                </div>
            </el-form-item>
            <el-form-item label="特别约定" prop="specialAgreement">
                <RichEditor :richData="form.specialAgreement" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor" :readonly="false"/>
              <RichEditor :richData="form.specialAgreement" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor" :readonly="false"/>
            </el-form-item>
            <el-form-item label="特别说明" prop="specialInfo">
                <RichEditor :richData="form.specialInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor1" :readonly="false"/>
              <RichEditor :richData="form.specialInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor1" :readonly="false"/>
            </el-form-item>
            <el-form-item label="其他说明" prop="ortherInfo">
                <RichEditor :richData="form.ortherInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor2" :readonly="false"/>
              <RichEditor :richData="form.ortherInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor2" :readonly="false"/>
            </el-form-item>
          </el-tab-pane>
          <el-tab-pane label="风险设置" name="1" >
            <el-form-item label="风险设置" prop="risk">
              <div class="tx">
                <div class="tx_item">
                  <div class="tx_item_head">
                    <span>延迟报案提醒</span>
                    <el-switch :active-value="1" :inactive-value="0" v-model="form.riskDelayStatus"></el-switch>
                  </div>
                  <div class="tx_item_content">
                    <span>规则设置:当报案时间超过案发时间</span>
                    <el-input-number style="margin: 0 15px;" :disabled="form.riskDelayStatus === 0" v-model="form.riskDelayTime" :min="1"></el-input-number>
                    <el-select v-model="form.riskDelayUnit" :disabled="form.riskDelayStatus === 0" style="width: 100px; margin-right: 15px;" placeholder="请选择">
                      <el-option label="分钟" :value="0"></el-option>
                      <el-option label="小时" :value="1"></el-option>
                      <el-option label="天" :value="2"></el-option>
                    </el-select>
                    <span>时,进行提醒。</span>
                  </div>
                </div>
                <div class="tx_item">
                  <div class="tx_item_head">
                    <span>允许对新员工已投保未生效保险进行保障</span>
                    <el-switch :active-value="1" :inactive-value="0" v-model="form.riskNewUserStatus"></el-switch>
                  </div>
                  <div class="tx_item_content">
                    <span>规则设置:允许出险时间在保单生效前</span>
                    <el-input-number style="margin: 0 15px;" :disabled="form.riskNewUserStatus === 0"   v-model="form.riskNewUserTime" :min="1"></el-input-number>
                    <el-select v-model="form.riskNewUserUnit"  :disabled="form.riskNewUserStatus === 0"  style="width: 100px; margin-right: 15px;" placeholder="请选择">
                      <el-option label="小时" :value="1"></el-option>
                      <el-option label="天" :value="2"></el-option>
                    </el-select>
                  </div>
                </div>
              </div>
            </el-form-item>
          </el-tab-pane>
        </el-tabs>
        </el-form>
        <!--    ä¸Šä¼ å·¥ç§    -->
        <input type="file" @change="getFile" style="opacity: 0;" ref="upload" accept=".xlsx" />
      </div>
    </GlobalWindow>
</template>
<script>
  import BaseOpera from '@/components/base/BaseOpera'
  import GlobalWindow from '@/components/common/GlobalWindow'
  import { all } from '@/api/business/insurance'
  import { all as allWorktype, importExcelForSolution } from '@/api/business/worktype'
  import { solutionsBaseId } from '@/api/business/solutionsBase'
  import { pageAll as shopList } from '@/api/business/company'
  import UploadFile from '@/components/common/UploadFile'
  import { numRule } from '@/utils/form'
  import RichEditor from '@/components/common/RichEditor'
  import { UTable, UTableColumn } from 'umy-ui'
  export default {
    name: 'OperaSolutionsBaseWindow',
    extends: BaseOpera,
    components: { GlobalWindow, UploadFile, RichEditor, UTable, UTableColumn },
    data () {
      var validType = (rule, value, callback) => {
        if (this.form.validType === 0 && !value) {
          return callback(new Error('延迟天数不能为空'))
        } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
          return callback(new Error('延迟天数只能为正整数'))
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { all } from '@/api/business/insurance'
import { all as allWorktype, importExcelForSolution } from '@/api/business/worktype'
import { solutionsBaseId } from '@/api/business/solutionsBase'
import { pageAll as shopList } from '@/api/business/company'
import UploadFile from '@/components/common/UploadFile'
import { numRule } from '@/utils/form'
import RichEditor from '@/components/common/RichEditor'
import { UTable, UTableColumn } from 'umy-ui'
import {getChangeMemberListOnlineSignLink} from "@/api/business/applyChange";
export default {
  name: 'OperaSolutionsBaseWindow',
  extends: BaseOpera,
  components: { GlobalWindow, UploadFile, RichEditor, UTable, UTableColumn },
  data () {
    var validatorWorktype = (rule, value, callback) => {
      if (!this.form.worktypeIdList || this.form.worktypeIdList.length === 0) {
        callback(new Error('请完善工种信息!'));
      } else {
        callback();
      }
    };
    var validType = (rule, value, callback) => {
      if (this.form.validType === 0 && !value) {
        return callback(new Error('延迟天数不能为空'))
      } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
        return callback(new Error('延迟天数只能为正整数'))
      }
      callback()
    }
    var canAddFun = (rule, value, callback) => {
      if (!this.form.canAdd && !this.form.canReduce && !this.form.canChangeUnit) {
        return callback(new Error('批改支持不能为空'))
      }
      callback()
    }
    var riskRule = (rule, value, callback) => {
      if (this.form.riskDelayStatus === '1') {
        if (!this.form.riskDelayTime || !this.form.riskDelayUnit) {
          return callback(new Error('请完善内容'))
        }
        callback()
      }
      var canAddFun = (rule, value, callback) => {
        if (!this.form.canAdd && !form.canReduce && !form.canChangeUnit) {
          return callback(new Error('批改支持不能为空'))
      if (this.form.riskNewUserStatus === '1') {
        if (!this.form.riskNewUserTime || !this.form.riskNewUserUnit) {
          return callback(new Error('请完善内容'))
        }
        callback()
      }
      var riskRule = (rule, value, callback) => {
          if (this.form.riskDelayStatus === '1') {
              if (!this.form.riskDelayTime || !this.form.riskDelayUnit) {
                  return callback(new Error('请完善内容'))
              }
          }
          if (this.form.riskNewUserStatus === '1') {
              if (!this.form.riskNewUserTime || !this.form.riskNewUserUnit) {
                  return callback(new Error('请完善内容'))
              }
          }
          callback()
      }
      return {
        // è¡¨å•数据
        form: {
          id: null,
          name: '',
          companyName: '',
          insuranceId: '',
          validType: 0,
          minAge: '',
          maxAge: '',
          specialAgreement: '',
          specialInfo: '',
          ortherInfo: '',
          validTypeNum: '',
          canReduce: 0,
          canChangeUnit: 0,
          addValidDays: 0,
          delValidDays: 0,
          delOnlyReplace: 0,
          canAdd: 0,
          correctWarnTime: '',
          worktypeIdList: [],
      callback()
    }
    return {
      // è¡¨å•数据
      form: {
        id: null,
        name: '',
        companyName: '',
        insuranceId: '',
        validType: 0,
        minAge: '',
        maxAge: '',
        specialAgreement: '',
        specialInfo: '',
        ortherInfo: '',
        validTypeNum: '',
        canReduce: 0,
        canChangeUnit: 0,
        addValidDays: 0,
        delValidDays: 0,
        delOnlyReplace: 0,
        canAdd: 0,
        saveType: '0',
        correctWarnTime: '',
        worktypeIdList: [],
            riskDelayStatus: 0,
            riskDelayTime: 1,
            riskDelayUnit: 0,
            riskNewUserStatus: 0,
            riskNewUserTime: 1,
            riskNewUserUnit: 1
        },
          value: '',
          options: [],
        worktypeId: [],
        // éªŒè¯è§„则
        rules: {
          name: [
            { required: true, message: '请输入方案名称' }
          ],
          delOnlyReplace: [
            { required: true, message: '请选择' }
          ],
          addValidDays: [
            { required: true, validator: numRule }
          ],
          delValidDays: [
            { required: true, validator: numRule }
          ],
            risk: [
                { required: true, validator: riskRule }
            ],
          insuranceId: [
            { required: true, message: '请选择保险公司' }
          ],
          companyName: [
            { required: true, message: '请输入承保公司' }
          ],
          minAge: [
            { required: true, message: '请选择投保年龄' }
          ],
          validTypeNum: [
            { required: true, validator: validType }
          ],
          correctWarnTime: [
            { required: true, message: '请输入批改提醒时间' }
          ],
          worktypeIdList: [
            { required: true, message: '请完善工种信息' }
          ],
          canAdd: [
            { required: true, validator: canAddFun }
          ]
        },
        shops: [],
        company: [],
        typeWork: [],
        typeWorkCopy: []
      }
    },
    created () {
      this.config({
        api: '/business/solutionsBase',
        'field.id': 'id'
      })
    },
    methods: {
      // å¯¼å…¥å·¥ç§æ¨¡æ¿
      getFile(e) {
        const formdate = new FormData()
        formdate.append('file', e.target.files[0])
        formdate.append('insuranceId', this.form.insuranceId)
        importExcelForSolution(formdate)
          .then(res => {
            let arr = []
            res.forEach(item => {
              arr.push({ worktypeId: item.id, worktypeName: item.name })
            })
            this.form.worktypeIdList = [...arr, ...this.form.worktypeIdList]
            let valData = this.form.worktypeIdList.map(item => item.worktypeName)
            this.typeWorkCopy = this.typeWorkCopy.filter(item => !valData.includes(item.name))
          })
          .catch(err => {
            this.$message.error(err.message)
          })
          .finally(() => {
            this.$refs.upload.value = null
          })
        riskDelayStatus: 0,
        riskDelayTime: 1,
        riskDelayUnit: 0,
        riskNewUserStatus: 0,
        riskNewUserTime: 1,
        riskNewUserUnit: 1
      },
      impor() {
        if (!this.form.insuranceId) return this.$message.warning('请先选择保险公司')
        this.$refs.upload.click()
      value: '',
      options: [],
      worktypeId: [],
      // éªŒè¯è§„则
      rules: {
        name: [
          { required: true, message: '请输入方案名称' }
        ],
        delOnlyReplace: [
          { required: true, message: '请选择' }
        ],
        addValidDays: [
          { required: true, validator: numRule }
        ],
        delValidDays: [
          { required: true, validator: numRule }
        ],
        risk: [
          { required: true, validator: riskRule }
        ],
        insuranceId: [
          { required: true, message: '请选择保险公司' }
        ],
        companyName: [
          { required: true, message: '请输入承保公司' }
        ],
        minAge: [
          { required: true, message: '请选择投保最小年龄' }
        ],
        maxAge: [
          { required: true, message: '请选择投保最大年龄' }
        ],
        validTypeNum: [
          { required: true, validator: validType }
        ],
        correctWarnTime: [
          { required: true, message: '请输入批改提醒时间' }
        ],
        worktypeIdList: [
          { required: true, validator: validatorWorktype }
        ],
        canAdd: [
          { required: true, validator: canAddFun }
        ]
      },
      // å¯¼å‡ºæ¨¡æ¿
      exprot() {
        window.open(process.env.VUE_APP_TYPEWORK_URL)
      },
      getWangedditor(val){
        this.form.specialAgreement = val;
      },
      getWangedditor1(val){
        this.form.specialInfo = val;
      },
      getWangedditor2(val){
        this.form.ortherInfo = val;
      },
      changeMinAge(e) {
        if (this.form.maxAge && this.form.maxAge >= 0 && e > this.form.maxAge) {
          this.form.minAge = ''
          this.$message.warning('起始年龄不能大于截止年龄!')
        }
      },
      changeMaxAge(e) {
        if (this.form.minAge && this.form.minAge >= 0 && e < this.form.minAge) {
          this.form.maxAge = ''
          this.$message.warning('截止年龄不能大于起始年龄!')
        }
      },
      handNumberInput (value) {
        const regex = /^[-+]?\d*$/
        if (!regex.test(value)) {
          // å¦‚果输入的不是整数,则设置为上一个有效的整数值
          this.form.addValidDays = value.replace(/[^0-9]/g, '')
          this.form.addValidDays = value.replace(/[^0-9]/g, '')
          this.form.delValidDays = value.replace(/[^0-9]/g, '')
        }
      },
      // åˆ‡æ¢å…¬å¸
      getAllWorktype1 () {
        this.form.worktypeIdList = []
        this.getAllWorktype()
      },
      changeValidType(e) {
        if (e === 1) {
          this.form.validTypeNum = 0
        } else {
          this.form.validTypeNum = ''
        }
      },
      // ç¡®è®¤æ–°å»º/修改
      confirm () {
        const data = JSON.parse(JSON.stringify(this.form))
        data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
      shops: [],
      company: [],
      typeWork: [],
      typeWorkCopy: []
    }
  },
  created () {
    this.config({
      api: '/business/solutionsBase',
      'field.id': 'id'
    })
  },
  methods: {
    beforeTabClick(n,o){
      let re = true
      if( !this.form.id && n === '1'){
        this.$refs.form.validate((valid) => {
          if (!valid) {
            return
            re = false
          }
          // è°ƒç”¨æ–°å»ºæŽ¥å£
          this.isWorking = true
          if (data.id == null || data.id === '') {
            this.api.create(data)
              .then(() => {
                this.visible = false
                this.$tip.apiSuccess('新建成功')
                this.$emit('success')
              })
              .catch(e => {
                this.$tip.apiFailed(e)
              })
              .finally(() => {
                this.isWorking = false
              })
          } else {
            this.api.updateById(data)
              .then(() => {
                this.visible = false
                this.$tip.apiSuccess('修改成功')
                this.$emit('success')
              })
              .catch(e => {
                this.$tip.apiFailed(e)
              })
              .finally(() => {
                this.isWorking = false
              })
          }
          this.form.saveType = n
        })
      },
      open (title, target) {
        this.title = title
        this.visible = true
        this.form.maxAge = ''
        this.form.validTypeNum = ''
        this.form.canReduce = 0
        this.form.canChangeUnit = 0
        this.form.addValidDays = 0
        this.form.delOnlyReplace = 0
        this.form.delValidDays = 0
        this.form.canAdd = 0
        this.form.worktypeIdList = []
        this.typeWork = []
        this.typeWorkCopy = []
        // this.$refs['$upload'].clearFiles()//初始化导入组件
        this.allCompany()
        this.allShops()
        // æ–°å»º
        if (target == null) {
          this.$nextTick(() => {
            this.$refs.form.resetFields()
            this.form.maxAge = ''
            this.form.validTypeNum = ''
            this.form.fanganFile = null
            this.form.worktypeIdList = []
            this.form[this.configData['field.id']] = null
          })
          return
        }
        // ç¼–辑
        this.$nextTick(() => {
          solutionsBaseId(target.id)
            .then(res => {
              for (const key in this.form) {
                this.form[key] = res[key]
              }
              this.form.correctWarnTime = `${this.form.correctWarnTime}:00`
              if (res.worktypeList) {
                this.form.worktypeIdList = res.worktypeList.map(item => {
                  return {
                    worktypeId: item.worktypeId,
                    worktypeName: item.worktypeName
                  }
                })
              }
              this.getAllWorktype()
            })
        })
      },
      // æŸ¥è¯¢ä¿é™©å…¬å¸ä¸‹å…¨éƒ¨å·¥ç§
      getAllWorktype () {
        allWorktype({
          insuranceId: this.form.insuranceId,
          dataType: 2
        }).then(res => {
            this.typeWork = res
            if (!this.form.id) {
                this.typeWorkCopy = res
            } else {
                let valData = this.form.worktypeIdList.map(item => item.worktypeName)
                this.typeWorkCopy = res.filter(item => !valData.includes(item.name))
            }
        })
      },
      // æŸ¥è¯¢å…¨éƒ¨ä¿é™©å…¬å¸
      allCompany () {
        all({ dataType: 2, status: 0 })
          .then(res => {
            this.company = res
          })
      },
      allShops () {
        shopList({ type: 1, status: 0 })
          .then(res => {
            this.shops = res
          })
      },
      add () {
          let arr = this.typeWorkCopy.filter(item => this.worktypeId.includes(item.id))
          let dataVal = arr.map(item => {
              return {
                  worktypeId: item.id,
                  worktypeName: item.name
              }
          })
          this.form.worktypeIdList = [ ...dataVal, ...this.form.worktypeIdList ]
          let valData = this.form.worktypeIdList.map(item => item.worktypeName)
          this.typeWorkCopy = this.typeWorkCopy.filter(item => !valData.includes(item.name))
          this.worktypeId = []
      },
      dele (index) {
        if (this.form.worktypeIdList.length === 1) {
          this.$message.warning('至少要保留一项')
          return
        }
        let row = this.typeWork.filter(item => item.name === this.form.worktypeIdList[index].worktypeName)
        this.typeWorkCopy.unshift(row[0])
        this.form.worktypeIdList.splice(index, 1)
      }
      return re
    },
    // å¯¼å…¥å·¥ç§æ¨¡æ¿
    getFile (e) {
      const formdate = new FormData()
      formdate.append('file', e.target.files[0])
      formdate.append('insuranceId', this.form.insuranceId)
      importExcelForSolution(formdate)
        .then(res => {
          const arr = []
          res.forEach(item => {
            arr.push({ worktypeId: item.id, worktypeName: item.name })
          })
          this.form.worktypeIdList = [...arr, ...this.form.worktypeIdList]
          this.$refs.form.validate()
          const valData = this.form.worktypeIdList.map(item => item.worktypeName)
          this.typeWorkCopy = this.typeWorkCopy.filter(item => !valData.includes(item.name))
          this.$refs.form.validate()
        })
        .catch(err => {
          this.$message.error(err.message)
        })
        .finally(() => {
          this.$refs.upload.value = null
        })
    },
    impor () {
      if (!this.form.insuranceId) return this.$message.warning('请先选择保险公司')
      this.$refs.upload.click()
    },
    // å¯¼å‡ºæ¨¡æ¿
    exprot () {
      window.open(process.env.VUE_APP_TYPEWORK_URL)
    },
    getWangedditor (val) {
      this.form.specialAgreement = val
    },
    getWangedditor1 (val) {
      this.form.specialInfo = val
    },
    getWangedditor2 (val) {
      this.form.ortherInfo = val
    },
    changeMinAge (e) {
      if (this.form.maxAge && this.form.maxAge >= 0 && e > this.form.maxAge) {
        this.form.minAge = ''
        this.$message.warning('起始年龄不能大于截止年龄!')
      }
    },
    changeMaxAge (e) {
      if (this.form.minAge && this.form.minAge >= 0 && e < this.form.minAge) {
        this.form.maxAge = ''
        this.$message.warning('截止年龄不能大于起始年龄!')
      }
    },
    handNumberInput (value) {
      const regex = /^[-+]?\d*$/
      if (!regex.test(value)) {
        // å¦‚果输入的不是整数,则设置为上一个有效的整数值
        this.form.addValidDays = value.replace(/[^0-9]/g, '')
        this.form.addValidDays = value.replace(/[^0-9]/g, '')
        this.form.delValidDays = value.replace(/[^0-9]/g, '')
      }
    },
    // åˆ‡æ¢å…¬å¸
    getAllWorktype1 () {
      this.form.worktypeIdList = []
      this.getAllWorktype()
    },
    changeValidType (e) {
      if (e === 1) {
        this.form.validTypeNum = 0
      } else {
        this.form.validTypeNum = ''
      }
    },
    // ç¡®è®¤æ–°å»º/修改
    confirm () {
      const data = JSON.parse(JSON.stringify(this.form))
      data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return
        }
        // è°ƒç”¨æ–°å»ºæŽ¥å£
        this.isWorking = true
        if (data.id == null || data.id === '') {
          this.api.create(data)
            .then(() => {
              this.visible = false
              this.$tip.apiSuccess('新建成功')
              this.$emit('success')
            })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking = false
            })
        } else {
          this.api.updateById(data)
            .then(() => {
              this.visible = false
              this.$tip.apiSuccess('修改成功')
              this.$emit('success')
            })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking = false
            })
        }
      })
    },
    open (title, target) {
      this.title = title
      this.visible = true
      this.form.maxAge = ''
      this.form.validTypeNum = ''
      this.form.canReduce = 0
      this.form.canChangeUnit = 0
      this.form.addValidDays = 0
      this.form.delOnlyReplace = 0
      this.form.delValidDays = 0
      this.form.canAdd = 0
      this.form.worktypeIdList = []
      this.typeWork = []
      this.typeWorkCopy = []
      // this.$refs['$upload'].clearFiles()//初始化导入组件
      this.allCompany()
      this.allShops()
      // æ–°å»º
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.form.maxAge = ''
          this.form.validTypeNum = ''
          this.form.fanganFile = null
          this.form.worktypeIdList = []
          this.form[this.configData['field.id']] = null
          this.form.saveType = '0'
        })
        return
      }
      // ç¼–辑
      this.$nextTick(() => {
        solutionsBaseId(target.id)
          .then(res => {
            for (const key in this.form) {
              this.form[key] = res[key]
            }
            this.form.saveType = '0'
            this.form.correctWarnTime = `${this.form.correctWarnTime}:00`
            if (res.worktypeList) {
              this.form.worktypeIdList = res.worktypeList.map(item => {
                return {
                  worktypeId: item.worktypeId,
                  worktypeName: item.worktypeName
                }
              })
            }
            this.getAllWorktype()
          })
      })
    },
    // æŸ¥è¯¢ä¿é™©å…¬å¸ä¸‹å…¨éƒ¨å·¥ç§
    getAllWorktype () {
      allWorktype({
        insuranceId: this.form.insuranceId,
        dataType: 2
      }).then(res => {
        this.typeWork = res
        if (!this.form.id) {
          this.typeWorkCopy = res
        } else {
          const valData = this.form.worktypeIdList.map(item => item.worktypeName)
          this.typeWorkCopy = res.filter(item => !valData.includes(item.name))
        }
      })
    },
    // æŸ¥è¯¢å…¨éƒ¨ä¿é™©å…¬å¸
    allCompany () {
      all({ dataType: 2, status: 0 })
        .then(res => {
          this.company = res
        })
    },
    allShops () {
      shopList({ type: 1, status: 0 })
        .then(res => {
          this.shops = res
        })
    },
    add () {
      const arr = this.typeWorkCopy.filter(item => this.worktypeId.includes(item.id))
      const dataVal = arr.map(item => {
        return {
          worktypeId: item.id,
          worktypeName: item.name
        }
      })
      this.form.worktypeIdList = [...dataVal, ...this.form.worktypeIdList]
      const valData = this.form.worktypeIdList.map(item => item.worktypeName)
      this.typeWorkCopy = this.typeWorkCopy.filter(item => !valData.includes(item.name))
      this.worktypeId = []
      this.$refs.form.validate()
    },
    dele (index) {
      if (this.form.worktypeIdList.length === 1) {
        this.$message.warning('至少要保留一项')
        return
      }
      const row = this.typeWork.filter(item => item.name === this.form.worktypeIdList[index].worktypeName)
      this.typeWorkCopy.unshift(row[0])
      this.form.worktypeIdList.splice(index, 1)
    }
  }
}
</script>
<style lang="scss" scoped>
company/src/components/business/setCompany.vue
@@ -76,117 +76,116 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import RichEditor from '@/components/common/RichEditor'
    import { saveLpInfo, getById } from '@/api/business/insurance'
    export default {
        name: 'setCompany',
        extends: BaseOpera,
        components: { GlobalWindow, RichEditor },
        data () {
            return {
                uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=INSURANCE',
                activeNames: ['1', '2', '3', '4', '5', '6'],
                specialAgreement: '',
                form: {
                    id: null,
                    lpStampTempFile: null,
                    lpStampTempFileCopy: [],
                    lpFile: null,
                    lpFileCopy: [],
                    lpYggxFileInfo: '',
                    lpMzFileInfo: '',
                    lpZyFileInfo: '',
                    lpScFileInfo: '',
                    lpOtherFileInfo: ''
                }
            }
        },
        created () {
            this.config({
                api: '/business/knowledge',
                'field.id': 'id'
            })
        },
        methods: {
            confirm () {
                this.isWorking = true
                saveLpInfo(this.form)
                    .then(res => {
                        this.isWorking = false
                        this.$emit('success')
                        this.$message.success('保存成功')
                        this.visible = false
                    })
            },
            open (title, id) {
                this.title = title
                getById(id)
                    .then(res => {
                        this.visible = true
                        this.$nextTick(() => {
                            setTimeout(() => {
                                for (const key in this.form) {
                                    this.form[key] = res[key]
                                }
                                if (this.form.lpStampTempFile) {
                                    this.form.lpStampTempFileCopy = [this.form.lpStampTempFile]
                                }
                                if (this.form.lpFile) {
                                    this.form.lpFileCopy = [this.form.lpFile]
                                }
                            }, 1000)
                        })
                    })
            },
            getWangedditor1(val) {
                this.form.lpYggxFileInfo = val
            },
            getWangedditor2(val) {
                this.form.lpMzFileInfo = val
            },
            getWangedditor3(val) {
                this.form.lpZyFileInfo = val
            },
            getWangedditor4(val) {
                this.form.lpScFileInfo = val
            },
            getWangedditor5(val) {
                this.form.lpOtherFileInfo = val
            },
            handleFileSuccess(e) {
                e.data.name = e.data.originname
                e.data.fileurl = e.data.imgaddr
                this.form.lpFile = e.data
                this.form.lpFileCopy = [e.data]
            },
            uploadError(e) {
                this.$message.error('上传失败')
            },
            handleRemove() {
                this.form.lpFile = null
                this.form.lpFileCopy = []
            },
            handleFileSuccess1(e) {
                e.data.name = e.data.originname
                e.data.fileurl = e.data.imgaddr
                this.form.lpStampTempFile = e.data
                this.form.lpStampTempFileCopy = [e.data]
            },
            uploadError1(e) {
                this.$message.error('上传失败')
            },
            handleRemove1() {
                this.form.lpStampTempFile = null
                this.form.lpStampTempFileCopy = []
            },
            handleExceed() {
                this.$message.warning('只能上传一个文件!')
            }
        }
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import RichEditor from '@/components/common/RichEditor'
import { saveLpInfo, getById } from '@/api/business/insurance'
export default {
  name: 'setCompany',
  extends: BaseOpera,
  components: { GlobalWindow, RichEditor },
  data () {
    return {
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=insurance',
      activeNames: ['1', '2', '3', '4', '5', '6'],
      specialAgreement: '',
      form: {
        id: null,
        lpStampTempFile: null,
        lpStampTempFileCopy: [],
        lpFile: null,
        lpFileCopy: [],
        lpYggxFileInfo: '',
        lpMzFileInfo: '',
        lpZyFileInfo: '',
        lpScFileInfo: '',
        lpOtherFileInfo: ''
      }
    }
  },
  created () {
    this.config({
      api: '/business/knowledge',
      'field.id': 'id'
    })
  },
  methods: {
    confirm () {
      this.isWorking = true
      saveLpInfo(this.form)
        .then(res => {
          this.isWorking = false
          this.$emit('success')
          this.$message.success('保存成功')
          this.visible = false
        })
    },
    open (title, id) {
      this.title = title
      getById(id)
        .then(res => {
          this.visible = true
          this.$nextTick(() => {
            setTimeout(() => {
              for (const key in this.form) {
                this.form[key] = res[key]
              }
              if (this.form.lpStampTempFile) {
                this.form.lpStampTempFileCopy = [this.form.lpStampTempFile]
              }
              if (this.form.lpFile) {
                this.form.lpFileCopy = [this.form.lpFile]
              }
            }, 1000)
          })
        })
    },
    getWangedditor1 (val) {
      this.form.lpYggxFileInfo = val
    },
    getWangedditor2 (val) {
      this.form.lpMzFileInfo = val
    },
    getWangedditor3 (val) {
      this.form.lpZyFileInfo = val
    },
    getWangedditor4 (val) {
      this.form.lpScFileInfo = val
    },
    getWangedditor5 (val) {
      this.form.lpOtherFileInfo = val
    },
    handleFileSuccess (e) {
      e.data.name = e.data.originname
      e.data.fileurl = e.data.imgaddr
      this.form.lpFile = e.data
      this.form.lpFileCopy = [e.data]
    },
    uploadError (e) {
      this.$message.error('上传失败')
    },
    handleRemove () {
      this.form.lpFile = null
      this.form.lpFileCopy = []
    },
    handleFileSuccess1 (e) {
      e.data.name = e.data.originname
      e.data.fileurl = e.data.imgaddr
      this.form.lpStampTempFile = e.data
      this.form.lpStampTempFileCopy = [e.data]
    },
    uploadError1 (e) {
      this.$message.error('上传失败')
    },
    handleRemove1 () {
      this.form.lpStampTempFile = null
      this.form.lpStampTempFileCopy = []
    },
    handleExceed () {
      this.$message.warning('只能上传一个文件!')
    }
  }
}
</script>
<style lang="scss" scoped>
company/src/components/enterprise/onlineReporting.vue
@@ -199,7 +199,11 @@
                    </div>
                    <div class="box_item">
                        <div class="box_item_title">
                            <span>理赔材料</span>
                          <div> <span>上传理赔材料</span></div>
                          <div style="float: right">
                            <el-button type="primary" v-if="insurance && insurance.lpStampTempFile && insurance.lpStampTempFile.fileurlFull"   @click="openLinkUrl(insurance.lpStampTempFile.fileurlFull)">盖章文件模版</el-button>
                            <el-button type="primary" v-if="insurance && insurance.lpFile && insurance.lpFile.fileurlFull"   @click="openLinkUrl(insurance.lpFile.fileurlFull)">理赔材料一览表</el-button>
                          </div>
                        </div>
                        <div class="box_item_list">
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -209,7 +213,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.relationFileList" :key="index">
@@ -237,7 +241,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpMzFileInfo" class="content" v-html="insurance.lpMzFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.outpatientFileList" :key="index">
@@ -265,7 +269,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpZyFileInfo" class="content" v-html="insurance.lpZyFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.hospitalFileList" :key="index">
@@ -293,7 +297,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpScFileInfo" class="content" v-html="insurance.lpScFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.disabilityFileList" :key="index">
@@ -321,7 +325,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                    <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.otherFileList" :key="index">
@@ -419,6 +423,7 @@
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
import { mapState } from 'vuex'
import { getById } from '@/api/business/insurance'
export default {
  name: 'onlineReporting',
  extends: BaseOpera,
@@ -520,12 +525,13 @@
        ]
      },
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now(); // ç¦ç”¨æœªæ¥çš„æ—¥æœŸ
        disabledDate (time) {
          return time.getTime() > Date.now() // ç¦ç”¨æœªæ¥çš„æ—¥æœŸ
        }
      },
      area: [],
      user: [],
      insurance: null,
      solutionList: []
    }
  },
@@ -545,6 +551,7 @@
      this.user = []
      this.getUser()
      this.getCityTree()
      this.insurance = {}
      if (id) {
        findById(id)
          .then(res => {
@@ -560,12 +567,13 @@
                .then(res1 => {
                  res1.forEach(item => {
                    if (item.id === res.applyDetailId) {
                      this.getInsuranceFile(item)//获取保险方案文件说明
                      item.active = true
                      this.pickerOptions = {
                        disabledDate (time) {
                          var start = new Date(item.startTime)
                          var end = new Date(item.endTime)
                          return ( time.getTime() < start.getTime() ||  time.getTime()>end.getTime())
                          return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
                        }
                      }
                    } else {
@@ -583,6 +591,9 @@
          this.form.informantName = this.userInfo.realname
        })
      }
    },
    openLinkUrl(url){
      window.open(url)
    },
    continueReporting () {
      this.i = 0
@@ -675,6 +686,13 @@
        this.form.reportFileList.splice(index, 1)
      }
    },
    getInsuranceFile (obj) {
      this.insurance = null
      getById(obj.insuranceId,1)
        .then(res => {
          this.insurance = res
        })
    },
    claimsUploadFile (file, type) {
      file.fileurl = file.imgaddr
      file.name = file.originname
@@ -699,27 +717,28 @@
      findList({ memberId: id })
        .then(res => {
          this.form.insuranceApplyId = ''
          res.forEach(item=> {
              item.active = false
          res.forEach(item => {
            item.active = false
          })
          this.solutionList = res
          this.changeSolution(null,0)
          this.changeSolution(null, 0)
        })
    },
    changeSolution (e, i) {
      this.pickerOptions = {}
      if(this.solutionList.length < i){
      if (this.solutionList.length < i) {
        return
      }
      this.solutionList.forEach((item, index) => {
        item.active = i === index
      })
      const obj = this.solutionList.filter(item => item.active)[0]
      this.getInsuranceFile(obj)
      this.pickerOptions = {
        disabledDate (time) {
          var start = new Date(obj.startTime)
          var end = new Date(obj.endTime)
          return ( time.getTime() < start.getTime() ||  time.getTime()>end.getTime())
          return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
        }
      }
      this.form.insuranceApplyId = obj.applyId
@@ -751,8 +770,8 @@
          }
          this.$emit('success')
        }).catch(err => {
            this.$tip.apiFailed(err)
         })
          this.$tip.apiFailed(err)
        })
        .finally(() => {
          this.isWorking = false
        })
company/src/views/business/caseEntry.vue
@@ -76,8 +76,8 @@
                <el-table-column prop="reportNum" label="案件号" min-width="150px" align="center"></el-table-column>
                <el-table-column prop="companyName" label="投保单位" min-width="150px" align="center"></el-table-column>
                <el-table-column prop="informantName" label="报案人" min-width="150px" align="center"></el-table-column>
                <el-table-column prop="createDateStr" label="报案时间" min-width="100px" align="center"></el-table-column>
                <el-table-column prop="createDate" label="出险时间" min-width="120px" align="center"></el-table-column>
                <el-table-column prop="reportDate" label="报案时间" min-width="100px" align="center"></el-table-column>
                <el-table-column prop="happenTime" label="出险时间" min-width="120px" align="center"></el-table-column>
                <el-table-column prop="memberName" label="出险人" min-width="120px" align="center"></el-table-column>
                <el-table-column prop="memberIdcard" label="身份证号" min-width="120px" align="center"></el-table-column>
                <el-table-column prop="solutionName" label="保险方案" min-width="120px" align="center"></el-table-column>
company/src/views/business/insurance.vue
@@ -88,45 +88,45 @@
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import OperaInsuranceWindow from '@/components/business/OperaInsuranceWindow'
    import OperaInsuranceDescWindow from '@/components/business/OperaInsuranceDescWindow'
    import SetCompany from '@/components/business/setCompany'
    import { updateStatus } from '@/api/business/insurance'
    export default {
        name: 'Insurance',
        extends: BaseTable,
        components: { TableLayout, Pagination, OperaInsuranceWindow, OperaInsuranceDescWindow, SetCompany },
        data () {
            return {
                // æœç´¢
                searchForm: {
                    name: ''
                }
            }
        },
        created () {
            this.config({
                module: '保险公司信息表',
                api: '/business/insurance',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
        },
        methods: {
            // ä¿®æ”¹çŠ¶æ€
            changeStatus(status, row) {
                updateStatus({ id: row.id, status })
                    .then(res => {
                        this.search()
                    })
                    .catch(err => {
                        row.status = row.status === 0 ? 1 : 0
                    })
            }
        }
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceWindow from '@/components/business/OperaInsuranceWindow'
import OperaInsuranceDescWindow from '@/components/business/OperaInsuranceDescWindow'
import SetCompany from '@/components/business/setCompany'
import { updateStatus } from '@/api/business/insurance'
export default {
  name: 'Insurance',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceWindow, OperaInsuranceDescWindow, SetCompany },
  data () {
    return {
      // æœç´¢
      searchForm: {
        name: ''
      }
    }
  },
  created () {
    this.config({
      module: '保险公司信息表',
      api: '/business/insurance',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    // ä¿®æ”¹çŠ¶æ€
    changeStatus (status, row) {
      updateStatus({ id: row.id, status })
        .then(res => {
          this.search()
        })
        .catch(err => {
          row.status = row.status === 0 ? 1 : 0
        })
    }
  }
}
</script>
company/src/views/business/settleClaims.vue
@@ -70,7 +70,11 @@
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
              <el-table-column prop="statusName" label="案件状态" min-width="100px"></el-table-column>
              <el-table-column prop="statusName" label="案件状态" min-width="100px">
                <template slot-scope="{row}">
                  <span :class="'settle-status'+row.status">{{row.statusName}}</span>
                </template>
              </el-table-column>
                <el-table-column prop="reportNum" label="报案号" min-width="100px"></el-table-column>
                <el-table-column prop="companyName" label="报案企业" min-width="100px"></el-table-column>
                <el-table-column prop="memberName" label="出险人" min-width="100px"></el-table-column>
@@ -79,6 +83,14 @@
                <el-table-column prop="duName" label="派遣单位" min-width="100px"></el-table-column>
                <el-table-column prop="worktypeName" label="所属工种" min-width="100px"></el-table-column>
                <el-table-column prop="baoxianStartTime" label="保险生效起期" min-width="100px"></el-table-column>
              <el-table-column prop="applyCode" label="保单号" min-width="100px"></el-table-column>
              <el-table-column prop="solutionName" label="保险方案" min-width="100px"></el-table-column>
              <el-table-column prop="money" label="赔付金额(元)" min-width="100px">
                <template slot-scope="{row}">
                  <span style="color: #f95601;cursor: pointer" v-if="[11,12,13].includes(row.status)" :title="'主赔付:'+(row.hpAccount||0) +'元 å…¶ä»–赔付:'+(row.hpOtherAccount||0) +'元'">{{(row.hpAccount||0) +(row.hpOtherAccount ||0 ) }}</span>
                  <span v-else>-</span>
                </template>
              </el-table-column>
                <el-table-column prop="isRisk" label="是否风险案件" min-width="100px">
                  <template slot-scope="{row}"> <span style="color: red" v-if="row.isRisk === 1">风险案件</span></template>
                </el-table-column>
company/src/views/enterprise/settleClaimsCom.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,231 @@
<template>
    <TableLayout :permissions="['business:settleclaims:query']">
        <!-- æœç´¢è¡¨å• -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="报案号" prop="code" >
                <el-input v-model="searchForm.code" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
          <el-form-item label="报案人" prop="informantName">
            <el-input v-model="searchForm.informantName" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
          </el-form-item>
            <el-form-item label="出险人姓名" prop="memberName">
                <el-input v-model="searchForm.memberName" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="出险人身份证" prop="memberIdcardNo">
                <el-input v-model="searchForm.memberIdcardNo" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="保险方案" prop="baseSolutionId">
                <el-select v-model="searchForm.baseSolutionId"  clearable filterable placeholder="请选择" style="width: 150px" @change="search">
                    <el-option
                        v-for="item in solutionList"
                        :key="item.baseId"
                        :label="item.name"
                        :value="item.baseId">
                    </el-option>
                </el-select>
            </el-form-item>
          <el-form-item label="保单号" prop="applyCode">
            <el-input v-model="searchForm.applyCode" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
          </el-form-item>
             <el-form-item label="案件状态" prop="status">
                <el-select v-model="searchForm.status" clearable placeholder="请选择" style="width: 150px" @change="search">
                    <el-option label="暂存中" value="0"></el-option>
                    <el-option label="已报案" value="1"></el-option>
                    <el-option label="待立案" value="2"></el-option>
                    <el-option label="已立案" value="3"></el-option>
                    <el-option label="立案退回" value="4"></el-option>
                    <el-option label="待受理" value="5"></el-option>
                    <el-option label="拒绝受理" value="6"></el-option>
                    <el-option label="商议待审批" value="7"></el-option>
                    <el-option label="商议审批拒绝" value="8"></el-option>
                    <el-option label="已受理" value="9"></el-option>
                    <el-option label="待核赔" value="10"></el-option>
                    <el-option label="已核赔" value="11"></el-option>
                    <el-option label="待结案" value="12"></el-option>
                    <el-option label="已结案" value="13"></el-option>
                    <el-option label="已撤案" value="14"></el-option>
                </el-select>
            </el-form-item>
          <el-form-item label="报案时间" prop="createDateStr">
            <el-date-picker
                style="width: 150px"
                clearable
                v-model="searchForm.createDateStr"
                @change="search"
                type="date"
                placeholder="请选择"
                value-format="yyyy-MM-dd" >
            </el-date-picker>
          </el-form-item>
            <section>
                <el-button type="primary" @click="search">搜索</el-button>
                <el-button @click="reset">重置</el-button>
            </section>
        </el-form>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
            <ul class="toolbar" v-if="userInfo.type === 1">
                <li><el-button type="primary" @click="$refs.onlineReporting.open('提交报案')">在线报案</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
                :data="tableData.list"
                stripe>
                <el-table-column label="序号" width="80px">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
              <el-table-column prop="statusName" label="案件状态" min-width="100px">
                <template slot-scope="{row}">
                  <span :class="'settle-status'+row.status">{{row.statusName}}</span>
                </template>
              </el-table-column>
                <el-table-column prop="reportNum" label="报案号" min-width="100px"></el-table-column>
                <el-table-column prop="informantName" label="报案人" min-width="100px"></el-table-column>
                <el-table-column prop="createDate" label="报案时间" min-width="150px"></el-table-column>
              <el-table-column prop="memberName" label="出险人" min-width="100px"></el-table-column>
                <el-table-column prop="memberIdcardNo" label="身份证号" min-width="180px"></el-table-column>
              <el-table-column prop="duName" label="用人遣单位" min-width="180px"></el-table-column>
              <el-table-column prop="applyCode" label="保单号" min-width="100px"></el-table-column>
              <el-table-column prop="solutionName" label="保险方案" min-width="180px"></el-table-column>
                <el-table-column prop="money" label="赔付金额(元)" min-width="100px">
                  <template slot-scope="{row}">
                    <span style="color: #f95601;cursor: pointer" v-if="[11,12,13].includes(row.status)" :title="'主赔付:'+(row.hpAccount||0) +'元 å…¶ä»–赔付:'+(row.hpOtherAccount||0) +'元'">{{(row.hpAccount||0) +(row.hpOtherAccount ||0 ) }}</span>
                    <span v-else>-</span>
                  </template>
                </el-table-column>
                <el-table-column prop="baoxianStartTime" label="保险生效起期" min-width="100px"></el-table-column>
                <el-table-column prop="isRisk" label="是否风险案件" min-width="100px">
                  <template slot-scope="{row}"> <span style="color: red" v-if="row.isRisk === 1">风险案件</span></template>
                </el-table-column>
                <el-table-column prop="createDate" label="报案时间" min-width="100px"></el-table-column>
                <el-table-column
                    v-if="containPermissions(['business:settleclaims:update', 'business:settleclaims:delete'])"
                    label="操作"
                    min-width="200"
                    fixed="right">
                    <template slot-scope="{row}">
                        <el-button
                            type="text"
                            @click="$refs.operaSettleClaimsWindow.open('报案详情', row.id)"
                            v-if="row.status !== 0">
                            æŸ¥çœ‹è¯¦æƒ…
                        </el-button>
                        <el-button
                            type="text"
                            @click="$refs.onlineReporting.open('编辑报案', row.id)"
                            v-if="[0,1,2,4,5,7].includes(row.status) && userInfo.type === 1">
                            ç¼–辑
                        </el-button>
                        <el-button
                            type="text"
                            @click="revoke(row.id)"
                            v-if="[1,2,3,4,5,9,7,10].includes(row.status) && userInfo.type === 1">
                            æ’¤é”€
                        </el-button>
                        <el-button type="text" @click="deleRow(row.id)" v-if="row.status === 0">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination
                @size-change="handleSizeChange"
                @current-change="handlePageChange"
                :pagination="tableData.pagination"
            >
            </pagination>
        </template>
        <!-- è¯¦æƒ… -->
        <OperaSettleClaimsWindow ref="operaSettleClaimsWindow" @success="handlePageChange"/>
        <!--    åœ¨çº¿æŠ¥æ¡ˆ    -->
        <onlineReporting ref="onlineReporting" @success="handlePageChange" />
    </TableLayout>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
import onlineReporting from '@/components/enterprise/onlineReporting'
import { all as solutionAll } from '@/api/business/solutions'
import { returnSettle } from '@/api/business/settleRisk'
import { pageAll as companyAll } from '@/api/business/company'
import { dele } from '@/api/business/settleClaims'
import { mapState } from 'vuex'
export default {
  name: 'SettleClaims',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaSettleClaimsWindow, onlineReporting },
  data () {
    return {
      // æœç´¢
      solutionList: [],
      companyList: [],
      searchForm: {
        baseSolutionId: '',
        companyId: '',
        duName: '',
        createDateStr:null,
        memberName: '',
        applyCode:null,
        memberIdcardNo: '',
        status: '',
        informantName: ''
      }
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  created () {
    this.config({
      module: '理赔申请表',
      api: '/business/settleClaims',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.loadSelectList()
  },
  methods: {
      // æ’¤é”€
      revoke(id) {
          this.$confirm('撤销后,案件直接结束,无法继续进行理赔操作!', '是否撤销报案?', {
              confirmButtonText: '确定撤销',
              cancelButtonText: '我再想想',
              type: 'warning'
          }).then(() => {
              returnSettle({ id })
                  .then(res => {
                      this.search()
                  })
          }).catch(() => {
          });
      },
    loadSelectList () {
      solutionAll({ dataType: 0 }).then(res => {
        this.solutionList = res
      }).catch(err => {
      })
    },
      deleRow(id) {
          this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
          }).then(() => {
              dele(id)
                .then(res => {
                    this.$message.success('删除成功')
                    this.search()
                })
          }).catch(() => {
          });
      }
  }
}
</script>