| | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="投保类型" prop="type"> |
| | | <el-radio-group v-model="form.type"> |
| | | <el-radio :label="0">直保</el-radio> |
| | | <el-radio-group v-model="form.type" :disabled="form.id!=null"> |
| | | <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'"> |
| | | <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-option |
| | | v-for="item in shops" |
| | |
| | | :value="item.id"> |
| | | </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}]"> |
| | | <UploadFile @remove="deleFile" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editFanganFile" /> |
| | | </el-form-item> |
| | | <el-form-item label="接收文件邮箱" prop="email"> |
| | | <el-input v-model="form.email" placeholder="请输入" v-trim/> |
| | |
| | | import { all as allWorktype } from '@/api/business/worktype' |
| | | import { solutionsId } from '@/api/business/solutions' |
| | | import { pageAll as shopList } from '@/api/business/company' |
| | | import UploadFile from "@/components/common/UploadFile"; |
| | | export default { |
| | | name: 'OperaSolutionsWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | components: { GlobalWindow ,UploadFile}, |
| | | data () { |
| | | var validType = (rule, value, callback) => { |
| | | if (this.form.validType === 0 && !value) { |
| | |
| | | ortherInfo: '', |
| | | signKeyword: '', |
| | | validTypeNum: '', |
| | | fileList1:[], |
| | | fanganFile:null, |
| | | worktypeIdList: [{ worktypeId: '' }] |
| | | }, |
| | | // 验证规则 |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | editFanganFile(data){ |
| | | this.form.fanganFile=data |
| | | }, |
| | | // 切换公司 |
| | | getAllWorktype1 () { |
| | | this.form.worktypeIdList = [{ worktypeId: '' }] |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | if(data.type===1 && (!data.fanganFile || !data.fanganFile.fileurl)){ |
| | | this.$message.error('请上传方案确认书!') |
| | | return; |
| | | } |
| | | // 调用新建接口 |
| | | this.isWorking = true |
| | |
| | | } |
| | | }) |
| | | }, |
| | | deleFile(){ |
| | | this.form.fanganFile={} |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form.maxAge = '' |
| | | this.form.timeUnit = '' |
| | | this.form.insureCycleUnit = '' |
| | | this.form.validTypeNum = '' |
| | | this.visible = true |
| | | this.form.fanganFile=null |
| | | this.form.fileList1= new Array(); |
| | | this.form.worktypeIdList = [{ worktypeId: '' }] |
| | | // this.$refs['$upload'].clearFiles()//初始化导入组件 |
| | | this.allCompany() |
| | | this.allShops() |
| | | // 新建 |
| | | 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= new Array(); |
| | | this.form.worktypeIdList = [{ worktypeId: '' }] |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = res[key] |
| | | } |
| | | 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.typeWork = res |
| | | }) |
| | | }, |
| | | |
| | | // 查询全部保险公司 |
| | | allCompany () { |
| | | all({ dataType: 2, status: 0 }) |