sun-biz 0.0.4-beta.60 → 0.0.4-beta.62

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/index.js CHANGED
@@ -4448,8 +4448,8 @@ function icon_combinevue_type_template_id_80fc0d0e_render(_ctx, _cache) {
4448
4448
  ], -1)
4449
4449
  ]));
4450
4450
  }
4451
- const script = {};
4452
- const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(script, [
4451
+ const icon_combine_script = {};
4452
+ const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(icon_combine_script, [
4453
4453
  [
4454
4454
  'render',
4455
4455
  icon_combinevue_type_template_id_80fc0d0e_render
@@ -5538,6 +5538,8 @@ const PERSON = 'PERSON'; //应该放到BIZ_ID_TYPE_CODE这个里面
5538
5538
  bannerInfo.value = initBannerInfo.value;
5539
5539
  tagIds.value = [];
5540
5540
  tagBizId.value = '';
5541
+ inEncounterBizTagList.value = [];
5542
+ personBizTagList.value = [];
5541
5543
  loading.value = false;
5542
5544
  emits('bannerInfoChange', bannerInfo.value);
5543
5545
  return;
@@ -5593,9 +5595,18 @@ const PERSON = 'PERSON'; //应该放到BIZ_ID_TYPE_CODE这个里面
5593
5595
  });
5594
5596
  if (result?.success) tagIds.value = (result.data || []).map((item)=>item.tagId);
5595
5597
  }
5598
+ /**
5599
+ * 清空标签数据
5600
+ */ const clearTags = ()=>{
5601
+ inEncounterBizTagList.value = [];
5602
+ personBizTagList.value = [];
5603
+ tagIds.value = [];
5604
+ tagBizId.value = '';
5605
+ };
5596
5606
  __expose({
5597
5607
  refresh: queryBannerConfig,
5598
- popoverSelector: popoverSelector
5608
+ popoverSelector: popoverSelector,
5609
+ clearTags
5599
5610
  });
5600
5611
  return (_ctx, _cache)=>{
5601
5612
  const _component_el_text = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text");
@@ -6427,13 +6438,14 @@ const createPrint = ()=>{
6427
6438
  /**
6428
6439
  * 2.1 是否为不打印(2025-9-22 任务号【25720】)
6429
6440
  */ const whetherPrint = ()=>{
6430
- const { receiptPrintRuleCode, receiptPrintCategCode, menuXReceiptList } = defaultContext.receiptInfo || {};
6441
+ const { receiptPrintRuleCode, receiptPrintCategCode, menuXReceiptList, redPrintCategCode } = defaultContext.receiptInfo || {};
6431
6442
  if (!receiptPrintRuleCode) return;
6432
6443
  let code = receiptPrintCategCode;
6433
6444
  if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
6434
6445
  const menuReceiptInfo = menuXReceiptList?.find((item)=>item.menuId === defaultContext.printParams?.menuId);
6435
6446
  code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
6436
6447
  } else code = receiptPrintCategCode;
6448
+ if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.RED) code = redPrintCategCode;
6437
6449
  if (code === constant_RECEIPT_PRINT_CATEG_CODE.NO_PRINT) {
6438
6450
  breakPrint = true; // 如果是不打印则取消打印
6439
6451
  return;
@@ -6459,7 +6471,7 @@ const createPrint = ()=>{
6459
6471
  /**
6460
6472
  * 2.弹窗询问判断方法
6461
6473
  */ const messageBoxAskJudge = async (receiptPrintCategCode, receiptNameDisplay)=>{
6462
- if (receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT || receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_ISSUE_NO_PRINT) return await messageBoxAsk(receiptPrintCategCode, receiptNameDisplay);
6474
+ if (receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT || receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_ISSUE_NO_PRINT || receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ONLY_ISSUE_NO_PRINT) return await messageBoxAsk(receiptPrintCategCode, receiptNameDisplay);
6463
6475
  return true;
6464
6476
  };
6465
6477
  /**
@@ -6677,50 +6689,64 @@ const createPrint = ()=>{
6677
6689
  * 7.单据打印
6678
6690
  */ const printReceiptFn = async (item)=>{
6679
6691
  if (defaultContext?.receiptInfo?.printInterfaceId) {
6680
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("暂不支持打印接口");
6681
- throw new Error("暂不支持打印接口");
6682
- }
6683
- if (defaultContext?.printParams?.dataSourceContent) {
6684
- defaultContext.dataSourceContentItem = defaultContext?.printParams?.dataSourceContent;
6685
- defaultContext.dataSourceContentTypeCodeItem = defaultContext?.printParams?.dataSourceContentTypeCode;
6686
- }
6687
- if (!defaultContext?.printParams?.dataSourceContent) {
6688
- if (defaultContext?.printParams?.insurInterfaceId) {
6689
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("暂不支持医保单据内容获取!");
6690
- throw new Error("暂不支持医保单据内容获取!");
6691
- }
6692
- if ([
6693
- constant_ELECTRONIC_INVOICE_CODE.OUTPATIENT_REGISTRATION,
6694
- constant_ELECTRONIC_INVOICE_CODE.OUTPATIENT_CHARGE,
6695
- constant_ELECTRONIC_INVOICE_CODE.HOSPITALIZATION_SETTLEMENT,
6696
- constant_ELECTRONIC_INVOICE_CODE.PREPAYMENT
6697
- ].includes(defaultContext?.receiptInfo?.receiptId)) {
6698
- const [, res] = await queryInvoiceBizNos({
6699
- invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
6692
+ const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
6693
+ tradeCode: 'PRINT001',
6694
+ interfaceId: defaultContext?.receiptInfo?.printInterfaceId,
6695
+ menuId: defaultContext?.printParams?.menuId,
6696
+ params: {
6697
+ receiptId: defaultContext?.receiptInfo?.receiptId,
6700
6698
  bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
6701
- bizIds: defaultContext?.printParams?.bizIds,
6702
- onlyLastFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
6703
- receiptSplitResultId: item.receiptSplitResultId
6704
- });
6705
- if (res?.success) {
6706
- defaultContext.dataSourceContentItem = ((res.data?.bizIssueList ?? [])[0].invoiceList ?? [])[0].eInvoiceH5Url;
6707
- defaultContext.dataSourceContentTypeCodeItem = constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5;
6699
+ bizIds: defaultContext?.printParams?.bizIds
6708
6700
  }
6709
- } else // 如果单据信息的数据源类型为JSON,则不调用接口
6710
- if (defaultContext?.receiptInfo?.dataSourceTypeCode === constant_DATA_SOURCE_TYPE_CODE.JSON) {
6711
- defaultContext.dataSourceContentItem = defaultContext?.receiptInfo?.designJson;
6712
- defaultContext.dataSourceContentTypeCodeItem = constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON;
6713
- } else {
6714
- const [, res] = await queryReceiptDataSource({
6715
- receiptId: defaultContext?.printParams?.receiptId,
6716
- designFlag: defaultContext?.printParams?.designFlag,
6717
- bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
6718
- bizIds: defaultContext?.printParams?.bizIds,
6719
- receiptSplitResultId: item.receiptSplitResultId
6720
- });
6721
- if (res?.success) {
6722
- defaultContext.dataSourceContentItem = res.data?.dataSourceContent;
6701
+ });
6702
+ if (res?.success) {
6703
+ if (res?.data.printFinishFlag !== __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) return await Promise.resolve();
6704
+ defaultContext.dataSourceContentItem = res?.data?.dataSourceContent;
6705
+ defaultContext.dataSourceContentTypeCodeItem = res?.data?.dataSourceContentTypeCode;
6706
+ }
6707
+ } else {
6708
+ if (defaultContext?.printParams?.dataSourceContent) {
6709
+ defaultContext.dataSourceContentItem = defaultContext?.printParams?.dataSourceContent;
6710
+ defaultContext.dataSourceContentTypeCodeItem = defaultContext?.printParams?.dataSourceContentTypeCode;
6711
+ }
6712
+ if (!defaultContext?.printParams?.dataSourceContent) {
6713
+ if (defaultContext?.printParams?.insurInterfaceId) {
6714
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("暂不支持医保单据内容获取!");
6715
+ throw new Error("暂不支持医保单据内容获取!");
6716
+ }
6717
+ if ([
6718
+ constant_ELECTRONIC_INVOICE_CODE.OUTPATIENT_REGISTRATION,
6719
+ constant_ELECTRONIC_INVOICE_CODE.OUTPATIENT_CHARGE,
6720
+ constant_ELECTRONIC_INVOICE_CODE.HOSPITALIZATION_SETTLEMENT,
6721
+ constant_ELECTRONIC_INVOICE_CODE.PREPAYMENT
6722
+ ].includes(defaultContext?.receiptInfo?.receiptId)) {
6723
+ const [, res] = await queryInvoiceBizNos({
6724
+ invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
6725
+ bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
6726
+ bizIds: defaultContext?.printParams?.bizIds,
6727
+ onlyLastFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
6728
+ receiptSplitResultId: item.receiptSplitResultId
6729
+ });
6730
+ if (res?.success) {
6731
+ defaultContext.dataSourceContentItem = ((res.data?.bizIssueList ?? [])[0].invoiceList ?? [])[0].eInvoiceH5Url;
6732
+ defaultContext.dataSourceContentTypeCodeItem = constant_DATA_SOURCE_CONTENT_TYPE_CODE.H5;
6733
+ }
6734
+ } else // 如果单据信息的数据源类型为JSON,则不调用接口
6735
+ if (defaultContext?.receiptInfo?.dataSourceTypeCode === constant_DATA_SOURCE_TYPE_CODE.JSON) {
6736
+ defaultContext.dataSourceContentItem = defaultContext?.receiptInfo?.designJson;
6723
6737
  defaultContext.dataSourceContentTypeCodeItem = constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON;
6738
+ } else {
6739
+ const [, res] = await queryReceiptDataSource({
6740
+ receiptId: defaultContext?.printParams?.receiptId,
6741
+ designFlag: defaultContext?.printParams?.designFlag,
6742
+ bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
6743
+ bizIds: defaultContext?.printParams?.bizIds,
6744
+ receiptSplitResultId: item.receiptSplitResultId
6745
+ });
6746
+ if (res?.success) {
6747
+ defaultContext.dataSourceContentItem = res.data?.dataSourceContent;
6748
+ defaultContext.dataSourceContentTypeCodeItem = constant_DATA_SOURCE_CONTENT_TYPE_CODE.JSON;
6749
+ }
6724
6750
  }
6725
6751
  }
6726
6752
  }
@@ -6938,6 +6964,12 @@ const THE_OTHER_REASON_ID = "1633928410185179136";
6938
6964
  * @param code
6939
6965
  * @returns
6940
6966
  */ const updateCurrentNoById = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.basicRequest)("/invoicemanagement/updateCurrentNoById", params);
6967
+ /**
6968
+ * [1-10195-1]根据条件查询票据配置
6969
+ * 1、查询DICT_INVOICE_SETTING(票据配置)
6970
+ * @param params
6971
+ * @returns
6972
+ */ const queryInvoiceSettingList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/invoicesetting/queryInvoiceSettingByExample', params);
6941
6973
  function useInvoiceInfoFormConfig() {
6942
6974
  const data = useFormConfig({
6943
6975
  getData: ()=>[
@@ -10010,409 +10042,28 @@ const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalCha
10010
10042
  };
10011
10043
  // 全局事件:用于关闭其他实例的 popover
10012
10044
  const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT = 'hospital-charge-select:close-others';
10013
- /* ESM default export */ const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
10014
- __name: 'index',
10015
- props: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)({
10016
- hospitalId: {},
10017
- encounterTypeCode: {},
10018
- priceAt: {},
10019
- size: {
10020
- default: 'default'
10021
- },
10022
- immediate: {
10023
- type: Boolean,
10024
- default: false
10025
- },
10026
- popoverWidth: {
10027
- default: 1000
10028
- }
10029
- }, {
10030
- modelValue: {},
10031
- modelModifiers: {}
10032
- }),
10033
- emits: /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeModels)([
10034
- "change"
10035
- ], [
10036
- "update:modelValue"
10037
- ]),
10038
- setup (__props, { expose: __expose, emit: __emit }) {
10039
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.useCssVars)((_ctx)=>({
10040
- "2f25a0af": dynamicMaxHeight.value + "px"
10041
- }));
10042
- const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
10043
- const props = __props;
10044
- const emit = __emit;
10045
- const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
10046
- const instance = (0, __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance)();
10047
- const componentId = instance?.uid || Math.random(); // 唯一标识当前组件实例
10048
- const popoverRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
10049
- const inputSearchRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
10050
- const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
10051
- const popoverVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
10052
- const inputValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
10053
- const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
10054
- const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
10055
- const currentRow = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
10056
- const currentRowIndex = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(0);
10057
- const dynamicMaxHeight = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(300); // 表格列配置
10058
- const columns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>[
10059
- {
10060
- type: 'index',
10061
- label: '序号',
10062
- width: 60,
10063
- align: 'center'
10064
- },
10065
- {
10066
- prop: 'commodityNo',
10067
- label: '编码',
10068
- width: 120,
10069
- showOverflowTooltip: true
10070
- },
10071
- {
10072
- prop: 'commodityNameDisplay',
10073
- label: '名称',
10074
- minWidth: 350,
10075
- showOverflowTooltip: true,
10076
- render: (row)=>{
10077
- const hasPrice = null !== row.price && void 0 !== row.price;
10078
- if (!hasPrice) return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("div", null, [
10079
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
10080
- row.commodityNameDisplay
10081
- ]),
10082
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-text"), {
10083
- type: "danger",
10084
- style: "margin-left: 8px;"
10085
- }, {
10086
- default: ()=>[
10087
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-icon"), null, {
10088
- default: ()=>[
10089
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE__element_sun_icons_vue__.InfoFilled, null, null)
10090
- ]
10091
- }),
10092
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("\u5F53\u524D\u6536\u8D39\u9879\u76EE\u7684\u4EF7\u683C\u6709\u8BEF\uFF0C\u65E0\u6CD5\u9009\u62E9\uFF01")
10093
- ],
10094
- _: 1
10095
- })
10096
- ]);
10097
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
10098
- row.commodityNameDisplay
10099
- ]);
10100
- }
10101
- },
10102
- {
10103
- prop: 'commoditySpec',
10104
- label: '规格',
10105
- width: 100,
10106
- showOverflowTooltip: true,
10107
- render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
10108
- row.commoditySpec || '--'
10109
- ])
10110
- },
10111
- {
10112
- prop: 'price',
10113
- label: '价格',
10114
- minWidth: 80,
10115
- render: (row)=>{
10116
- const hasPrice = null !== row.price && void 0 !== row.price;
10117
- if (hasPrice) return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
10118
- row.price.toFixed(2)
10119
- ]);
10120
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)("span", null, [
10121
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)("--")
10122
- ]);
10123
- }
10124
- },
10125
- {
10126
- prop: 'unitName',
10127
- label: '单位',
10128
- width: 60,
10129
- align: 'center'
10130
- }
10131
- ]); // 判断行是否可选择(价格有效才能选择)
10132
- const isRowSelectable = (row)=>null !== row.price && void 0 !== row.price; // 获取行的class名称(用于置灰不可选择的行)
10133
- const getRowClassName = ({ row })=>{
10134
- if (!isRowSelectable(row)) return 'cursor-not-allowed !bg-gray-100 text-gray-300';
10135
- return 'cursor-pointer';
10136
- }; // 查询收费项目列表
10137
- const fetchChargeItems = async (keyword)=>{
10138
- if (!props.hospitalId || !props.priceAt) {
10139
- console.warn('hospitalId and priceAt are required');
10140
- return;
10141
- }
10142
- loading.value = true;
10143
- try {
10144
- const params = {
10145
- hospitalId: props.hospitalId,
10146
- priceAt: props.priceAt,
10147
- keyWord: keyword || void 0,
10148
- encounterTypeCode: props.encounterTypeCode
10149
- };
10150
- const [error, result] = await queryHospitalChargeItemListByExample(params);
10151
- if (!error && result) {
10152
- tableData.value = result.data || [];
10153
- currentRowIndex.value = -1;
10154
- tableRef.value?.proTableRef?.setCurrentRow?.(void 0);
10155
- } else tableData.value = [];
10156
- } catch (error) {
10157
- console.error('Failed to fetch hospital charge items:', error);
10158
- tableData.value = [];
10159
- } finally{
10160
- loading.value = false;
10161
- }
10162
- }; // 处理输入框输入
10163
- const handleInput = (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.debounce)(async function(v) {
10164
- await fetchChargeItems(v);
10165
- popoverVisible.value = true;
10166
- }, 500); // 处理行点击
10167
- const handleRowClick = (row)=>{
10168
- if (!isRowSelectable(row)) {
10169
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('当前收费项目价格有误,无法选择!');
10170
- return;
10171
- } // 如果点击的是当前已选中的行,则取消选择
10172
- if (currentRow.value && row.hospitalCommodityId === currentRow.value.hospitalCommodityId) {
10173
- currentRow.value = void 0;
10174
- model.value = void 0;
10175
- tableRef.value?.proTableRef?.setCurrentRow(void 0); // 清空时,先 emit 事件再关闭 popover
10176
- emit('change', void 0);
10177
- } else {
10178
- currentRow.value = row;
10179
- model.value = row; // 选择时,先 emit 事件再关闭 popover
10180
- emit('change', row);
10181
- } // 单选模式下选择后关闭popover
10182
- popoverVisible.value = false;
10183
- }; // 计算动态最大高度
10184
- const calculateDynamicMaxHeight = ()=>{
10185
- const input = inputSearchRef.value?.$el;
10186
- if (!input) return 300;
10187
- const inputRect = input.getBoundingClientRect();
10188
- const viewportHeight = window.innerHeight;
10189
- const padding = 32; // 上下padding总和
10190
- // 计算下方和上方的可用空间
10191
- const spaceBelow = viewportHeight - inputRect.bottom - padding;
10192
- const spaceAbove = inputRect.top - padding; // 取两者中较大的一个,但不超过400px,不小于200px
10193
- const availableSpace = Math.max(spaceBelow, spaceAbove);
10194
- const maxHeight = Math.min(Math.max(availableSpace, 200), 400);
10195
- dynamicMaxHeight.value = Math.floor(maxHeight);
10196
- }; // 切换popover显示
10197
- const toggleVisible = ()=>{
10198
- window.dispatchEvent(new CustomEvent(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, {
10199
- detail: {
10200
- componentId
10201
- }
10202
- })); // 计算动态高度
10203
- calculateDynamicMaxHeight();
10204
- popoverVisible.value = true;
10205
- if (popoverVisible.value) fetchChargeItems(inputValue.value);
10206
- }; // 点击外部关闭popover
10207
- const handleClickOutside = (e)=>{
10208
- if (e.target === inputSearchRef.value?.$el) return;
10209
- popoverVisible.value = false;
10210
- }; // 重置
10211
- const reset = ()=>{
10212
- inputValue.value = '';
10213
- model.value = void 0;
10214
- currentRow.value = void 0;
10215
- tableData.value = [];
10216
- }; // 清空输入
10217
- const handleClear = ()=>{
10218
- reset();
10219
- emit('change', void 0);
10220
- }; // 滚动到当前选中行
10221
- const scrollToCurrentRow = ()=>{
10222
- setTimeout(()=>{
10223
- if (currentRowIndex.value < 0) return;
10224
- try {
10225
- const tableElement = tableRef.value?.proTableRef?.$el;
10226
- if (!tableElement) return; // 查找当前高亮的行
10227
- const currentRowElement = tableElement.querySelector('.el-table__body tr.current-row');
10228
- if (!currentRowElement) return; // 使用 scrollIntoView 方法滚动到当前行
10229
- currentRowElement.scrollIntoView({
10230
- block: 'nearest',
10231
- behavior: 'smooth'
10232
- });
10233
- } catch (error) {
10234
- console.error('Error scrolling to current row:', error);
10235
- }
10236
- }, 100);
10237
- }; // 键盘事件
10238
- const handleKeydown = (e)=>{
10239
- if (!tableData.value.length || !popoverVisible.value) return;
10240
- if ('ArrowDown' === e.key) {
10241
- e.preventDefault(); // 向下查找下一个可选择的行
10242
- let nextIndex = currentRowIndex.value + 1;
10243
- while(nextIndex < tableData.value.length){
10244
- if (isRowSelectable(tableData.value[nextIndex])) {
10245
- currentRowIndex.value = nextIndex;
10246
- tableRef.value?.proTableRef?.setCurrentRow(tableData.value[nextIndex]);
10247
- scrollToCurrentRow();
10248
- break;
10249
- }
10250
- nextIndex++;
10251
- }
10252
- } else if ('ArrowUp' === e.key) {
10253
- e.preventDefault(); // 向上查找上一个可选择的行
10254
- let prevIndex = currentRowIndex.value - 1;
10255
- while(prevIndex >= 0){
10256
- if (isRowSelectable(tableData.value[prevIndex])) {
10257
- currentRowIndex.value = prevIndex;
10258
- tableRef.value?.proTableRef?.setCurrentRow(tableData.value[prevIndex]);
10259
- scrollToCurrentRow();
10260
- break;
10261
- }
10262
- prevIndex--;
10263
- }
10264
- } else if ('Enter' === e.key && currentRowIndex.value >= 0) {
10265
- e.preventDefault();
10266
- const row = tableData.value[currentRowIndex.value];
10267
- handleRowClick(row);
10268
- }
10269
- }; // 监听popover显示状态,管理键盘事件监听器
10270
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>popoverVisible.value, (val)=>{
10271
- if (val) document.addEventListener('keydown', handleKeydown, true);
10272
- else document.removeEventListener('keydown', handleKeydown, true);
10273
- }); // 监听其他实例的关闭事件
10274
- const handleCloseOtherPopovers = (event)=>{
10275
- const customEvent = event;
10276
- if (customEvent.detail?.componentId !== componentId) popoverVisible.value = false;
10277
- }; // 根据ID获取收费项目详情(用于回显)
10278
- const fetchItemById = async (hospitalCommodityId)=>{
10279
- if (!props.hospitalId || !props.priceAt) {
10280
- console.warn('hospitalId and priceAt are required for fetching item details');
10281
- return;
10282
- }
10283
- try {
10284
- const params = {
10285
- hospitalId: props.hospitalId,
10286
- priceAt: props.priceAt,
10287
- hospitalCommodityIds: [
10288
- hospitalCommodityId
10289
- ],
10290
- encounterTypeCode: props.encounterTypeCode
10291
- };
10292
- const [error, result] = await queryHospitalChargeItemListByExample(params);
10293
- if (!error && result?.data && result.data.length > 0) {
10294
- const item = result.data[0]; // 更新model为完整数据
10295
- model.value = item;
10296
- currentRow.value = item;
10297
- inputValue.value = item.commodityNameDisplay || '';
10298
- }
10299
- } catch (error) {
10300
- console.error('Failed to fetch hospital charge item by id:', error);
10301
- }
10302
- }; // 监听model变化,更新输入框显示
10303
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>model.value, (newValue)=>{
10304
- if (newValue) {
10305
- if (newValue.commodityNameDisplay) {
10306
- inputValue.value = newValue.commodityNameDisplay;
10307
- currentRow.value = newValue;
10308
- } else if (newValue.hospitalCommodityId) fetchItemById(newValue.hospitalCommodityId);
10309
- } else {
10310
- inputValue.value = '';
10311
- currentRow.value = void 0;
10312
- }
10313
- }, {
10314
- immediate: true
10315
- }); // 监听窗口大小变化和滚动事件,重新计算动态高度
10316
- const handleResize = ()=>{
10317
- if (popoverVisible.value) calculateDynamicMaxHeight();
10318
- }; // 组件挂载时如果immediate为true则立即查询
10319
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
10320
- window.addEventListener(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers); // 监听窗口大小变化和滚动
10321
- window.addEventListener('resize', handleResize);
10322
- window.addEventListener('scroll', handleResize, true);
10323
- if (props.immediate) fetchChargeItems();
10324
- });
10325
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount)(()=>{
10326
- document.removeEventListener('keydown', handleKeydown, true);
10327
- window.removeEventListener(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_CLOSE_OTHER_POPOVERS_EVENT, handleCloseOtherPopovers);
10328
- window.removeEventListener('resize', handleResize);
10329
- window.removeEventListener('scroll', handleResize, true);
10330
- });
10331
- __expose({
10332
- reset,
10333
- fetchChargeItems,
10334
- tableRef,
10335
- popoverRef
10336
- });
10337
- return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_1, [
10338
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInput), {
10339
- ref_key: "inputSearchRef",
10340
- ref: inputSearchRef,
10341
- modelValue: inputValue.value,
10342
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>inputValue.value = $event),
10343
- class: "input",
10344
- "prefix-icon": "Search",
10345
- size: _ctx.size,
10346
- placeholder: "请输入搜索内容",
10347
- clearable: "",
10348
- onKeydownCapture: _cache[1] || (_cache[1] = (0, __WEBPACK_EXTERNAL_MODULE_vue__.withKeys)((0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(()=>{}, [
10349
- "prevent"
10350
- ]), [
10351
- "enter"
10352
- ])),
10353
- onClickCapture: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withModifiers)(toggleVisible, [
10354
- "prevent"
10355
- ]),
10356
- onInput: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(handleInput),
10357
- onClear: handleClear
10358
- }, null, 8, [
10359
- "modelValue",
10360
- "size",
10361
- "onInput"
10362
- ]),
10363
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPopover), {
10364
- ref_key: "popoverRef",
10365
- ref: popoverRef,
10366
- width: _ctx.popoverWidth,
10367
- visible: popoverVisible.value,
10368
- "virtual-ref": inputSearchRef.value,
10369
- "virtual-triggering": "",
10370
- teleported: true,
10371
- "popper-class": "hospital-charge-select-popover",
10372
- placement: "top"
10373
- }, {
10374
- default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
10375
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives)(((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("div", hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect_hoisted_2, [
10376
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
10377
- ref_key: "tableRef",
10378
- ref: tableRef,
10379
- columns: columns.value,
10380
- data: tableData.value,
10381
- loading: loading.value,
10382
- "max-height": dynamicMaxHeight.value,
10383
- "row-key": 'hospitalCommodityId',
10384
- "highlight-current-row": true,
10385
- "row-class-name": getRowClassName,
10386
- onRowClick: handleRowClick
10387
- }, null, 8, [
10388
- "columns",
10389
- "data",
10390
- "loading",
10391
- "max-height"
10392
- ])
10393
- ])), [
10394
- [
10395
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ClickOutside),
10396
- handleClickOutside
10397
- ]
10398
- ])
10399
- ]),
10400
- _: 1
10401
- }, 8, [
10402
- "width",
10403
- "visible",
10404
- "virtual-ref"
10405
- ])
10406
- ]));
10045
+ /* ESM default export */ ({
10046
+ hospitalId: {},
10047
+ encounterTypeCode: {},
10048
+ priceAt: {},
10049
+ size: {
10050
+ default: 'default'
10051
+ },
10052
+ immediate: {
10053
+ type: Boolean,
10054
+ default: false
10055
+ },
10056
+ popoverWidth: {
10057
+ default: 1000
10407
10058
  }
10408
- });
10409
- const hospital_charge_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalChargeSelect, [
10410
- [
10411
- '__scopeId',
10412
- "data-v-ffb2d000"
10413
- ]
10414
- ]);
10415
- /* ESM default export */ const hospital_charge_select = hospital_charge_select_exports_;
10059
+ }), ({
10060
+ modelValue: {},
10061
+ modelModifiers: {}
10062
+ }), [
10063
+ "change"
10064
+ ], [
10065
+ "update:modelValue"
10066
+ ];
10416
10067
  const FormUnitvue_type_script_setup_true_lang_ts_name_formUnit_hoisted_1 = {
10417
10068
  key: 1,
10418
10069
  class: "overflow-hidden"
@@ -10991,6 +10642,20 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
10991
10642
  /** 点击外部 */ const handleClickOutside = ()=>{
10992
10643
  if (isClickOut.value) handleHide();
10993
10644
  };
10645
+ //获取标记阈值
10646
+ const getInvoiceSettingList = async (val)=>{
10647
+ if (!val?.invoiceMediaTypeCode || !val?.invoiceUsageCode) return;
10648
+ const [, res] = await queryInvoiceSettingList({
10649
+ invoiceMediaTypeCode: val.invoiceMediaTypeCode,
10650
+ invoiceUsageCodes: [
10651
+ val.invoiceUsageCode
10652
+ ]
10653
+ });
10654
+ if (res?.success) {
10655
+ const [data] = res?.data || [];
10656
+ if (data?.warningThreshold !== void 0 && data?.warningThreshold !== null && data?.warningThreshold > val?.residueCount) __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning(`剩余发票[${val?.residueCount}]张,请及时领用票据!`);
10657
+ }
10658
+ };
10994
10659
  // 获取票据列表
10995
10660
  const getInvoiceList = async ()=>{
10996
10661
  loading.value = true;
@@ -11007,6 +10672,7 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
11007
10672
  if (tableData.value && 0 === tableData.value.length) __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("未查询到票据相关信息!");
11008
10673
  if (tableData.value && tableData.value.length > 1) currentRow.value = tableData.value.find((item)=>item.invoiceMediaTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_MEDIA_TYPE_CODE.ELECTRONIC);
11009
10674
  else currentRow.value = (tableData.value ?? [])[0];
10675
+ getInvoiceSettingList(currentRow.value);
11010
10676
  emit("change", {
11011
10677
  currentRow: currentRow.value,
11012
10678
  invoiceListData: tableData.value
@@ -11014,7 +10680,10 @@ const invoicevue_type_script_setup_true_lang_ts_name_proInvoice_hoisted_4 = {
11014
10680
  };
11015
10681
  // 刷新
11016
10682
  const refresh = async ()=>{
10683
+ isRefreshing.value = true //刷新动画
10684
+ ;
11017
10685
  await getInvoiceList();
10686
+ isRefreshing.value = false;
11018
10687
  };
11019
10688
  // 设置选中的currentRow
11020
10689
  const setCurrentRow = (row)=>{
@@ -11735,6 +11404,789 @@ const table_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(table_s
11735
11404
  ]
11736
11405
  ]);
11737
11406
  /* ESM default export */ const table_select = table_select_exports_;
11407
+ /** 2-10022-1 新增门诊收费申请 */ const createChargeRequisition = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.outRequest)('/ofinchargerequisition/createChargeRequisition', params, {
11408
+ successMsg: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.translation)('global:add.success'),
11409
+ failMsg: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.translation)('global:add.fail')
11410
+ });
11411
+ /** 1-10013-1 根据条件查询用户列表 */ const queryUserListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
11412
+ /** 1-10147-1 根据条件查询医院的收费项目列表(业务态) */ const queryChargeItemList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/chargeItem/queryHospitalChargeItemListByExample', {
11413
+ pageSize: 100,
11414
+ pageNumber: 1,
11415
+ keyWord: '',
11416
+ ...params
11417
+ });
11418
+ /**
11419
+ * [1-10012-1]获取值域列表
11420
+ * @param data
11421
+ * @returns
11422
+ */ const api_queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/codeSystem/queryDataSetByCodeSystemCodes', params, {
11423
+ cancel: false
11424
+ });
11425
+ function useGetDataSetList(codeSystemCodes) {
11426
+ const list = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
11427
+ async function fetchData() {
11428
+ if (codeSystemCodes) {
11429
+ const [, result] = await api_queryDataSetByCodeSystemCodes({
11430
+ codeSystemCodes
11431
+ });
11432
+ if (result) list.value = result.data;
11433
+ }
11434
+ }
11435
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
11436
+ fetchData();
11437
+ });
11438
+ return list;
11439
+ }
11440
+ function useConfigData_useFormConfig(options) {
11441
+ const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
11442
+ const { getData, dataSetCodes } = options;
11443
+ const dataSet = useGetDataSetList(dataSetCodes);
11444
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
11445
+ return data;
11446
+ } // export function useColumnConfig<T extends readonly string[] | undefined>(
11447
+ /** 未挂号 */ const NO_REGISTER = 'NO_REGISTER';
11448
+ /** 医嘱单据类型标识 */ const CLI_ORDER_TYPE_ID = '1707651943885021184';
11449
+ /** 申请项类型代码 */ var constants_REQ_ITEM_TYPE_CODE = /*#__PURE__*/ function(REQ_ITEM_TYPE_CODE) {
11450
+ /** 商品 */ REQ_ITEM_TYPE_CODE["COMMODITY"] = "2";
11451
+ return REQ_ITEM_TYPE_CODE;
11452
+ }({});
11453
+ /** 医保审批状态代码 */ var constants_MED_APPROVE_STATUS_CODE = /*#__PURE__*/ function(MED_APPROVE_STATUS_CODE) {
11454
+ /** 未审批 */ MED_APPROVE_STATUS_CODE["NOT_APPROVE"] = "1";
11455
+ return MED_APPROVE_STATUS_CODE;
11456
+ }({});
11457
+ /** 商品类型代码 */ var constants_COMMODITY_TYPE_CODE = /*#__PURE__*/ function(COMMODITY_TYPE_CODE) {
11458
+ /** 收费项目 */ COMMODITY_TYPE_CODE["CHARGE_ITEM"] = "1";
11459
+ /** 药品 */ COMMODITY_TYPE_CODE["MEDICINE"] = "2";
11460
+ return COMMODITY_TYPE_CODE;
11461
+ }({});
11462
+ /* ESM default export */ const table_selectvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
11463
+ __name: 'table-select',
11464
+ props: {
11465
+ changeUpdate: {
11466
+ type: Boolean,
11467
+ default: false
11468
+ },
11469
+ classOptions: {
11470
+ default: 'w-[800px]'
11471
+ },
11472
+ selectLabel: {},
11473
+ rowKey: {},
11474
+ columns: {},
11475
+ data: {},
11476
+ placeholder: {},
11477
+ loading: {
11478
+ type: Boolean
11479
+ }
11480
+ },
11481
+ emits: [
11482
+ 'change'
11483
+ ],
11484
+ setup (__props, { expose: __expose, emit: __emit }) {
11485
+ const emit = __emit;
11486
+ const currentRow = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** 选中行 */
11487
+ const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** select选择器 */
11488
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** table表格 */
11489
+ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.data);
11490
+ const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
11491
+ /** 获取select的input */ const selectInputRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>selectRef.value?.$refs.inputRef);
11492
+ /** 设置选中行 */ const setCurrentRow = (row)=>{
11493
+ currentRow.value = row;
11494
+ if (row) {
11495
+ tableRef.value?.eleTable.setCurrentRow(row);
11496
+ if (__props.changeUpdate) emit('change', currentRow.value);
11497
+ } else tableRef.value?.eleTable.clearSelection();
11498
+ };
11499
+ /** 清空 */ const handleClear = ()=>{
11500
+ currentRow.value = void 0; // 清空选中的行
11501
+ emit('change', currentRow.value);
11502
+ selectRef.value?.blur();
11503
+ };
11504
+ /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
11505
+ triggerRef: selectInputRef,
11506
+ rowKey: __props.rowKey,
11507
+ data: tableData,
11508
+ activeItem: currentRow,
11509
+ rowHeight: 36,
11510
+ setCurrentItem: setCurrentRow,
11511
+ scrollTo: (params)=>{
11512
+ tableRef?.value.eleTable.scrollTo(params);
11513
+ },
11514
+ enter: ()=>{
11515
+ if (!__props.changeUpdate) emit('change', currentRow.value);
11516
+ tableRef.value?.eleTable.clearSelection();
11517
+ }
11518
+ });
11519
+ // watch(
11520
+ // () => currentRow.value,
11521
+ // async () => {
11522
+ // emit('change', currentRow.value);
11523
+ // },
11524
+ // );
11525
+ __expose({
11526
+ clear: handleClear,
11527
+ setCurrentRow
11528
+ });
11529
+ return (_ctx, _cache)=>{
11530
+ const _component_el_tag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-tag");
11531
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
11532
+ ref_key: "selectRef",
11533
+ ref: selectRef,
11534
+ clearable: true,
11535
+ "model-value": currentRow.value?.[_ctx.rowKey],
11536
+ placeholder: _ctx.placeholder,
11537
+ onClear: handleClear
11538
+ }, {
11539
+ ...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
11540
+ }), {
11541
+ label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
11542
+ currentRow.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_tag, {
11543
+ key: 0,
11544
+ type: "primary",
11545
+ effect: "light"
11546
+ }, {
11547
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
11548
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.selectLabel), 1)
11549
+ ]),
11550
+ _: 1
11551
+ })) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
11552
+ ]),
11553
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
11554
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElOption), {
11555
+ value: currentRow.value ?? '',
11556
+ class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
11557
+ _ctx.classOptions
11558
+ ]),
11559
+ style: {
11560
+ display: "flex",
11561
+ "flex-direction": "column",
11562
+ padding: "0.5rem",
11563
+ height: "260px",
11564
+ background: "#fff",
11565
+ overflow: "hidden",
11566
+ "font-weight": "normal"
11567
+ }
11568
+ }, {
11569
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
11570
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default"),
11571
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
11572
+ loading: _ctx.loading,
11573
+ ref_key: "tableRef",
11574
+ ref: tableRef,
11575
+ columns: _ctx.columns,
11576
+ data: _ctx.data,
11577
+ "row-key": _ctx.rowKey,
11578
+ pagination: false,
11579
+ "highlight-current-row": "",
11580
+ onRowClick: _cache[0] || (_cache[0] = (row)=>{
11581
+ currentRow.value = row;
11582
+ emit('change', currentRow.value);
11583
+ })
11584
+ }, null, 8, [
11585
+ "loading",
11586
+ "columns",
11587
+ "data",
11588
+ "row-key"
11589
+ ])
11590
+ ]),
11591
+ _: 3
11592
+ }, 8, [
11593
+ "value",
11594
+ "class"
11595
+ ])
11596
+ ]),
11597
+ _: 3
11598
+ }, 16, [
11599
+ "model-value",
11600
+ "placeholder"
11601
+ ]);
11602
+ };
11603
+ }
11604
+ });
11605
+ const charge_order_dialog_table_select_exports_ = table_selectvue_type_script_setup_true_lang_ts;
11606
+ /* ESM default export */ const charge_order_dialog_table_select = charge_order_dialog_table_select_exports_;
11607
+ function useChargeTableConfig() {
11608
+ const data = useColumnConfig({
11609
+ getData: (t)=>[
11610
+ {
11611
+ label: t('global:code'),
11612
+ prop: 'commodityNo',
11613
+ minWidth: 100
11614
+ },
11615
+ {
11616
+ label: t('global:name'),
11617
+ prop: 'commodityNameDisplay',
11618
+ minWidth: 200
11619
+ },
11620
+ {
11621
+ label: t('unitPrice', '单价'),
11622
+ prop: 'price',
11623
+ minWidth: 150,
11624
+ render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
11625
+ row?.price || row?.price === 0 ? (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.formatDecimalNumber)(row.price) : '--'
11626
+ ])
11627
+ },
11628
+ {
11629
+ label: t('order.unit', '单位'),
11630
+ prop: 'unitName',
11631
+ minWidth: 150
11632
+ }
11633
+ ]
11634
+ });
11635
+ return data;
11636
+ } /** 手工单费用明细 */
11637
+ function useFeeColumnConfig(options) {
11638
+ const { tableRef, data, columns, chargeItemList, chargeLoading, getChargeItemList, currentOrg } = options;
11639
+ const { addItem, delItem } = useEditableTable({
11640
+ tableRef,
11641
+ data,
11642
+ id: 'commodityNo'
11643
+ });
11644
+ const columnsConfig = useColumnConfig({
11645
+ getData: (t)=>[
11646
+ {
11647
+ label: t('global:index.number', '序号'),
11648
+ prop: 'indexNo',
11649
+ minWidth: 60,
11650
+ render: (row, $index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
11651
+ $index + 1
11652
+ ])
11653
+ },
11654
+ {
11655
+ label: t('global:code', '编码'),
11656
+ prop: 'commodityNo',
11657
+ minWidth: 100
11658
+ },
11659
+ {
11660
+ label: t('global:name'),
11661
+ minWidth: 180,
11662
+ prop: 'commodityId',
11663
+ editable: true,
11664
+ rules: [
11665
+ {
11666
+ required: true,
11667
+ message: t('order.feeTipSelect', '请选择收费项目'),
11668
+ trigger: [
11669
+ 'change',
11670
+ 'blur'
11671
+ ]
11672
+ }
11673
+ ],
11674
+ render: (row)=>row.commodityNo ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
11675
+ row.commodityNameDisplay
11676
+ ]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(charge_order_dialog_table_select, {
11677
+ ref: (el)=>row.tabSelectRef = el,
11678
+ classOptions: "",
11679
+ clearable: false,
11680
+ filterable: true,
11681
+ remote: true,
11682
+ "remote-method": (keyWord)=>getChargeItemList({
11683
+ keyWord,
11684
+ hospitalId: currentOrg?.orgId,
11685
+ encounterTypeCode: '1',
11686
+ priceAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
11687
+ }),
11688
+ rowKey: "commodityId",
11689
+ loading: chargeLoading.value,
11690
+ selectLabel: row.selectLabel ?? '',
11691
+ columns: columns.value,
11692
+ data: chargeItemList.value ?? [],
11693
+ placeholder: t('global:placeholder.keyword'),
11694
+ onChange: (currentRow)=>{
11695
+ const chargeItem = chargeItemList?.value?.find((item)=>item.commodityId === currentRow.commodityId);
11696
+ if (!chargeItem?.price && chargeItem?.price !== 0) {
11697
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error('添加失败!当前项目缺少价格信息,请联系管理员进行维护!');
11698
+ row.tabSelectRef?.clear();
11699
+ return;
11700
+ }
11701
+ row.selectLabel = chargeItem.commodityNameDisplay;
11702
+ row.tabSelectRef?.setCurrentRow(chargeItem);
11703
+ row.commodityId = chargeItem.commodityId;
11704
+ row.commodityNo = chargeItem.commodityNo;
11705
+ row.commoditySpec = chargeItem.commoditySpec;
11706
+ row.price = chargeItem.price;
11707
+ row.unitName = chargeItem.unitName;
11708
+ row.unitId = chargeItem.unitId;
11709
+ row.commodityNameDisplay = chargeItem.commodityNameDisplay;
11710
+ row.commodityPriceId = chargeItem.commodityPriceId;
11711
+ }
11712
+ }, null, 8, [
11713
+ "remote-method",
11714
+ "loading",
11715
+ "selectLabel",
11716
+ "columns",
11717
+ "data",
11718
+ "placeholder",
11719
+ "onChange"
11720
+ ])
11721
+ },
11722
+ {
11723
+ label: t('global:spec', '规格'),
11724
+ minWidth: 100,
11725
+ prop: 'commoditySpec'
11726
+ },
11727
+ {
11728
+ label: t('global:quantity', '数量'),
11729
+ prop: 'presQty',
11730
+ minWidth: 156,
11731
+ editable: true,
11732
+ rules: [
11733
+ {
11734
+ validator: (rule, value, callback)=>{
11735
+ if (value) callback();
11736
+ else callback(new Error(t('global:placeholder.input.template', {
11737
+ content: t('global:quantity', '数量')
11738
+ })));
11739
+ },
11740
+ trigger: 'change'
11741
+ }
11742
+ ],
11743
+ render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-input-number"), {
11744
+ clearable: false,
11745
+ modelValue: row.presQty,
11746
+ "onUpdate:modelValue": ($event)=>row.presQty = $event,
11747
+ min: 1
11748
+ }, null, 8, [
11749
+ "modelValue",
11750
+ "onUpdate:modelValue"
11751
+ ])
11752
+ },
11753
+ {
11754
+ label: t('unitPrice', '单价'),
11755
+ prop: 'price',
11756
+ minWidth: 150,
11757
+ render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
11758
+ row?.price || row?.price === 0 ? (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.formatDecimalNumber)(row.price) : '--'
11759
+ ])
11760
+ },
11761
+ {
11762
+ label: t('order.unit', '单位'),
11763
+ prop: 'unitName',
11764
+ minWidth: 150
11765
+ },
11766
+ {
11767
+ label: t('global:operation'),
11768
+ prop: 'operation',
11769
+ minWidth: 100,
11770
+ render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button"), {
11771
+ key: `operation-delete-${index}`,
11772
+ type: "danger",
11773
+ link: true,
11774
+ icon: "Delete",
11775
+ onClick: ()=>{
11776
+ delItem(index);
11777
+ }
11778
+ }, null, 8, [
11779
+ "onClick"
11780
+ ])
11781
+ }
11782
+ ]
11783
+ });
11784
+ return {
11785
+ columnsConfig,
11786
+ addItem
11787
+ };
11788
+ } /** 手工单 */
11789
+ function useChargeOrderConfig(options) {
11790
+ const { orderInfo, userList, getUserList, userLoading, currentOrg } = options;
11791
+ return useConfigData_useFormConfig({
11792
+ getData: (t)=>[
11793
+ {
11794
+ label: t('order.department', '开立科室'),
11795
+ name: 'presBizUnitId',
11796
+ component: 'bizUnitSelect',
11797
+ rules: [
11798
+ {
11799
+ required: true,
11800
+ message: t('global:placeholder.select.template', {
11801
+ name: t('order.department', '开立科室')
11802
+ }),
11803
+ trigger: 'change'
11804
+ }
11805
+ ],
11806
+ extraProps: {
11807
+ style: 'width: 180px',
11808
+ selectProps: {
11809
+ placeholder: t('global:placeholder.select.template', {
11810
+ name: t('order.department', '开立科室')
11811
+ })
11812
+ },
11813
+ hospitalId: currentOrg?.orgId || '',
11814
+ orgTypeCodes: [
11815
+ __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT
11816
+ ],
11817
+ encounterTypeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENCOUNTER_TYPE_CODE.OUTPATIENT,
11818
+ orgLocationId: currentOrg?.orgLocationId ?? ''
11819
+ }
11820
+ },
11821
+ {
11822
+ label: t('order.doctor', '开立医生'),
11823
+ name: 'presUserId',
11824
+ component: 'select',
11825
+ placeholder: t('global:placeholder.select.template', {
11826
+ name: t('order.doctor', '开立医生')
11827
+ }),
11828
+ rules: [
11829
+ {
11830
+ required: true,
11831
+ message: t('global:placeholder.select.template', {
11832
+ name: t('order.doctor', '开立医生')
11833
+ }),
11834
+ trigger: 'change'
11835
+ }
11836
+ ],
11837
+ extraProps: {
11838
+ style: 'width: 180px',
11839
+ remote: true,
11840
+ filterable: true,
11841
+ remoteShowSuffix: true,
11842
+ options: userList.value,
11843
+ loading: userLoading.value,
11844
+ remoteMethod: async (keyWord)=>{
11845
+ await getUserList({
11846
+ hospitalId: currentOrg?.orgId,
11847
+ keyWord: keyWord
11848
+ });
11849
+ },
11850
+ props: {
11851
+ label: 'userNameDisplay',
11852
+ value: 'userId'
11853
+ }
11854
+ }
11855
+ },
11856
+ {
11857
+ label: t('order.createTime', '开立时间'),
11858
+ name: 'presAt',
11859
+ component: 'date-picker',
11860
+ type: 'datetime',
11861
+ placeholder: t('global:placeholder.select.template', {
11862
+ name: t('order.createTime', '开立时间')
11863
+ }),
11864
+ extraProps: {
11865
+ clearable: false,
11866
+ type: 'datetime',
11867
+ format: 'YYYY-MM-DD HH:mm:ss',
11868
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
11869
+ disabledDate: (time)=>time.getTime() > Date.now() - 8.64e6,
11870
+ disabledHours: ()=>{
11871
+ const hours = [];
11872
+ for(let i = 0; i < 24; i++)if (!(new Date().getHours() > i - 1)) hours.push(i);
11873
+ return hours;
11874
+ },
11875
+ disabledMinutes: ()=>{
11876
+ const minutes = [];
11877
+ for(let i = 0; i < 60; i++)if (!(new Date().getMinutes() > i - 1)) minutes.push(i);
11878
+ return minutes;
11879
+ }
11880
+ },
11881
+ rules: [
11882
+ {
11883
+ required: true,
11884
+ message: t('global:placeholder.select.template', {
11885
+ name: t('order.createTime', '开立时间')
11886
+ }),
11887
+ trigger: 'change'
11888
+ }
11889
+ ]
11890
+ },
11891
+ {
11892
+ label: t('order.execDept', '执行科室'),
11893
+ name: 'execBizUnitId',
11894
+ component: 'bizUnitSelect',
11895
+ rules: [
11896
+ {
11897
+ required: true,
11898
+ message: t('global:placeholder.select.template', {
11899
+ name: t('order.execDept', '执行科室')
11900
+ }),
11901
+ trigger: 'change'
11902
+ }
11903
+ ],
11904
+ formItemProps: {
11905
+ style: 'margin-bottom: 0; margin-right: 0'
11906
+ },
11907
+ extraProps: {
11908
+ style: 'width: 180px',
11909
+ selectProps: {
11910
+ placeholder: t('global:placeholder.select.template', {
11911
+ name: t('patient.patientName', '执行科室/病区')
11912
+ })
11913
+ },
11914
+ hospitalId: currentOrg?.orgId || '',
11915
+ /** 可选科室+病区选项 */ orgTypeCodes: [
11916
+ __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.AREA,
11917
+ __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT
11918
+ ],
11919
+ encounterTypeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENCOUNTER_TYPE_CODE.OUTPATIENT,
11920
+ orgLocationId: currentOrg?.orgLocationId ?? '',
11921
+ onChange: (val, data)=>{
11922
+ orderInfo.value.execBizUnitCategCode = data.orgTypeCode ?? '';
11923
+ }
11924
+ }
11925
+ }
11926
+ ]
11927
+ });
11928
+ }
11929
+ /** 获取收费项目 */ function useFetchChargeItemList() {
11930
+ const chargeItemList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
11931
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
11932
+ const getChargeItemList = async (params)=>{
11933
+ loading.value = true;
11934
+ const [, res] = await queryChargeItemList(params);
11935
+ loading.value = false;
11936
+ chargeItemList.value = res?.data ? res.data : [];
11937
+ };
11938
+ return {
11939
+ loading,
11940
+ chargeItemList,
11941
+ getChargeItemList
11942
+ };
11943
+ }
11944
+ // 获取操作员、获取就诊医生
11945
+ function useFetchUserList() {
11946
+ const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
11947
+ const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
11948
+ const getUserList = async (params)=>{
11949
+ loading.value = true;
11950
+ const [, res] = await queryUserListByExample({
11951
+ pageNumber: 1,
11952
+ pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE,
11953
+ enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
11954
+ ...params
11955
+ });
11956
+ loading.value = false;
11957
+ if (res?.success) userList.value = res.data ?? [];
11958
+ };
11959
+ return {
11960
+ loading,
11961
+ userList,
11962
+ getUserList
11963
+ };
11964
+ }
11965
+ /* ESM default export */ const charge_order_dialogvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
11966
+ __name: 'index',
11967
+ emits: [
11968
+ 'success'
11969
+ ],
11970
+ setup (__props, { expose: __expose, emit: __emit }) {
11971
+ const emits = __emit;
11972
+ const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
11973
+ const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
11974
+ const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
11975
+ const paramsData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
11976
+ chargeReqTypeCode: '',
11977
+ patientId: '',
11978
+ hospitalId: ''
11979
+ });
11980
+ const orderInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
11981
+ presBizUnitId: '',
11982
+ presUserId: '',
11983
+ presAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)(),
11984
+ execBizUnitId: ''
11985
+ });
11986
+ const detailList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
11987
+ const { userList, getUserList, loading: userLoading } = useFetchUserList();
11988
+ const { chargeItemList, loading: chargeLoading, getChargeItemList } = useFetchChargeItemList();
11989
+ const currentOrg = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
11990
+ orgId: '',
11991
+ orgLocationId: ''
11992
+ });
11993
+ const createConfig = useChargeOrderConfig({
11994
+ orderInfo,
11995
+ userList,
11996
+ getUserList,
11997
+ userLoading,
11998
+ currentOrg
11999
+ });
12000
+ const tableSelectConfig = useChargeTableConfig();
12001
+ const { columnsConfig: columns, addItem } = useFeeColumnConfig({
12002
+ tableRef,
12003
+ data: detailList,
12004
+ columns: tableSelectConfig,
12005
+ chargeItemList,
12006
+ chargeLoading,
12007
+ getChargeItemList,
12008
+ currentOrg
12009
+ });
12010
+ const addNewDtItem = ()=>{
12011
+ addItem({
12012
+ key: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.generateUUID)(),
12013
+ editable: true,
12014
+ unitName: '',
12015
+ price: 0,
12016
+ presQty: 1,
12017
+ commoditySpec: '',
12018
+ unitId: '',
12019
+ commodityNameDisplay: '',
12020
+ commodityId: '',
12021
+ commodityNo: ''
12022
+ });
12023
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
12024
+ const row = tableRef.value?.proTableRef?.$el?.querySelector(`.el-table__body-wrapper tbody tr:nth-child(${detailList.value.length - 1})`);
12025
+ row?.scrollIntoView({
12026
+ behavior: 'smooth',
12027
+ block: 'center'
12028
+ });
12029
+ });
12030
+ };
12031
+ const normalizeCreateParams = ()=>({
12032
+ chargeReqTypeCode: paramsData.value.chargeReqTypeCode,
12033
+ patientId: paramsData.value.patientId,
12034
+ regId: paramsData.value.regId === NO_REGISTER ? void 0 : paramsData.value.regId,
12035
+ hospitalId: paramsData.value.hospitalId,
12036
+ chargeReqList: [
12037
+ {
12038
+ orderFormTypeId: CLI_ORDER_TYPE_ID,
12039
+ presBizUnitCategCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT,
12040
+ presBizUnitId: orderInfo.value.presBizUnitId,
12041
+ presUserId: orderInfo.value.presUserId,
12042
+ presAt: orderInfo.value.presAt,
12043
+ herbNum: 1,
12044
+ execBizUnitCategCode: orderInfo.value.execBizUnitCategCode,
12045
+ execBizUnitId: orderInfo.value.execBizUnitId,
12046
+ expiredAt: '2099-12-31 23:59:59',
12047
+ chargeReqItemDtList: detailList?.value?.map((item)=>({
12048
+ reqItemTypeCode: constants_REQ_ITEM_TYPE_CODE.COMMODITY,
12049
+ medicineFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
12050
+ reqItemId: item.commodityId,
12051
+ presQty: item.presQty,
12052
+ presUnitId: item.unitId,
12053
+ chargeReqQty: item.presQty,
12054
+ chargeUnitId: item.unitId,
12055
+ chargeReqFeeDtList: [
12056
+ {
12057
+ commodityTypeCode: constants_COMMODITY_TYPE_CODE.CHARGE_ITEM,
12058
+ commodityId: item.commodityId,
12059
+ commodityPriceId: item.commodityPriceId,
12060
+ chargePrice: item.price,
12061
+ chargeUnitId: item.unitId,
12062
+ chargeReqQty: item.presQty,
12063
+ needMedApproveFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
12064
+ medApproveStatusCode: constants_MED_APPROVE_STATUS_CODE.NOT_APPROVE,
12065
+ needUploadFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
12066
+ herbPerQty: 1,
12067
+ chargeUnitFactor: 1,
12068
+ chargeReqItemFactor: 1
12069
+ }
12070
+ ]
12071
+ }))
12072
+ }
12073
+ ]
12074
+ });
12075
+ const confirmFn = async ()=>{
12076
+ const isValid = await formRef.value.ref.validate();
12077
+ const isDetailValid = await tableRef?.value?.formRef?.validate();
12078
+ if (!isValid || !isDetailValid) return [
12079
+ {
12080
+ message: '请填写必填项'
12081
+ }
12082
+ ];
12083
+ const orderData = normalizeCreateParams();
12084
+ const [err, res] = await createChargeRequisition(orderData);
12085
+ return [
12086
+ err,
12087
+ res
12088
+ ];
12089
+ };
12090
+ const resetOrderInfo = async ()=>{
12091
+ orderInfo.value = {
12092
+ presBizUnitId: paramsData.value.presBizUnitId || '',
12093
+ presUserId: paramsData.value.presUserId || '',
12094
+ execBizUnitId: paramsData.value.execBizUnitId || '',
12095
+ presAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
12096
+ };
12097
+ };
12098
+ __expose({
12099
+ open: async (params)=>{
12100
+ paramsData.value = params;
12101
+ currentOrg.orgId = params.hospitalId;
12102
+ currentOrg.orgLocationId = params.orgLocationId;
12103
+ resetOrderInfo();
12104
+ getUserList({
12105
+ hospitalId: params.hospitalId
12106
+ });
12107
+ dialogRef.value.open();
12108
+ await addNewDtItem();
12109
+ await getChargeItemList({
12110
+ hospitalId: params.hospitalId,
12111
+ encounterTypeCode: '1',
12112
+ priceAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
12113
+ });
12114
+ }
12115
+ });
12116
+ return (_ctx, _cache)=>{
12117
+ const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
12118
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_dialog), {
12119
+ ref_key: "dialogRef",
12120
+ ref: dialogRef,
12121
+ "confirm-fn": confirmFn,
12122
+ title: _ctx.$t('newChargeOrder', '新处方'),
12123
+ "before-close": (done)=>{
12124
+ formRef.value.ref.resetFields();
12125
+ resetOrderInfo();
12126
+ detailList.value = [];
12127
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
12128
+ done && done();
12129
+ });
12130
+ },
12131
+ "close-on-click-modal": false,
12132
+ onSuccess: _cache[1] || (_cache[1] = ($event)=>emits('success')),
12133
+ width: 1220
12134
+ }, {
12135
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
12136
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
12137
+ ref_key: "formRef",
12138
+ ref: formRef,
12139
+ modelValue: orderInfo.value,
12140
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>orderInfo.value = $event),
12141
+ data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(createConfig),
12142
+ "layout-mode": "inline"
12143
+ }, null, 8, [
12144
+ "modelValue",
12145
+ "data"
12146
+ ]),
12147
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
12148
+ title: _ctx.$t('feeList', '费用明细'),
12149
+ class: "mb-2"
12150
+ }, null, 8, [
12151
+ "title"
12152
+ ]),
12153
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
12154
+ "max-height": "calc(100vh - 550px)",
12155
+ "row-key": "commodityNo",
12156
+ ref_key: "tableRef",
12157
+ ref: tableRef,
12158
+ editable: true,
12159
+ columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(columns),
12160
+ data: detailList.value
12161
+ }, null, 8, [
12162
+ "columns",
12163
+ "data"
12164
+ ]),
12165
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
12166
+ class: "rounded-0 w-full border-t-0",
12167
+ style: {
12168
+ "border-top-width": "0",
12169
+ "border-radius": "0"
12170
+ },
12171
+ onClick: addNewDtItem,
12172
+ icon: "Plus"
12173
+ }, {
12174
+ default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
12175
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.$t('global:add')), 1)
12176
+ ]),
12177
+ _: 1
12178
+ })
12179
+ ]),
12180
+ _: 1
12181
+ }, 8, [
12182
+ "title",
12183
+ "before-close"
12184
+ ]);
12185
+ };
12186
+ }
12187
+ });
12188
+ const charge_order_dialog_exports_ = charge_order_dialogvue_type_script_setup_true_lang_ts;
12189
+ /* ESM default export */ const charge_order_dialog = charge_order_dialog_exports_;
11738
12190
  const utils_DICT_SELECT = 'dictSelect';
11739
12191
  /**
11740
12192
  * 集合规则
@@ -12065,6 +12517,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
12065
12517
  emit('searchChange', data);
12066
12518
  };
12067
12519
  /** 新患者按钮 */ const clearFn = async ()=>{
12520
+ bannerRef.value?.clearTags?.();
12068
12521
  emit('clear');
12069
12522
  };
12070
12523
  /** 票据方法 */ const handleInvoiceChange = async (data)=>{
@@ -13732,4 +14185,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
13732
14185
  ]);
13733
14186
  /* ESM default export */ const form_design_render = form_design_render_exports_;
13734
14187
  /** components **/ /** hooks ** */ var __webpack_exports__COMPONENT_CODE = __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.COMPONENT_CODE;
13735
- export { utils_AVATAR_TYPE_CODE as AVATAR_TYPE_CODE, access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, biz_unit_select as BizUnitSelect, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, department_select as DepartmentSelect, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_charge_select as HospitalChargeSelect, hospital_select as HospitalSelect, keyboard_value as KeyboardValue, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_avatar as ProAvatar, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, table_select as TableSelect, types_TableSelectMode as TableSelectMode, tag_select as TagSelect, Title, user_select as UserSelect, ward_select as WardSelect, convertToSpellNo, convertToWbNo, createShortcutDirective, debounce, decimalCount, findKeyCommandConfig, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, useDirectionKey, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };
14188
+ export { utils_AVATAR_TYPE_CODE as AVATAR_TYPE_CODE, access_info as AccessInfo, BANNER_COMPONENT_CONFIG, BannerInfo, biz_unit_select as BizUnitSelect, charge_order_dialog as ChargeOrderDialog, copy_text_with_tooltip as CopyTextWithTooltip, constant_DATA_SOURCE_CONTENT_TYPE_CODE as DATA_SOURCE_CONTENT_TYPE_CODE, dbgrid_component_setting as DbgridComponentSetting, department_select as DepartmentSelect, dict_select as DictSelect, dml_button as DmlButton, flag_select as FlagSelect, form_design_render as FormDesignRender, FormUnit, hospital_select as HospitalSelect, keyboard_value as KeyboardValue, use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, patient_access as PatientAccess, PatientInfo, printReceiptBtn as PrintReceiptBtn, pro_avatar as ProAvatar, pro_dialog as ProDialog, pro_form as ProForm, invoice as ProInvoice, pro_table as ProTable, pro_table_v2 as ProTableV2, table_select as TableSelect, types_TableSelectMode as TableSelectMode, tag_select as TagSelect, Title, user_select as UserSelect, ward_select as WardSelect, convertToSpellNo, convertToWbNo, createShortcutDirective, debounce, decimalCount, findKeyCommandConfig, formatDecimalNumber, getSystemTime, isNumber, print, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, useDataChangeDetector, useDirectionKey, use_direction_select as useDirectionSelect, useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, usePrintReceipt, use_request as useRequest, __webpack_exports__COMPONENT_CODE as COMPONENT_CODE };