|
@@ -212,6 +212,7 @@ import receiptDocuments from "@/utils/print/receiptDocuments";
|
|
import qrCodeList from "@/utils/print/qrCodeList.js";
|
|
import qrCodeList from "@/utils/print/qrCodeList.js";
|
|
import { xmlStr2XmlObj } from "@/utils/bpmn/tool";
|
|
import { xmlStr2XmlObj } from "@/utils/bpmn/tool";
|
|
import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
|
|
import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
|
|
|
|
+import { camelCase, toUnderline } from "@/utils";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "processMange",
|
|
name: "processMange",
|
|
@@ -394,15 +395,65 @@ export default {
|
|
});
|
|
});
|
|
if (subFormList && subFormList.length > 0) {
|
|
if (subFormList && subFormList.length > 0) {
|
|
subFormList.forEach((item) => {
|
|
subFormList.forEach((item) => {
|
|
- let showValue = item.showValue[0];
|
|
|
|
|
|
+ let showValue = null;
|
|
|
|
+ if (item.showValue) {
|
|
|
|
+ showValue = item.showValue[0];
|
|
|
|
+ }
|
|
|
|
+ let defaultValue = {};
|
|
if (showValue) {
|
|
if (showValue) {
|
|
- item.showTemplate.resultMap = mainForm.showValue;
|
|
|
|
|
|
+ if (item.showTemplate.spare == "2") {
|
|
|
|
+ //动态表格表单
|
|
|
|
+ let batch = {},
|
|
|
|
+ tableName = item.formItem?.split(".")?.[0];
|
|
|
|
+ batch[tableName] = item.showValue.map((item) => item.resultMap);
|
|
|
|
+ defaultValue = JSON.parse(JSON.stringify(batch));
|
|
|
|
+ console.log(JSON.parse(JSON.stringify(batch)));
|
|
|
|
+ // 所有字段驼峰转下划线
|
|
|
|
+ batch[tableName].forEach((i) => {
|
|
|
|
+ for (const key of Object.keys(i)) {
|
|
|
|
+ i[toUnderline(key)] = i[key];
|
|
|
|
+ if (toUnderline(key) != key) {
|
|
|
|
+ delete i[key];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ item.showTemplate.resultMap = [
|
|
|
|
+ {
|
|
|
|
+ batch,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ } else {
|
|
|
|
+ for (const key of Object.keys(item.showValue[0].resultMap)) {
|
|
|
|
+ item.showValue[0].resultMap[toUnderline(key)] =
|
|
|
|
+ item.showValue[0].resultMap[key];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ item.showTemplate.resultMap = [item.showValue[0].resultMap];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.formList.push({
|
|
this.formList.push({
|
|
template: item.showTemplate,
|
|
template: item.showTemplate,
|
|
tableName: item.formItem?.split(".")?.[0],
|
|
tableName: item.formItem?.split(".")?.[0],
|
|
});
|
|
});
|
|
|
|
+ // this.FormNameList.push({
|
|
|
|
+ // tableName: item.formItem?.split(".")?.[0],
|
|
|
|
+ // formItem: item.formItem,
|
|
|
|
+ // relateFormItem: item.relateMainItem,
|
|
|
|
+ // formType: item.showTemplate.spare == "2" ? "batch" : "normal",
|
|
|
|
+ // defaultValue,
|
|
|
|
+ // insertMap: item.insertMap,
|
|
|
|
+ // });
|
|
});
|
|
});
|
|
|
|
+ // subFormList.forEach((item) => {
|
|
|
|
+ // let showValue = item.showValue[0];
|
|
|
|
+ // if (showValue) {
|
|
|
|
+ // item.showTemplate.resultMap = mainForm.showValue;
|
|
|
|
+ // }
|
|
|
|
+ // this.formList.push({
|
|
|
|
+ // template: item.showTemplate,
|
|
|
|
+ // tableName: item.formItem?.split(".")?.[0],
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toDetail(row) {
|
|
toDetail(row) {
|