cloud-web-corejs 1.0.54-dev.800 → 1.0.54-dev.801

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.
Files changed (36) hide show
  1. package/package.json +1 -1
  2. package/src/components/bizTab/BizBillActions.vue +2 -2
  3. package/src/components/bizTab/bizBillDetailMixin.js +27 -9
  4. package/src/components/excelExport/exportFieldDialog.vue +11 -9
  5. package/src/components/table/config.js +6 -4
  6. package/src/components/table/index.js +78 -22
  7. package/src/components/table/state.js +42 -0
  8. package/src/components/table/vxeFilter/index.js +4 -2
  9. package/src/components/table/vxeFilter/mixin.js +10 -4
  10. package/src/components/wf/content.vue +4 -0
  11. package/src/components/wf/wf.js +72 -23
  12. package/src/components/wf/wfActionDropdown.vue +58 -0
  13. package/src/components/wf/wfActionItems.js +116 -0
  14. package/src/components/wf/wfAutoConfirm.js +55 -0
  15. package/src/components/wf/wfUserRange.js +53 -0
  16. package/src/components/wf/wfUtil.js +20 -0
  17. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -1
  18. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +5 -5
  19. package/src/components/xform/form-designer/setting-panel/form-setting.vue +48 -26
  20. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +16 -19
  21. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +13 -12
  22. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +16 -18
  23. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/afterColumnsCreated-editor.vue +30 -0
  24. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  25. package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +4 -4
  26. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
  27. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +20 -3
  28. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -178
  29. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +1 -1
  30. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
  31. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
  32. package/src/components/xform/form-render/container-item/data-table-mixin.js +35 -2
  33. package/src/components/xform/form-render/container-item/detail-item.vue +8 -12
  34. package/src/components/xform/mixins/defaultHandle.js +18 -3
  35. package/src/views/user/outLink/cc_form_view.vue +33 -30
  36. package/src/components/xform/form-render/container-item/data-table-mixin copy.js +0 -5910
@@ -1,178 +1,188 @@
1
- <template>
2
- <div>
3
- <el-form-item class="form-item-label-top" prop="name" :rules="nameRequiredRule">
4
- <span slot="label"
5
- >{{ i18nt("designer.setting.uniqueName") }}
6
- <el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')">
7
- <i class="el-icon-info"></i
8
- ></el-tooltip>
9
- </span>
10
- <template
11
- v-if="
12
- (!!selectedWidget.category && selectedWidget.type !== 'sub-form') || noFieldList
13
- "
14
- >
15
- <el-input
16
- type="text"
17
- v-model="optionModel.name"
18
- :readonly="widgetNameReadonly"
19
- @change="updateWidgetNameAndRef"
20
- ></el-input>
21
- </template>
22
- <template v-else>
23
- <el-select
24
- v-model="optionModel.name"
25
- allow-create
26
- filterable
27
- :disabled="true"
28
- @change="updateWidgetNameAndRef"
29
- :title="i18nt('designer.setting.editNameHelp')"
30
- >
31
- <el-option
32
- v-for="(sf, sfIdx) in serverFieldList"
33
- :key="sfIdx"
34
- :label="sf.label"
35
- :value="sf.name"
36
- ></el-option>
37
- </el-select>
38
- </template>
39
- </el-form-item>
40
- <el-form-item label="按钮编码" v-show="showAuthCode">
41
- <div style="word-break: break-all">
42
- <el-tooltip effect="light" content="复制">
43
- <a class="a-link" style="color: unset;" @click="copyAuthCode"><span><i class="el-icon-copy-document" style="margin-right:2px"></i>{{ authCode }}</span></a>
44
- </el-tooltip>
45
- </div>
46
- </el-form-item>
47
- </div>
48
- </template>
49
-
50
- <script>
51
- import i18n from "../../../../../components/xform/utils/i18n";
52
- import { isEmptyStr } from "../../../../../components/xform/utils/util";
53
- import Clipboard from 'clipboard'
54
-
55
- export default {
56
- name: "name-editor",
57
- mixins: [i18n],
58
- props: {
59
- designer: Object,
60
- selectedWidget: Object,
61
- optionModel: Object,
62
- parentList: Array,
63
- },
64
- inject: ["serverFieldList", "getDesignerConfig", "isDataTableChildWidget"],
65
- data() {
66
- return {
67
- nameRequiredRule: [{ required: true, message: "name required" }],
68
- };
69
- },
70
- computed: {
71
- noFieldList() {
72
- return !this.serverFieldList || this.serverFieldList.length <= 0;
73
- },
74
-
75
- widgetNameReadonly() {
76
- return !!this.getDesignerConfig().widgetNameReadonly;
77
- },
78
- showAuthCode() {
79
- // return this.selectedWidget.category !== "container";
80
- return [
81
- "button",
82
- "a-text",
83
- "a-link",
84
- "a-link2",
85
- "search_button",
86
- "save_button",
87
- "reset_button",
88
- "table-export-button",
89
- "select-export-button",
90
- "add_button",
91
- "import-button",
92
- "import2-button",
93
- "print-button",
94
- "print-detail-button",
95
- "download-button",
96
- "copy_button",
97
- "save_submit_wf_button",
98
- "tempStorage",
99
- "dropdown",
100
- "dropdown-item",
101
- ].includes(this.selectedWidget.type);
102
- },
103
- authCode() {
104
- return (
105
- this.designer.vueInstance?.reportTemplate?.formCode + ":" + this.optionModel.name
106
- );
107
- },
108
- },
109
- methods: {
110
- copyAuthCode(e){
111
- this.copyToClipboard(this.authCode, e, this.$message, '复制成功', '复制失败');
112
- },
113
- copyToClipboard(content, clickEvent, $message, successMsg, errorMsg) {
114
- const clipboard = new Clipboard(clickEvent.target, {
115
- text: () => content
116
- });
117
-
118
- clipboard.on('success', () => {
119
- $message.success(successMsg);
120
- clipboard.destroy();
121
- })
122
-
123
- clipboard.on('error', () => {
124
- $message.error(errorMsg);
125
- clipboard.destroy();
126
- });
127
-
128
- clipboard.onClick(clickEvent);
129
- },
130
- updateWidgetNameAndRef(newName) {
131
- let oldName = this.designer.selectedWidgetName;
132
- if (isEmptyStr(newName)) {
133
- this.selectedWidget.options.name = oldName;
134
- this.$message.info(this.i18nt("designer.hint.nameRequired"));
135
- return;
136
- }
137
-
138
- if (!!this.designer.formWidget) {
139
- let foundRef = this.designer.formWidget.getWidgetRef(newName); // 检查newName是否已存在!!
140
-
141
- if (!!foundRef) {
142
- if (this.isDataTableChildWidget()) {
143
- let parentList = this.parentList;
144
- for (let i; i < parentList.length; i++) {}
145
- } else {
146
- this.selectedWidget.options.name = oldName;
147
- this.$message.info(this.i18nt("designer.hint.duplicateName") + newName);
148
- return;
149
- }
150
- }
151
-
152
- let widgetInDesign = this.designer.formWidget.getWidgetRef(oldName);
153
- if (!!widgetInDesign && !!widgetInDesign.registerToRefList) {
154
- widgetInDesign.registerToRefList(oldName); //注册组件新的ref名称并删除老的ref!!
155
- let newLabel = this.getLabelByFieldName(newName);
156
- this.designer.updateSelectedWidgetNameAndLabel(
157
- this.selectedWidget,
158
- newName,
159
- newLabel
160
- );
161
- }
162
- }
163
- },
164
-
165
- getLabelByFieldName(fieldName) {
166
- for (let i = 0; i < this.serverFieldList.length; i++) {
167
- if (this.serverFieldList[i].name === fieldName) {
168
- return this.serverFieldList[i].label;
169
- }
170
- }
171
-
172
- return null;
173
- },
174
- },
175
- };
176
- </script>
177
-
178
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div>
3
+ <el-form-item class="form-item-label-top" prop="name" :rules="nameRequiredRule">
4
+ <span slot="label"
5
+ >{{ i18nt("designer.setting.uniqueName") }}
6
+ <el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')">
7
+ <i class="el-icon-info"></i
8
+ ></el-tooltip>
9
+ </span>
10
+ <template
11
+ v-if="
12
+ (!!selectedWidget.category && selectedWidget.type !== 'sub-form') || noFieldList
13
+ "
14
+ >
15
+ <el-input
16
+ type="text"
17
+ v-model="optionModel.name"
18
+ :readonly="widgetNameReadonly"
19
+ @change="updateWidgetNameAndRef"
20
+ ></el-input>
21
+ </template>
22
+ <template v-else>
23
+ <el-select
24
+ v-model="optionModel.name"
25
+ allow-create
26
+ filterable
27
+ :disabled="true"
28
+ @change="updateWidgetNameAndRef"
29
+ :title="i18nt('designer.setting.editNameHelp')"
30
+ >
31
+ <el-option
32
+ v-for="(sf, sfIdx) in serverFieldList"
33
+ :key="sfIdx"
34
+ :label="sf.label"
35
+ :value="sf.name"
36
+ ></el-option>
37
+ </el-select>
38
+ </template>
39
+ </el-form-item>
40
+ <el-form-item label="按钮编码" v-show="showAuthCode" class="form-item-label-top">
41
+ <div style="word-break: break-all">
42
+ <el-tooltip effect="light" content="复制">
43
+ <a class="a-link" style="" @click="copyAuthCode"><i class="el-icon-copy-document"></i><span>{{ authCode }}</span></a>
44
+ </el-tooltip>
45
+ </div>
46
+ </el-form-item>
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+ import i18n from "../../../../../components/xform/utils/i18n";
52
+ import { isEmptyStr } from "../../../../../components/xform/utils/util";
53
+ import Clipboard from 'clipboard'
54
+
55
+ export default {
56
+ name: "name-editor",
57
+ mixins: [i18n],
58
+ props: {
59
+ designer: Object,
60
+ selectedWidget: Object,
61
+ optionModel: Object,
62
+ parentList: Array,
63
+ },
64
+ inject: ["serverFieldList", "getDesignerConfig", "isDataTableChildWidget"],
65
+ data() {
66
+ return {
67
+ nameRequiredRule: [{ required: true, message: "name required" }],
68
+ };
69
+ },
70
+ computed: {
71
+ noFieldList() {
72
+ return !this.serverFieldList || this.serverFieldList.length <= 0;
73
+ },
74
+
75
+ widgetNameReadonly() {
76
+ return !!this.getDesignerConfig().widgetNameReadonly;
77
+ },
78
+ showAuthCode() {
79
+ // return this.selectedWidget.category !== "container";
80
+ return [
81
+ "button",
82
+ "a-text",
83
+ "a-link",
84
+ "a-link2",
85
+ "search_button",
86
+ "save_button",
87
+ "reset_button",
88
+ "table-export-button",
89
+ "select-export-button",
90
+ "add_button",
91
+ "import-button",
92
+ "import2-button",
93
+ "print-button",
94
+ "print-detail-button",
95
+ "download-button",
96
+ "copy_button",
97
+ "save_submit_wf_button",
98
+ "tempStorage",
99
+ "dropdown",
100
+ "dropdown-item",
101
+ ].includes(this.selectedWidget.type);
102
+ },
103
+ authCode() {
104
+ return (
105
+ this.designer.vueInstance?.reportTemplate?.formCode + ":" + this.optionModel.name
106
+ );
107
+ },
108
+ },
109
+ methods: {
110
+ copyAuthCode(e){
111
+ this.copyToClipboard(this.authCode, e, this.$message, '复制成功', '复制失败');
112
+ },
113
+ copyToClipboard(content, clickEvent, $message, successMsg, errorMsg) {
114
+ const clipboard = new Clipboard(clickEvent.target, {
115
+ text: () => content
116
+ });
117
+
118
+ clipboard.on('success', () => {
119
+ $message.success(successMsg);
120
+ clipboard.destroy();
121
+ })
122
+
123
+ clipboard.on('error', () => {
124
+ $message.error(errorMsg);
125
+ clipboard.destroy();
126
+ });
127
+
128
+ clipboard.onClick(clickEvent);
129
+ },
130
+ updateWidgetNameAndRef(newName) {
131
+ let oldName = this.designer.selectedWidgetName;
132
+ if (isEmptyStr(newName)) {
133
+ this.selectedWidget.options.name = oldName;
134
+ this.$message.info(this.i18nt("designer.hint.nameRequired"));
135
+ return;
136
+ }
137
+
138
+ if (!!this.designer.formWidget) {
139
+ let foundRef = this.designer.formWidget.getWidgetRef(newName); // 检查newName是否已存在!!
140
+
141
+ if (!!foundRef) {
142
+ if (this.isDataTableChildWidget()) {
143
+ let parentList = this.parentList;
144
+ for (let i; i < parentList.length; i++) {}
145
+ } else {
146
+ this.selectedWidget.options.name = oldName;
147
+ this.$message.info(this.i18nt("designer.hint.duplicateName") + newName);
148
+ return;
149
+ }
150
+ }
151
+
152
+ let widgetInDesign = this.designer.formWidget.getWidgetRef(oldName);
153
+ if (!!widgetInDesign && !!widgetInDesign.registerToRefList) {
154
+ widgetInDesign.registerToRefList(oldName); //注册组件新的ref名称并删除老的ref!!
155
+ let newLabel = this.getLabelByFieldName(newName);
156
+ this.designer.updateSelectedWidgetNameAndLabel(
157
+ this.selectedWidget,
158
+ newName,
159
+ newLabel
160
+ );
161
+ }
162
+ }
163
+ },
164
+
165
+ getLabelByFieldName(fieldName) {
166
+ for (let i = 0; i < this.serverFieldList.length; i++) {
167
+ if (this.serverFieldList[i].name === fieldName) {
168
+ return this.serverFieldList[i].label;
169
+ }
170
+ }
171
+
172
+ return null;
173
+ },
174
+ },
175
+ };
176
+ </script>
177
+
178
+ <style lang="scss" scoped>
179
+ .a-link{
180
+ display:flex;line-height:1.2;width:100%;align-items:center;color:rgba(0,0,0,0.65);
181
+ > i{
182
+ margin-right:8px;
183
+ }
184
+ > span{
185
+ flex:1
186
+ }
187
+ }
188
+ </style>
@@ -15,7 +15,7 @@
15
15
  <el-form-item :label="i18nt('启用特定用户显示规则设置')">
16
16
  <el-switch v-model="optionModel.userTextRuleEnabled"></el-switch>
17
17
  </el-form-item>
18
- <el-form-item :label="i18nt('特定用户显示规则设置')" v-if="optionModel.userTextRuleEnabled">
18
+ <el-form-item :label="i18nt('特定用户显示规则设置')" v-if="optionModel.userTextRuleEnabled" class="el-form-item-second">
19
19
  <a href="javascript:void(0);" class="a-link link-oneLind" @click="openDialog">
20
20
  <span>{{ optionModel.userTextRuleConfig && optionModel.userTextRuleConfig.length ? "已维护" : "" }}</span>
21
21
  <i class="el-icon-edit"></i>
@@ -266,6 +266,7 @@ const EVENT_PROPERTIES = {
266
266
  onCheckboxChange: "onCheckboxChange-editor",
267
267
  onSearchTable: "onSearchTable-editor",
268
268
  onResetTable: "onResetTable-editor",
269
+ afterColumnsCreated: "afterColumnsCreated-editor",
269
270
 
270
271
  //tree事件
271
272
  onNodeClick: "onNodeClick-editor",
@@ -286,6 +286,7 @@ export const containers = [
286
286
  onCellDblclick: "",
287
287
  onSearchTable: "",
288
288
  onResetTable: "",
289
+ afterColumnsCreated: "",
289
290
  dynamicColumnsScript: null,
290
291
  dynamicColumnSourceType: "none",
291
292
  dynamicColumnMode: "append",
@@ -5,6 +5,7 @@ import containerItemMixin from "./containerItemMixin";
5
5
 
6
6
  import * as formatUtil from "../../../../components/xform/utils/format.js";
7
7
  import tableConfig from "../../../../components/table/config.js";
8
+ import { getTableStateValue } from "../../../../components/table/state";
8
9
  import { extendDeeply } from "../../../../utils/index.js";
9
10
  import {
10
11
  assembleAxiosConfig,
@@ -1280,6 +1281,7 @@ modules = {
1280
1281
  const finish = () => {
1281
1282
  this.initFieldSchemaData(true);
1282
1283
  this.afterDynamicColumnsCommonWidget(effectiveColumns);
1284
+ this.emitAfterColumnsCreated(columns);
1283
1285
  resolve(columns);
1284
1286
  };
1285
1287
  if (reloadResult?.then) {
@@ -1288,6 +1290,7 @@ modules = {
1288
1290
  finish();
1289
1291
  }
1290
1292
  } else {
1293
+ this.emitAfterColumnsCreated(columns);
1291
1294
  resolve(columns);
1292
1295
  }
1293
1296
  },
@@ -1295,6 +1298,35 @@ modules = {
1295
1298
  );
1296
1299
  });
1297
1300
  },
1301
+ /**
1302
+ * 表头(列)创建完成后的统一出口:首次建表和运行时重建列(setTableColumns /
1303
+ * 动态列加载)两条链路都经这里,脚本拿到的一定是已经写进 VXE 的最终列。
1304
+ *
1305
+ * 脚本签名:function (dataId, formCode, columns, $grid)
1306
+ * columns —— 应用到 VXE 的列配置数组(含 checkbox 列、分组表头 children)
1307
+ * $grid —— vxe-grid 实例,需要活列对象时用 $grid.getTableColumn()
1308
+ *
1309
+ * 注意:每次表头重建都会触发(动态列表单首屏会触发两次:静态列建表一次、
1310
+ * 动态列回来重建一次),脚本必须幂等。
1311
+ * @param {Array} columns 已应用的列配置。
1312
+ */
1313
+ emitAfterColumnsCreated(columns) {
1314
+ const script = this.widget.options.afterColumnsCreated;
1315
+ if (!script) return;
1316
+ // 列刚写进 vxeOption,DOM 表头还没渲染完,等一拍脚本才能操作表头节点
1317
+ this.$nextTick(() => {
1318
+ try {
1319
+ this.handleCustomEvent(
1320
+ script,
1321
+ ["columns", "$grid"],
1322
+ [columns || [], this.getGridTable()]
1323
+ );
1324
+ } catch (error) {
1325
+ // handleCustomEvent 已按配置弹「前端脚本异常」,这里吞掉避免打断建表后续流程
1326
+ console.error("afterColumnsCreated 脚本执行异常", error);
1327
+ }
1328
+ });
1329
+ },
1298
1330
  /**
1299
1331
  * 替换列配置并刷新 VXE 列、行 schema 和组件选项。
1300
1332
  * @param {Array} tableColumns 新列配置。
@@ -2017,7 +2049,7 @@ modules = {
2017
2049
  if (this.widget.options.showPagination) {
2018
2050
  let proxyInfo = $grid.getProxyInfo();
2019
2051
  let searchCount = true;
2020
- let isQueryAllPage = $grid.isQueryAllPage;
2052
+ let isQueryAllPage = getTableStateValue($grid, "isQueryAllPage");
2021
2053
  if (isQueryAllPage === false) {
2022
2054
  searchCount = false;
2023
2055
  }
@@ -2610,7 +2642,7 @@ modules = {
2610
2642
  }
2611
2643
 
2612
2644
  // let $grid = this.getGridTable();
2613
- let isQueryAllPage = $grid.isQueryAllPage;
2645
+ let isQueryAllPage = getTableStateValue($grid, "isQueryAllPage");
2614
2646
  let pathStr1 = "";
2615
2647
  /* if (isQueryAllPage === false) {
2616
2648
  queryParams.searchCount = false;
@@ -2894,6 +2926,7 @@ modules = {
2894
2926
  }
2895
2927
  // 列已就绪,补建 created 阶段被延后的行 schema
2896
2928
  this.flushPendingSchemaInit();
2929
+ this.emitAfterColumnsCreated(opts?.columns || columns);
2897
2930
  this.tryAutoLoadDynamicColumns().finally(() => {
2898
2931
  if (!isQueryTable) {
2899
2932
  setTimeout(() => {
@@ -175,6 +175,8 @@ import {
175
175
  DEFAULT_SUBMIT_BTN,
176
176
  DEFAULT_SAVE_SUBMIT_BTN,
177
177
  } from "../../../../components/wf/wfButtonName";
178
+ import { loadWfAutoConfirm } from "../../../../components/wf/wfAutoConfirm";
179
+ import { loadWfUserRange } from "../../../../components/wf/wfUserRange";
178
180
  import settingConfig from "@/settings.js";
179
181
 
180
182
  export default {
@@ -193,9 +195,11 @@ export default {
193
195
  created() {
194
196
  this.initRefList();
195
197
  this.handleOnCreated();
196
- //只有流程表单才需要按钮名,避免给普通详情页平白多一次请求(模块内全局只发一次)
198
+ //只有流程表单才需要按钮名/自动确认开关,避免给普通详情页平白多一次请求(模块内全局只发一次)
197
199
  if (this.getFormRef()?.formConfig?.wfEnabled) {
198
200
  loadWfButtonNames(this);
201
+ loadWfAutoConfirm(this);
202
+ loadWfUserRange(this);
199
203
  }
200
204
  },
201
205
  mounted() {
@@ -349,12 +353,9 @@ export default {
349
353
  startWf() {
350
354
  let ws = this.wfStart();
351
355
  if (!ws || !ws.option || !ws.ctx) return;
352
- // 启动确认提示语跟随「提交流程按钮名」:包一层现成的 startConfirmText 钩子,
353
- // 既保住模板脚本 wfStartConfirmText 的最高优先级,又不必改公共的 wf.js
354
- // (wf.js 默认分支走 $t2(文案, key),i18n 命中 key 会把自定义按钮名吞掉)。
355
- let inner = ws.option.startConfirmText;
356
- //只有后台真配了按钮名才改提示语;没配就返空,让 wf.js 走它自己的默认链
357
- let btnName = getWfButtonNames().submitBtn;
356
+ // startConfirmText 原样透传:它只承载模板脚本 wfStartConfirmText 的文案(见 indexMixin
357
+ // option 构造)。按钮名拼接与「后台 param19 自动确认」都由 wf.js 统一处理——
358
+ // 在这里替它拼默认文案的话,wf.js 会把它当成脚本自定义的告警,自动确认就失效了。
358
359
  let innerOnStart = ws.option.onStart;
359
360
  let formRef = this.getFormRef && this.getFormRef();
360
361
  openStartWfDialog(ws.ctx, {
@@ -377,11 +378,6 @@ export default {
377
378
  runBefore();
378
379
  }
379
380
  },
380
- startConfirmText: async (ctx) => {
381
- let text = typeof inner === "function" ? await inner.call(this, ctx) : inner;
382
- if (typeof text === "string" && text.trim()) return text; //模板脚本优先
383
- return btnName ? `您确定要${btnName}吗?` : ""; //返空 → wf.js 走自身默认
384
- },
385
381
  });
386
382
  },
387
383
  // 触发宿主翻单:step = -1 上一单 / +1 下一单
@@ -3,6 +3,14 @@ import { saveUserLog } from "@base/api/user";
3
3
  import settingConfig from "@/settings";
4
4
  import { openStartWfDialog } from "../../../components/wf/wfUtil";
5
5
  import { getWfButtonNames } from "../../../components/wf/wfButtonName";
6
+ import {
7
+ isWfAutoConfirm,
8
+ loadWfAutoConfirm,
9
+ } from "../../../components/wf/wfAutoConfirm";
10
+ import {
11
+ isWfUserRangeEnabled,
12
+ loadWfUserRange,
13
+ } from "../../../components/wf/wfUserRange";
6
14
 
7
15
  let modules = {};
8
16
  modules = {
@@ -134,7 +142,7 @@ modules = {
134
142
  });
135
143
  }
136
144
  },
137
- saveAndSubmitWfHandle(option) {
145
+ async saveAndSubmitWfHandle(option) {
138
146
  let formRef = this.getFormRef ? this.getFormRef() : this;
139
147
  let formConfig = formRef.formConfig;
140
148
  let reportTemplate = formRef.reportTemplate;
@@ -159,12 +167,18 @@ modules = {
159
167
  ? this.$t1(`您确定要${btnName}吗?`)
160
168
  : this.$t1("您确定要保存并提交流程吗?"));
161
169
 
170
+ // param19 + param12 都开:这道「保存前」的确认框不弹,把确认交给 wfStartDialog——
171
+ // 它在保存之后才探 preStart,探到候选人就由「修改候选人」弹框顶替,探不到才弹确认框。
172
+ // 任一为 false 都当场弹:param12 关着后面不可能有候选人弹框,延后没有意义。
173
+ await Promise.all([loadWfAutoConfirm(this), loadWfUserRange(this)]);
174
+ let autoConfirm = isWfAutoConfirm() && isWfUserRangeEnabled();
175
+
162
176
  return this.saveDefaultHandle({
163
177
  ...option,
164
178
  config: {
165
179
  ...option?.config,
166
180
  successMsg: option?.config?.successMsg ?? true,
167
- isConfirm: option?.config?.isConfirm ?? true,
181
+ isConfirm: option?.config?.isConfirm ?? !autoConfirm,
168
182
  confirmText: option?.config?.confirmText || confirmText,
169
183
  skipHostReloadAfterSave: true,
170
184
  //提交前置处理(与「提交流程」按钮共用同一个表单脚本)
@@ -187,7 +201,8 @@ modules = {
187
201
  wfCode: reportTemplate.objTypeCode,
188
202
  formCode: reportTemplate.formCode,
189
203
  serviceId: reportTemplate.serviceName,
190
- skipStartConfirm: true,
204
+ // 上面确认过就不再弹第二次;上面因 param19 跳过了,就得让弹框自己去确认
205
+ skipStartConfirm: !autoConfirm,
191
206
  // 提交后行为复用 xform 侧统一方法:
192
207
  // 成功 → onWfStartSuccess(关页签/刷新本页);失败/取消 → onWfStartAbort(刷新到编辑态)
193
208
  onStartSuccess: () =>