lyflowchart 1.0.115 → 1.0.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionsConfig-BuvSvRbv.js +395 -0
- package/dist/ActionsConfig-BuvSvRbv.js.map +1 -0
- package/dist/ApprovalEditorModal-suKPJ-vN.js +48 -0
- package/dist/ApprovalEditorModal-suKPJ-vN.js.map +1 -0
- package/dist/CancelModal-BUi3ieI8.js +61 -0
- package/dist/CancelModal-BUi3ieI8.js.map +1 -0
- package/dist/Cell_click_approve-Dr83RkI-.js +244 -0
- package/dist/Cell_click_approve-Dr83RkI-.js.map +1 -0
- package/dist/JsonTags-BbWLqghI.js +66 -0
- package/dist/JsonTags-BbWLqghI.js.map +1 -0
- package/dist/MyProcess-FWGEwQcv.js +26434 -0
- package/dist/MyProcess-FWGEwQcv.js.map +1 -0
- package/dist/MyProcess.vue.d.ts +991 -0
- package/dist/approval-BW2WjPxY.js +167 -0
- package/dist/approval-BW2WjPxY.js.map +1 -0
- package/dist/approval-BaVHder3.js +18 -0
- package/dist/approval-BaVHder3.js.map +1 -0
- package/dist/approvalHistory-B2gpQbFC.js +868 -0
- package/dist/approvalHistory-B2gpQbFC.js.map +1 -0
- package/dist/approvalHistoryViewModal-DgLpv2ot.js +114 -0
- package/dist/approvalHistoryViewModal-DgLpv2ot.js.map +1 -0
- package/dist/approvalPageConfig-D0zPXOUf.js +2437 -0
- package/dist/approvalPageConfig-D0zPXOUf.js.map +1 -0
- package/dist/approveLeftConfig-BOU_UgHp.js +136 -0
- package/dist/approveLeftConfig-BOU_UgHp.js.map +1 -0
- package/dist/codeHistoryViewModal-BfSjIbEU.js +103 -0
- package/dist/codeHistoryViewModal-BfSjIbEU.js.map +1 -0
- package/dist/columnTables-DLwtgcC7.js +1272 -0
- package/dist/columnTables-DLwtgcC7.js.map +1 -0
- package/dist/components/Cell_click_approve.vue.d.ts +5 -0
- package/dist/components/Cell_click_data_source.vue.d.ts +6 -0
- package/dist/components/Process/common/bpmnUtils.d.ts +8 -0
- package/dist/components/Process/common/global.d.ts +16 -0
- package/dist/components/Process/common/index.d.ts +5 -0
- package/dist/components/Process/component/JsonTags2.vue.d.ts +60 -0
- package/dist/components/Process/component/ValueInput2.vue.d.ts +74 -0
- package/dist/components/Process/component/columnNameField2.vue.d.ts +51 -0
- package/dist/components/Process/component/data.d.ts +157 -0
- package/dist/components/Process/customPanel/CustomContextPad.d.ts +31 -0
- package/dist/components/Process/customPanel/CustomPalette.d.ts +89 -0
- package/dist/components/Process/customPanel/customTranslate.d.ts +1 -0
- package/dist/components/Process/customPanel/index.d.ts +8 -0
- package/dist/components/Process/designer.vue.d.ts +589 -0
- package/dist/components/Process/flowable/init.d.ts +1 -0
- package/dist/components/Process/index.vue.d.ts +812 -0
- package/dist/components/Process/lang/zh.d.ts +249 -0
- package/dist/components/Process/panel/ButtonsPanel.vue.d.ts +24 -0
- package/dist/components/Process/panel/PropertiesPanel.vue.d.ts +24 -0
- package/dist/components/Process/panel/commonPanel.vue.d.ts +40 -0
- package/dist/components/Process/panel/conditionPanel.vue.d.ts +271 -0
- package/dist/components/Process/panel/executionListener.vue.d.ts +66 -0
- package/dist/components/Process/panel/formPanel.vue.d.ts +7 -0
- package/dist/components/Process/panel/multiInstance.vue.d.ts +33 -0
- package/dist/components/Process/panel/otherPanel.vue.d.ts +17 -0
- package/dist/components/Process/panel/taskListener.vue.d.ts +64 -0
- package/dist/components/Process/panel/taskPanel.vue.d.ts +254 -0
- package/dist/components/Process/viewer/index.vue.d.ts +41 -0
- package/dist/components/approval/ApprovalEditorModal.vue.d.ts +26 -0
- package/dist/components/approval/CostCompanySelect.vue.d.ts +29 -0
- package/dist/components/approval/CostDepartmentSelect.vue.d.ts +35 -0
- package/dist/components/approval/CreateByCascader.vue.d.ts +27 -0
- package/dist/components/approval/CreateBySelect.vue.d.ts +35 -0
- package/dist/components/approval/PostionCascader.vue.d.ts +26 -0
- package/dist/components/approval/SystemTime.vue.d.ts +38 -0
- package/dist/components/approval/approvalViewId.d.ts +36 -0
- package/dist/components/approval/components/CancelModal.vue.d.ts +25 -0
- package/dist/components/approval/components/FormCodeInput.vue.d.ts +33 -0
- package/dist/components/approval/components/FormContextInput.vue.d.ts +33 -0
- package/dist/components/approval/components/FormFlowOrgInput.vue.d.ts +40 -0
- package/dist/components/approval/components/actionsBar.vue.d.ts +17 -0
- package/dist/components/approval/components/approvalHistory/approvalHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/dataStoreSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalHistory/dataStoreSettingHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/flowHistoryViewModal.vue.d.ts +41 -0
- package/dist/components/approval/components/approvalHistory/flowSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalHistory/index.vue.d.ts +212 -0
- package/dist/components/approval/components/approvalHistory/pageSettingHistory.vue.d.ts +55 -0
- package/dist/components/approval/components/approvalPageConfig/ActionsConfig.vue.d.ts +112 -0
- package/dist/components/approval/components/approvalPageConfig/BaseConditions.vue.d.ts +205 -0
- package/dist/components/approval/components/approvalPageConfig/CodeEditorWraper.vue.d.ts +51 -0
- package/dist/components/approval/components/approvalPageConfig/ColumnConfig.vue.d.ts +145 -0
- package/dist/components/approval/components/approvalPageConfig/ConditionFieldMulType.vue.d.ts +137 -0
- package/dist/components/approval/components/approvalPageConfig/JsonInput.vue.d.ts +38 -0
- package/dist/components/approval/components/approvalPageConfig/JsonTags.vue.d.ts +26 -0
- package/dist/components/approval/components/approvalPageConfig/JsonText.vue.d.ts +36 -0
- package/dist/components/approval/components/approvalPageConfig/approveLeftConfig.vue.d.ts +6 -0
- package/dist/components/approval/components/approvalPageConfig/baseConfig.vue.d.ts +10 -0
- package/dist/components/approval/components/approvalPageConfig/cellEdit.vue.d.ts +23 -0
- package/dist/components/approval/components/approvalPageConfig/configSync.vue.d.ts +76 -0
- package/dist/components/approval/components/approvalPageConfig/confirmInput.vue.d.ts +26 -0
- package/dist/components/approval/components/approvalPageConfig/defaultOperatorSelect.vue.d.ts +18 -0
- package/dist/components/approval/components/approvalPageConfig/index.vue.d.ts +11 -0
- package/dist/components/approval/components/approvalPageConfig/jsonConfig.vue.d.ts +16 -0
- package/dist/components/approval/components/approvalPageConfig/layoutSetting.vue.d.ts +9 -0
- package/dist/components/approval/components/approvalPageConfig/leftColumn.vue.d.ts +1184 -0
- package/dist/components/approval/components/approvalPageConfig/middleColumn.vue.d.ts +145 -0
- package/dist/components/approval/components/approvalPageConfig/operatorSelect.vue.d.ts +18 -0
- package/dist/components/approval/components/approvalPageConfig/searchConfig.vue.d.ts +166 -0
- package/dist/components/approval/components/approvalPageConfig/tableConfig.vue.d.ts +802 -0
- package/dist/components/approval/components/codeHistory/codeHistory.vue.d.ts +53 -0
- package/dist/components/approval/components/codeHistory/codeHistoryViewModal.vue.d.ts +32 -0
- package/dist/components/approval/components/columnDataList.vue.d.ts +454 -0
- package/dist/components/approval/components/columnForm.vue.d.ts +26 -0
- package/dist/components/approval/components/columnTables.vue.d.ts +502 -0
- package/dist/components/approval/components/columnUnknown.vue.d.ts +2 -0
- package/dist/components/approval/components/dataStoreConfig/ConditionConfig.vue.d.ts +199 -0
- package/dist/components/approval/components/dataStoreConfig/ValueInput.vue.d.ts +37 -0
- package/dist/components/approval/components/dataStoreConfig/dataSourceDetial.vue.d.ts +22 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreConfig.vue.d.ts +554 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreConfigItem.vue.d.ts +434 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreTest.vue.d.ts +39 -0
- package/dist/components/approval/components/dataStoreConfig/dataStoreTestsItem.vue.d.ts +17 -0
- package/dist/components/approval/components/dataStoreConfig/formField.vue.d.ts +28 -0
- package/dist/components/approval/components/dataStoreConfig/formFieldMulType.vue.d.ts +96 -0
- package/dist/components/approval/components/dataStoreConfig/selectExcelColumn.vue.d.ts +26 -0
- package/dist/components/approval/components/dataStoreConfig/selectExcelType.vue.d.ts +28 -0
- package/dist/components/approval/components/debugCode/debugCode.vue.d.ts +214 -0
- package/dist/components/approval/components/drawerDataList.vue.d.ts +504 -0
- package/dist/components/approval/components/drawerTablesList.vue.d.ts +551 -0
- package/dist/components/approval/components/flowConfig/flowConfig.vue.d.ts +1097 -0
- package/dist/components/approval/components/flowConfig/selectCcGroup.vue.d.ts +9 -0
- package/dist/components/approval/components/flowConfig/selectUsers.vue.d.ts +9 -0
- package/dist/components/approval/components/modelTablesList.vue.d.ts +551 -0
- package/dist/components/approval/components/pageConfigHistory.vue.d.ts +2 -0
- package/dist/components/approval/components/search.vue.d.ts +238 -0
- package/dist/components/approval/components/searchSummary.vue.d.ts +100 -0
- package/dist/components/approval/components/table.vue.d.ts +416 -0
- package/dist/components/approval/components/tableModal.vue.d.ts +84 -0
- package/dist/components/approval/configs/approval/default.d.ts +11 -0
- package/dist/components/approval/configs/approval/recordActions.d.ts +22 -0
- package/dist/components/approval/core.vue.d.ts +53 -0
- package/dist/components/approval/example_code/example_code.d.ts +11 -0
- package/dist/components/approval/index.d.ts +18 -0
- package/dist/components/approval/index.vue.d.ts +2 -0
- package/dist/components/approval/migrate/index.d.ts +1 -0
- package/dist/components/approval/migrate/v0001.d.ts +2 -0
- package/dist/components/approval/store/context.d.ts +48 -0
- package/dist/components/approval/store/debugCode.d.ts +7 -0
- package/dist/components/approval/store/settingsState.d.ts +15 -0
- package/dist/components/approval/typing.d.ts +210 -0
- package/dist/components/approval/useApprovalRecordActions.d.ts +83 -0
- package/dist/components/approval/utils.d.ts +164 -0
- package/dist/components/approval_for_details.vue.d.ts +9 -0
- package/dist/components/flow/ElInputTag/index.vue.d.ts +46 -0
- package/dist/components/flow/Expression/index.vue.d.ts +48 -0
- package/dist/components/flow/Role/index.vue.d.ts +68 -0
- package/dist/components/flow/User/index.vue.d.ts +76 -0
- package/dist/config/packed-config.d.ts +26 -0
- package/dist/constants.d.ts +1 -0
- package/dist/core-BOc9ch_5.js +1631 -0
- package/dist/core-BOc9ch_5.js.map +1 -0
- package/dist/dataStoreSettingHistoryViewModal-D_so-KLp.js +114 -0
- package/dist/dataStoreSettingHistoryViewModal-D_so-KLp.js.map +1 -0
- package/dist/debugCode-Cm9-WiUG.js +565 -0
- package/dist/debugCode-Cm9-WiUG.js.map +1 -0
- package/dist/debugCode-dD1YnQSD.js +11 -0
- package/dist/debugCode-dD1YnQSD.js.map +1 -0
- package/dist/default-VdDMlY4e.js +560 -0
- package/dist/default-VdDMlY4e.js.map +1 -0
- package/dist/example_code-C_xF8RRG.js +129 -0
- package/dist/example_code-C_xF8RRG.js.map +1 -0
- package/dist/flowHistoryViewModal-D8DJP7Te.js +109 -0
- package/dist/flowHistoryViewModal-D8DJP7Te.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +507 -26691
- package/dist/index.js.map +1 -1
- package/dist/init-plugin-fQTSQzui.js +48 -0
- package/dist/init-plugin-fQTSQzui.js.map +1 -0
- package/dist/init-plugin.d.ts +57 -0
- package/dist/leftColumn-CsPjufue.js +209 -0
- package/dist/leftColumn-CsPjufue.js.map +1 -0
- package/dist/lyflowchart.css +1 -1
- package/dist/middleColumn-C7M6-eVo.js +107 -0
- package/dist/middleColumn-C7M6-eVo.js.map +1 -0
- package/dist/recordActions-BgFlNsGU.js +51 -0
- package/dist/recordActions-BgFlNsGU.js.map +1 -0
- package/dist/settingsState-CI81PG-i.js +19 -0
- package/dist/settingsState-CI81PG-i.js.map +1 -0
- package/dist/style.d.ts +3 -0
- package/dist/styles.d.ts +7 -0
- package/dist/tableConfig-uLXue-BS.js +2408 -0
- package/dist/tableConfig-uLXue-BS.js.map +1 -0
- package/dist/tableModal-BcYfVL02.js +124 -0
- package/dist/tableModal-BcYfVL02.js.map +1 -0
- package/dist/useApprovalRecordActions-BQ6MgV2L.js +843 -0
- package/dist/useApprovalRecordActions-BQ6MgV2L.js.map +1 -0
- package/dist/utils/StrUtil.d.ts +52 -0
- package/dist/utils/function.d.ts +8 -0
- package/dist/utils-CLet2gLV.js +420 -0
- package/dist/utils-CLet2gLV.js.map +1 -0
- package/dist/v0001-OaBeBCXI.js +4 -0
- package/dist/v0001-OaBeBCXI.js.map +1 -0
- package/dist/{Cell_click_data_source-C8WEsBGB.js → viewer-Dv3kQsMf.js} +1839 -2724
- package/dist/viewer-Dv3kQsMf.js.map +1 -0
- package/dist/vue-print-next-HRweUmNi.js +683 -0
- package/dist/vue-print-next-HRweUmNi.js.map +1 -0
- package/package.json +39 -8
- package/dist/Cell_click_data_source-C8WEsBGB.js.map +0 -1
|
@@ -0,0 +1,1631 @@
|
|
|
1
|
+
import { _ as e, a as t, c as n, o as r, v as i } from "./init-plugin-fQTSQzui.js";
|
|
2
|
+
import { t as a } from "./CancelModal-BUi3ieI8.js";
|
|
3
|
+
import { n as o, r as s, t as c } from "./approval-BW2WjPxY.js";
|
|
4
|
+
import { c as l, d as u, l as d, p as f } from "./utils-CLet2gLV.js";
|
|
5
|
+
import { a as ee, c as te, d as p, f as m, i as h, l as g, n as _, o as ne, p as re, r as v, s as ie, t as y, u as ae } from "./columnTables-DLwtgcC7.js";
|
|
6
|
+
import { n as oe, t as se } from "./debugCode-dD1YnQSD.js";
|
|
7
|
+
import { Fragment as b, Teleport as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createTextVNode as D, createVNode as O, defineAsyncComponent as k, defineComponent as A, inject as j, onMounted as M, onUnmounted as ce, openBlock as N, provide as le, reactive as ue, ref as P, renderList as F, resolveComponent as I, resolveDynamicComponent as L, toDisplayString as R, unref as de, watch as z, withCtx as B } from "vue";
|
|
8
|
+
import { Modal as V, message as H } from "ant-design-vue";
|
|
9
|
+
import { cloneDeep as U, debounce as fe } from "lodash";
|
|
10
|
+
import pe from "mitt";
|
|
11
|
+
import { useResizeObserver as W } from "@vueuse/core";
|
|
12
|
+
import { useForm as me } from "ant-design-vue/es/form";
|
|
13
|
+
import G from "dayjs";
|
|
14
|
+
//#region src/components/approval/SystemTime.vue?vue&type=script&lang.ts
|
|
15
|
+
var K = A({
|
|
16
|
+
name: "CreateBySelect",
|
|
17
|
+
components: {},
|
|
18
|
+
props: {
|
|
19
|
+
value: { type: Object },
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:value", "change"],
|
|
26
|
+
setup(e, { emit: t }) {
|
|
27
|
+
let n = P([]), r = (e, n) => {
|
|
28
|
+
if (!e) {
|
|
29
|
+
t("update:value", null), t("change", null);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
t("update:value", {
|
|
33
|
+
date: e.format("YYYY-MM-DD"),
|
|
34
|
+
date_ch: e.format("YYYY年MM月DD日"),
|
|
35
|
+
date_short: e.format("YYYYMMDD")
|
|
36
|
+
}), t("change", n);
|
|
37
|
+
}, i = S(() => {
|
|
38
|
+
if (e.value) try {
|
|
39
|
+
return G(e.value.date, "YYYY-MM-DD");
|
|
40
|
+
} catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
else return null;
|
|
44
|
+
});
|
|
45
|
+
return z(() => e.value, (e) => {
|
|
46
|
+
e?.date || r(G(), !1);
|
|
47
|
+
}, {
|
|
48
|
+
immediate: !0,
|
|
49
|
+
deep: !0
|
|
50
|
+
}), {
|
|
51
|
+
dataList: n,
|
|
52
|
+
innerValue: i,
|
|
53
|
+
handleChange: r,
|
|
54
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/approval/SystemTime.vue
|
|
60
|
+
function q(e, t, n, r, i, a) {
|
|
61
|
+
let o = I("a-date-picker");
|
|
62
|
+
return N(), C(o, {
|
|
63
|
+
size: "small",
|
|
64
|
+
value: e.innerValue,
|
|
65
|
+
disabled: e.disabled,
|
|
66
|
+
onChange: t[0] ||= (t) => e.handleChange(t, !0)
|
|
67
|
+
}, null, 8, ["value", "disabled"]);
|
|
68
|
+
}
|
|
69
|
+
var he = /* @__PURE__ */ i(K, [["render", q]]), ge = A({
|
|
70
|
+
name: "FormCodeInput",
|
|
71
|
+
components: {},
|
|
72
|
+
props: {
|
|
73
|
+
value: { type: Object },
|
|
74
|
+
disabled: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
emits: ["update:value", "change"],
|
|
80
|
+
setup(e, { emit: t }) {
|
|
81
|
+
return {
|
|
82
|
+
dataList: P([]),
|
|
83
|
+
innerValue: S(() => e.value ? e.value.code : null),
|
|
84
|
+
handleChange: (e) => {
|
|
85
|
+
if (!e) {
|
|
86
|
+
t("update:value", null), t("change", !0);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
t("update:value", { code: e }), t("change", !0);
|
|
90
|
+
},
|
|
91
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/approval/components/FormCodeInput.vue
|
|
97
|
+
function J(e, t, n, r, i, a) {
|
|
98
|
+
let o = I("a-input");
|
|
99
|
+
return N(), T("span", null, [O(o, {
|
|
100
|
+
size: "small",
|
|
101
|
+
value: e.innerValue,
|
|
102
|
+
disabled: e.disabled,
|
|
103
|
+
"onUpdate:value": e.handleChange
|
|
104
|
+
}, null, 8, [
|
|
105
|
+
"value",
|
|
106
|
+
"disabled",
|
|
107
|
+
"onUpdate:value"
|
|
108
|
+
])]);
|
|
109
|
+
}
|
|
110
|
+
var _e = /* @__PURE__ */ i(ge, [["render", J], ["__scopeId", "data-v-819f8123"]]), Y = A({
|
|
111
|
+
name: "FormContextInput",
|
|
112
|
+
components: {},
|
|
113
|
+
props: {
|
|
114
|
+
value: { type: Object },
|
|
115
|
+
disabled: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !1
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
emits: ["update:value", "change"],
|
|
121
|
+
setup(e, { emit: t }) {
|
|
122
|
+
return {
|
|
123
|
+
dataList: P([]),
|
|
124
|
+
innerValue: S(() => e.value?.context ? e.value.context : null),
|
|
125
|
+
handleChange: (e) => {
|
|
126
|
+
if (!e) {
|
|
127
|
+
t("update:value", null), t("change", !0);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
t("update:value", { context: e }), t("change", !0);
|
|
131
|
+
},
|
|
132
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/components/approval/components/FormContextInput.vue
|
|
138
|
+
function X(e, t, n, r, i, a) {
|
|
139
|
+
let o = I("a-input");
|
|
140
|
+
return N(), T("span", null, [O(o, {
|
|
141
|
+
size: "small",
|
|
142
|
+
value: e.innerValue,
|
|
143
|
+
disabled: e.disabled,
|
|
144
|
+
"onUpdate:value": e.handleChange
|
|
145
|
+
}, null, 8, [
|
|
146
|
+
"value",
|
|
147
|
+
"disabled",
|
|
148
|
+
"onUpdate:value"
|
|
149
|
+
])]);
|
|
150
|
+
}
|
|
151
|
+
var ve = /* @__PURE__ */ i(Y, [["render", X]]), ye = A({
|
|
152
|
+
name: "CostDepartmentSelect",
|
|
153
|
+
components: {},
|
|
154
|
+
props: {
|
|
155
|
+
value: { type: Object },
|
|
156
|
+
disabled: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
default: !1
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
emits: ["change"],
|
|
162
|
+
setup(e, { emit: t }) {
|
|
163
|
+
let n = P([]), i = P([]), a = (e) => {
|
|
164
|
+
let t = [], n = /* @__PURE__ */ new Map();
|
|
165
|
+
return e.forEach((e) => {
|
|
166
|
+
let r = e.cost_company.id, i = e.cost_company.name, a = e.department.id, o = e.department.name, s = e.business_person.id, c = e.business_person.name, l = n.get(r);
|
|
167
|
+
l || (l = {
|
|
168
|
+
value: r,
|
|
169
|
+
label: i,
|
|
170
|
+
children: []
|
|
171
|
+
}, n.set(r, l), t.push(l));
|
|
172
|
+
let u = l.children.find((e) => e.value === a);
|
|
173
|
+
u || (u = {
|
|
174
|
+
value: a,
|
|
175
|
+
label: o,
|
|
176
|
+
children: []
|
|
177
|
+
}, l.children.push(u)), u.children.some((e) => e.value === s) || u.children.push({
|
|
178
|
+
value: s,
|
|
179
|
+
label: c
|
|
180
|
+
});
|
|
181
|
+
}), t;
|
|
182
|
+
}, o = async () => {
|
|
183
|
+
let t = await r({ is_active: !0 }, "/approve/get_cascaded_my_business_person");
|
|
184
|
+
if (t && t.length > 0) {
|
|
185
|
+
i.value = t, n.value = a(t);
|
|
186
|
+
let r = e.value?.cost_company, o = e.value?.cost_department, s = e.value?.create_by;
|
|
187
|
+
(!r?.id || !o?.id || !s?.id) && c([
|
|
188
|
+
i.value[0].cost_company.id,
|
|
189
|
+
i.value[0].department.id,
|
|
190
|
+
i.value[0].business_person.id
|
|
191
|
+
], !1);
|
|
192
|
+
} else i.value = [], n.value = [];
|
|
193
|
+
}, s = S(() => {
|
|
194
|
+
let t = e.value?.cost_company, n = e.value?.cost_department, r = e.value?.create_by;
|
|
195
|
+
return t?.id && n?.id && r?.id ? [
|
|
196
|
+
t.id,
|
|
197
|
+
n.id,
|
|
198
|
+
r.id
|
|
199
|
+
] : null;
|
|
200
|
+
}), c = (n, r) => {
|
|
201
|
+
let a = () => {
|
|
202
|
+
Object.assign(e.value, {
|
|
203
|
+
cost_company: null,
|
|
204
|
+
cost_department: null,
|
|
205
|
+
create_by: null,
|
|
206
|
+
person_cost_company: null,
|
|
207
|
+
person_department: null,
|
|
208
|
+
person_position: null
|
|
209
|
+
}), t("change", r);
|
|
210
|
+
};
|
|
211
|
+
if (!n || n.length === 0) {
|
|
212
|
+
a();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
let o = n[0], s = n[1], c = n[2], l = i.value.find((e) => e.cost_company.id === o && e.department.id === s && e.business_person.id === c);
|
|
216
|
+
if (l) {
|
|
217
|
+
let n = {
|
|
218
|
+
cost_company: l.cost_company,
|
|
219
|
+
cost_department: l.department,
|
|
220
|
+
create_by: l.business_person,
|
|
221
|
+
person_cost_company: null,
|
|
222
|
+
person_department: null,
|
|
223
|
+
person_position: null
|
|
224
|
+
};
|
|
225
|
+
Object.assign(e.value, n), t("change", r);
|
|
226
|
+
} else a();
|
|
227
|
+
};
|
|
228
|
+
return z(() => e.value, (e) => {
|
|
229
|
+
if (i.value && i.value.length > 0) {
|
|
230
|
+
let t = e?.cost_company, n = e?.cost_department, r = e?.create_by;
|
|
231
|
+
(!t?.id || !n?.id || !r?.id) && c([
|
|
232
|
+
i.value[0].cost_company.id,
|
|
233
|
+
i.value[0].department.id,
|
|
234
|
+
i.value[0].business_person.id
|
|
235
|
+
], !1);
|
|
236
|
+
}
|
|
237
|
+
}, { deep: !0 }), M(() => {
|
|
238
|
+
o();
|
|
239
|
+
}), {
|
|
240
|
+
dataSource: n,
|
|
241
|
+
handleChange: c,
|
|
242
|
+
filterOption: (e, t) => t.some((t) => t.label.toLowerCase().indexOf(e.toLowerCase()) > -1),
|
|
243
|
+
innerValue: s
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region src/components/approval/CreateByCascader.vue
|
|
249
|
+
function Z(e, t, n, r, i, a) {
|
|
250
|
+
let o = I("a-cascader");
|
|
251
|
+
return N(), C(o, {
|
|
252
|
+
value: e.innerValue,
|
|
253
|
+
"onUpdate:value": t[0] ||= (t) => e.innerValue = t,
|
|
254
|
+
options: e.dataSource,
|
|
255
|
+
placeholder: "请选择制单人",
|
|
256
|
+
onChange: t[1] ||= (t) => e.handleChange(t, !0),
|
|
257
|
+
allowClear: !1,
|
|
258
|
+
disabled: e.disabled,
|
|
259
|
+
style: { "min-height": "24px" }
|
|
260
|
+
}, null, 8, [
|
|
261
|
+
"value",
|
|
262
|
+
"options",
|
|
263
|
+
"disabled"
|
|
264
|
+
]);
|
|
265
|
+
}
|
|
266
|
+
var be = /* @__PURE__ */ i(ye, [["render", Z]]), Q = A({
|
|
267
|
+
name: "PostionCascader",
|
|
268
|
+
components: {},
|
|
269
|
+
props: {
|
|
270
|
+
value: { type: Object },
|
|
271
|
+
disabled: {
|
|
272
|
+
type: Boolean,
|
|
273
|
+
default: !1
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
emits: ["change"],
|
|
277
|
+
setup(e, { emit: t }) {
|
|
278
|
+
let n = P([]), i = P([]), a = (e) => {
|
|
279
|
+
let t = [], n = /* @__PURE__ */ new Map();
|
|
280
|
+
return e.forEach((e) => {
|
|
281
|
+
let r = e.cost_company.id, i = e.cost_company.name, a = e.department.id, o = e.department.name, s = e.position.id, c = e.position.name, l = n.get(r);
|
|
282
|
+
l || (l = {
|
|
283
|
+
value: r,
|
|
284
|
+
label: i,
|
|
285
|
+
children: []
|
|
286
|
+
}, n.set(r, l), t.push(l));
|
|
287
|
+
let u = l.children.find((e) => e.value === a);
|
|
288
|
+
u || (u = {
|
|
289
|
+
value: a,
|
|
290
|
+
label: o,
|
|
291
|
+
children: []
|
|
292
|
+
}, l.children.push(u)), u.children.some((e) => e.value === s) || u.children.push({
|
|
293
|
+
value: s,
|
|
294
|
+
label: c
|
|
295
|
+
});
|
|
296
|
+
}), t;
|
|
297
|
+
}, o = async () => {
|
|
298
|
+
let t = e.value?.create_by?.id, o = e.value?.create_date?.date;
|
|
299
|
+
if (!t || !o) {
|
|
300
|
+
i.value = [], n.value = [];
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
let s = await r({
|
|
304
|
+
business_person_id: t,
|
|
305
|
+
create_date: o
|
|
306
|
+
}, "/approve/get_cascaded_person_position");
|
|
307
|
+
if (s && s.length > 0) {
|
|
308
|
+
i.value = s, n.value = a(s);
|
|
309
|
+
let t = e.value?.person_cost_company, r = e.value?.person_department, o = e.value?.person_position;
|
|
310
|
+
(!t?.id || !r?.id || !o?.id) && c([
|
|
311
|
+
i.value[0].cost_company.id,
|
|
312
|
+
i.value[0].department.id,
|
|
313
|
+
i.value[0].position.id
|
|
314
|
+
], !1);
|
|
315
|
+
} else i.value = [], n.value = [];
|
|
316
|
+
}, s = S(() => {
|
|
317
|
+
let t = e.value?.person_cost_company, n = e.value?.person_department, r = e.value?.person_position;
|
|
318
|
+
return t?.id && n?.id && r?.id ? [
|
|
319
|
+
t.id,
|
|
320
|
+
n.id,
|
|
321
|
+
r.id
|
|
322
|
+
] : null;
|
|
323
|
+
}), c = (n, r) => {
|
|
324
|
+
let a = () => {
|
|
325
|
+
Object.assign(e.value, {
|
|
326
|
+
person_cost_company: null,
|
|
327
|
+
person_department: null,
|
|
328
|
+
person_position: null
|
|
329
|
+
}), t("change", r);
|
|
330
|
+
};
|
|
331
|
+
if (!n || n.length < 3) {
|
|
332
|
+
a();
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
let [o, s, c] = n, l = i.value.find((e) => e.cost_company.id === o && e.department.id === s && e.position.id === c);
|
|
336
|
+
if (l) {
|
|
337
|
+
let n = {
|
|
338
|
+
person_cost_company: l.cost_company,
|
|
339
|
+
person_department: l.department,
|
|
340
|
+
person_position: l.position
|
|
341
|
+
};
|
|
342
|
+
Object.assign(e.value, n), t("change", r);
|
|
343
|
+
} else a();
|
|
344
|
+
};
|
|
345
|
+
z(() => [e.value?.create_by?.id, e.value?.create_date?.date], ([e, t], [n, r]) => {
|
|
346
|
+
(e !== n || t !== r) && o();
|
|
347
|
+
});
|
|
348
|
+
let l = fe(() => {
|
|
349
|
+
let t = e.value;
|
|
350
|
+
if (i.value && i.value.length > 0) {
|
|
351
|
+
let e = t?.person_cost_company, n = t?.person_department, r = t?.person_position;
|
|
352
|
+
(!e?.id || !n?.id || !r?.id) && c([
|
|
353
|
+
i.value[0].cost_company.id,
|
|
354
|
+
i.value[0].department.id,
|
|
355
|
+
i.value[0].position.id
|
|
356
|
+
], !1);
|
|
357
|
+
}
|
|
358
|
+
}, 200);
|
|
359
|
+
return z(() => e.value, (e) => {
|
|
360
|
+
l();
|
|
361
|
+
}, { deep: !0 }), M(() => {
|
|
362
|
+
o();
|
|
363
|
+
}), {
|
|
364
|
+
dataSource: n,
|
|
365
|
+
handleChange: c,
|
|
366
|
+
innerValue: s
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/components/approval/PostionCascader.vue
|
|
372
|
+
function xe(e, t, n, r, i, a) {
|
|
373
|
+
let o = I("a-cascader");
|
|
374
|
+
return N(), C(o, {
|
|
375
|
+
value: e.innerValue,
|
|
376
|
+
"onUpdate:value": t[0] ||= (t) => e.innerValue = t,
|
|
377
|
+
options: e.dataSource,
|
|
378
|
+
placeholder: "请选择职位",
|
|
379
|
+
onChange: t[1] ||= (t) => e.handleChange(t, !0),
|
|
380
|
+
allowClear: !1,
|
|
381
|
+
disabled: e.disabled,
|
|
382
|
+
style: { "min-height": "24px" }
|
|
383
|
+
}, null, 8, [
|
|
384
|
+
"value",
|
|
385
|
+
"options",
|
|
386
|
+
"disabled"
|
|
387
|
+
]);
|
|
388
|
+
}
|
|
389
|
+
var Se = /* @__PURE__ */ i(Q, [["render", xe]]), Ce = A({
|
|
390
|
+
name: "FormCodeInput",
|
|
391
|
+
components: {},
|
|
392
|
+
props: {
|
|
393
|
+
value: { type: Object },
|
|
394
|
+
modelType: {
|
|
395
|
+
type: String,
|
|
396
|
+
required: !0
|
|
397
|
+
},
|
|
398
|
+
disabled: {
|
|
399
|
+
type: Boolean,
|
|
400
|
+
default: !1
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
emits: ["update:value", "change"],
|
|
404
|
+
setup(e, { emit: t }) {
|
|
405
|
+
let n = S(() => e.value ? e.value.name : null), i = async () => {
|
|
406
|
+
let n = await r({ menu_flag: e.modelType }, "/approve/query_flow_node_list");
|
|
407
|
+
n && n.data?.length && t("update:value", {
|
|
408
|
+
id: n.data[0].flow_org_id,
|
|
409
|
+
name: n.data[0].flow_org__name
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
return M(() => {
|
|
413
|
+
i();
|
|
414
|
+
}), { innerValue: n };
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
//#endregion
|
|
418
|
+
//#region src/components/approval/components/FormFlowOrgInput.vue
|
|
419
|
+
function we(e, t, n, r, i, a) {
|
|
420
|
+
let o = I("a-input");
|
|
421
|
+
return N(), T("span", null, [O(o, {
|
|
422
|
+
size: "small",
|
|
423
|
+
value: e.innerValue,
|
|
424
|
+
readonly: !0,
|
|
425
|
+
disabled: e.disabled
|
|
426
|
+
}, null, 8, ["value", "disabled"])]);
|
|
427
|
+
}
|
|
428
|
+
var Te = /* @__PURE__ */ i(Ce, [["render", we]]), Ee = { class: "form-body" }, De = { class: "base-info" }, Oe = {
|
|
429
|
+
key: 0,
|
|
430
|
+
class: "form-footer"
|
|
431
|
+
}, ke = /* @__PURE__ */ i(/* @__PURE__ */ A({
|
|
432
|
+
name: "ApprovalColumnForm",
|
|
433
|
+
__name: "columnForm",
|
|
434
|
+
props: {
|
|
435
|
+
columnConfig: {},
|
|
436
|
+
height: {},
|
|
437
|
+
modelType: {},
|
|
438
|
+
eventBus: {},
|
|
439
|
+
globalData: {},
|
|
440
|
+
topFormRef: {},
|
|
441
|
+
approvalConfig: {}
|
|
442
|
+
},
|
|
443
|
+
emits: ["globalDataChange"],
|
|
444
|
+
setup(e, { emit: i }) {
|
|
445
|
+
let s = e, c = i, l = re(), u = P(U(s.columnConfig.form.model)), f = ue(U(s.columnConfig.form.rules)), ee = P({}), p = P(!1), m = P(!1), g = P(null), _ = P(!1), ne = process.env.NODE_ENV !== "production", y = P({}), ae = P({}), oe = P(), se = P(null), x = P(!1), A = P(null), j = P([]), le, F = P(/* @__PURE__ */ new Map()), L = P(/* @__PURE__ */ new Map()), pe = async () => {
|
|
446
|
+
try {
|
|
447
|
+
let { config: e } = await o(s.modelType), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
448
|
+
for (let r of e || []) for (let e of r.fields || []) {
|
|
449
|
+
let r = !!(e.data_column && e.data_column.is_modifiable);
|
|
450
|
+
e.source_type === "form" && Array.isArray(e.source_value) && e.source_value.length ? t.set(e.source_value[e.source_value.length - 1], r) : e.source_type === "global" && Array.isArray(e.source_value) && e.source_value.length && n.set(e.source_value[0], r);
|
|
451
|
+
}
|
|
452
|
+
F.value = t, L.value = n;
|
|
453
|
+
} catch (e) {
|
|
454
|
+
console.error("加载数据存储配置失败,编辑态字段可编辑性控制未生效", e), F.value = /* @__PURE__ */ new Map(), L.value = /* @__PURE__ */ new Map();
|
|
455
|
+
}
|
|
456
|
+
}, W = (e) => {
|
|
457
|
+
if (!e) return !1;
|
|
458
|
+
let t = F.value.get(e);
|
|
459
|
+
return t === void 0 ? !0 : !t;
|
|
460
|
+
}, G = ["form_code"], K = (e) => {
|
|
461
|
+
if (G.includes(e)) return !0;
|
|
462
|
+
let t = L.value.get(e);
|
|
463
|
+
return t === void 0 ? !1 : !t;
|
|
464
|
+
}, q = (e) => {
|
|
465
|
+
let t = e?.editable_mode;
|
|
466
|
+
return t === "disabled" || t === "enabled" ? t : "auto";
|
|
467
|
+
}, ge = (e, t) => {
|
|
468
|
+
let n = q(e), r = n === "auto" ? t : n;
|
|
469
|
+
return r === "disabled" ? !0 : r === "enabled" ? !1 : !!e.disabled || W(e.key);
|
|
470
|
+
}, J = (e) => {
|
|
471
|
+
if (!e || !e.dynamicFieldList) return e;
|
|
472
|
+
let t = U(e), n = (e, t = "auto") => {
|
|
473
|
+
for (let r of e || []) {
|
|
474
|
+
let e = q(r), i = e === "auto" ? t : e;
|
|
475
|
+
r.children && Array.isArray(r.children) && r.children.length && n(r.children, i), r.form && r.form.dynamicFieldList && n(r.form.dynamicFieldList, i), r.key && !(r.children && r.children.length) && !(r.form && r.form.dynamicFieldList) && (r.disabled = ge(r, t));
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
return n(t.dynamicFieldList), t;
|
|
479
|
+
}, Y = S(() => _.value ? J(s.columnConfig.form) : s.columnConfig.form);
|
|
480
|
+
z(_, (e) => {
|
|
481
|
+
e || (F.value = /* @__PURE__ */ new Map(), L.value = /* @__PURE__ */ new Map());
|
|
482
|
+
});
|
|
483
|
+
let X = ([e, t]) => {
|
|
484
|
+
let n = {};
|
|
485
|
+
Object.keys(f).forEach((r) => {
|
|
486
|
+
r in e && !t[r] && (n[r] = f[r]);
|
|
487
|
+
});
|
|
488
|
+
let r = me(e, n);
|
|
489
|
+
le = r.validate, ee.value = r.validateInfos;
|
|
490
|
+
}, ye = async (e) => {
|
|
491
|
+
e.add_key ? (delete j.value[e.add_key], X([u.value, j.value])) : e.remove_key && (j.value[e.remove_key] = !0, X([u.value, j.value]));
|
|
492
|
+
}, Z = (e) => {
|
|
493
|
+
if (!e.action) {
|
|
494
|
+
console.error("未定义action");
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
we({
|
|
498
|
+
code: e.code,
|
|
499
|
+
action: e,
|
|
500
|
+
params: {
|
|
501
|
+
context: l.contexts[s.modelType],
|
|
502
|
+
settings: e.settings
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}, Q = fe(async (e = null) => {
|
|
506
|
+
xe(e);
|
|
507
|
+
}, 1e3), xe = async (e = null) => {
|
|
508
|
+
e === null && (e = u.value), l[te](s.modelType, e), await r({
|
|
509
|
+
name: s.modelType,
|
|
510
|
+
context: l.contexts[s.modelType]
|
|
511
|
+
}, "/approve/update_user_page_context");
|
|
512
|
+
}, Ce = async () => {
|
|
513
|
+
y.value = {}, p.value = !1, u.value = U(s.columnConfig.form.model), l[h](s.modelType), await r({
|
|
514
|
+
name: s.modelType,
|
|
515
|
+
context: null
|
|
516
|
+
}, "/approve/update_user_page_context"), s.eventBus.emit("reinit");
|
|
517
|
+
}, we = async ({ code: e, action: n, params: i }) => {
|
|
518
|
+
let a = n.action;
|
|
519
|
+
try {
|
|
520
|
+
if (a === "save") Q();
|
|
521
|
+
else if (a === "save_approve") {
|
|
522
|
+
let n = !1;
|
|
523
|
+
try {
|
|
524
|
+
await le();
|
|
525
|
+
} catch (e) {
|
|
526
|
+
console.log(e), n = !0;
|
|
527
|
+
}
|
|
528
|
+
for (let e of Object.values(ae.value)) if (e) try {
|
|
529
|
+
await e();
|
|
530
|
+
} catch (e) {
|
|
531
|
+
console.log(e), n = !0;
|
|
532
|
+
}
|
|
533
|
+
if (s.topFormRef) try {
|
|
534
|
+
await s.topFormRef.validate();
|
|
535
|
+
} catch (e) {
|
|
536
|
+
console.log(e), n = !0;
|
|
537
|
+
}
|
|
538
|
+
try {
|
|
539
|
+
await oe.value.validate();
|
|
540
|
+
} catch {
|
|
541
|
+
n = !0;
|
|
542
|
+
}
|
|
543
|
+
if (n) {
|
|
544
|
+
let e = se.value?.querySelectorAll(".ant-form-item-has-error") ?? [];
|
|
545
|
+
e.length > 0 && e[0].scrollIntoView({
|
|
546
|
+
behavior: "smooth",
|
|
547
|
+
block: "center"
|
|
548
|
+
});
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
if (e) {
|
|
552
|
+
let n;
|
|
553
|
+
try {
|
|
554
|
+
n = await t(e, i);
|
|
555
|
+
} catch (e) {
|
|
556
|
+
H.error(e.message);
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
p.value ? m.value ? await d({
|
|
560
|
+
source_approve_record_id: g.value,
|
|
561
|
+
data: {
|
|
562
|
+
...n.data,
|
|
563
|
+
globalData: s.globalData
|
|
564
|
+
},
|
|
565
|
+
page_setting_history_id: l.contexts?.[s.modelType]?.current_history_id
|
|
566
|
+
}) : await r({
|
|
567
|
+
approve_record_id: y.value.id,
|
|
568
|
+
data: {
|
|
569
|
+
...n.data,
|
|
570
|
+
globalData: s.globalData
|
|
571
|
+
},
|
|
572
|
+
context: s.globalData.context?.context || ""
|
|
573
|
+
}, "/approve/update_approve_record") : await r({
|
|
574
|
+
menu_flag: s.modelType,
|
|
575
|
+
data: {
|
|
576
|
+
...n.data,
|
|
577
|
+
globalData: s.globalData
|
|
578
|
+
},
|
|
579
|
+
page_setting_history_id: l.contexts?.[s.modelType]?.current_history_id,
|
|
580
|
+
context: s.globalData.context?.context || "",
|
|
581
|
+
number: s.globalData.number
|
|
582
|
+
}, "/approve/create_approve_record"), H.success("提交成功");
|
|
583
|
+
let a = p.value, o = m.value;
|
|
584
|
+
Ce(), s.eventBus.emit("saved", {
|
|
585
|
+
isEdit: a,
|
|
586
|
+
modifyMode: o
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
} else if (a === "commit_approve") {
|
|
590
|
+
if (e) {
|
|
591
|
+
let n;
|
|
592
|
+
try {
|
|
593
|
+
n = await t(e, i);
|
|
594
|
+
} catch (e) {
|
|
595
|
+
console.error(e), H.error(e.message);
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
let { ids: a } = n;
|
|
599
|
+
if (!a) {
|
|
600
|
+
H.error("代码未返回ids");
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
if (!(a instanceof Array)) {
|
|
604
|
+
H.error("ids应为数组");
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
for (let e of a) await r({ approve_record_id: e }, "/approve/commit_approve_record");
|
|
608
|
+
s.eventBus.emit("reload_table"), H.success("提交成功");
|
|
609
|
+
}
|
|
610
|
+
} else if (a === "delete_approve") e && V.confirm({
|
|
611
|
+
title: "提示",
|
|
612
|
+
content: "是否确认要执行删除操作",
|
|
613
|
+
async onOk() {
|
|
614
|
+
let n;
|
|
615
|
+
try {
|
|
616
|
+
n = await t(e, i);
|
|
617
|
+
} catch (e) {
|
|
618
|
+
console.error(e), H.error(e.message);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
let { ids: a } = n;
|
|
622
|
+
if (!a) {
|
|
623
|
+
H.error("代码未返回ids");
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
if (!(a instanceof Array)) {
|
|
627
|
+
H.error("ids应为数组");
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
for (let e of a) await r({ approve_record_id: e }, "/approve/delete_approve_record");
|
|
631
|
+
s.eventBus.emit("reload_table"), H.success("删除成功");
|
|
632
|
+
},
|
|
633
|
+
onCancel() {}
|
|
634
|
+
});
|
|
635
|
+
else if (a === "cancel_approve") e && V.confirm({
|
|
636
|
+
title: "提示",
|
|
637
|
+
content: "是否确认要执行撤销操作",
|
|
638
|
+
async onOk() {
|
|
639
|
+
let n;
|
|
640
|
+
try {
|
|
641
|
+
n = await t(e, i);
|
|
642
|
+
} catch (e) {
|
|
643
|
+
console.error(e), H.error(e.message);
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
let { ids: a } = n;
|
|
647
|
+
if (!a) {
|
|
648
|
+
H.error("代码未返回ids");
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
if (!(a instanceof Array)) {
|
|
652
|
+
H.error("ids应为数组");
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
for (let e of a) await r({ approve_record_id: e }, "/approve/cancel_approve_record");
|
|
656
|
+
s.eventBus.emit("reload_table"), H.success("撤销成功");
|
|
657
|
+
},
|
|
658
|
+
onCancel() {}
|
|
659
|
+
});
|
|
660
|
+
else if (a === "cancel_agree_approve") {
|
|
661
|
+
if (e) {
|
|
662
|
+
let n;
|
|
663
|
+
try {
|
|
664
|
+
n = await t(e, i);
|
|
665
|
+
} catch (e) {
|
|
666
|
+
console.error(e), H.error(e.message);
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
let { ids: r } = n;
|
|
670
|
+
if (!r) {
|
|
671
|
+
H.error("代码未返回ids");
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
if (!(r instanceof Array)) {
|
|
675
|
+
H.error("ids应为数组");
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
if (r.length !== 1) {
|
|
679
|
+
H.error("每次仅能作废一个审批单");
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
A.value = r[0], x.value = !0;
|
|
683
|
+
}
|
|
684
|
+
} else if (a === "send_reminder") e && V.confirm({
|
|
685
|
+
title: "提示",
|
|
686
|
+
content: "是否确认要执行催办操作",
|
|
687
|
+
async onOk() {
|
|
688
|
+
let n;
|
|
689
|
+
try {
|
|
690
|
+
n = await t(e, i);
|
|
691
|
+
} catch (e) {
|
|
692
|
+
console.error(e), H.error(e.message);
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
let { ids: a } = n;
|
|
696
|
+
if (!a) {
|
|
697
|
+
H.error("代码未返回ids");
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (!(a instanceof Array)) {
|
|
701
|
+
H.error("ids应为数组");
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
for (let e of a) await r({ process_instance_id: e }, "/lyapprove/manul_recreate_task");
|
|
705
|
+
H.success("催办成功");
|
|
706
|
+
},
|
|
707
|
+
onCancel() {}
|
|
708
|
+
});
|
|
709
|
+
else if (a === "clear_form") V.confirm({
|
|
710
|
+
title: "确定要清空表单吗?",
|
|
711
|
+
onOk: () => {
|
|
712
|
+
Ce();
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
else if (a === "process" && e) {
|
|
716
|
+
let n;
|
|
717
|
+
try {
|
|
718
|
+
n = await t(e, i);
|
|
719
|
+
} catch (e) {
|
|
720
|
+
console.error(e), H.error(e.message);
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
n != null && (u.value = n, Q());
|
|
724
|
+
}
|
|
725
|
+
} finally {}
|
|
726
|
+
}, ke = ({ data: e, state: t }) => {
|
|
727
|
+
u.value = e, y.value = t, p.value = !0, m.value = !!(t && t.modifyMode), g.value = t && t.source_approve_record_id || null, _.value = m.value || !!(t && t.modify_source_id), _.value && pe(), l[ie](s.modelType, !0, t), xe();
|
|
728
|
+
}, Ae = ({ data: e }) => {
|
|
729
|
+
u.value = e, y.value = {}, p.value = !1, m.value = !1, g.value = null, _.value = !1, F.value = /* @__PURE__ */ new Map(), L.value = /* @__PURE__ */ new Map(), l[ie](s.modelType, !1, {}), xe();
|
|
730
|
+
};
|
|
731
|
+
M(() => {
|
|
732
|
+
s.eventBus.on("run_action", we), s.eventBus.on("update_form", ke), s.eventBus.on("copy_form", Ae);
|
|
733
|
+
let { formModel: e, isEdit: t, editState: n } = l.contexts?.[s.modelType] || {};
|
|
734
|
+
e && (u.value = e), X([u.value, j.value]), t && (p.value = t, y.value = n, m.value = !!(y.value && y.value.modifyMode), g.value = y.value && y.value.source_approve_record_id || null, _.value = m.value || !!(y.value && y.value.modify_source_id), _.value && pe());
|
|
735
|
+
});
|
|
736
|
+
let $ = (e) => {
|
|
737
|
+
c("globalDataChange", e);
|
|
738
|
+
};
|
|
739
|
+
z(() => u.value, (e) => {
|
|
740
|
+
Q(e), X([e, j.value]);
|
|
741
|
+
}, { deep: !0 }), ce(() => {
|
|
742
|
+
s.eventBus.off("run_action", we), s.eventBus.off("update_form", ke), s.eventBus.off("copy_form", Ae);
|
|
743
|
+
});
|
|
744
|
+
let je = { showTables: async ({ title: e, tables: t }) => {
|
|
745
|
+
let r = null;
|
|
746
|
+
for (let e of s.approvalConfig?.columns || []) if (e.type === "tables") {
|
|
747
|
+
r = e;
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
return new Promise(async (i, a) => {
|
|
751
|
+
n(ue({
|
|
752
|
+
component: k(() => import("./tableModal-BcYfVL02.js")),
|
|
753
|
+
columnConfig: r,
|
|
754
|
+
height: s.height,
|
|
755
|
+
eventBus: s.eventBus,
|
|
756
|
+
modelType: s.modelType,
|
|
757
|
+
approvalConfig: s.approvalConfig,
|
|
758
|
+
tables: t || [],
|
|
759
|
+
title: e || "数据选择",
|
|
760
|
+
open: !0,
|
|
761
|
+
hideAllButtons: !0,
|
|
762
|
+
ok: (e) => {
|
|
763
|
+
i(e);
|
|
764
|
+
},
|
|
765
|
+
cancel: () => {
|
|
766
|
+
i(null);
|
|
767
|
+
}
|
|
768
|
+
}));
|
|
769
|
+
});
|
|
770
|
+
} };
|
|
771
|
+
return (t, n) => {
|
|
772
|
+
let r = I("a-tag"), i = I("a-form-item"), o = I("a-col"), s = I("a-row"), c = I("a-form"), d = I("a-card"), f = I("form-render-3");
|
|
773
|
+
return N(), T(b, null, [E("div", {
|
|
774
|
+
class: "form-container",
|
|
775
|
+
ref_key: "formContainerRef",
|
|
776
|
+
ref: se
|
|
777
|
+
}, [E("div", Ee, [E("div", De, [O(d, { "body-style": { padding: "10px 10px 0" } }, {
|
|
778
|
+
extra: B(() => [p.value ? (N(), C(r, {
|
|
779
|
+
key: 0,
|
|
780
|
+
color: "blue"
|
|
781
|
+
}, {
|
|
782
|
+
default: B(() => [D(" 流水号:" + R(y.value.number) + "【编辑】 ", 1)]),
|
|
783
|
+
_: 1
|
|
784
|
+
})) : (N(), C(r, {
|
|
785
|
+
key: 1,
|
|
786
|
+
color: "blue"
|
|
787
|
+
}, {
|
|
788
|
+
default: B(() => [D(" 流水号:" + R(e.globalData.number), 1)]),
|
|
789
|
+
_: 1
|
|
790
|
+
}))]),
|
|
791
|
+
title: B(() => [...n[10] ||= [D("基础信息", -1)]]),
|
|
792
|
+
default: B(() => [O(c, {
|
|
793
|
+
layout: "vertical",
|
|
794
|
+
size: "small",
|
|
795
|
+
model: e.globalData,
|
|
796
|
+
ref_key: "formRef",
|
|
797
|
+
ref: oe
|
|
798
|
+
}, {
|
|
799
|
+
default: B(() => [O(s, { gutter: 36 }, {
|
|
800
|
+
default: B(() => [
|
|
801
|
+
O(o, { span: 12 }, {
|
|
802
|
+
default: B(() => [O(i, {
|
|
803
|
+
label: "单据编号",
|
|
804
|
+
name: "form_code",
|
|
805
|
+
rules: [{ required: !0 }]
|
|
806
|
+
}, {
|
|
807
|
+
default: B(() => [O(_e, {
|
|
808
|
+
value: e.globalData.form_code,
|
|
809
|
+
"onUpdate:value": n[0] ||= (t) => e.globalData.form_code = t,
|
|
810
|
+
disabled: K("form_code"),
|
|
811
|
+
onChange: n[1] ||= (e) => $(e)
|
|
812
|
+
}, null, 8, ["value", "disabled"])]),
|
|
813
|
+
_: 1
|
|
814
|
+
})]),
|
|
815
|
+
_: 1
|
|
816
|
+
}),
|
|
817
|
+
O(o, { span: 12 }, {
|
|
818
|
+
default: B(() => [O(i, {
|
|
819
|
+
label: "制单日期",
|
|
820
|
+
name: "create_date",
|
|
821
|
+
rules: [{ required: !0 }]
|
|
822
|
+
}, {
|
|
823
|
+
default: B(() => [O(he, {
|
|
824
|
+
value: e.globalData.create_date,
|
|
825
|
+
"onUpdate:value": n[2] ||= (t) => e.globalData.create_date = t,
|
|
826
|
+
disabled: K("create_date"),
|
|
827
|
+
onChange: n[3] ||= (e) => $(e),
|
|
828
|
+
style: { width: "100%" }
|
|
829
|
+
}, null, 8, ["value", "disabled"])]),
|
|
830
|
+
_: 1
|
|
831
|
+
})]),
|
|
832
|
+
_: 1
|
|
833
|
+
}),
|
|
834
|
+
O(o, { span: 8 }, {
|
|
835
|
+
default: B(() => [O(i, {
|
|
836
|
+
label: "流程组织",
|
|
837
|
+
name: "create_by",
|
|
838
|
+
validateTrigger: !1
|
|
839
|
+
}, {
|
|
840
|
+
default: B(() => [O(Te, {
|
|
841
|
+
value: e.globalData.flow_org,
|
|
842
|
+
"onUpdate:value": n[4] ||= (t) => e.globalData.flow_org = t,
|
|
843
|
+
"model-type": e.modelType,
|
|
844
|
+
disabled: K("flow_org"),
|
|
845
|
+
onChange: n[5] ||= (e) => $(e)
|
|
846
|
+
}, null, 8, [
|
|
847
|
+
"value",
|
|
848
|
+
"model-type",
|
|
849
|
+
"disabled"
|
|
850
|
+
])]),
|
|
851
|
+
_: 1
|
|
852
|
+
})]),
|
|
853
|
+
_: 1
|
|
854
|
+
}),
|
|
855
|
+
O(o, { span: 8 }, {
|
|
856
|
+
default: B(() => [O(i, {
|
|
857
|
+
label: "制单人",
|
|
858
|
+
name: "create_by",
|
|
859
|
+
validateTrigger: !1,
|
|
860
|
+
rules: ne ? [] : [{ required: !0 }]
|
|
861
|
+
}, {
|
|
862
|
+
default: B(() => [O(be, {
|
|
863
|
+
value: e.globalData,
|
|
864
|
+
disabled: K("create_by"),
|
|
865
|
+
onChange: n[6] ||= (e) => $(e)
|
|
866
|
+
}, null, 8, ["value", "disabled"])]),
|
|
867
|
+
_: 1
|
|
868
|
+
}, 8, ["rules"])]),
|
|
869
|
+
_: 1
|
|
870
|
+
}),
|
|
871
|
+
O(o, { span: 8 }, {
|
|
872
|
+
default: B(() => [O(i, {
|
|
873
|
+
label: "职位",
|
|
874
|
+
name: "person_position",
|
|
875
|
+
validateTrigger: !1,
|
|
876
|
+
rules: ne ? [] : [{ required: !0 }]
|
|
877
|
+
}, {
|
|
878
|
+
default: B(() => [O(Se, {
|
|
879
|
+
value: e.globalData,
|
|
880
|
+
disabled: K("person_position"),
|
|
881
|
+
onChange: n[7] ||= (e) => $(e)
|
|
882
|
+
}, null, 8, ["value", "disabled"])]),
|
|
883
|
+
_: 1
|
|
884
|
+
}, 8, ["rules"])]),
|
|
885
|
+
_: 1
|
|
886
|
+
})
|
|
887
|
+
]),
|
|
888
|
+
_: 1
|
|
889
|
+
}), O(i, {
|
|
890
|
+
label: "流程主题",
|
|
891
|
+
name: "context",
|
|
892
|
+
rules: [{ required: !0 }]
|
|
893
|
+
}, {
|
|
894
|
+
default: B(() => [O(ve, {
|
|
895
|
+
value: e.globalData.context,
|
|
896
|
+
"onUpdate:value": n[8] ||= (t) => e.globalData.context = t,
|
|
897
|
+
disabled: K("context"),
|
|
898
|
+
onChange: $,
|
|
899
|
+
style: { width: "100%" }
|
|
900
|
+
}, null, 8, ["value", "disabled"])]),
|
|
901
|
+
_: 1
|
|
902
|
+
})]),
|
|
903
|
+
_: 1
|
|
904
|
+
}, 8, ["model"])]),
|
|
905
|
+
_: 1
|
|
906
|
+
})]), e.columnConfig.form?.dynamicFieldList ? (N(), C(f, {
|
|
907
|
+
key: 0,
|
|
908
|
+
form: Y.value,
|
|
909
|
+
model: u.value,
|
|
910
|
+
options: e.columnConfig.form?.options,
|
|
911
|
+
validateInfos: ee.value,
|
|
912
|
+
onUpdate_model: ye,
|
|
913
|
+
alwaysShowGroup: !0,
|
|
914
|
+
context: de(l).contexts?.[e.modelType],
|
|
915
|
+
nestValidate: ae.value,
|
|
916
|
+
"worker-host-functions": je,
|
|
917
|
+
"lock-structure": _.value
|
|
918
|
+
}, null, 8, [
|
|
919
|
+
"form",
|
|
920
|
+
"model",
|
|
921
|
+
"options",
|
|
922
|
+
"validateInfos",
|
|
923
|
+
"context",
|
|
924
|
+
"nestValidate",
|
|
925
|
+
"lock-structure"
|
|
926
|
+
])) : w("", !0)]), e.columnConfig.actions && e.columnConfig.actions.length > 0 ? (N(), T("div", Oe, [O(v, {
|
|
927
|
+
actions: e.columnConfig.actions,
|
|
928
|
+
onClick: Z,
|
|
929
|
+
params: { context: de(l).contexts?.[e.modelType] || {} }
|
|
930
|
+
}, null, 8, ["actions", "params"])])) : w("", !0)], 512), O(a, {
|
|
931
|
+
"cancel-modal-show": x.value,
|
|
932
|
+
"onUpdate:cancelModalShow": n[9] ||= (e) => x.value = e,
|
|
933
|
+
id: A.value,
|
|
934
|
+
"event-bus": e.eventBus
|
|
935
|
+
}, null, 8, [
|
|
936
|
+
"cancel-modal-show",
|
|
937
|
+
"id",
|
|
938
|
+
"event-bus"
|
|
939
|
+
])], 64);
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
}), [["__scopeId", "data-v-7f57d432"]]), Ae = A({
|
|
943
|
+
name: "ApprovalColumnDataList",
|
|
944
|
+
props: {
|
|
945
|
+
columnConfig: {
|
|
946
|
+
type: Object,
|
|
947
|
+
required: !0
|
|
948
|
+
},
|
|
949
|
+
height: {
|
|
950
|
+
type: Number,
|
|
951
|
+
required: !0
|
|
952
|
+
},
|
|
953
|
+
eventBus: {
|
|
954
|
+
type: Object,
|
|
955
|
+
required: !0
|
|
956
|
+
},
|
|
957
|
+
modelType: {
|
|
958
|
+
type: String,
|
|
959
|
+
required: !0
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
setup(e) {
|
|
963
|
+
let t = P(null), n = P(null);
|
|
964
|
+
return W(t, (e) => {
|
|
965
|
+
n.value = e[0].contentRect.height;
|
|
966
|
+
}), {
|
|
967
|
+
headerRef: t,
|
|
968
|
+
contentHeight: S(() => t.value && e.height ? e.height - n.value : null)
|
|
969
|
+
};
|
|
970
|
+
},
|
|
971
|
+
components: { ApprovalTable: _ }
|
|
972
|
+
}), $ = { class: "data-list-container" }, je = {
|
|
973
|
+
class: "data-list-header",
|
|
974
|
+
ref: "headerRef"
|
|
975
|
+
}, Me = { class: "data-list-title" }, Ne = { class: "data-list-body" };
|
|
976
|
+
function Pe(e, t, n, r, i, a) {
|
|
977
|
+
let o = I("ApprovalTable");
|
|
978
|
+
return N(), T("div", $, [E("div", je, [E("div", Me, [E("b", null, R(e.columnConfig.table?.title), 1)])], 512), E("div", Ne, [e.columnConfig.table ? (N(), C(o, {
|
|
979
|
+
key: 0,
|
|
980
|
+
config: e.columnConfig.table,
|
|
981
|
+
height: e.contentHeight,
|
|
982
|
+
modelType: e.modelType,
|
|
983
|
+
"event-bus": e.eventBus
|
|
984
|
+
}, null, 8, [
|
|
985
|
+
"config",
|
|
986
|
+
"height",
|
|
987
|
+
"modelType",
|
|
988
|
+
"event-bus"
|
|
989
|
+
])) : w("", !0)])]);
|
|
990
|
+
}
|
|
991
|
+
var Fe = /* @__PURE__ */ i(Ae, [["render", Pe], ["__scopeId", "data-v-814e1d27"]]), Ie = A({
|
|
992
|
+
name: "ApprovalColumnUnknown",
|
|
993
|
+
props: {},
|
|
994
|
+
setup(e) {
|
|
995
|
+
return {};
|
|
996
|
+
},
|
|
997
|
+
components: {}
|
|
998
|
+
}), Le = { class: "unknow-content" };
|
|
999
|
+
function Re(e, t, n, r, i, a) {
|
|
1000
|
+
let o = I("a-empty"), s = I("a-spin");
|
|
1001
|
+
return N(), T("div", Le, [O(s, null, {
|
|
1002
|
+
default: B(() => [O(o)]),
|
|
1003
|
+
_: 1
|
|
1004
|
+
})]);
|
|
1005
|
+
}
|
|
1006
|
+
var ze = /* @__PURE__ */ i(Ie, [["render", Re], ["__scopeId", "data-v-13fcf6af"]]), Be = "approval-view-", Ve = Symbol("approval-view-id"), He = () => `${Be}${u()}`, Ue = A({
|
|
1007
|
+
name: "drawerTablesList",
|
|
1008
|
+
props: {
|
|
1009
|
+
columnConfig: {
|
|
1010
|
+
type: Object,
|
|
1011
|
+
required: !0
|
|
1012
|
+
},
|
|
1013
|
+
height: {
|
|
1014
|
+
type: Number,
|
|
1015
|
+
required: !0
|
|
1016
|
+
},
|
|
1017
|
+
eventBus: {
|
|
1018
|
+
type: Object,
|
|
1019
|
+
required: !0
|
|
1020
|
+
},
|
|
1021
|
+
modelType: {
|
|
1022
|
+
type: String,
|
|
1023
|
+
required: !0
|
|
1024
|
+
},
|
|
1025
|
+
approvalConfig: {
|
|
1026
|
+
type: Object,
|
|
1027
|
+
required: !0
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
setup(e) {
|
|
1031
|
+
let t = P(!1), n = P(""), r = j(Ve, null);
|
|
1032
|
+
if (!r) throw Error("[lyflowchart] drawerTablesList 必须渲染在 approval/core.vue 之内:缺少 .approval-view 的 id 注入");
|
|
1033
|
+
let i = P("");
|
|
1034
|
+
return M(() => {
|
|
1035
|
+
i.value = `#${r}`;
|
|
1036
|
+
}), {
|
|
1037
|
+
groups: S(() => {
|
|
1038
|
+
let t = [];
|
|
1039
|
+
for (let n of e.columnConfig.tables) {
|
|
1040
|
+
if (n.is_hidden) continue;
|
|
1041
|
+
let e = n.group_title || "未命名";
|
|
1042
|
+
t.includes(e) || t.push(e);
|
|
1043
|
+
}
|
|
1044
|
+
return t;
|
|
1045
|
+
}),
|
|
1046
|
+
open: t,
|
|
1047
|
+
openDrawer: (e) => {
|
|
1048
|
+
n.value = e, t.value = !0;
|
|
1049
|
+
},
|
|
1050
|
+
title: n,
|
|
1051
|
+
teleportTo: i
|
|
1052
|
+
};
|
|
1053
|
+
},
|
|
1054
|
+
components: { columnTables: y }
|
|
1055
|
+
}), We = { class: "drawer-tables-list" };
|
|
1056
|
+
function Ge(e, t, n, r, i, a) {
|
|
1057
|
+
let o = I("a-tag"), s = I("columnTables"), c = I("a-drawer");
|
|
1058
|
+
return N(), T(b, null, [e.teleportTo ? (N(), C(x, {
|
|
1059
|
+
key: 0,
|
|
1060
|
+
to: e.teleportTo
|
|
1061
|
+
}, [E("div", We, [(N(!0), T(b, null, F(e.groups, (t) => (N(), C(o, {
|
|
1062
|
+
class: "item",
|
|
1063
|
+
color: "blue",
|
|
1064
|
+
onClick: (n) => e.openDrawer(t)
|
|
1065
|
+
}, {
|
|
1066
|
+
default: B(() => [D(R(t), 1)]),
|
|
1067
|
+
_: 2
|
|
1068
|
+
}, 1032, ["onClick"]))), 256))])], 8, ["to"])) : w("", !0), O(c, {
|
|
1069
|
+
open: e.open,
|
|
1070
|
+
"onUpdate:open": t[0] ||= (t) => e.open = t,
|
|
1071
|
+
title: e.title,
|
|
1072
|
+
placement: "left",
|
|
1073
|
+
width: "80%",
|
|
1074
|
+
class: "tables-drawer"
|
|
1075
|
+
}, {
|
|
1076
|
+
default: B(() => [e.title && e.open ? (N(), C(s, {
|
|
1077
|
+
key: 0,
|
|
1078
|
+
columnConfig: e.columnConfig,
|
|
1079
|
+
groupTitle: e.title,
|
|
1080
|
+
height: e.height,
|
|
1081
|
+
eventBus: e.eventBus,
|
|
1082
|
+
modelType: e.modelType,
|
|
1083
|
+
approvalConfig: e.approvalConfig
|
|
1084
|
+
}, null, 8, [
|
|
1085
|
+
"columnConfig",
|
|
1086
|
+
"groupTitle",
|
|
1087
|
+
"height",
|
|
1088
|
+
"eventBus",
|
|
1089
|
+
"modelType",
|
|
1090
|
+
"approvalConfig"
|
|
1091
|
+
])) : w("", !0)]),
|
|
1092
|
+
_: 1
|
|
1093
|
+
}, 8, ["open", "title"])], 64);
|
|
1094
|
+
}
|
|
1095
|
+
var Ke = /* @__PURE__ */ i(Ue, [["render", Ge], ["__scopeId", "data-v-81149bd2"]]), qe = A({
|
|
1096
|
+
name: "drawerDataList",
|
|
1097
|
+
props: {
|
|
1098
|
+
columnConfig: {
|
|
1099
|
+
type: Object,
|
|
1100
|
+
required: !0
|
|
1101
|
+
},
|
|
1102
|
+
height: {
|
|
1103
|
+
type: Number,
|
|
1104
|
+
required: !0
|
|
1105
|
+
},
|
|
1106
|
+
eventBus: {
|
|
1107
|
+
type: Object,
|
|
1108
|
+
required: !0
|
|
1109
|
+
},
|
|
1110
|
+
modelType: {
|
|
1111
|
+
type: String,
|
|
1112
|
+
required: !0
|
|
1113
|
+
},
|
|
1114
|
+
approvalConfig: {
|
|
1115
|
+
type: Object,
|
|
1116
|
+
required: !0
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
setup(e) {
|
|
1120
|
+
let t = P(!1), n = () => {
|
|
1121
|
+
t.value = !0;
|
|
1122
|
+
}, r = j(Ve, null);
|
|
1123
|
+
if (!r) throw Error("[lyflowchart] drawerDataList 必须渲染在 approval/core.vue 之内:缺少 .approval-view 的 id 注入");
|
|
1124
|
+
let i = P("");
|
|
1125
|
+
return M(() => {
|
|
1126
|
+
i.value = `#${r}`;
|
|
1127
|
+
}), {
|
|
1128
|
+
open: t,
|
|
1129
|
+
openDrawer: n,
|
|
1130
|
+
teleportTo: i
|
|
1131
|
+
};
|
|
1132
|
+
},
|
|
1133
|
+
components: { columnDataList: Fe }
|
|
1134
|
+
}), Je = { class: "drawer-data-list" };
|
|
1135
|
+
function Ye(e, t, n, r, i, a) {
|
|
1136
|
+
let o = I("a-tag"), s = I("columnDataList"), c = I("a-drawer");
|
|
1137
|
+
return N(), T(b, null, [e.teleportTo ? (N(), C(x, {
|
|
1138
|
+
key: 0,
|
|
1139
|
+
to: e.teleportTo
|
|
1140
|
+
}, [E("div", Je, [O(o, {
|
|
1141
|
+
class: "item",
|
|
1142
|
+
color: "blue",
|
|
1143
|
+
onClick: t[0] ||= (t) => e.openDrawer()
|
|
1144
|
+
}, {
|
|
1145
|
+
default: B(() => [...t[2] ||= [D(" 审批列表 ", -1)]]),
|
|
1146
|
+
_: 1
|
|
1147
|
+
})])], 8, ["to"])) : w("", !0), O(c, {
|
|
1148
|
+
open: e.open,
|
|
1149
|
+
"onUpdate:open": t[1] ||= (t) => e.open = t,
|
|
1150
|
+
title: "审批列表",
|
|
1151
|
+
placement: "right",
|
|
1152
|
+
width: "80%"
|
|
1153
|
+
}, {
|
|
1154
|
+
default: B(() => [O(s, {
|
|
1155
|
+
"v-if": e.open,
|
|
1156
|
+
columnConfig: e.columnConfig,
|
|
1157
|
+
height: e.height,
|
|
1158
|
+
eventBus: e.eventBus,
|
|
1159
|
+
modelType: e.modelType,
|
|
1160
|
+
approvalConfig: e.approvalConfig
|
|
1161
|
+
}, null, 8, [
|
|
1162
|
+
"v-if",
|
|
1163
|
+
"columnConfig",
|
|
1164
|
+
"height",
|
|
1165
|
+
"eventBus",
|
|
1166
|
+
"modelType",
|
|
1167
|
+
"approvalConfig"
|
|
1168
|
+
])]),
|
|
1169
|
+
_: 1
|
|
1170
|
+
}, 8, ["open"])], 64);
|
|
1171
|
+
}
|
|
1172
|
+
var Xe = /* @__PURE__ */ i(qe, [["render", Ye], ["__scopeId", "data-v-9c479f56"]]), Ze = A({
|
|
1173
|
+
name: "CostCompanySelect",
|
|
1174
|
+
components: {},
|
|
1175
|
+
props: { value: { type: Object } },
|
|
1176
|
+
emits: ["update:value", "change"],
|
|
1177
|
+
setup(e, { emit: t }) {
|
|
1178
|
+
let n = P([]), i = P(e.value), a = async () => {
|
|
1179
|
+
n.value = await r({ is_active: !0 }, "/approve/get_my_cost_company");
|
|
1180
|
+
let t = e.value?.id;
|
|
1181
|
+
t ||= n.value[0]?.id, o(t, !0);
|
|
1182
|
+
}, o = (e, r = !1) => {
|
|
1183
|
+
if (!e) {
|
|
1184
|
+
i.value = null, t("update:value", null), r || t("change", null);
|
|
1185
|
+
return;
|
|
1186
|
+
}
|
|
1187
|
+
let a = n.value.find((t) => t.id === e);
|
|
1188
|
+
if (a && a.id !== i.value?.id && (i.value = a.id), !a) {
|
|
1189
|
+
t("update:value", null), r || t("change", null);
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
let o = {
|
|
1193
|
+
id: a.id,
|
|
1194
|
+
name: a.name,
|
|
1195
|
+
area: a.area,
|
|
1196
|
+
code: a.code
|
|
1197
|
+
};
|
|
1198
|
+
t("update:value", o), r || t("change", o);
|
|
1199
|
+
};
|
|
1200
|
+
return z(() => e.value, (t, r) => {
|
|
1201
|
+
if (t?.id === r?.id) return;
|
|
1202
|
+
let i = e.value?.id;
|
|
1203
|
+
i ||= n.value[0]?.id, o(i, !0);
|
|
1204
|
+
}), M(() => {
|
|
1205
|
+
a();
|
|
1206
|
+
}), {
|
|
1207
|
+
excelTypeList: n,
|
|
1208
|
+
selectValue: i,
|
|
1209
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0,
|
|
1210
|
+
handleChange: o
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
//#endregion
|
|
1215
|
+
//#region src/components/approval/CostCompanySelect.vue
|
|
1216
|
+
function Qe(e, t, n, r, i, a) {
|
|
1217
|
+
let o = I("a-tooltip"), s = I("a-select-option"), c = I("a-select");
|
|
1218
|
+
return N(), C(c, {
|
|
1219
|
+
value: e.selectValue,
|
|
1220
|
+
"onUpdate:value": t[0] ||= (t) => e.selectValue = t,
|
|
1221
|
+
onChange: t[1] ||= (t) => e.handleChange(t, !1),
|
|
1222
|
+
style: {
|
|
1223
|
+
"max-width": "220px",
|
|
1224
|
+
"min-width": "150px"
|
|
1225
|
+
},
|
|
1226
|
+
placeholder: "请选择",
|
|
1227
|
+
"show-search": "",
|
|
1228
|
+
"filter-option": e.filterOption,
|
|
1229
|
+
size: "small"
|
|
1230
|
+
}, {
|
|
1231
|
+
default: B(() => [t[2] ||= D(" > ", -1), (N(!0), T(b, null, F(e.excelTypeList, (e) => (N(), C(s, {
|
|
1232
|
+
key: e.id,
|
|
1233
|
+
value: e.id,
|
|
1234
|
+
name: e.name
|
|
1235
|
+
}, {
|
|
1236
|
+
default: B(() => [O(o, null, {
|
|
1237
|
+
title: B(() => [D(R(e.name), 1)]),
|
|
1238
|
+
default: B(() => [D(R(e.name) + " ", 1)]),
|
|
1239
|
+
_: 2
|
|
1240
|
+
}, 1024)]),
|
|
1241
|
+
_: 2
|
|
1242
|
+
}, 1032, ["value", "name"]))), 128))]),
|
|
1243
|
+
_: 1
|
|
1244
|
+
}, 8, ["value", "filter-option"]);
|
|
1245
|
+
}
|
|
1246
|
+
var $e = /* @__PURE__ */ i(Ze, [["render", Qe]]), et = A({
|
|
1247
|
+
name: "CostDepartmentSelect",
|
|
1248
|
+
components: {},
|
|
1249
|
+
props: { value: { type: Object } },
|
|
1250
|
+
emits: ["update:value", "change"],
|
|
1251
|
+
setup(e, { emit: t }) {
|
|
1252
|
+
let n = [
|
|
1253
|
+
"id",
|
|
1254
|
+
"code",
|
|
1255
|
+
"name",
|
|
1256
|
+
"kind",
|
|
1257
|
+
"bz",
|
|
1258
|
+
"start_date",
|
|
1259
|
+
"end_date"
|
|
1260
|
+
], i = P([]), a = P(e.value), o = async () => {
|
|
1261
|
+
i.value = await r({ is_active: !0 }, "/approve/get_my_department");
|
|
1262
|
+
let t = e.value?.id;
|
|
1263
|
+
t ||= i.value[0]?.id, s(t, !0);
|
|
1264
|
+
}, s = (e, r = !1) => {
|
|
1265
|
+
if (!e) {
|
|
1266
|
+
a.value = null, t("update:value", null), r || t("change", null);
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
let o = i.value.find((t) => t.id === e);
|
|
1270
|
+
if (o && o.id !== a.value?.id && (a.value = o.id), !o) {
|
|
1271
|
+
t("update:value", null), r || t("change", null);
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
let s = {};
|
|
1275
|
+
for (let e of n) s[e] = o[e];
|
|
1276
|
+
t("update:value", s), r || t("change", s);
|
|
1277
|
+
};
|
|
1278
|
+
return z(() => e.value, (t, n) => {
|
|
1279
|
+
if (t?.id === n?.id) return;
|
|
1280
|
+
let r = e.value?.id;
|
|
1281
|
+
r ||= i.value[0]?.id, s(r, !0);
|
|
1282
|
+
}), M(() => {
|
|
1283
|
+
o();
|
|
1284
|
+
}), {
|
|
1285
|
+
excelTypeList: i,
|
|
1286
|
+
selectValue: a,
|
|
1287
|
+
handleChange: s,
|
|
1288
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
//#endregion
|
|
1293
|
+
//#region src/components/approval/CostDepartmentSelect.vue
|
|
1294
|
+
function tt(e, t, n, r, i, a) {
|
|
1295
|
+
let o = I("a-select-option"), s = I("a-select");
|
|
1296
|
+
return N(), C(s, {
|
|
1297
|
+
value: e.selectValue,
|
|
1298
|
+
"onUpdate:value": t[0] ||= (t) => e.selectValue = t,
|
|
1299
|
+
onChange: t[1] ||= (t) => e.handleChange(t, !1),
|
|
1300
|
+
style: {
|
|
1301
|
+
"min-width": "120px",
|
|
1302
|
+
"max-width": "220px"
|
|
1303
|
+
},
|
|
1304
|
+
placeholder: "请选择",
|
|
1305
|
+
"show-search": "",
|
|
1306
|
+
"filter-option": e.filterOption,
|
|
1307
|
+
size: "small"
|
|
1308
|
+
}, {
|
|
1309
|
+
default: B(() => [(N(!0), T(b, null, F(e.excelTypeList, (e) => (N(), C(o, {
|
|
1310
|
+
key: e.id,
|
|
1311
|
+
value: e.id,
|
|
1312
|
+
name: e.name
|
|
1313
|
+
}, {
|
|
1314
|
+
default: B(() => [D(R(e.name), 1)]),
|
|
1315
|
+
_: 2
|
|
1316
|
+
}, 1032, ["value", "name"]))), 128))]),
|
|
1317
|
+
_: 1
|
|
1318
|
+
}, 8, ["value", "filter-option"]);
|
|
1319
|
+
}
|
|
1320
|
+
var nt = /* @__PURE__ */ i(et, [["render", tt]]), rt = A({
|
|
1321
|
+
name: "CostDepartmentSelect",
|
|
1322
|
+
components: {},
|
|
1323
|
+
props: { value: { type: Object } },
|
|
1324
|
+
emits: ["update:value", "change"],
|
|
1325
|
+
setup(e, { emit: t }) {
|
|
1326
|
+
let n = [
|
|
1327
|
+
"id",
|
|
1328
|
+
"code",
|
|
1329
|
+
"name",
|
|
1330
|
+
"id_str",
|
|
1331
|
+
"bz"
|
|
1332
|
+
], i = P([]), a = P(e.value), o = async () => {
|
|
1333
|
+
i.value = await r({ is_active: !0 }, "/approve/get_my_business_person");
|
|
1334
|
+
let t = e.value?.id;
|
|
1335
|
+
t ||= i.value[0]?.id, s(t, !0);
|
|
1336
|
+
}, s = (e, r = !1) => {
|
|
1337
|
+
if (!e) {
|
|
1338
|
+
a.value = null, t("update:value", null), r || t("change", null);
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
let o = i.value.find((t) => t.id === e);
|
|
1342
|
+
if (o && o.id !== a.value?.id && (a.value = o.id), !o) {
|
|
1343
|
+
t("update:value", null), r || t("change", null);
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
let s = {};
|
|
1347
|
+
for (let e of n) s[e] = o[e];
|
|
1348
|
+
t("update:value", s), r || t("change", s);
|
|
1349
|
+
};
|
|
1350
|
+
return z(() => e.value, (t, n) => {
|
|
1351
|
+
if (t?.id === n?.id) return;
|
|
1352
|
+
let r = e.value?.id;
|
|
1353
|
+
r ||= i.value[0]?.id, s(r, !0);
|
|
1354
|
+
}), M(() => {
|
|
1355
|
+
o();
|
|
1356
|
+
}), {
|
|
1357
|
+
dataList: i,
|
|
1358
|
+
selectValue: a,
|
|
1359
|
+
handleChange: s,
|
|
1360
|
+
filterOption: (e, t) => t.name.toLowerCase().indexOf(e.toLowerCase()) >= 0
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
//#endregion
|
|
1365
|
+
//#region src/components/approval/CreateBySelect.vue
|
|
1366
|
+
function it(e, t, n, r, i, a) {
|
|
1367
|
+
let o = I("a-select-option"), s = I("a-select");
|
|
1368
|
+
return N(), C(s, {
|
|
1369
|
+
value: e.selectValue,
|
|
1370
|
+
"onUpdate:value": t[0] ||= (t) => e.selectValue = t,
|
|
1371
|
+
onChange: t[1] ||= (t) => e.handleChange(t, !1),
|
|
1372
|
+
style: {
|
|
1373
|
+
"min-width": "120px",
|
|
1374
|
+
"max-width": "220px"
|
|
1375
|
+
},
|
|
1376
|
+
placeholder: "请选择",
|
|
1377
|
+
"show-search": "",
|
|
1378
|
+
"filter-option": e.filterOption,
|
|
1379
|
+
size: "small"
|
|
1380
|
+
}, {
|
|
1381
|
+
default: B(() => [(N(!0), T(b, null, F(e.dataList, (e) => (N(), C(o, {
|
|
1382
|
+
key: e.id,
|
|
1383
|
+
value: e.id,
|
|
1384
|
+
name: e.name
|
|
1385
|
+
}, {
|
|
1386
|
+
default: B(() => [D(R(e.name), 1)]),
|
|
1387
|
+
_: 2
|
|
1388
|
+
}, 1032, ["value", "name"]))), 128))]),
|
|
1389
|
+
_: 1
|
|
1390
|
+
}, 8, ["value", "filter-option"]);
|
|
1391
|
+
}
|
|
1392
|
+
var at = /* @__PURE__ */ i(rt, [["render", it]]), ot = ["id"], st = /* @__PURE__ */ i(/* @__PURE__ */ A({
|
|
1393
|
+
name: "ApprovalCore",
|
|
1394
|
+
components: {
|
|
1395
|
+
ColumnApprovalTables: y,
|
|
1396
|
+
ColumnApprovalForm: ke,
|
|
1397
|
+
ColumnApprovalDataList: Fe,
|
|
1398
|
+
ColumnApprovalUnknown: ze,
|
|
1399
|
+
CostCompanySelect: $e,
|
|
1400
|
+
CostCompanyDepartment: nt,
|
|
1401
|
+
CreateBySelect: at,
|
|
1402
|
+
SystemTime: he,
|
|
1403
|
+
FormCodeInput: _e,
|
|
1404
|
+
CreateByCascader: be,
|
|
1405
|
+
PostionCascader: Se,
|
|
1406
|
+
drawerTablesList: Ke,
|
|
1407
|
+
drawerDataList: Xe
|
|
1408
|
+
},
|
|
1409
|
+
__name: "core",
|
|
1410
|
+
props: {
|
|
1411
|
+
modelType: {},
|
|
1412
|
+
approveRecordId: { default: null }
|
|
1413
|
+
},
|
|
1414
|
+
emits: ["saved"],
|
|
1415
|
+
setup(n, { expose: i, emit: a }) {
|
|
1416
|
+
let o = n, u = a, d = re(), h = e(), _ = pe(), v = S(() => o.modelType), y = P(3), b = P(!1), x = oe(), w = He();
|
|
1417
|
+
le(Ve, w);
|
|
1418
|
+
let T = P(null), D = P(null), k = P({}), A = P(0), j = P(null), ue = P(), F = S(() => ({ token: {} })), R = S(() => {
|
|
1419
|
+
let e = !1;
|
|
1420
|
+
if (T.value?.columns) {
|
|
1421
|
+
for (let t of T.value?.columns) if (t.type === "tables") {
|
|
1422
|
+
for (let n of t.tables) if (!n.is_hidden) {
|
|
1423
|
+
e = !0;
|
|
1424
|
+
break;
|
|
1425
|
+
}
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
return e ? [
|
|
1430
|
+
"30px",
|
|
1431
|
+
"1fr",
|
|
1432
|
+
"30px"
|
|
1433
|
+
] : [
|
|
1434
|
+
"0px",
|
|
1435
|
+
"1fr",
|
|
1436
|
+
"30px"
|
|
1437
|
+
];
|
|
1438
|
+
}), W = async (e) => await r({
|
|
1439
|
+
prefix: e?.number_prefix,
|
|
1440
|
+
suffix: e?.number_suffix,
|
|
1441
|
+
digit_place: e?.number_digit_place
|
|
1442
|
+
}, "/approve/get_record_number"), me = async (e) => await r({ prefix: e?.form_code_prefix }, "/approve/get_form_code"), K = () => {
|
|
1443
|
+
let e = G();
|
|
1444
|
+
return {
|
|
1445
|
+
date: e.format("YYYY-MM-DD"),
|
|
1446
|
+
date_ch: e.format("YYYY年MM月DD日"),
|
|
1447
|
+
date_short: e.format("YYYYMMDD")
|
|
1448
|
+
};
|
|
1449
|
+
}, q = async (e) => {
|
|
1450
|
+
let t = !!e?.skip_auto_numbering, n = await r({ name: v.value }, "/approve/get_user_page_context", !1, { skip_error: !0 }), i = null;
|
|
1451
|
+
n && (i = n.current_history_id, d[ae](v.value, n));
|
|
1452
|
+
let a = d.contexts?.[v.value]?.request_history_id, o = d.contexts?.[v.value]?.request_flow_history_id, { config: l, current_history_id: u } = await c(v.value, null, a), { content: f, current_history_id: p } = await s(v.value, o);
|
|
1453
|
+
T.value = l, D.value = f, d[ne](v.value, u), d[ee](v.value, p), u != i && d[te](v.value, null), y.value = l.columns.length;
|
|
1454
|
+
let m = d.contexts?.[v.value]?.globalData;
|
|
1455
|
+
if (m && (k.value = m), !t && !d.contexts?.[v.value]?.isEdit && (!k.value.number || !k.value.number.startsWith(l.number_prefix) || !k.value.number.endsWith(l.number_suffix))) {
|
|
1456
|
+
let e = await W(l);
|
|
1457
|
+
k.value.number = e, Y();
|
|
1458
|
+
}
|
|
1459
|
+
let h = /* @__PURE__ */ new Date(), g = String(h.getFullYear()).slice(-2), _ = String(h.getMonth() + 1).padStart(2, "0"), re = `${l.form_code_prefix || ""}${g}${_}`;
|
|
1460
|
+
if (!t && !d.contexts?.[v.value]?.isEdit && l.form_code_prefix && (!k.value.form_code?.code || !k.value.form_code.code.startsWith(re))) {
|
|
1461
|
+
let e = await me(l);
|
|
1462
|
+
k.value.form_code = { code: e }, Y();
|
|
1463
|
+
}
|
|
1464
|
+
}, he = (e) => {
|
|
1465
|
+
switch (T.value?.columns[e]?.type) {
|
|
1466
|
+
case "tables": return "drawerTablesList";
|
|
1467
|
+
case "form": return "ColumnApprovalForm";
|
|
1468
|
+
case "data_list": return "drawerDataList";
|
|
1469
|
+
default: return "ColumnApprovalUnknown";
|
|
1470
|
+
}
|
|
1471
|
+
}, ge = (e) => T.value?.columns[e], J = () => {
|
|
1472
|
+
j.value && (A.value = j.value.offsetHeight - 8.5);
|
|
1473
|
+
};
|
|
1474
|
+
window.setDebugCode = (e) => {
|
|
1475
|
+
x[se](e), e ? H.success("代码调试已开启") : H.info("代码调试已关闭");
|
|
1476
|
+
};
|
|
1477
|
+
let _e = fe(async () => {
|
|
1478
|
+
Y();
|
|
1479
|
+
}, 1e3), Y = async () => {
|
|
1480
|
+
await r({
|
|
1481
|
+
name: v.value,
|
|
1482
|
+
context: d.contexts[v.value]
|
|
1483
|
+
}, "/approve/update_user_page_context");
|
|
1484
|
+
}, X = (e) => {
|
|
1485
|
+
if (!e) return e;
|
|
1486
|
+
if (e.indexOf("-") === -1) return `${e}-1`;
|
|
1487
|
+
let t = e.lastIndexOf("-"), n = e.substring(0, t), r = e.substring(t + 1);
|
|
1488
|
+
return /^\d+$/.test(r) ? `${n}-${parseInt(r, 10) + 1}` : `${e}-1`;
|
|
1489
|
+
}, ve = async (e) => {
|
|
1490
|
+
let t = await r({ approve_record_id: e }, "/approve/get_approve_record"), { page_setting_history_id: n, flow_setting_history_id: i, data: a, number: o, process_status: s, result_status: c, is_modifiable: l, modify_status: u } = t, f = t.modify_source_id ?? (t.modify_source && t.modify_source.id) ?? null;
|
|
1491
|
+
if (d[m](v.value, n), d[p](v.value, i), k.value = a.globalData, d[g](v.value, k.value), await Y(), await q({ skip_auto_numbering: !0 }), s === "approved" && c === "pass" && l === !0 && u === "正常") {
|
|
1492
|
+
let n = await r({ approve_record_id: e }, "/approve/check_approve_can_modify");
|
|
1493
|
+
if (!n || !n.can_modify) {
|
|
1494
|
+
H.error(n && n.msg || "该审批记录不可修改");
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
let i = X(o);
|
|
1498
|
+
k.value.number = i;
|
|
1499
|
+
let s = X(t.context || a?.globalData?.context?.context || "");
|
|
1500
|
+
s && (k.value.context = { context: s }), d[g](v.value, k.value), _.emit("update_form", {
|
|
1501
|
+
data: a,
|
|
1502
|
+
state: {
|
|
1503
|
+
id: e,
|
|
1504
|
+
number: i,
|
|
1505
|
+
modifyMode: !0,
|
|
1506
|
+
source_approve_record_id: e,
|
|
1507
|
+
modify_source_id: f
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
} else _.emit("update_form", {
|
|
1511
|
+
data: a,
|
|
1512
|
+
state: {
|
|
1513
|
+
id: e,
|
|
1514
|
+
number: o,
|
|
1515
|
+
modify_source_id: f
|
|
1516
|
+
}
|
|
1517
|
+
});
|
|
1518
|
+
}, ye = async ({ code: e, action: n, params: i }) => {
|
|
1519
|
+
let a = n.action;
|
|
1520
|
+
if (a === "edit_approve") {
|
|
1521
|
+
if (!e) return;
|
|
1522
|
+
let n;
|
|
1523
|
+
try {
|
|
1524
|
+
n = await t(e, i);
|
|
1525
|
+
} catch (e) {
|
|
1526
|
+
console.error(e), H.error(e instanceof Error ? e.message : String(e));
|
|
1527
|
+
return;
|
|
1528
|
+
}
|
|
1529
|
+
let { id: r } = n;
|
|
1530
|
+
if (!r) {
|
|
1531
|
+
H.error("代码未返回id");
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
await ve(r);
|
|
1535
|
+
} else if (a === "copy_approve") {
|
|
1536
|
+
if (!e) return;
|
|
1537
|
+
let n;
|
|
1538
|
+
try {
|
|
1539
|
+
n = await t(e, i);
|
|
1540
|
+
} catch (e) {
|
|
1541
|
+
console.error(e), H.error(e instanceof Error ? e.message : String(e));
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
let { id: a } = n || {};
|
|
1545
|
+
if (!a) {
|
|
1546
|
+
H.error("代码未返回id");
|
|
1547
|
+
return;
|
|
1548
|
+
}
|
|
1549
|
+
if (!await new Promise((e) => {
|
|
1550
|
+
V.confirm({
|
|
1551
|
+
title: "复制表单",
|
|
1552
|
+
content: "将覆盖当前表单数据,并以新的单据编号、流水号新建一条待提交审批",
|
|
1553
|
+
onOk: () => e(!0),
|
|
1554
|
+
onCancel: () => e(!1)
|
|
1555
|
+
});
|
|
1556
|
+
})) return;
|
|
1557
|
+
let o = (await r({ approve_record_id: a }, "/approve/get_approve_record"))?.data;
|
|
1558
|
+
if (!o) {
|
|
1559
|
+
H.error("未获取到审批数据");
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
let s = T.value || {}, c = {
|
|
1563
|
+
...k.value || {},
|
|
1564
|
+
...U(o.globalData) || {}
|
|
1565
|
+
};
|
|
1566
|
+
c.number = await W(s), c.create_date = K(), c.person_cost_company = null, c.person_department = null, c.person_position = null, s.form_code_prefix ? c.form_code = { code: await me(s) } : delete c.form_code, k.value = c, d[g](v.value, k.value), d[ie](v.value, !1, {}), d[m](v.value, null), d[p](v.value, null);
|
|
1567
|
+
let u = U(o);
|
|
1568
|
+
delete u.globalData, l(u, f(s)), d[te](v.value, u), await Y(), await q(), d[te](v.value, u), _.emit("copy_form", { data: u });
|
|
1569
|
+
}
|
|
1570
|
+
}, Z = async () => {
|
|
1571
|
+
q();
|
|
1572
|
+
}, be = (e) => {
|
|
1573
|
+
u("saved", e || {});
|
|
1574
|
+
}, Q = (e, t) => {
|
|
1575
|
+
d[g](v.value, k.value), t && _e();
|
|
1576
|
+
};
|
|
1577
|
+
return M(async () => {
|
|
1578
|
+
_.on("run_action", ye), _.on("reinit", Z), _.on("saved", be), b.value = h.CHECK_AUTH("approve/debug_code", "开启代码调试"), window.addEventListener("resize", J), J(), o.approveRecordId ? await ve(o.approveRecordId) : await q(), J();
|
|
1579
|
+
}), ce(() => {
|
|
1580
|
+
_.off("run_action", ye), _.off("reinit", Z), _.off("saved", be), window.removeEventListener("resize", J);
|
|
1581
|
+
}), z(() => o.modelType, (e, t) => {
|
|
1582
|
+
!e || e === t || q();
|
|
1583
|
+
}), i({
|
|
1584
|
+
applyApproveRecord: ve,
|
|
1585
|
+
reinit: Z,
|
|
1586
|
+
resize: J
|
|
1587
|
+
}), (e, t) => {
|
|
1588
|
+
let n = I("ColumnLayout"), r = I("a-config-provider");
|
|
1589
|
+
return N(), C(r, { theme: F.value }, {
|
|
1590
|
+
default: B(() => [E("div", {
|
|
1591
|
+
class: "approval-view",
|
|
1592
|
+
id: de(w)
|
|
1593
|
+
}, [O(n, {
|
|
1594
|
+
modelValue: R.value,
|
|
1595
|
+
"onUpdate:modelValue": t[0] ||= (e) => R.value = e,
|
|
1596
|
+
minWidth: 0,
|
|
1597
|
+
"show-zoom-btn": !1,
|
|
1598
|
+
resizeable: !1
|
|
1599
|
+
}, {
|
|
1600
|
+
default: B(({ index: e }) => [E("div", {
|
|
1601
|
+
class: "column-item-content",
|
|
1602
|
+
ref_key: "columnItemContentRef",
|
|
1603
|
+
ref: j
|
|
1604
|
+
}, [(N(), C(L(he(e)), {
|
|
1605
|
+
"column-config": ge(e),
|
|
1606
|
+
"global-data": k.value,
|
|
1607
|
+
height: A.value,
|
|
1608
|
+
modelType: v.value,
|
|
1609
|
+
eventBus: de(_),
|
|
1610
|
+
topFormRef: ue.value,
|
|
1611
|
+
approvalConfig: T.value,
|
|
1612
|
+
onGlobalDataChange: (t) => Q(he(e), t)
|
|
1613
|
+
}, null, 40, [
|
|
1614
|
+
"column-config",
|
|
1615
|
+
"global-data",
|
|
1616
|
+
"height",
|
|
1617
|
+
"modelType",
|
|
1618
|
+
"eventBus",
|
|
1619
|
+
"topFormRef",
|
|
1620
|
+
"approvalConfig",
|
|
1621
|
+
"onGlobalDataChange"
|
|
1622
|
+
]))], 512)]),
|
|
1623
|
+
_: 1
|
|
1624
|
+
}, 8, ["modelValue"])], 8, ot)]),
|
|
1625
|
+
_: 1
|
|
1626
|
+
}, 8, ["theme"]);
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
}), [["__scopeId", "data-v-ae889e17"]]);
|
|
1630
|
+
//#endregion
|
|
1631
|
+
export { st as t };
|