k94314517
2025-07-01 f7a3d41075e00498f7033475108c0bcd86cda733
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <el-collapse v-model="activeNames">
            <el-collapse-item title="模板及材料清单上传" name="1">
                <div class="item">
                    <div class="item_upload">
                        <div class="item_upload_info1">上传盖章文件模版</div>
                        <div class="item_upload_info2">
                            <i class="el-icon-info"></i>
                            <span>多文件请打包上传</span>
                        </div>
                        <div class="item_upload_upload">
                            <el-upload
                                class="upload-demo"
                                :action="uploadImgUrl"
                                :on-remove="handleRemove1"
                                :on-success="handleFileSuccess1"
                                :on-error="uploadError1"
                                :limit="1"
                                :on-exceed="handleExceed"
                                :file-list="form.lpStampTempFileCopy">
                                <el-button size="small" type="primary">点击上传</el-button>
                            </el-upload>
                        </div>
                    </div>
                    <div class="item_upload">
                        <div class="item_upload_info1">上传理赔材料一览表</div>
                        <div class="item_upload_info2">
                            <i class="el-icon-info"></i>
                            <span>建议上传PDF格式的文件</span>
                        </div>
                        <div class="item_upload_upload">
                            <el-upload
                                class="upload-demo"
                                :action="uploadImgUrl"
                                :on-remove="handleRemove"
                                :on-success="handleFileSuccess"
                                :on-error="uploadError"
                                :limit="1"
                                :on-exceed="handleExceed"
                                :file-list="form.lpFileCopy">
                                <el-button size="small" type="primary">点击上传</el-button>
                            </el-upload>
                        </div>
                    </div>
                </div>
            </el-collapse-item>
            <el-collapse-item title="员工关系证明" name="2">
                <div class="title">文件上传说明</div>
                <RichEditor :richData="form.lpYggxFileInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor1" :readonly="false"/>
            </el-collapse-item>
            <el-collapse-item title="门诊" name="3">
                <div class="title">文件上传说明</div>
                <RichEditor :richData="form.lpMzFileInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor2" :readonly="false"/>
            </el-collapse-item>
            <el-collapse-item title="住院" name="4">
                <div class="title">文件上传说明</div>
                <RichEditor :richData="form.lpZyFileInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor3" :readonly="false"/>
            </el-collapse-item>
            <el-collapse-item title="伤残" name="5">
                <div class="title">文件上传说明</div>
                <RichEditor :richData="form.lpScFileInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor4" :readonly="false"/>
            </el-collapse-item>
            <el-collapse-item title="其他" name="6">
                <div class="title">文件上传说明</div>
                <RichEditor :richData="form.lpOtherFileInfo" :styleEditor="'border: 1px solid #ccc;display: inline-block;'" @getWangedditor="getWangedditor5" :readonly="false"/>
            </el-collapse-item>
        </el-collapse>
    </GlobalWindow>
</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('只能上传一个文件!')
    }
  }
}
</script>
 
<style lang="scss" scoped>
    .title {
        width: 100%;
        color: #9A9A9A;
        font-size: 14px;
    }
    .item {
        width: 100%;
        display: flex;
        align-items: start;
        .item_upload {
            width: 300px;
            display: flex;
            flex-direction: column;
            .item_upload_info1 {
                color: rgba(16,16,16,1);
                font-size: 14px;
                margin-bottom: 7px;
            }
            .item_upload_info2 {
                display: flex;
                align-items: center;
                margin-bottom: 16px;
                i {
                    color: #9A9A9A;
                    font-size: 18px;
                }
                span {
                    color: rgba(154,154,154,1);
                    font-size: 14px;
                    margin-left: 5px;
                }
            }
        }
    }
</style>