|
|
@@ -6,9 +6,11 @@ import { isObjEmpty, isObjNull } from './common.util'
|
|
|
import BillGroupModel from '../../model/common/BillGroupModel'
|
|
|
import BillModel, {
|
|
|
billGetDisplay,
|
|
|
- billGetValue,
|
|
|
+ billGetValue, billIsEnclosure,
|
|
|
} from '../../model/common/BillModel'
|
|
|
import { message } from 'antd'
|
|
|
+import store from '../../redux/store/store'
|
|
|
+import { _baseURL } from '../../configs/api.config'
|
|
|
|
|
|
export function analysisFormData (formData, isDetail) {
|
|
|
let billGroupList = []
|
|
|
@@ -104,6 +106,30 @@ export function getBillGroup (groupItem, groupIndex, isDetail) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ //添加附件
|
|
|
+ let filePaths = fieldItem.filePaths
|
|
|
+ if (billIsEnclosure(billModel)) {
|
|
|
+ let fileList = []
|
|
|
+ if (!isObjEmpty(filePaths)) {
|
|
|
+ filePaths.forEach((item, index) => {
|
|
|
+ let fileObj = {}
|
|
|
+ fileObj.uid = 'rc-upload-' + new Date().getTime() + '-' + index
|
|
|
+ fileObj.enclosureId = item.fp_id
|
|
|
+ fileObj.url = item.pathurl || (_baseURL +
|
|
|
+ '/common/downloadbyId.action?id=' +
|
|
|
+ fileObj.enclosureId
|
|
|
+ + '&master=' + store.getState().userState.accountCode)
|
|
|
+ fileObj.name = item.fp_name
|
|
|
+ fileObj.size = item.fp_size
|
|
|
+ fileObj.status = 'done'
|
|
|
+
|
|
|
+ fileList.push(fileObj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ billModel.fileList = fileList
|
|
|
+ }
|
|
|
+
|
|
|
+ //是否是显示字段,添加到show或hide列表
|
|
|
if (billModel.isdefault) {
|
|
|
showBillFields.push(billModel)
|
|
|
} else {
|