MrShi
2024-11-04 b6fde711bf33cede4cb84f85146c32b0c0c61aa5
优化需求
已修改10个文件
525 ■■■■■ 文件已修改
company/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/solutionsBase.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaInsuranceWindow.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsBaseDescWindow.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsBaseWindow.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsDescWindow.vue 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsWindow.vue 289 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/common/UploadAvatarImage.vue 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/insurance.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/solutions.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/.env.development
@@ -8,7 +8,7 @@
VUE_APP_COOKIE_NAME='dmplat-auth-token'
# 测试服
VUE_APP_API = 'https://dmtest.ahapp.net/yyb_admin_api/'
# VUE_APP_API = 'https://dmtest.ahapp.net/yyb_admin_api/'
# 任康
# VUE_APP_API = 'http://192.168.0.138:10030/'
VUE_APP_API = 'http://192.168.0.138:10030/'
company/src/api/business/solutionsBase.js
@@ -17,6 +17,16 @@
  return request.post('/business/solutionsBase/updateById', data)
}
// 列表查询
export function list (data) {
  return request.post('/business/solutionsBase/list', data)
}
// 禁用启用
export function updateStatus (data) {
  return request.post('/business/solutionsBase/updateStatus', data)
}
// 删除
export function deleteById (id) {
  return request.get(`/business/solutionsBase/delete/${id}`)
company/src/components/business/OperaInsuranceWindow.vue
@@ -9,6 +9,18 @@
            <el-form-item label="保险公司" prop="name">
                <el-input v-model="form.name" placeholder="平安保险" v-trim/>
            </el-form-item>
            <el-form-item label="logo" prop="logo">
                <UploadAvatarImage :uploadData="{ folder: 'insurance' }" :file="file" @uploadSuccess="result" />
            </el-form-item>
            <el-form-item label="英文名称" prop="englishName">
                <el-input v-model="form.englishName" maxlength="100" show-word-limit placeholder="请输入英文名称" v-trim/>
            </el-form-item>
            <el-form-item label="联系人" prop="linkName">
                <el-input v-model="form.linkName" maxlength="10" show-word-limit placeholder="请输入联系人" v-trim/>
            </el-form-item>
            <el-form-item label="联系人电话" prop="linkPhone">
                <el-input v-model="form.linkPhone"  maxlength="11" show-word-limit placeholder="请输入联系人电话" v-trim/>
            </el-form-item>
            <div style="width: 100%; display: flex; align-items: center;margin-bottom: 10px;">
                <el-button type="primary" @click="add">添加</el-button>
                <el-button type="primary" @click="impor">导入工种</el-button>
@@ -42,6 +54,15 @@
                    </template>
                </el-table-column>
            </el-table>
            <el-form-item label="理赔所需材料" prop="claimsInformation">
                <RichEditor :richData="form.claimsInformation" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor" :readonly="false"/>
            </el-form-item>
            <el-form-item label="保险政策" prop="policy">
                <RichEditor :richData="form.policy" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor1" :readonly="false"/>
            </el-form-item>
            <el-form-item label="保险条款" prop="agreement">
                <RichEditor :richData="form.agreement" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor2" :readonly="false"/>
            </el-form-item>
        </el-form>
        <!--    上传工种    -->
        <input type="file" @change="getFile" style="opacity: 0;" ref="upload" accept=".xlsx" />
@@ -51,24 +72,47 @@
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import UploadAvatarImage from '@/components/common/UploadAvatarImage'
    import RichEditor from '@/components/common/RichEditor'
    import { importExcel, all } from '@/api/business/worktype'
    export default {
        name: 'OperaInsuranceWindow',
        extends: BaseOpera,
        components: { GlobalWindow },
        components: { GlobalWindow, UploadAvatarImage, RichEditor },
        data () {
          var phoneRule = (rule, value, callback) => {
            if (value) {
                if (!/^1[3-9]\d{9}$/.test(value)) {
                  return callback(new Error('请输入正确的手机号!'))
                }
            }
            callback()
          }
            return {
                // 表单数据
                form: {
                    id: null,
                    name: '',
                    logo: '',
                    englishName: '',
                    linkName: '',
                    linkPhone: '',
                    agreement: '',
                    claimsInformation: '',
                    policy: '',
                    worktypeList: [
                        { name: '' }
                    ]
                },
                file: {
                    imgurlfull: ''
                },
                // 验证规则
                rules: {
                  linkPhone: [
                    { required: false, validator: phoneRule }
                  ]
                }
            }
        },
@@ -96,6 +140,8 @@
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                    this.file.imgurlfull = target.logoFullUrl
                    console.log(this.form)
                    all({ insuranceId: this.form.id })
                        .then(res => {
                            let arr = []
@@ -106,6 +152,19 @@
                        })
                })
            },
            getWangedditor(val){
                this.form.claimsInformation = val;
            },
            getWangedditor1(val){
                this.form.policy = val;
            },
            getWangedditor2(val){
                this.form.agreement = val;
            },
            result(res) {
              this.form.logo = res.imgurl
              this.file.imgurlfull = res.imgurlfull
            },
            // 导出模板
            exprot() {
                window.open(process.env.VUE_APP_TYPEWORK_URL)
company/src/components/business/OperaSolutionsBaseDescWindow.vue
@@ -2,8 +2,7 @@
    <GlobalWindow
        :title="title"
        width="100%"
        text="修改"
        :withFooter="userInfo.type !== 1"
        :withFooter="false"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="$refs.operaSolutionsWindow.open('编辑方案', form)"
@@ -22,10 +21,6 @@
                    <div class="info_list_item_label">承保公司:</div>
                    <div class="info_list_item_val">{{form.companyName}}</div>
                </div>
<!--                <div class="info_list_item">-->
<!--                    <div class="info_list_item_label">投保周期:</div>-->
<!--                    <div class="info_list_item_val">1月</div>-->
<!--                </div>-->
                <div class="info_list_item">
                    <div class="info_list_item_label">批改提醒时间:</div>
                    <div class="info_list_item_val">{{form.correctWarnTime}}</div>
@@ -36,7 +31,7 @@
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批减生效:</div>
                    <div class="info_list_item_val">{{form.delOnlyReplace === 1 ? '是' : '否'}}</div>
                    <div class="info_list_item_val">{{form.delValidDays||0}} 天</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批改支持:</div>
company/src/components/business/OperaSolutionsBaseWindow.vue
@@ -80,9 +80,9 @@
                    <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">{{form.correctWarnTime}}
            <el-form-item label="批改提醒时间" prop="correctWarnTime">
                <el-time-picker
                    value-format="HH:hh:mm"
                    value-format="HH:mm"
                    v-model="form.correctWarnTime"
                    placeholder="请选择批改提醒时间">
                </el-time-picker>
@@ -268,7 +268,6 @@
      confirm () {
        const data = JSON.parse(JSON.stringify(this.form))
        data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
        data.correctWarnTime = data.correctWarnTime.substring(0, data.correctWarnTime.lastIndexOf(':'))
        this.$refs.form.validate((valid) => {
          if (!valid) {
            return
company/src/components/business/OperaSolutionsDescWindow.vue
@@ -1,9 +1,8 @@
<template>
    <GlobalWindow
        :title="title"
        width="70%"
        text="修改"
        :withFooter="userInfo.type !== 1"
        width="100%"
        :withFooter="false"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="$refs.operaSolutionsWindow.open('编辑方案', form)"
@@ -11,48 +10,21 @@
        <div class="info">
            <div class="info_list">
                <div class="info_list_item">
                    <div class="info_list_item_label">方案名称:</div>
                    <div class="info_list_item_label">子方案:</div>
                    <div class="info_list_item_val">{{form.name}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">保险公司:</div>
                    <div class="info_list_item_val">{{form.insuranceName}}</div>
                    <div class="info_list_item_label">主方案:</div>
                    <div class="info_list_item_val"><a @click="$refs.operaSolutionsBaseDescWindow.open('主方案详情', { id: form.parentId })" style="cursor: pointer;color: #2E68EC;">{{form.solutionBaseName}}</a></div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">承保公司:</div>
                    <div class="info_list_item_val">{{form.companyName}}</div>
                </div>
              <div class="info_list_item">
                <div class="info_list_item_label">投保类型:</div>
                <div class="info_list_item_val" v-if="form.type === 0 "> 直保</div>
                <div class="info_list_item_val" v-if="form.type === 1">委托投保</div>
              </div>
              <div class="info_list_item" v-if="form.type === 1">
                <div class="info_list_item_label">委托商户:</div>
                <div class="info_list_item_val" > {{form.shopName}}</div>
              </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">投保年龄:</div>
                    <div class="info_list_item_val">{{form.minAge}}至{{form.maxAge}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label" v-if="form.type !=1">方案费用:</div>
                    <div class="info_list_item_label" v-else>服务费用:</div>
                    <div class="info_list_item_label">保险费用:</div>
                    <div class="info_list_item_val">
                        {{form.price}}元/人/
<!--                        <span v-if="form.timeUnit === 0">天</span>
                        <span v-if="form.timeUnit === 1">半月</span>
                        <span v-if="form.timeUnit === 2">月</span>
                        <span v-if="form.timeUnit === 3">年</span>-->
                      <span v-if="form.timeUnit === 0">天</span>
                      <span v-if="form.timeUnit === 2">月</span>
                      <span v-if="form.timeUnit === 3">季度</span>
                      <span v-if="form.timeUnit === 4">半年</span>
                      <span v-if="form.timeUnit === 5">年</span>
                        {{form.price}}元/人/<template v-if="form.timeUnit === 0">天</template><template v-if="form.timeUnit === 2">月</template><template v-if="form.timeUnit === 3">季度</template><template v-if="form.timeUnit === 4">半年</template><template v-if="form.timeUnit === 5">年</template>
                    </div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批改计费单位:</div>
                    <div class="info_list_item_label">批改计费规则:</div>
                    <div class="info_list_item_val">
                        <span v-if="form.insureCycleUnit === 0">天</span>
                        <span v-if="form.insureCycleUnit === 1">半月</span>
@@ -63,36 +35,24 @@
                    </div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">生效时间:</div>
                    <div class="info_list_item_val">{{form.validType === 0 ? form.validTypeNum + '日后生效' : '次月生效'}}</div>
                    <div class="info_list_item_label">投保类型:</div>
                    <div class="info_list_item_val" v-if="form.type === 0 ">直保</div>
                    <div class="info_list_item_val" v-if="form.type === 1">委托投保</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">委托商户:</div>
                    <div class="info_list_item_val" > {{form.shopName}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">派遣单位:</div>
                    <div class="info_list_item_val" v-if="form.hasDispatchUnit === 1">无</div>
                    <div class="info_list_item_val" v-else-if="form.hasDispatchUnit === 0">有</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">接收文件邮箱:</div>
                    <div class="info_list_item_val">{{form.email}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批增生效:</div>
                    <div class="info_list_item_val">{{form.addValidDays||0}} 天</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批减生效:</div>
                    <div class="info_list_item_val">{{form.delValidDays||0}} 天</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批改支持:</div>
                    <div class="info_list_item_val">
                      <span style="margin-right: 50px">加保 <i  :class="form.canAdd ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canAdd ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                      <span  style="margin-right: 50px">减保  <i   :class="form.canReduce ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canReduce ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                      <span>更换派遣单位 <i   :class="form.canChangeUnit ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canChangeUnit ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                    </div>
                </div>
                <div class="info_list_item" v-if="form.insureCycleUnit===0 || (form.insureCycleUnit===form.timeUnit)">
                    <div class="info_list_item_label">批改仅支持替换:</div>
                    <div class="info_list_item_val" v-if="form.delOnlyReplace == 1">是</div>
                    <div class="info_list_item_val" v-else>否</div>
                </div>
              <div class="info_list_item" style="width: 100%" v-if="form.type==1">
                <div class="info_list_item" style="width: 100%">
                <div class="info_list_item_label">方案确认书:</div>
                <div class="info_list_item_val" ><a v-if="form.fanganFile && form.fanganFile.fileurlFull" style="cursor: pointer;color: #2E68EC" title="点击查看" @click="openFile(form.fanganFile.fileurlFull)">{{ form.fanganFile.name || '点击查看' }}</a></div>
              </div>
@@ -115,15 +75,11 @@
                    label="工种名称">
                </el-table-column>
            </el-table>
            <div class="info_agree">
              <div class="info_agree_label">特别约定:<div v-html="form.specialAgreement"></div></div>
                <div class="info_agree_label">特别说明:<div v-html="form.specialInfo"></div></div>
                <div class="info_agree_label">其他说明:<div v-html="form.ortherInfo"></div></div>
            </div>
        </div>
        <!-- 修改 -->
        <OperaSolutionsWindow ref="operaSolutionsWindow" @success="callback"/>
        <OperaPdfViewerWindow ref="OperaPdfViewerWindow"  />
        <OperaSolutionsBaseDescWindow ref="operaSolutionsBaseDescWindow" />
    </GlobalWindow>
</template>
@@ -132,12 +88,13 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow'
import OperaPdfViewerWindow from '@/components/business/OperaPdfViewerWindow'
import OperaSolutionsBaseDescWindow from '@/components/business/OperaSolutionsBaseDescWindow'
import { solutionsId } from '@/api/business/solutions'
import { mapState } from 'vuex'
export default {
  name: 'OperaSolutionsDescWindow',
  extends: BaseOpera,
  components: { GlobalWindow, OperaPdfViewerWindow,OperaSolutionsWindow },
  components: { GlobalWindow, OperaPdfViewerWindow,OperaSolutionsWindow, OperaSolutionsBaseDescWindow },
  data () {
    return {
      // 表单数据
@@ -153,8 +110,11 @@
        price: '',
        timeUnit: '',
        insureCycle: '',
        parentId: '',
        shopName: '',
        insureCycleUnit: '',
        hasDispatchUnit: '',
        solutionBaseName: '',
        validTypeNum: '',
        email: '',
        canReduce: 0,
@@ -195,14 +155,17 @@
        type: 0,
        minAge: '',
        maxAge: '',
        parentId: '',
        price: '',
        timeUnit: '',
        insureCycle: '',
        hasDispatchUnit: '',
        shopName: '',
        insureCycleUnit: '',
        validTypeNum: '',
        email: '',
        specialAgreement: '',
        solutionBaseName: '',
        specialInfo: '',
        ortherInfo: '',
        fanganFile: null,
@@ -255,24 +218,6 @@
<style lang="scss" scoped>
    .info {
        width: 100%;
        .info_agree {
            width: 100%;
            display: flex;
            flex-direction: column;
            margin-top: 20px;
            .info_agree_label {
                font-size: 14px;
                font-weight: 500;
                color: #000000;
                margin-top: 5px;
            }
            .info_agree_val {
                font-size: 14px;
                font-weight: 500;
                color: #000000;
                margin-top: 5px;
            }
        }
        .info_label {
            width: 100%;
            display: flex;
company/src/components/business/OperaSolutionsWindow.vue
@@ -7,44 +7,20 @@
        @confirm="confirm"
    >
        <el-form :model="form" ref="form" :rules="rules">
            <el-form-item label="方案名称" prop="name">
                <el-input v-model="form.name" placeholder="请输入" v-trim/>
            </el-form-item>
            <el-form-item label="保险公司" prop="insuranceId">
                <el-select v-model="form.insuranceId" @change="getAllWorktype1" placeholder="请选择">
            <el-form-item label="主方案" prop="parentId">
                <el-select v-model="form.parentId" filterable @change="changeParent" placeholder="请选择">
                    <el-option
                        v-for="item in company"
                        v-for="item in list"
                        :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-form-item label="子方案名称" prop="name">
                <el-input v-model="form.name" 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" 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" 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>
            <el-form-item label="方案费用" prop="price">
            <el-form-item label="保险费用" prop="price">
                <div style="display: flex; align-items: center;">
                    <el-input v-model="form.price" style="flex: 1;" placeholder="请输入" v-trim/>
                    <span style="margin: 0 30px;">元/人</span>
@@ -70,50 +46,14 @@
                    </el-select>
                </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="form.validTypeNum = ''">
                            <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="批改支持" >
            <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" v-if="form.insureCycleUnit===0 || (form.insureCycleUnit===form.timeUnit)">
            <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>
          </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>
          </el-form-item>
            <el-form-item label="投保类型" prop="type">
                <el-radio-group v-model="form.type" :disabled="form.id!=null">
                <el-radio-group v-model="form.type" :disabled="form.id!=null" @change="form.signType = ''">
                    <el-radio :label="0" >直保</el-radio>
                    <el-radio :label="1">委托投保</el-radio>
                </el-radio-group>
            </el-form-item>
          <el-form-item label="委托商户" prop="shopId" v-if="form.type =='1'" :rules="form.type===1?[{required:true,message:'请选择商户'}]:[{required:false}]">
            <el-select v-model="form.shopId"  placeholder="请选择委托商户">
            <el-form-item label="委托商户" prop="shopId" :rules="form.type === 1 ? [{required:true,message:'请选择商户'}] : [{ required:false }]">
                <el-select v-model="form.shopId" filterable placeholder="请选择委托商户">
              <el-option
                  v-for="item in shops"
                  :key="item.id"
@@ -122,59 +62,32 @@
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="上传方案确认书:" prop="fanganFile" v-if="form.type =='1'" :rules="form.type===1?[{required:true,message:'请上传方案确认书'}]:[{required:false}]">
            <el-form-item label="签章方式" prop="signType" v-if="form.type === 1">
                <el-select v-model="form.signType" placeholder="请选择委托商户">
                    <el-option label="企业签署商户上传投保单" :value="0"></el-option>
                    <el-option label="企业签投保申请" :value="1"></el-option>
                    <el-option label="企业无需签章" :value="2"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="有派遣单位" prop="hasDispatchUnit">
                <el-radio-group v-model="form.hasDispatchUnit">
                    <el-radio :label="0">有</el-radio>
                    <el-radio :label="1">无</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="需要复核" prop="retrial">
                <el-radio-group v-model="form.retrial">
                    <el-radio :label="1">需要</el-radio>
                    <el-radio :label="0">不需要</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="上传方案确认书:" prop="fanganFile" :rules="[{required:true,message:'请上传方案确认书'}]">
                <div>
            <UploadFile  @remove="deleFile" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editFanganFile" />
                </div>
          </el-form-item>
            <el-form-item label="接收文件邮箱" prop="email">
                <el-input v-model="form.email" placeholder="请输入" v-trim/>
            </el-form-item>
<!--            <el-form-item label="投保单签章关键字(如有多个关键字,请使用英文分号 ; 隔开)" prop="signKeyword">
                <el-input v-model="form.signKeyword" placeholder="多个英文分号 ; 隔开" v-trim/>
            </el-form-item>-->
            <el-button type="primary" @click="add">添加工种</el-button>
            <el-table
                :data="form.worktypeIdList"
                border
                style="width: 100%; margin-bottom: 20px;">
                <el-table-column
                    label="序号"
                    align="center"
                    width="80">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    align="center"
                    label="所属工种">
                    <template slot-scope="{row}">
                        <el-select filterable v-model="row.worktypeId" placeholder="请选择">
                            <el-option
                                v-for="item in typeWork"
                                :key="item.id"
                                :label="item.name"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column
                    label="操作"
                    align="center"
                    width="100">
                    <template slot-scope="scope">
                        <el-button type="text" size="small" style="color: red;" @click="dele(scope.$index)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-form-item label="特别约定" prop="specialAgreement">
                <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"/>
            </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"/>
            </el-form-item>
        </el-form>
    </GlobalWindow>
@@ -184,79 +97,45 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { all } from '@/api/business/insurance'
import { all as allWorktype } from '@/api/business/worktype'
import { solutionsId } from '@/api/business/solutions'
  import { list } from '@/api/business/solutionsBase'
import { pageAll as shopList } from '@/api/business/company'
import UploadFile from '@/components/common/UploadFile'
import { checkMobile, numRule } from '@/utils/form'
import RichEditor from '@/components/common/RichEditor'
export default {
  name: 'OperaSolutionsWindow',
  extends: BaseOpera,
  components: { GlobalWindow, UploadFile, RichEditor },
  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('延迟天数只能为正整数'))
      }
      callback()
    }
    return {
      // 表单数据
      form: {
        id: null,
        name: '',
        companyName: '',
        insuranceId: '',
        validType: 0,
        parentId: '',
        signType: '',
        type: 0,
        minAge: '',
        maxAge: '',
        price: '',
        timeUnit: '',
        shopId: null,
        insureCycle: '',
        retrial: 0,
        hasDispatchUnit: 0,
        insureCycleUnit: '',
        email: '',
        specialAgreement: '',
        specialInfo: '',
        ortherInfo: '',
        signKeyword: '',
        validTypeNum: '',
        canReduce: 0,
        canChangeUnit: 0,
        addValidDays: 0,
        delValidDays: 0,
        delOnlyReplace: 0,
        canAdd: 0,
        fileList1: [],
        fanganFile: null,
        worktypeIdList: [{ worktypeId: '' }]
        fanganFile: null
      },
      // 验证规则
      rules: {
        name: [
          { required: true, message: '请输入方案名称' }
        ],
        delOnlyReplace: [
          { required: true, message: '请选择' }
        parentId: [
          { required: true, message: '请选择主方案' }
        ],
        addValidDays: [
          { validator: numRule }
        ],
        delValidDays: [
          { validator: numRule }
        ],
        insuranceId: [
          { required: true, message: '请选择保险公司' }
        ],
        companyName: [
          { required: true, message: '请输入承保公司' }
        ],
        minAge: [
          { required: true, message: '请选择投保年龄' }
        signType: [
          { required: true, message: '请选择签章方式' }
        ],
        price: [
          { required: true, message: '请输入方案费用' }
@@ -264,19 +143,13 @@
        insureCycleUnit: [
          { required: true, message: '请输入批改计费单位' }
        ],
        validTypeNum: [
          { required: true, validator: validType }
        ],
        type: [
          { required: true, message: '请选择投保类型' }
        ]
        // signKeyword: [
        //     { required: false, message: '请输入投保单签章关键字' }
        // ]
      },
      list: [],
      shops: [],
      company: [],
      typeWork: []
      company: []
    }
  },
  created () {
@@ -286,24 +159,16 @@
    })
  },
  methods: {
    getWangedditor(val){
      this.form.specialAgreement = val;
    },
    getWangedditor1(val){
      this.form.specialInfo = val;
    },
    getWangedditor2(val){
      this.form.ortherInfo = val;
    },
    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, '')
    changeParent(e) {
      let name = this.list.filter(item => {
        if (e === item.id) {
          return item.name
      }
      })
      this.form.name = name[0].name
    },
    async getList() {
      this.list = await list({})
    },
    changeTimeUnit () {
      if (this.form.timeUnit < this.form.insureCycleUnit) {
@@ -313,15 +178,9 @@
    editFanganFile (data) {
      this.form.fanganFile = data
    },
    // 切换公司
    getAllWorktype1 () {
      this.form.worktypeIdList = [{ worktypeId: '' }]
      this.getAllWorktype()
    },
    // 确认新建/修改
    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
@@ -367,33 +226,21 @@
    open (title, target) {
      this.title = title
      this.visible = true
      this.form.maxAge = ''
      this.form.timeUnit = ''
      this.form.insureCycleUnit = ''
      this.form.validTypeNum = ''
      this.form.fanganFile = null
      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.fileList1 = []
      this.form.worktypeIdList = [{ worktypeId: '' }]
      // this.$refs['$upload'].clearFiles()//初始化导入组件
      this.allCompany()
      this.allShops()
      this.getList()
      // 新建
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.form.maxAge = ''
          this.form.timeUnit = ''
          this.form.insureCycleUnit = ''
          this.form.validTypeNum = ''
          this.form.fanganFile = null
          this.form.fileList1 = []
          this.form.worktypeIdList = [{ worktypeId: '' }]
          this.form[this.configData['field.id']] = null
        })
        return
@@ -408,49 +255,21 @@
            if (this.form.fanganFile && this.form.fanganFile.fileurl) {
              this.form.fileList1 = [{ url: this.form.fanganFile.fileurlFull, name: this.form.fanganFile.name }]
            }
            console.log(this.form.fileList1)
            this.form.worktypeIdList = res.worktypeList.map(item => {
              return {
                worktypeId: item.worktypeId
              }
            })
            this.getAllWorktype()
          })
      })
    },
    // 查询保险公司下全部工种
    getAllWorktype () {
      allWorktype({
        insuranceId: this.form.insuranceId
      }).then(res => {
        this.typeWork = res
      })
    },
    // 查询全部保险公司
    allCompany () {
      all({ dataType: 2, status: 0 })
        .then(res => {
          console.log(res)
          this.company = res
        })
    },
    allShops () {
      shopList({ type: 1, status: 0 })
        .then(res => {
          console.log(res)
          this.shops = res
        })
    },
    add () {
      this.form.worktypeIdList.push({ worktypeId: '' })
    },
    dele (index) {
      if (this.form.worktypeIdList.length === 1) {
        this.$message.warning('至少要保留一项')
        return
      }
      this.form.worktypeIdList.splice(index, 1)
    }
  }
}
company/src/components/common/UploadAvatarImage.vue
company/src/views/business/insurance.vue
@@ -27,10 +27,19 @@
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="保险公司" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="LOGO" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="英文名称" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="联系人" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="联系电话" min-width="100px"></el-table-column>
                <el-table-column prop="logo" label="LOGO" min-width="100px">
                    <template slot-scope="{row}">
                        <el-image
                            v-if="row.logoFullUrl"
                            style="width: 100px; height: 100px"
                            :src="row.logoFullUrl"
                            :preview-src-list="[row.logoFullUrl]">
                        </el-image>
                    </template>
                </el-table-column>
                <el-table-column prop="englishName" label="英文名称" min-width="100px"></el-table-column>
                <el-table-column prop="linkName" label="联系人" min-width="100px"></el-table-column>
                <el-table-column prop="linkPhone" label="联系电话" min-width="100px"></el-table-column>
                <el-table-column label="启用状态" min-width="100px">
                    <template slot-scope="{row}">
                        <el-switch
company/src/views/business/solutions.vue
@@ -14,7 +14,7 @@
        <template v-slot:table-wrap>
            <ul class="toolbar" v-permissions="['business:solutions:create']">
                <template v-if="userInfo.type !== 1">
                    <li><el-button type="primary" @click="$refs.operaSolutionsWindow.open('新建保险方案')" v-permissions="['business:solutions:create']">添加方案</el-button></li>
                    <li><el-button type="primary" @click="$refs.operaSolutionsWindow.open('新增子方案')" v-permissions="['business:solutions:create']">添加方案</el-button></li>
                </template>
            </ul>
            <el-table
@@ -28,7 +28,7 @@
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="子方案名称" min-width="150px"></el-table-column>
                <el-table-column prop="insuranceName" label="主方案" min-width="100px"></el-table-column>
                <el-table-column prop="solutionBaseName" label="主方案" min-width="100px"></el-table-column>
                <el-table-column label="投保类型" min-width="120px" align="center">
                    <template slot-scope="{row}">
                        <span v-if="row.type === 0">直保</span>
@@ -46,7 +46,12 @@
                        <span v-if="row.timeUnit === 5">年</span>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="需要复审"></el-table-column>
                <el-table-column prop="retrial" label="需要复审">
                    <template slot-scope="{row}">
                        <span v-if="row.retrial === 0">不需要</span>
                        <span v-if="row.retrial === 1">需要</span>
                    </template>
                </el-table-column>
                <el-table-column prop="createDate" label="方案创建日期" min-width="100px"></el-table-column>
                <el-table-column prop="status" label="启用状态" min-width="100px" v-if="userInfo.type !== 1">
                    <template slot-scope="{row}">
@@ -67,9 +72,9 @@
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.OperaSolutionsDescWindow.open('方案详情', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">查看详情</el-button>
                        <el-button type="text" @click="$refs.OperaSolutionsDescWindow.open('子方案详情', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">查看详情</el-button>
                        <template v-if="userInfo.type !== 1">
                            <el-button type="text" @click="$refs.operaSolutionsWindow.open('编辑保险方案', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">修改</el-button>
                            <el-button type="text" @click="$refs.operaSolutionsWindow.open('编辑子方案', { id: row.id })" icon="el-icon-edit" v-permissions="['business:solutions:update']">修改</el-button>
                        </template>
                    </template>
                </el-table-column>