sun-biz 0.0.4-beta.29 → 0.0.4-beta.30

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.
@@ -389,8 +389,9 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
389
389
  }; // 获取 tag 类型
390
390
  const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames, 'tag') || 'primary';
391
391
  const renderColumn = (column)=>{
392
+ const { label, ...restColumn } = column;
392
393
  const columnProps = {
393
- ...column,
394
+ ...restColumn,
394
395
  align: column.align ?? 'center',
395
396
  fixed: column.fixed ?? false,
396
397
  showOverflowTooltip: column.showOverflowTooltip ?? column.prop !== OPERATION
@@ -411,7 +412,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
411
412
  }, [
412
413
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
413
414
  ]),
414
- column.label
415
+ 'function' == typeof column.label ? column.label() : column.label
415
416
  ], 2)
416
417
  ];
417
418
  };
@@ -2375,13 +2376,18 @@ const SELECTION = 'selection';
2375
2376
  },
2376
2377
  dragTipsClassName: {
2377
2378
  default: ''
2379
+ },
2380
+ scrollLoad: {
2381
+ type: Function,
2382
+ default: void 0
2378
2383
  }
2379
2384
  },
2380
2385
  emits: [
2381
2386
  "drag-end",
2382
2387
  "size-page-change",
2383
2388
  "current-page-change",
2384
- "sort-change"
2389
+ "sort-change",
2390
+ "scroll"
2385
2391
  ],
2386
2392
  setup (__props, { expose: __expose, emit: __emit }) {
2387
2393
  const props = __props;
@@ -2761,7 +2767,10 @@ const SELECTION = 'selection';
2761
2767
  }));
2762
2768
  if (serveColumns.value?.length) {
2763
2769
  result = result.map((item, index)=>{
2764
- let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
2770
+ let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {
2771
+ label: '',
2772
+ displayFlag: void 0
2773
+ };
2765
2774
  return {
2766
2775
  displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
2767
2776
  ...item,
@@ -2778,6 +2787,19 @@ const SELECTION = 'selection';
2778
2787
  }
2779
2788
  });
2780
2789
  /**
2790
+ * 处理 Element Plus 表格的滚动事件
2791
+ */ function handleTableScroll(event) {
2792
+ // 获取表格容器元素
2793
+ const clientHeight = document.querySelector(`#${uuid.value} .el-table__body-wrapper`)?.clientHeight;
2794
+ const scrollHeight = document.querySelector(`#${uuid.value} .el-table__body`)?.scrollHeight;
2795
+ const threshold = 50; // 距离底部50px时触发加载
2796
+ if (scrollHeight - event.scrollTop - clientHeight < threshold) {
2797
+ console.log('触发加载更多数据');
2798
+ props.scrollLoad();
2799
+ }
2800
+ }
2801
+ let debounceScroll = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(handleTableScroll, 500);
2802
+ /**
2781
2803
  * 表格渲染存在设置标志的情况 左边宽度加个40px
2782
2804
  */ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2783
2805
  let result = [
@@ -2792,7 +2814,8 @@ const SELECTION = 'selection';
2792
2814
  {
2793
2815
  type: SELECTION,
2794
2816
  prop: SELECTION,
2795
- minWidth: 80
2817
+ minWidth: 80,
2818
+ label: ''
2796
2819
  },
2797
2820
  ...result
2798
2821
  ];
@@ -2856,6 +2879,10 @@ const SELECTION = 'selection';
2856
2879
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
2857
2880
  ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
2858
2881
  id: uuid.value,
2882
+ onScroll: _cache[0] || (_cache[0] = (event)=>{
2883
+ if (props.scrollLoad) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(debounceScroll)(event);
2884
+ emit('scroll', event);
2885
+ }),
2859
2886
  "export-file-flag": exportFileFlag.value,
2860
2887
  componentDesc: componentDesc.value,
2861
2888
  key: refreshIndex.value,
@@ -3567,8 +3594,7 @@ const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_na
3567
3594
  */ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/searchcomponent/queryMenuXSearchTypeByExample', params);
3568
3595
  const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/bizsearch/queryBizDataListByExample', {
3569
3596
  ...params,
3570
- pageSize: 100,
3571
- pageNumber: 1
3597
+ pageSize: 100
3572
3598
  });
3573
3599
  /**
3574
3600
  * [4-10073-1] 根据业务标识获取Banner数据
@@ -3706,7 +3732,45 @@ function useColumnConfig(options) {
3706
3732
  const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
3707
3733
  return data;
3708
3734
  }
3709
- /* ESM default export */ const AccessInputvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
3735
+ const icon_combinevue_type_template_id_80fc0d0e_hoisted_1 = {
3736
+ width: "24px",
3737
+ height: "24px",
3738
+ viewBox: "0 0 24 24",
3739
+ version: "1.1",
3740
+ xmlns: "http://www.w3.org/2000/svg",
3741
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
3742
+ };
3743
+ function icon_combinevue_type_template_id_80fc0d0e_render(_ctx, _cache) {
3744
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", icon_combinevue_type_template_id_80fc0d0e_hoisted_1, _cache[0] || (_cache[0] = [
3745
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("title", null, "形状结合", -1),
3746
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("g", {
3747
+ id: "页面-1",
3748
+ stroke: "none",
3749
+ "stroke-width": "1",
3750
+ fill: "none",
3751
+ "fill-rule": "evenodd"
3752
+ }, [
3753
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("g", {
3754
+ id: "标识-径-路径",
3755
+ fill: "#0043B2"
3756
+ }, [
3757
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("path", {
3758
+ d: "M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M17.976,12.542 L6.366,12.542 L6.366,20.048 L8.562,20.048 L8.562,19.256 L15.69,19.256 L15.69,19.976 L17.976,19.976 L17.976,12.542 Z M15.69,14.432 L15.69,17.276 L8.562,17.276 L8.562,14.432 L15.69,14.432 Z M12.162,3.164 C10.272,5.972 6.87,8.15 3.558,9.464 C4.152,10.004 4.782,10.814 5.124,11.426 C5.934,11.048 6.744,10.598 7.536,10.112 L7.536,10.994 L16.536,10.994 L16.536,9.824 C17.382,10.31 18.264,10.742 19.128,11.156 C19.416,10.49 20.046,9.698 20.604,9.194 C18.174,8.312 15.78,7.088 13.476,4.946 C13.674,4.694 13.872,4.424 14.07,4.154 L12.162,3.164 Z M12.162,6.458 C13.224,7.502 14.268,8.33 15.294,9.032 L9.192,9.032 C10.254,8.258 11.244,7.412 12.162,6.458 Z",
3759
+ id: "形状结合"
3760
+ })
3761
+ ])
3762
+ ], -1)
3763
+ ]));
3764
+ }
3765
+ const script = {};
3766
+ const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(script, [
3767
+ [
3768
+ 'render',
3769
+ icon_combinevue_type_template_id_80fc0d0e_render
3770
+ ]
3771
+ ]);
3772
+ /* ESM default export */ const icon_combine = icon_combine_exports_;
3773
+ /* ESM default export */ const AccessInputvue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
3710
3774
  __name: 'AccessInput',
3711
3775
  props: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)({
3712
3776
  activeAccessWay: {},
@@ -3716,6 +3780,9 @@ function useColumnConfig(options) {
3716
3780
  },
3717
3781
  inputChange: {
3718
3782
  type: Boolean
3783
+ },
3784
+ isPatientAccess: {
3785
+ type: Boolean
3719
3786
  }
3720
3787
  }, {
3721
3788
  modelValue: {},
@@ -3740,13 +3807,32 @@ function useColumnConfig(options) {
3740
3807
  ...item,
3741
3808
  label: item.title,
3742
3809
  minWidth: 110,
3743
- prop: item.dataIndex
3810
+ prop: item.dataIndex,
3811
+ ...__props.isPatientAccess && 'patientName' === item.dataIndex && {
3812
+ render: (row)=>row?.patMainRecordId ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
3813
+ class: 'flex items-center justify-center gap-1'
3814
+ }, [
3815
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
3816
+ class: 'text-center truncate'
3817
+ }, [
3818
+ row?.patientName ?? '--'
3819
+ ]),
3820
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(icon_combine, {
3821
+ style: "width: 1rem; height: 1rem"
3822
+ }, null)
3823
+ ]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
3824
+ class: 'text-center truncate',
3825
+ key: "patientName"
3826
+ }, [
3827
+ row?.patientName ?? '--'
3828
+ ])
3829
+ } // 添加 render 项
3744
3830
  })));
3745
3831
  const setCurrentRow = (row)=>{
3746
3832
  currentRow.value = row;
3747
3833
  tableRef.value?.setCurrentRow(row);
3748
- };
3749
- /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
3834
+ }; /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */
3835
+ use_direction_select({
3750
3836
  triggerRef: inputRef,
3751
3837
  rowKey: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.primaryKey),
3752
3838
  data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.data),
@@ -3757,15 +3843,15 @@ function useColumnConfig(options) {
3757
3843
  tableRef?.value.eleTable.scrollTo(params);
3758
3844
  },
3759
3845
  enter: (e)=>{
3760
- const { code } = e;
3761
- /** 当没有检索结果数据或者正在检索中时 触发 enter 检索事件 */ if (__props.inputChange || !visible.value || __props.searchLoading || !__props.accessResult.data || !__props.accessResult.data.length) {
3762
- if (-1 !== code.indexOf(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER)) emits("enter", e);
3846
+ const { code } = e; /** 当没有检索结果数据或者正在检索中时 触发 enter 检索事件 */
3847
+ if (__props.inputChange || !visible.value || __props.searchLoading || !__props.accessResult.data || !__props.accessResult.data.length) {
3848
+ if (-1 !== code.indexOf(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER)) emits('enter');
3763
3849
  return;
3764
3850
  }
3765
3851
  const primaryKey = __props.accessResult.primaryKey;
3766
3852
  const rowList = __props.accessResult.data;
3767
- const currentRowId = currentRow?.value?.[primaryKey];
3768
- /** 当有检索结果数据时,通过 enter 事件触发 select */ if (code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER && currentRowId) {
3853
+ const currentRowId = currentRow?.value?.[primaryKey]; /** 当有检索结果数据时,通过 enter 事件触发 select */
3854
+ if (code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER && currentRowId) {
3769
3855
  const selectData = rowList?.find((item)=>item?.[primaryKey] === currentRowId);
3770
3856
  if (selectData) handleSelectRow(selectData);
3771
3857
  }
@@ -3785,11 +3871,14 @@ function useColumnConfig(options) {
3785
3871
  if (visible.value) hide();
3786
3872
  };
3787
3873
  const handleSelectRow = (row)=>{
3788
- emits("select", row);
3874
+ emits('select', row);
3789
3875
  };
3790
3876
  const handleCurrentChange = (rowData)=>{
3791
3877
  setCurrentRow(rowData);
3792
3878
  };
3879
+ function scrollLoad() {
3880
+ emits('enter', true);
3881
+ }
3793
3882
  __expose({
3794
3883
  focus: ()=>{
3795
3884
  inputRef.value?.focus();
@@ -3848,6 +3937,7 @@ function useColumnConfig(options) {
3848
3937
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)((0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
3849
3938
  ref_key: "tableRef",
3850
3939
  ref: tableRef,
3940
+ scrollLoad: scrollLoad,
3851
3941
  loading: _ctx.searchLoading,
3852
3942
  columns: columns.value,
3853
3943
  data: _ctx.accessResult.data,
@@ -3874,7 +3964,7 @@ function useColumnConfig(options) {
3874
3964
  ]));
3875
3965
  }
3876
3966
  });
3877
- const AccessInput_exports_ = AccessInputvue_type_script_setup_true_lang_ts;
3967
+ const AccessInput_exports_ = AccessInputvue_type_script_setup_true_lang_tsx;
3878
3968
  /* ESM default export */ const AccessInput = AccessInput_exports_;
3879
3969
  const Iconvue_type_script_setup_true_lang_ts_hoisted_1 = {
3880
3970
  width: "1.2em",
@@ -4106,13 +4196,15 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4106
4196
  // 检索 loading
4107
4197
  const searchLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4108
4198
  // input 框输入值
4109
- const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
4199
+ const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
4110
4200
  const inputChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4111
4201
  /** 组件配置信息 */ const configData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4112
4202
  // 当前激活进入方式
4203
+ const pageNumber = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
4204
+ const total = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(10);
4113
4205
  const activeAccessWay = (0, __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef)();
4114
4206
  const defaultResult = {
4115
- primaryKey: "",
4207
+ primaryKey: '',
4116
4208
  columns: [],
4117
4209
  data: []
4118
4210
  };
@@ -4121,8 +4213,11 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4121
4213
  });
4122
4214
  const accessInputRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4123
4215
  /**
4124
- * 获取组件配置
4125
- */ const getComponentConfig = async ()=>{
4216
+ * 是否是患者检索组件
4217
+ */ const isPatientAccess = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.PATIENT_INFO);
4218
+ /**
4219
+ * 获取组件配置
4220
+ */ const getComponentConfig = async ()=>{
4126
4221
  loading.value = true;
4127
4222
  const [, res] = await queryPatientAccessConfig({
4128
4223
  menuId: __props.menuId,
@@ -4137,11 +4232,15 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4137
4232
  }
4138
4233
  };
4139
4234
  /**
4140
- * emit change事件,患者切换
4141
- */ const handleChange = (data)=>{
4235
+ * emit change事件,患者切换
4236
+ */ const handleChange = (data)=>{
4142
4237
  // 患者检索组件将患者姓名放在input框中
4143
- if (__props.showName && data?.patientInfo?.patientName) inputValue.value = data.patientInfo.patientName;
4144
- emits("change", {
4238
+ if (__props.showName && data?.patientInfo?.patientName) {
4239
+ inputValue.value = data.patientInfo.patientName;
4240
+ // 如果是患者检索组件,patMainRecordId存在将patMainRecordId赋值给patientId 不存在则取patientId(需求24056)
4241
+ data.patientInfo.patientId = data?.patientInfo?.patMainRecordId ?? data.patientInfo.patientId;
4242
+ }
4243
+ emits('change', {
4145
4244
  inputInfo: {
4146
4245
  value: inputValue.value,
4147
4246
  primaryKey: accessResult.value.primaryKey,
@@ -4156,11 +4255,11 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4156
4255
  if (!data.interfaceId) return;
4157
4256
  const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
4158
4257
  interfaceId: data.interfaceId,
4159
- tradeCode: "001",
4258
+ tradeCode: '001',
4160
4259
  menuId: __props.menuId,
4161
4260
  params: {
4162
4261
  searchTypeCode: data.searchTypeCode,
4163
- searchValue: "",
4262
+ searchValue: '',
4164
4263
  indexTypeCode: data.indexTypeCode
4165
4264
  }
4166
4265
  });
@@ -4180,45 +4279,50 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4180
4279
  } else if (cardInfo?.indexNo || activeAccessWay.value?.indexTypeCode) handleChange({
4181
4280
  cardInfo
4182
4281
  });
4183
- else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("未检索到数据");
4282
+ else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到数据');
4184
4283
  };
4185
- /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo)=>{
4284
+ /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo, loadMore = false)=>{
4186
4285
  searchLoading.value = true;
4187
4286
  const [, res] = await queryBizDataList({
4188
4287
  componentCode: __props.code,
4189
4288
  searchTypeCode: data.searchTypeCode,
4190
4289
  searchValue: inputValue.value,
4191
4290
  indexTypeCode: cardInfo?.indexTypeCode ? cardInfo?.indexTypeCode : data.indexTypeCode,
4192
- indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo
4291
+ indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo,
4292
+ pageNumber: pageNumber.value
4193
4293
  });
4194
4294
  searchLoading.value = false;
4195
4295
  if (res?.data) {
4196
4296
  accessResult.value = {
4197
4297
  primaryKey: res.data.primaryKey,
4198
4298
  columns: res.data.titleAndAttribute,
4199
- data: res.data.data.data ?? []
4299
+ data: loadMore ? [
4300
+ ...accessResult.value?.data || [],
4301
+ ...res.data.data.data ?? []
4302
+ ] : res.data.data.data ?? []
4200
4303
  };
4304
+ total.value = Number(res.data.data.total);
4201
4305
  handleSearchResult(accessResult.value, cardInfo);
4202
4306
  }
4203
4307
  };
4204
4308
  /**
4205
- * 处理患者 access
4206
- * @param data 检索项配置
4207
- */ const handleAccess = async (data)=>{
4309
+ * 处理患者 access
4310
+ * @param data 检索项配置
4311
+ */ const handleAccess = async (data, loadMore = false)=>{
4208
4312
  inputChange.value = false;
4209
4313
  if (data?.interfaceId) {
4210
4314
  const cardInfo = await triggerCardAccess(data);
4211
4315
  if (cardInfo && __props.code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.READ_CARD) handleChange({
4212
4316
  cardInfo
4213
4317
  });
4214
- else triggerSearchAccess(data, cardInfo);
4215
- } else triggerSearchAccess(data);
4318
+ else triggerSearchAccess(data, cardInfo, loadMore);
4319
+ } else triggerSearchAccess(data, void 0, loadMore);
4216
4320
  };
4217
4321
  // 重置进入方式
4218
4322
  const resetAccessWay = (data)=>{
4219
4323
  const currentAccessWay = data ? data : configData.value?.bizSearchTypeList?.find((item)=>item.defaultFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) ?? configData.value?.bizSearchTypeList?.[0];
4220
4324
  if (currentAccessWay && (!activeAccessWay?.value?.searchTypeId || activeAccessWay?.value?.searchTypeId !== currentAccessWay.searchTypeId || !data)) {
4221
- inputValue.value = "";
4325
+ inputValue.value = '';
4222
4326
  activeAccessWay.value = currentAccessWay;
4223
4327
  accessResult.value = {
4224
4328
  ...defaultResult
@@ -4231,9 +4335,9 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4231
4335
  });
4232
4336
  };
4233
4337
  /**
4234
- * 处理检索方式切换
4235
- * @param data 检索项配置
4236
- */ const handleAccessWayChange = (data)=>{
4338
+ * 处理检索方式切换
4339
+ * @param data 检索项配置
4340
+ */ const handleAccessWayChange = (data)=>{
4237
4341
  resetAccessWay(data);
4238
4342
  if (data.triggerTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.TRIGGER_TYPE_CODE.CLICK) handleAccess(data);
4239
4343
  };
@@ -4259,6 +4363,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4259
4363
  ref: accessInputRef,
4260
4364
  modelValue: inputValue.value,
4261
4365
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>inputValue.value = $event),
4366
+ "is-patient-access": isPatientAccess.value,
4262
4367
  "access-result": accessResult.value,
4263
4368
  "active-access-way": activeAccessWay.value,
4264
4369
  "search-loading": searchLoading.value,
@@ -4268,8 +4373,12 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4268
4373
  emits('input-change', val);
4269
4374
  }),
4270
4375
  onClear: _cache[2] || (_cache[2] = ()=>emits('clear')),
4271
- onEnter: _cache[3] || (_cache[3] = ()=>{
4272
- handleAccess(activeAccessWay.value);
4376
+ onEnter: _cache[3] || (_cache[3] = (loadMore)=>{
4377
+ if (loadMore) {
4378
+ if (total.value === accessResult.value?.data?.length) return;
4379
+ pageNumber.value += 1;
4380
+ } else pageNumber.value = 1;
4381
+ handleAccess(activeAccessWay.value, loadMore);
4273
4382
  }),
4274
4383
  onSelect: _cache[4] || (_cache[4] = (rowData)=>{
4275
4384
  handleChange({
@@ -4279,6 +4388,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4279
4388
  })
4280
4389
  }, null, 8, [
4281
4390
  "modelValue",
4391
+ "is-patient-access",
4282
4392
  "access-result",
4283
4393
  "active-access-way",
4284
4394
  "search-loading",
@@ -6043,6 +6153,11 @@ const createPrint = ()=>{
6043
6153
  return true;
6044
6154
  };
6045
6155
  /** 校验参数是否都传了 */ const validateParams = (params)=>{
6156
+ if (params?.invoiceInfo && !params?.receiptId) {
6157
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("无票据信息,如需开票请及时领用!");
6158
+ breakPrint = true;
6159
+ return;
6160
+ }
6046
6161
  if (!validateRequired(params?.designFlag, "设计时标志不能为空")) return;
6047
6162
  if (!validateRequired(params?.menuId, "系统菜单标识不能为空")) return;
6048
6163
  if (!validateRequired(params?.receiptId, "单据标识不能为空")) return;
@@ -14,6 +14,7 @@ export declare const queryBizDataList: (params: SearchReqParams) => Promise<[imp
14
14
  }[];
15
15
  data: {
16
16
  data: TPatient[];
17
+ total: number;
17
18
  };
18
19
  }> | undefined]>;
19
20
  /**
@@ -35,7 +35,8 @@ export type HeaderRenderScope<T> = {
35
35
  column: TableColumnCtx<T>;
36
36
  [key: string]: any;
37
37
  };
38
- export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader'>> {
38
+ export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader' | 'label'>> {
39
+ label: string | (() => VNode | string);
39
40
  isDraggable?: boolean;
40
41
  defaultDisplayFlag?: number;
41
42
  required?: boolean | undefined;
package/dist/index.js CHANGED
@@ -389,8 +389,9 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
389
389
  }; // 获取 tag 类型
390
390
  const getTagType = (item, scope)=>filterEnum(handleRowAccordingToProp(scope.row, item.prop), enumMap.value.get(item.prop), item.fieldNames, 'tag') || 'primary';
391
391
  const renderColumn = (column)=>{
392
+ const { label, ...restColumn } = column;
392
393
  const columnProps = {
393
- ...column,
394
+ ...restColumn,
394
395
  align: column.align ?? 'center',
395
396
  fixed: column.fixed ?? false,
396
397
  showOverflowTooltip: column.showOverflowTooltip ?? column.prop !== OPERATION
@@ -411,7 +412,7 @@ const TableColumn = (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
411
412
  }, [
412
413
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("*")
413
414
  ]),
414
- column.label
415
+ 'function' == typeof column.label ? column.label() : column.label
415
416
  ], 2)
416
417
  ];
417
418
  };
@@ -2411,13 +2412,18 @@ const SELECTION = 'selection';
2411
2412
  },
2412
2413
  dragTipsClassName: {
2413
2414
  default: ''
2415
+ },
2416
+ scrollLoad: {
2417
+ type: Function,
2418
+ default: void 0
2414
2419
  }
2415
2420
  },
2416
2421
  emits: [
2417
2422
  "drag-end",
2418
2423
  "size-page-change",
2419
2424
  "current-page-change",
2420
- "sort-change"
2425
+ "sort-change",
2426
+ "scroll"
2421
2427
  ],
2422
2428
  setup (__props, { expose: __expose, emit: __emit }) {
2423
2429
  const props = __props;
@@ -2797,7 +2803,10 @@ const SELECTION = 'selection';
2797
2803
  }));
2798
2804
  if (serveColumns.value?.length) {
2799
2805
  result = result.map((item, index)=>{
2800
- let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {};
2806
+ let findObj = serveColumns.value.find((cur)=>cur.prop === item.prop) || {
2807
+ label: '',
2808
+ displayFlag: void 0
2809
+ };
2801
2810
  return {
2802
2811
  displayFlag: item.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
2803
2812
  ...item,
@@ -2814,6 +2823,19 @@ const SELECTION = 'selection';
2814
2823
  }
2815
2824
  });
2816
2825
  /**
2826
+ * 处理 Element Plus 表格的滚动事件
2827
+ */ function handleTableScroll(event) {
2828
+ // 获取表格容器元素
2829
+ const clientHeight = document.querySelector(`#${uuid.value} .el-table__body-wrapper`)?.clientHeight;
2830
+ const scrollHeight = document.querySelector(`#${uuid.value} .el-table__body`)?.scrollHeight;
2831
+ const threshold = 50; // 距离底部50px时触发加载
2832
+ if (scrollHeight - event.scrollTop - clientHeight < threshold) {
2833
+ console.log('触发加载更多数据');
2834
+ props.scrollLoad();
2835
+ }
2836
+ }
2837
+ let debounceScroll = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(handleTableScroll, 500);
2838
+ /**
2817
2839
  * 表格渲染存在设置标志的情况 左边宽度加个40px
2818
2840
  */ const tableColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
2819
2841
  let result = [
@@ -2828,7 +2850,8 @@ const SELECTION = 'selection';
2828
2850
  {
2829
2851
  type: SELECTION,
2830
2852
  prop: SELECTION,
2831
- minWidth: 80
2853
+ minWidth: 80,
2854
+ label: ''
2832
2855
  },
2833
2856
  ...result
2834
2857
  ];
@@ -2892,6 +2915,10 @@ const SELECTION = 'selection';
2892
2915
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
2893
2916
  ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
2894
2917
  id: uuid.value,
2918
+ onScroll: _cache[0] || (_cache[0] = (event)=>{
2919
+ if (props.scrollLoad) (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(debounceScroll)(event);
2920
+ emit('scroll', event);
2921
+ }),
2895
2922
  "export-file-flag": exportFileFlag.value,
2896
2923
  componentDesc: componentDesc.value,
2897
2924
  key: refreshIndex.value,
@@ -3603,8 +3630,7 @@ const pro_table_v2_exports_ = pro_table_v2vue_type_script_lang_tsx_setup_true_na
3603
3630
  */ const queryPatientAccessConfig = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/searchcomponent/queryMenuXSearchTypeByExample', params);
3604
3631
  const queryBizDataList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)('/bizsearch/queryBizDataListByExample', {
3605
3632
  ...params,
3606
- pageSize: 100,
3607
- pageNumber: 1
3633
+ pageSize: 100
3608
3634
  });
3609
3635
  /**
3610
3636
  * [4-10073-1] 根据业务标识获取Banner数据
@@ -4198,7 +4224,45 @@ function useColumnConfig(options) {
4198
4224
  const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
4199
4225
  return data;
4200
4226
  }
4201
- /* ESM default export */ const AccessInputvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4227
+ const icon_combinevue_type_template_id_80fc0d0e_hoisted_1 = {
4228
+ width: "24px",
4229
+ height: "24px",
4230
+ viewBox: "0 0 24 24",
4231
+ version: "1.1",
4232
+ xmlns: "http://www.w3.org/2000/svg",
4233
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
4234
+ };
4235
+ function icon_combinevue_type_template_id_80fc0d0e_render(_ctx, _cache) {
4236
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("svg", icon_combinevue_type_template_id_80fc0d0e_hoisted_1, _cache[0] || (_cache[0] = [
4237
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("title", null, "形状结合", -1),
4238
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("g", {
4239
+ id: "页面-1",
4240
+ stroke: "none",
4241
+ "stroke-width": "1",
4242
+ fill: "none",
4243
+ "fill-rule": "evenodd"
4244
+ }, [
4245
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("g", {
4246
+ id: "标识-径-路径",
4247
+ fill: "#0043B2"
4248
+ }, [
4249
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementVNode)("path", {
4250
+ d: "M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M17.976,12.542 L6.366,12.542 L6.366,20.048 L8.562,20.048 L8.562,19.256 L15.69,19.256 L15.69,19.976 L17.976,19.976 L17.976,12.542 Z M15.69,14.432 L15.69,17.276 L8.562,17.276 L8.562,14.432 L15.69,14.432 Z M12.162,3.164 C10.272,5.972 6.87,8.15 3.558,9.464 C4.152,10.004 4.782,10.814 5.124,11.426 C5.934,11.048 6.744,10.598 7.536,10.112 L7.536,10.994 L16.536,10.994 L16.536,9.824 C17.382,10.31 18.264,10.742 19.128,11.156 C19.416,10.49 20.046,9.698 20.604,9.194 C18.174,8.312 15.78,7.088 13.476,4.946 C13.674,4.694 13.872,4.424 14.07,4.154 L12.162,3.164 Z M12.162,6.458 C13.224,7.502 14.268,8.33 15.294,9.032 L9.192,9.032 C10.254,8.258 11.244,7.412 12.162,6.458 Z",
4251
+ id: "形状结合"
4252
+ })
4253
+ ])
4254
+ ], -1)
4255
+ ]));
4256
+ }
4257
+ const script = {};
4258
+ const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(script, [
4259
+ [
4260
+ 'render',
4261
+ icon_combinevue_type_template_id_80fc0d0e_render
4262
+ ]
4263
+ ]);
4264
+ /* ESM default export */ const icon_combine = icon_combine_exports_;
4265
+ /* ESM default export */ const AccessInputvue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4202
4266
  __name: 'AccessInput',
4203
4267
  props: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)({
4204
4268
  activeAccessWay: {},
@@ -4208,6 +4272,9 @@ function useColumnConfig(options) {
4208
4272
  },
4209
4273
  inputChange: {
4210
4274
  type: Boolean
4275
+ },
4276
+ isPatientAccess: {
4277
+ type: Boolean
4211
4278
  }
4212
4279
  }, {
4213
4280
  modelValue: {},
@@ -4232,13 +4299,32 @@ function useColumnConfig(options) {
4232
4299
  ...item,
4233
4300
  label: item.title,
4234
4301
  minWidth: 110,
4235
- prop: item.dataIndex
4302
+ prop: item.dataIndex,
4303
+ ...__props.isPatientAccess && 'patientName' === item.dataIndex && {
4304
+ render: (row)=>row?.patMainRecordId ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
4305
+ class: 'flex items-center justify-center gap-1'
4306
+ }, [
4307
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", {
4308
+ class: 'text-center truncate'
4309
+ }, [
4310
+ row?.patientName ?? '--'
4311
+ ]),
4312
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(icon_combine, {
4313
+ style: "width: 1rem; height: 1rem"
4314
+ }, null)
4315
+ ]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", {
4316
+ class: 'text-center truncate',
4317
+ key: "patientName"
4318
+ }, [
4319
+ row?.patientName ?? '--'
4320
+ ])
4321
+ } // 添加 render 项
4236
4322
  })));
4237
4323
  const setCurrentRow = (row)=>{
4238
4324
  currentRow.value = row;
4239
4325
  tableRef.value?.setCurrentRow(row);
4240
- };
4241
- /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
4326
+ }; /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */
4327
+ use_direction_select({
4242
4328
  triggerRef: inputRef,
4243
4329
  rowKey: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.primaryKey),
4244
4330
  data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.data),
@@ -4249,15 +4335,15 @@ function useColumnConfig(options) {
4249
4335
  tableRef?.value.eleTable.scrollTo(params);
4250
4336
  },
4251
4337
  enter: (e)=>{
4252
- const { code } = e;
4253
- /** 当没有检索结果数据或者正在检索中时 触发 enter 检索事件 */ if (__props.inputChange || !visible.value || __props.searchLoading || !__props.accessResult.data || !__props.accessResult.data.length) {
4254
- if (-1 !== code.indexOf(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER)) emits("enter", e);
4338
+ const { code } = e; /** 当没有检索结果数据或者正在检索中时 触发 enter 检索事件 */
4339
+ if (__props.inputChange || !visible.value || __props.searchLoading || !__props.accessResult.data || !__props.accessResult.data.length) {
4340
+ if (-1 !== code.indexOf(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER)) emits('enter');
4255
4341
  return;
4256
4342
  }
4257
4343
  const primaryKey = __props.accessResult.primaryKey;
4258
4344
  const rowList = __props.accessResult.data;
4259
- const currentRowId = currentRow?.value?.[primaryKey];
4260
- /** 当有检索结果数据时,通过 enter 事件触发 select */ if (code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER && currentRowId) {
4345
+ const currentRowId = currentRow?.value?.[primaryKey]; /** 当有检索结果数据时,通过 enter 事件触发 select */
4346
+ if (code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.KEY_CODE.ENTER && currentRowId) {
4261
4347
  const selectData = rowList?.find((item)=>item?.[primaryKey] === currentRowId);
4262
4348
  if (selectData) handleSelectRow(selectData);
4263
4349
  }
@@ -4277,11 +4363,14 @@ function useColumnConfig(options) {
4277
4363
  if (visible.value) hide();
4278
4364
  };
4279
4365
  const handleSelectRow = (row)=>{
4280
- emits("select", row);
4366
+ emits('select', row);
4281
4367
  };
4282
4368
  const handleCurrentChange = (rowData)=>{
4283
4369
  setCurrentRow(rowData);
4284
4370
  };
4371
+ function scrollLoad() {
4372
+ emits('enter', true);
4373
+ }
4285
4374
  __expose({
4286
4375
  focus: ()=>{
4287
4376
  inputRef.value?.focus();
@@ -4340,6 +4429,7 @@ function useColumnConfig(options) {
4340
4429
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)((0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
4341
4430
  ref_key: "tableRef",
4342
4431
  ref: tableRef,
4432
+ scrollLoad: scrollLoad,
4343
4433
  loading: _ctx.searchLoading,
4344
4434
  columns: columns.value,
4345
4435
  data: _ctx.accessResult.data,
@@ -4366,7 +4456,7 @@ function useColumnConfig(options) {
4366
4456
  ]));
4367
4457
  }
4368
4458
  });
4369
- const AccessInput_exports_ = AccessInputvue_type_script_setup_true_lang_ts;
4459
+ const AccessInput_exports_ = AccessInputvue_type_script_setup_true_lang_tsx;
4370
4460
  /* ESM default export */ const AccessInput = AccessInput_exports_;
4371
4461
  const Iconvue_type_script_setup_true_lang_ts_hoisted_1 = {
4372
4462
  width: "1.2em",
@@ -4598,13 +4688,15 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4598
4688
  // 检索 loading
4599
4689
  const searchLoading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4600
4690
  // input 框输入值
4601
- const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
4691
+ const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
4602
4692
  const inputChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4603
4693
  /** 组件配置信息 */ const configData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4604
4694
  // 当前激活进入方式
4695
+ const pageNumber = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(1);
4696
+ const total = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(10);
4605
4697
  const activeAccessWay = (0, __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef)();
4606
4698
  const defaultResult = {
4607
- primaryKey: "",
4699
+ primaryKey: '',
4608
4700
  columns: [],
4609
4701
  data: []
4610
4702
  };
@@ -4613,8 +4705,11 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4613
4705
  });
4614
4706
  const accessInputRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4615
4707
  /**
4616
- * 获取组件配置
4617
- */ const getComponentConfig = async ()=>{
4708
+ * 是否是患者检索组件
4709
+ */ const isPatientAccess = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.PATIENT_INFO);
4710
+ /**
4711
+ * 获取组件配置
4712
+ */ const getComponentConfig = async ()=>{
4618
4713
  loading.value = true;
4619
4714
  const [, res] = await queryPatientAccessConfig({
4620
4715
  menuId: __props.menuId,
@@ -4629,11 +4724,15 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4629
4724
  }
4630
4725
  };
4631
4726
  /**
4632
- * emit change事件,患者切换
4633
- */ const handleChange = (data)=>{
4727
+ * emit change事件,患者切换
4728
+ */ const handleChange = (data)=>{
4634
4729
  // 患者检索组件将患者姓名放在input框中
4635
- if (__props.showName && data?.patientInfo?.patientName) inputValue.value = data.patientInfo.patientName;
4636
- emits("change", {
4730
+ if (__props.showName && data?.patientInfo?.patientName) {
4731
+ inputValue.value = data.patientInfo.patientName;
4732
+ // 如果是患者检索组件,patMainRecordId存在将patMainRecordId赋值给patientId 不存在则取patientId(需求24056)
4733
+ data.patientInfo.patientId = data?.patientInfo?.patMainRecordId ?? data.patientInfo.patientId;
4734
+ }
4735
+ emits('change', {
4637
4736
  inputInfo: {
4638
4737
  value: inputValue.value,
4639
4738
  primaryKey: accessResult.value.primaryKey,
@@ -4648,11 +4747,11 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4648
4747
  if (!data.interfaceId) return;
4649
4748
  const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
4650
4749
  interfaceId: data.interfaceId,
4651
- tradeCode: "001",
4750
+ tradeCode: '001',
4652
4751
  menuId: __props.menuId,
4653
4752
  params: {
4654
4753
  searchTypeCode: data.searchTypeCode,
4655
- searchValue: "",
4754
+ searchValue: '',
4656
4755
  indexTypeCode: data.indexTypeCode
4657
4756
  }
4658
4757
  });
@@ -4672,45 +4771,50 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4672
4771
  } else if (cardInfo?.indexNo || activeAccessWay.value?.indexTypeCode) handleChange({
4673
4772
  cardInfo
4674
4773
  });
4675
- else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("未检索到数据");
4774
+ else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到数据');
4676
4775
  };
4677
- /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo)=>{
4776
+ /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo, loadMore = false)=>{
4678
4777
  searchLoading.value = true;
4679
4778
  const [, res] = await queryBizDataList({
4680
4779
  componentCode: __props.code,
4681
4780
  searchTypeCode: data.searchTypeCode,
4682
4781
  searchValue: inputValue.value,
4683
4782
  indexTypeCode: cardInfo?.indexTypeCode ? cardInfo?.indexTypeCode : data.indexTypeCode,
4684
- indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo
4783
+ indexNo: data.indexTypeCode && !cardInfo?.indexNo ? inputValue.value : cardInfo?.indexNo,
4784
+ pageNumber: pageNumber.value
4685
4785
  });
4686
4786
  searchLoading.value = false;
4687
4787
  if (res?.data) {
4688
4788
  accessResult.value = {
4689
4789
  primaryKey: res.data.primaryKey,
4690
4790
  columns: res.data.titleAndAttribute,
4691
- data: res.data.data.data ?? []
4791
+ data: loadMore ? [
4792
+ ...accessResult.value?.data || [],
4793
+ ...res.data.data.data ?? []
4794
+ ] : res.data.data.data ?? []
4692
4795
  };
4796
+ total.value = Number(res.data.data.total);
4693
4797
  handleSearchResult(accessResult.value, cardInfo);
4694
4798
  }
4695
4799
  };
4696
4800
  /**
4697
- * 处理患者 access
4698
- * @param data 检索项配置
4699
- */ const handleAccess = async (data)=>{
4801
+ * 处理患者 access
4802
+ * @param data 检索项配置
4803
+ */ const handleAccess = async (data, loadMore = false)=>{
4700
4804
  inputChange.value = false;
4701
4805
  if (data?.interfaceId) {
4702
4806
  const cardInfo = await triggerCardAccess(data);
4703
4807
  if (cardInfo && __props.code === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE.READ_CARD) handleChange({
4704
4808
  cardInfo
4705
4809
  });
4706
- else triggerSearchAccess(data, cardInfo);
4707
- } else triggerSearchAccess(data);
4810
+ else triggerSearchAccess(data, cardInfo, loadMore);
4811
+ } else triggerSearchAccess(data, void 0, loadMore);
4708
4812
  };
4709
4813
  // 重置进入方式
4710
4814
  const resetAccessWay = (data)=>{
4711
4815
  const currentAccessWay = data ? data : configData.value?.bizSearchTypeList?.find((item)=>item.defaultFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) ?? configData.value?.bizSearchTypeList?.[0];
4712
4816
  if (currentAccessWay && (!activeAccessWay?.value?.searchTypeId || activeAccessWay?.value?.searchTypeId !== currentAccessWay.searchTypeId || !data)) {
4713
- inputValue.value = "";
4817
+ inputValue.value = '';
4714
4818
  activeAccessWay.value = currentAccessWay;
4715
4819
  accessResult.value = {
4716
4820
  ...defaultResult
@@ -4723,9 +4827,9 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4723
4827
  });
4724
4828
  };
4725
4829
  /**
4726
- * 处理检索方式切换
4727
- * @param data 检索项配置
4728
- */ const handleAccessWayChange = (data)=>{
4830
+ * 处理检索方式切换
4831
+ * @param data 检索项配置
4832
+ */ const handleAccessWayChange = (data)=>{
4729
4833
  resetAccessWay(data);
4730
4834
  if (data.triggerTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.TRIGGER_TYPE_CODE.CLICK) handleAccess(data);
4731
4835
  };
@@ -4751,6 +4855,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4751
4855
  ref: accessInputRef,
4752
4856
  modelValue: inputValue.value,
4753
4857
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>inputValue.value = $event),
4858
+ "is-patient-access": isPatientAccess.value,
4754
4859
  "access-result": accessResult.value,
4755
4860
  "active-access-way": activeAccessWay.value,
4756
4861
  "search-loading": searchLoading.value,
@@ -4760,8 +4865,12 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4760
4865
  emits('input-change', val);
4761
4866
  }),
4762
4867
  onClear: _cache[2] || (_cache[2] = ()=>emits('clear')),
4763
- onEnter: _cache[3] || (_cache[3] = ()=>{
4764
- handleAccess(activeAccessWay.value);
4868
+ onEnter: _cache[3] || (_cache[3] = (loadMore)=>{
4869
+ if (loadMore) {
4870
+ if (total.value === accessResult.value?.data?.length) return;
4871
+ pageNumber.value += 1;
4872
+ } else pageNumber.value = 1;
4873
+ handleAccess(activeAccessWay.value, loadMore);
4765
4874
  }),
4766
4875
  onSelect: _cache[4] || (_cache[4] = (rowData)=>{
4767
4876
  handleChange({
@@ -4771,6 +4880,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
4771
4880
  })
4772
4881
  }, null, 8, [
4773
4882
  "modelValue",
4883
+ "is-patient-access",
4774
4884
  "access-result",
4775
4885
  "active-access-way",
4776
4886
  "search-loading",
@@ -6535,6 +6645,11 @@ const createPrint = ()=>{
6535
6645
  return true;
6536
6646
  };
6537
6647
  /** 校验参数是否都传了 */ const validateParams = (params)=>{
6648
+ if (params?.invoiceInfo && !params?.receiptId) {
6649
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("无票据信息,如需开票请及时领用!");
6650
+ breakPrint = true;
6651
+ return;
6652
+ }
6538
6653
  if (!validateRequired(params?.designFlag, "设计时标志不能为空")) return;
6539
6654
  if (!validateRequired(params?.menuId, "系统菜单标识不能为空")) return;
6540
6655
  if (!validateRequired(params?.receiptId, "单据标识不能为空")) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.4-beta.29",
3
+ "version": "0.0.4-beta.30",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "src/*",