sun-biz 0.0.4-beta.3 → 0.0.4-beta.5

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.
@@ -1112,7 +1112,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1112
1112
  closeOnCancel: {
1113
1113
  type: Boolean,
1114
1114
  default: true
1115
- }
1115
+ },
1116
+ confirmBtnText: {},
1117
+ cancelBtnText: {}
1116
1118
  },
1117
1119
  emits: [
1118
1120
  "success",
@@ -1231,9 +1233,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1231
1233
  "enter"
1232
1234
  ])
1233
1235
  }, {
1234
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
1235
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
1236
- ])),
1236
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1237
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.cancelBtnText ?? "取消"), 1)
1238
+ ]),
1237
1239
  _: 1
1238
1240
  }, 512),
1239
1241
  _ctx.showConfirmButton ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
@@ -1248,9 +1250,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1248
1250
  "enter"
1249
1251
  ])
1250
1252
  }, {
1251
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[4] || (_cache[4] = [
1252
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
1253
- ])),
1253
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1254
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.confirmBtnText ?? "确认"), 1)
1255
+ ]),
1254
1256
  _: 1
1255
1257
  }, 8, [
1256
1258
  "loading",
@@ -4965,7 +4967,10 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
4965
4967
  options.onCancel?.(); // 触发取消回调
4966
4968
  closeDialog();
4967
4969
  },
4968
- class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog"
4970
+ class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog",
4971
+ "close-on-click-modal": false,
4972
+ "close-on-press-escape": false,
4973
+ "destroy-on-close": true
4969
4974
  }, {
4970
4975
  header: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, [
4971
4976
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("span", {}, title),
@@ -7672,7 +7677,7 @@ function useUpdateInvoiceFormConfig(options) {
7672
7677
  };
7673
7678
  /** 提交 */ const confirmFn = async ()=>{
7674
7679
  const isValid = await formRef.value.ref.validate();
7675
- if (isValid) return [];
7680
+ if (!isValid) return [];
7676
7681
  const params = {
7677
7682
  invoiceAllotId: originData.value?.invoiceAllotId,
7678
7683
  currentNo: updateModel.value?.currentNo,
@@ -7703,7 +7708,7 @@ function useUpdateInvoiceFormConfig(options) {
7703
7708
  "confirm-fn": confirmFn,
7704
7709
  onSuccess: _cache[2] || (_cache[2] = ()=>{
7705
7710
  emits('success');
7706
- formRef.value.value.ref?.resetFields();
7711
+ formRef.value.ref?.resetFields();
7707
7712
  })
7708
7713
  }, {
7709
7714
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -0,0 +1,4 @@
1
+ /** 获取系统时间 */
2
+ export declare function getSystemTime(): Promise<string | null>;
3
+ /** 获取系统时间 */
4
+ export declare function useFetchSystemTiem(): import("vue").Ref<any, any>;
package/dist/index.d.ts CHANGED
@@ -1,25 +1,26 @@
1
1
  /** components **/
2
- export * from './components/pro-table';
3
- export * from './components/pro-table-v2';
4
- export * from './components/patient-access/index.ts';
5
- export * from './components/print/index.ts';
6
- export * from './components/invoice/index.ts';
7
- export { Title } from './components/title';
8
- export { DictSelect, FlagSelect, HospitalSelect, } from './components/biz-select';
9
- export { CopyTextWithTooltip } from './components/copy-text-with-tooltip';
10
- export { FormDesignRender } from './components/form-design-render';
11
- export { ProDialog } from './components/pro-dialog';
12
- export { AccessInfo } from './components/access-info';
13
- export { ProForm, FormUnit, convertToWbNo, convertToSpellNo, type FormDescItem, } from './components/pro-form';
14
- export { DmlButton } from './components/dml-button/index.ts';
2
+ export * from "./components/pro-table";
3
+ export * from "./components/pro-table-v2";
4
+ export * from "./components/patient-access/index.ts";
5
+ export * from "./components/print/index.ts";
6
+ export * from "./components/invoice/index.ts";
7
+ export { Title } from "./components/title";
8
+ export { DictSelect, FlagSelect, HospitalSelect, } from "./components/biz-select";
9
+ export { CopyTextWithTooltip } from "./components/copy-text-with-tooltip";
10
+ export { FormDesignRender } from "./components/form-design-render";
11
+ export { ProDialog } from "./components/pro-dialog";
12
+ export { AccessInfo } from "./components/access-info";
13
+ export { ProForm, FormUnit, convertToWbNo, convertToSpellNo, type FormDescItem, } from "./components/pro-form";
14
+ export { DmlButton } from "./components/dml-button/index.ts";
15
15
  /** hooks ** */
16
- export { default as useRequest } from './hooks/use-request';
17
- export { default as useAppConfigData, MAIN_APP_CONFIG, } from './hooks/use-app-config';
18
- export type { PreferenceData } from './hooks/use-app-config';
19
- export { default as useDirectionSelect } from './hooks/use-direction-select';
20
- export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem } from './hooks/use-fetch-dataset';
21
- export { useEditableTable } from './hooks/use-editable-table';
22
- export type { TableRef } from './hooks/use-editable-table';
23
- export { useColumnConfig, useFormConfig } from './hooks/use-column&form-config';
24
- export { useDataChangeDetector } from './hooks/use-data-change-detector';
25
- export { debounce, isNumber, decimalCount, formatDecimalNumber } from './utils';
16
+ export { default as useRequest } from "./hooks/use-request";
17
+ export { default as useAppConfigData, MAIN_APP_CONFIG, } from "./hooks/use-app-config";
18
+ export type { PreferenceData } from "./hooks/use-app-config";
19
+ export { default as useDirectionSelect } from "./hooks/use-direction-select";
20
+ export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem, } from "./hooks/use-fetch-dataset";
21
+ export { getSystemTime, useFetchSystemTiem, } from "./hooks/use-fetch-dataset/use-fetch-time";
22
+ export { useEditableTable } from "./hooks/use-editable-table";
23
+ export type { TableRef } from "./hooks/use-editable-table";
24
+ export { useColumnConfig, useFormConfig } from "./hooks/use-column&form-config";
25
+ export { useDataChangeDetector } from "./hooks/use-data-change-detector";
26
+ export { debounce, isNumber, decimalCount, formatDecimalNumber } from "./utils";
package/dist/index.js CHANGED
@@ -1113,7 +1113,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1113
1113
  closeOnCancel: {
1114
1114
  type: Boolean,
1115
1115
  default: true
1116
- }
1116
+ },
1117
+ confirmBtnText: {},
1118
+ cancelBtnText: {}
1117
1119
  },
1118
1120
  emits: [
1119
1121
  "success",
@@ -1232,9 +1234,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1232
1234
  "enter"
1233
1235
  ])
1234
1236
  }, {
1235
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[3] || (_cache[3] = [
1236
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("取消")
1237
- ])),
1237
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1238
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.cancelBtnText ?? "取消"), 1)
1239
+ ]),
1238
1240
  _: 1
1239
1241
  }, 512),
1240
1242
  _ctx.showConfirmButton ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElButton), {
@@ -1249,9 +1251,9 @@ const pro_dialogvue_type_script_setup_true_lang_ts_name_ProDialog_hoisted_2 = {
1249
1251
  "enter"
1250
1252
  ])
1251
1253
  }, {
1252
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>_cache[4] || (_cache[4] = [
1253
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)(" 确认 ")
1254
- ])),
1254
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1255
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.confirmBtnText ?? "确认"), 1)
1256
+ ]),
1255
1257
  _: 1
1256
1258
  }, 8, [
1257
1259
  "loading",
@@ -5421,7 +5423,10 @@ var constant_DATA_SOURCE_CONTENT_TYPE_CODE = /*#__PURE__*/ function(DATA_SOURCE_
5421
5423
  options.onCancel?.(); // 触发取消回调
5422
5424
  closeDialog();
5423
5425
  },
5424
- class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog"
5426
+ class: isFullscreen.value ? "custom-dialog custom-dialog__bodyContent" : "custom-dialog",
5427
+ "close-on-click-modal": false,
5428
+ "close-on-press-escape": false,
5429
+ "destroy-on-close": true
5425
5430
  }, {
5426
5431
  header: ()=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("div", {}, [
5427
5432
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)("span", {}, title),
@@ -6907,7 +6912,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
6907
6912
  };
6908
6913
  /** 提交 */ const confirmFn = async ()=>{
6909
6914
  const isValid = await formRef.value.ref.validate();
6910
- if (isValid) return [];
6915
+ if (!isValid) return [];
6911
6916
  const params = {
6912
6917
  invoiceAllotId: originData.value?.invoiceAllotId,
6913
6918
  currentNo: updateModel.value?.currentNo,
@@ -6938,7 +6943,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
6938
6943
  "confirm-fn": confirmFn,
6939
6944
  onSuccess: _cache[2] || (_cache[2] = ()=>{
6940
6945
  emits('success');
6941
- formRef.value.value.ref?.resetFields();
6946
+ formRef.value.ref?.resetFields();
6942
6947
  })
6943
6948
  }, {
6944
6949
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -8424,5 +8429,17 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
8424
8429
  ]
8425
8430
  ]);
8426
8431
  /* ESM default export */ const form_design_render = form_design_render_exports_;
8432
+ /** 获取系统时间 */ async function getSystemTime() {
8433
+ const [res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/dictCommon/getSysTime");
8434
+ if (res?.success) return res.data;
8435
+ return (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)();
8436
+ }
8437
+ /** 获取系统时间 */ function useFetchSystemTiem() {
8438
+ const time = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
8439
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
8440
+ getSystemTime().then((val)=>time.value = val);
8441
+ });
8442
+ return time;
8443
+ }
8427
8444
  /** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
8428
- export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, Title, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, isNumber, print, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
8445
+ export { access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, Title, convertToSpellNo, convertToWbNo, debounce, decimalCount, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchSystemTiem, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.4-beta.3",
3
+ "version": "0.0.4-beta.5",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "src/*",