|
|
@@ -62,11 +62,10 @@ export function analysisFormData (formData, isDetail) {
|
|
|
export function getBillGroup (groupItem, groupIndex, isDetail) {
|
|
|
let billGroup = new BillGroupModel()
|
|
|
billGroup.group = groupItem.groupTitle
|
|
|
- billGroup.isForm = groupItem.isForm
|
|
|
+ billGroup.isForm = (groupItem.isForm === undefined) ? true:groupItem.isForm;
|
|
|
billGroup.keyField = groupItem.keyField
|
|
|
billGroup.billCaller = groupItem.groupCaller
|
|
|
billGroup.groupIndex = groupIndex
|
|
|
-
|
|
|
let showBillFields = [], hideBillFields = []
|
|
|
if (!isObjEmpty(groupItem.fieldList)) {
|
|
|
groupItem.fieldList.forEach((fieldItem, filedIndex) => {
|
|
|
@@ -86,13 +85,20 @@ export function getBillGroup (groupItem, groupIndex, isDetail) {
|
|
|
billModel.caption = fieldItem.caption
|
|
|
|
|
|
billModel.type = fieldItem.type//前端类型
|
|
|
- billModel.sourcetype = fieldItem.sourcetype//字段原类型
|
|
|
- if (billModel.type === 'MF' && !billGroup.isForm) {
|
|
|
+ billModel.sourceType = fieldItem.sourceType//字段原类型
|
|
|
+ if (billModel.type === 'MF' && isDetail) {
|
|
|
//移动端不支持从表的放大镜多选类型
|
|
|
//将多选类型识别为放大镜单选类型
|
|
|
billModel.type = 'DF'
|
|
|
}
|
|
|
-
|
|
|
+ // CBG 视同多选放大镜
|
|
|
+ if (billModel.type === 'CBG') {
|
|
|
+ if(isDetail){
|
|
|
+ billModel.type = 'DF'
|
|
|
+ }else {
|
|
|
+ billModel.type = 'MF'
|
|
|
+ }
|
|
|
+ }
|
|
|
billModel.value = fieldItem.value
|
|
|
billModel.display = fieldItem.display
|
|
|
billModel.defValue = fieldItem.defValue
|
|
|
@@ -106,8 +112,27 @@ export function getBillGroup (groupItem, groupIndex, isDetail) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- //添加附件
|
|
|
+ //CBG 数据处理
|
|
|
+ if (billModel.value&&billModel.sourceType === 'CBG'&&billModel.logicType
|
|
|
+ && billModel.value.indexOf(";")>=0
|
|
|
+ ){
|
|
|
+ console.log(billModel.value,billModel.logicType);
|
|
|
+ var logicTypeList = billModel.logicType.split(";");
|
|
|
+ var cbgVList= billModel.value.split(";");
|
|
|
+ if(cbgVList.length === logicTypeList.length){
|
|
|
+ var cbgRealV = "";
|
|
|
+ cbgVList.forEach((cbgv,index) => {
|
|
|
+ if (String(cbgv) === '1') {
|
|
|
+ cbgRealV = cbgRealV+"#"+logicTypeList[index];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(cbgRealV){
|
|
|
+ cbgRealV = cbgRealV.substring(1);
|
|
|
+ }
|
|
|
+ billModel.value = cbgRealV;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //添加附件
|
|
|
let filePaths = fieldItem.filePaths
|
|
|
if (billIsEnclosure(billModel)) {
|
|
|
let fileList = []
|