| @@ -82,7 +82,7 @@ module.exports = class extends Base { | |||||
| const taskNo = model.generateTaskNo(); | const taskNo = model.generateTaskNo(); | ||||
| // 构建标题 | // 构建标题 | ||||
| const typeLabels = { id_photos: '实名认证照片', documents: '上传资料', signs: '签字材料' }; | |||||
| const typeLabels = { id_photos: '实名认证照片', documents: '上传资料', signs: '签字材料', sample_photos: '送检信息附件' }; | |||||
| const title = file_types.map(t => typeLabels[t] || t).join('、'); | const title = file_types.map(t => typeLabels[t] || t).join('、'); | ||||
| const id = await model.add({ | const id = await model.add({ | ||||
| @@ -240,6 +240,19 @@ module.exports = class extends think.Service { | |||||
| } | } | ||||
| } | } | ||||
| // 送检信息附件(送检单照片) | |||||
| if (fileTypes.includes('sample_photos')) { | |||||
| let samplePhotos = []; | |||||
| try { | |||||
| samplePhotos = Array.isArray(p.sample_photos) ? p.sample_photos : JSON.parse(p.sample_photos || '[]'); | |||||
| } catch (e) { /* ignore */ } | |||||
| samplePhotos.forEach((url, idx) => { | |||||
| if (url) { | |||||
| files.push({ name: `送检单照片_${idx + 1}${this._getExt(url)}`, url }); | |||||
| } | |||||
| }); | |||||
| } | |||||
| if (files.length) { | if (files.length) { | ||||
| list.push({ folder, files }); | list.push({ folder, files }); | ||||
| } | } | ||||
| @@ -301,6 +301,7 @@ | |||||
| <el-checkbox label="id_photos">实名认证照片(身份证人像面、国徽面、免冠照片)</el-checkbox> | <el-checkbox label="id_photos">实名认证照片(身份证人像面、国徽面、免冠照片)</el-checkbox> | ||||
| <el-checkbox label="documents">上传资料(检查报告单、出院诊断证明书)</el-checkbox> | <el-checkbox label="documents">上传资料(检查报告单、出院诊断证明书)</el-checkbox> | ||||
| <el-checkbox label="signs">签字材料(收入声明、信息同意书、声明与承诺等)</el-checkbox> | <el-checkbox label="signs">签字材料(收入声明、信息同意书、声明与承诺等)</el-checkbox> | ||||
| <el-checkbox label="sample_photos">送检信息附件(送检单照片)</el-checkbox> | |||||
| </div> | </div> | ||||
| </el-checkbox-group> | </el-checkbox-group> | ||||
| <template #footer> | <template #footer> | ||||