sun-biz 0.0.4-beta.60 → 0.0.4-beta.61
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/components/charge-order-dialog/api.d.ts +117 -0
- package/dist/components/charge-order-dialog/constants.d.ts +23 -0
- package/dist/components/charge-order-dialog/hooks.d.ts +132 -0
- package/dist/components/charge-order-dialog/index.d.ts +3 -0
- package/dist/components/charge-order-dialog/types.d.ts +155 -0
- package/dist/components/charge-order-dialog/useConfigData.d.ts +13 -0
- package/dist/components/charge-order-dialog/useGetDataSetList.d.ts +2 -0
- package/dist/components/charge-order-dialog/utils.d.ts +92 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1053 -156
- package/dist/index.d.ts +2 -1
- package/dist/index.js +820 -406
- package/package.json +1 -1
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
|
|
4452
|
-
const icon_combine_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(
|
|
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");
|
|
@@ -10010,409 +10021,28 @@ const hospital_charge_selectvue_type_script_setup_true_lang_tsx_name_HospitalCha
|
|
|
10010
10021
|
};
|
|
10011
10022
|
// 全局事件:用于关闭其他实例的 popover
|
|
10012
10023
|
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 */
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
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
|
-
]));
|
|
10024
|
+
/* ESM default export */ ({
|
|
10025
|
+
hospitalId: {},
|
|
10026
|
+
encounterTypeCode: {},
|
|
10027
|
+
priceAt: {},
|
|
10028
|
+
size: {
|
|
10029
|
+
default: 'default'
|
|
10030
|
+
},
|
|
10031
|
+
immediate: {
|
|
10032
|
+
type: Boolean,
|
|
10033
|
+
default: false
|
|
10034
|
+
},
|
|
10035
|
+
popoverWidth: {
|
|
10036
|
+
default: 1000
|
|
10407
10037
|
}
|
|
10408
|
-
})
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10038
|
+
}), ({
|
|
10039
|
+
modelValue: {},
|
|
10040
|
+
modelModifiers: {}
|
|
10041
|
+
}), [
|
|
10042
|
+
"change"
|
|
10043
|
+
], [
|
|
10044
|
+
"update:modelValue"
|
|
10045
|
+
];
|
|
10416
10046
|
const FormUnitvue_type_script_setup_true_lang_ts_name_formUnit_hoisted_1 = {
|
|
10417
10047
|
key: 1,
|
|
10418
10048
|
class: "overflow-hidden"
|
|
@@ -11735,6 +11365,789 @@ const table_select_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(table_s
|
|
|
11735
11365
|
]
|
|
11736
11366
|
]);
|
|
11737
11367
|
/* ESM default export */ const table_select = table_select_exports_;
|
|
11368
|
+
/** 2-10022-1 新增门诊收费申请 */ const createChargeRequisition = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.outRequest)('/ofinchargerequisition/createChargeRequisition', params, {
|
|
11369
|
+
successMsg: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.translation)('global:add.success'),
|
|
11370
|
+
failMsg: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.translation)('global:add.fail')
|
|
11371
|
+
});
|
|
11372
|
+
/** 1-10013-1 根据条件查询用户列表 */ const queryUserListByExample = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/user/queryUserListByExample', params);
|
|
11373
|
+
/** 1-10147-1 根据条件查询医院的收费项目列表(业务态) */ const queryChargeItemList = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/chargeItem/queryHospitalChargeItemListByExample', {
|
|
11374
|
+
pageSize: 100,
|
|
11375
|
+
pageNumber: 1,
|
|
11376
|
+
keyWord: '',
|
|
11377
|
+
...params
|
|
11378
|
+
});
|
|
11379
|
+
/**
|
|
11380
|
+
* [1-10012-1]获取值域列表
|
|
11381
|
+
* @param data
|
|
11382
|
+
* @returns
|
|
11383
|
+
*/ const api_queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/codeSystem/queryDataSetByCodeSystemCodes', params, {
|
|
11384
|
+
cancel: false
|
|
11385
|
+
});
|
|
11386
|
+
function useGetDataSetList(codeSystemCodes) {
|
|
11387
|
+
const list = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
11388
|
+
async function fetchData() {
|
|
11389
|
+
if (codeSystemCodes) {
|
|
11390
|
+
const [, result] = await api_queryDataSetByCodeSystemCodes({
|
|
11391
|
+
codeSystemCodes
|
|
11392
|
+
});
|
|
11393
|
+
if (result) list.value = result.data;
|
|
11394
|
+
}
|
|
11395
|
+
}
|
|
11396
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
|
|
11397
|
+
fetchData();
|
|
11398
|
+
});
|
|
11399
|
+
return list;
|
|
11400
|
+
}
|
|
11401
|
+
function useConfigData_useFormConfig(options) {
|
|
11402
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
|
|
11403
|
+
const { getData, dataSetCodes } = options;
|
|
11404
|
+
const dataSet = useGetDataSetList(dataSetCodes);
|
|
11405
|
+
const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
|
|
11406
|
+
return data;
|
|
11407
|
+
} // export function useColumnConfig<T extends readonly string[] | undefined>(
|
|
11408
|
+
/** 未挂号 */ const NO_REGISTER = 'NO_REGISTER';
|
|
11409
|
+
/** 医嘱单据类型标识 */ const CLI_ORDER_TYPE_ID = '1707651943885021184';
|
|
11410
|
+
/** 申请项类型代码 */ var constants_REQ_ITEM_TYPE_CODE = /*#__PURE__*/ function(REQ_ITEM_TYPE_CODE) {
|
|
11411
|
+
/** 商品 */ REQ_ITEM_TYPE_CODE["COMMODITY"] = "2";
|
|
11412
|
+
return REQ_ITEM_TYPE_CODE;
|
|
11413
|
+
}({});
|
|
11414
|
+
/** 医保审批状态代码 */ var constants_MED_APPROVE_STATUS_CODE = /*#__PURE__*/ function(MED_APPROVE_STATUS_CODE) {
|
|
11415
|
+
/** 未审批 */ MED_APPROVE_STATUS_CODE["NOT_APPROVE"] = "1";
|
|
11416
|
+
return MED_APPROVE_STATUS_CODE;
|
|
11417
|
+
}({});
|
|
11418
|
+
/** 商品类型代码 */ var constants_COMMODITY_TYPE_CODE = /*#__PURE__*/ function(COMMODITY_TYPE_CODE) {
|
|
11419
|
+
/** 收费项目 */ COMMODITY_TYPE_CODE["CHARGE_ITEM"] = "1";
|
|
11420
|
+
/** 药品 */ COMMODITY_TYPE_CODE["MEDICINE"] = "2";
|
|
11421
|
+
return COMMODITY_TYPE_CODE;
|
|
11422
|
+
}({});
|
|
11423
|
+
/* ESM default export */ const table_selectvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
11424
|
+
__name: 'table-select',
|
|
11425
|
+
props: {
|
|
11426
|
+
changeUpdate: {
|
|
11427
|
+
type: Boolean,
|
|
11428
|
+
default: false
|
|
11429
|
+
},
|
|
11430
|
+
classOptions: {
|
|
11431
|
+
default: 'w-[800px]'
|
|
11432
|
+
},
|
|
11433
|
+
selectLabel: {},
|
|
11434
|
+
rowKey: {},
|
|
11435
|
+
columns: {},
|
|
11436
|
+
data: {},
|
|
11437
|
+
placeholder: {},
|
|
11438
|
+
loading: {
|
|
11439
|
+
type: Boolean
|
|
11440
|
+
}
|
|
11441
|
+
},
|
|
11442
|
+
emits: [
|
|
11443
|
+
'change'
|
|
11444
|
+
],
|
|
11445
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
11446
|
+
const emit = __emit;
|
|
11447
|
+
const currentRow = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** 选中行 */
|
|
11448
|
+
const selectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** select选择器 */
|
|
11449
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(); /** table表格 */
|
|
11450
|
+
const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.data);
|
|
11451
|
+
const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
|
|
11452
|
+
/** 获取select的input */ const selectInputRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>selectRef.value?.$refs.inputRef);
|
|
11453
|
+
/** 设置选中行 */ const setCurrentRow = (row)=>{
|
|
11454
|
+
currentRow.value = row;
|
|
11455
|
+
if (row) {
|
|
11456
|
+
tableRef.value?.eleTable.setCurrentRow(row);
|
|
11457
|
+
if (__props.changeUpdate) emit('change', currentRow.value);
|
|
11458
|
+
} else tableRef.value?.eleTable.clearSelection();
|
|
11459
|
+
};
|
|
11460
|
+
/** 清空 */ const handleClear = ()=>{
|
|
11461
|
+
currentRow.value = void 0; // 清空选中的行
|
|
11462
|
+
emit('change', currentRow.value);
|
|
11463
|
+
selectRef.value?.blur();
|
|
11464
|
+
};
|
|
11465
|
+
/** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
|
|
11466
|
+
triggerRef: selectInputRef,
|
|
11467
|
+
rowKey: __props.rowKey,
|
|
11468
|
+
data: tableData,
|
|
11469
|
+
activeItem: currentRow,
|
|
11470
|
+
rowHeight: 36,
|
|
11471
|
+
setCurrentItem: setCurrentRow,
|
|
11472
|
+
scrollTo: (params)=>{
|
|
11473
|
+
tableRef?.value.eleTable.scrollTo(params);
|
|
11474
|
+
},
|
|
11475
|
+
enter: ()=>{
|
|
11476
|
+
if (!__props.changeUpdate) emit('change', currentRow.value);
|
|
11477
|
+
tableRef.value?.eleTable.clearSelection();
|
|
11478
|
+
}
|
|
11479
|
+
});
|
|
11480
|
+
// watch(
|
|
11481
|
+
// () => currentRow.value,
|
|
11482
|
+
// async () => {
|
|
11483
|
+
// emit('change', currentRow.value);
|
|
11484
|
+
// },
|
|
11485
|
+
// );
|
|
11486
|
+
__expose({
|
|
11487
|
+
clear: handleClear,
|
|
11488
|
+
setCurrentRow
|
|
11489
|
+
});
|
|
11490
|
+
return (_ctx, _cache)=>{
|
|
11491
|
+
const _component_el_tag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-tag");
|
|
11492
|
+
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)({
|
|
11493
|
+
ref_key: "selectRef",
|
|
11494
|
+
ref: selectRef,
|
|
11495
|
+
clearable: true,
|
|
11496
|
+
"model-value": currentRow.value?.[_ctx.rowKey],
|
|
11497
|
+
placeholder: _ctx.placeholder,
|
|
11498
|
+
onClear: handleClear
|
|
11499
|
+
}, {
|
|
11500
|
+
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|
|
11501
|
+
}), {
|
|
11502
|
+
label: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
11503
|
+
currentRow.value ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(_component_el_tag, {
|
|
11504
|
+
key: 0,
|
|
11505
|
+
type: "primary",
|
|
11506
|
+
effect: "light"
|
|
11507
|
+
}, {
|
|
11508
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
11509
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.selectLabel), 1)
|
|
11510
|
+
]),
|
|
11511
|
+
_: 1
|
|
11512
|
+
})) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
11513
|
+
]),
|
|
11514
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
11515
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElOption), {
|
|
11516
|
+
value: currentRow.value ?? '',
|
|
11517
|
+
class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
|
|
11518
|
+
_ctx.classOptions
|
|
11519
|
+
]),
|
|
11520
|
+
style: {
|
|
11521
|
+
display: "flex",
|
|
11522
|
+
"flex-direction": "column",
|
|
11523
|
+
padding: "0.5rem",
|
|
11524
|
+
height: "260px",
|
|
11525
|
+
background: "#fff",
|
|
11526
|
+
overflow: "hidden",
|
|
11527
|
+
"font-weight": "normal"
|
|
11528
|
+
}
|
|
11529
|
+
}, {
|
|
11530
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
11531
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "default"),
|
|
11532
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
|
|
11533
|
+
loading: _ctx.loading,
|
|
11534
|
+
ref_key: "tableRef",
|
|
11535
|
+
ref: tableRef,
|
|
11536
|
+
columns: _ctx.columns,
|
|
11537
|
+
data: _ctx.data,
|
|
11538
|
+
"row-key": _ctx.rowKey,
|
|
11539
|
+
pagination: false,
|
|
11540
|
+
"highlight-current-row": "",
|
|
11541
|
+
onRowClick: _cache[0] || (_cache[0] = (row)=>{
|
|
11542
|
+
currentRow.value = row;
|
|
11543
|
+
emit('change', currentRow.value);
|
|
11544
|
+
})
|
|
11545
|
+
}, null, 8, [
|
|
11546
|
+
"loading",
|
|
11547
|
+
"columns",
|
|
11548
|
+
"data",
|
|
11549
|
+
"row-key"
|
|
11550
|
+
])
|
|
11551
|
+
]),
|
|
11552
|
+
_: 3
|
|
11553
|
+
}, 8, [
|
|
11554
|
+
"value",
|
|
11555
|
+
"class"
|
|
11556
|
+
])
|
|
11557
|
+
]),
|
|
11558
|
+
_: 3
|
|
11559
|
+
}, 16, [
|
|
11560
|
+
"model-value",
|
|
11561
|
+
"placeholder"
|
|
11562
|
+
]);
|
|
11563
|
+
};
|
|
11564
|
+
}
|
|
11565
|
+
});
|
|
11566
|
+
const charge_order_dialog_table_select_exports_ = table_selectvue_type_script_setup_true_lang_ts;
|
|
11567
|
+
/* ESM default export */ const charge_order_dialog_table_select = charge_order_dialog_table_select_exports_;
|
|
11568
|
+
function useChargeTableConfig() {
|
|
11569
|
+
const data = useColumnConfig({
|
|
11570
|
+
getData: (t)=>[
|
|
11571
|
+
{
|
|
11572
|
+
label: t('global:code'),
|
|
11573
|
+
prop: 'commodityNo',
|
|
11574
|
+
minWidth: 100
|
|
11575
|
+
},
|
|
11576
|
+
{
|
|
11577
|
+
label: t('global:name'),
|
|
11578
|
+
prop: 'commodityNameDisplay',
|
|
11579
|
+
minWidth: 200
|
|
11580
|
+
},
|
|
11581
|
+
{
|
|
11582
|
+
label: t('unitPrice', '单价'),
|
|
11583
|
+
prop: 'price',
|
|
11584
|
+
minWidth: 150,
|
|
11585
|
+
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
11586
|
+
row?.price || row?.price === 0 ? (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.formatDecimalNumber)(row.price) : '--'
|
|
11587
|
+
])
|
|
11588
|
+
},
|
|
11589
|
+
{
|
|
11590
|
+
label: t('order.unit', '单位'),
|
|
11591
|
+
prop: 'unitName',
|
|
11592
|
+
minWidth: 150
|
|
11593
|
+
}
|
|
11594
|
+
]
|
|
11595
|
+
});
|
|
11596
|
+
return data;
|
|
11597
|
+
} /** 手工单费用明细 */
|
|
11598
|
+
function useFeeColumnConfig(options) {
|
|
11599
|
+
const { tableRef, data, columns, chargeItemList, chargeLoading, getChargeItemList, currentOrg } = options;
|
|
11600
|
+
const { addItem, delItem } = useEditableTable({
|
|
11601
|
+
tableRef,
|
|
11602
|
+
data,
|
|
11603
|
+
id: 'commodityNo'
|
|
11604
|
+
});
|
|
11605
|
+
const columnsConfig = useColumnConfig({
|
|
11606
|
+
getData: (t)=>[
|
|
11607
|
+
{
|
|
11608
|
+
label: t('global:index.number', '序号'),
|
|
11609
|
+
prop: 'indexNo',
|
|
11610
|
+
minWidth: 60,
|
|
11611
|
+
render: (row, $index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
11612
|
+
$index + 1
|
|
11613
|
+
])
|
|
11614
|
+
},
|
|
11615
|
+
{
|
|
11616
|
+
label: t('global:code', '编码'),
|
|
11617
|
+
prop: 'commodityNo',
|
|
11618
|
+
minWidth: 100
|
|
11619
|
+
},
|
|
11620
|
+
{
|
|
11621
|
+
label: t('global:name'),
|
|
11622
|
+
minWidth: 180,
|
|
11623
|
+
prop: 'commodityId',
|
|
11624
|
+
editable: true,
|
|
11625
|
+
rules: [
|
|
11626
|
+
{
|
|
11627
|
+
required: true,
|
|
11628
|
+
message: t('order.feeTipSelect', '请选择收费项目'),
|
|
11629
|
+
trigger: [
|
|
11630
|
+
'change',
|
|
11631
|
+
'blur'
|
|
11632
|
+
]
|
|
11633
|
+
}
|
|
11634
|
+
],
|
|
11635
|
+
render: (row)=>row.commodityNo ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
11636
|
+
row.commodityNameDisplay
|
|
11637
|
+
]) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(charge_order_dialog_table_select, {
|
|
11638
|
+
ref: (el)=>row.tabSelectRef = el,
|
|
11639
|
+
classOptions: "",
|
|
11640
|
+
clearable: false,
|
|
11641
|
+
filterable: true,
|
|
11642
|
+
remote: true,
|
|
11643
|
+
"remote-method": (keyWord)=>getChargeItemList({
|
|
11644
|
+
keyWord,
|
|
11645
|
+
hospitalId: currentOrg?.orgId,
|
|
11646
|
+
encounterTypeCode: '1',
|
|
11647
|
+
priceAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
|
|
11648
|
+
}),
|
|
11649
|
+
rowKey: "commodityId",
|
|
11650
|
+
loading: chargeLoading.value,
|
|
11651
|
+
selectLabel: row.selectLabel ?? '',
|
|
11652
|
+
columns: columns.value,
|
|
11653
|
+
data: chargeItemList.value ?? [],
|
|
11654
|
+
placeholder: t('global:placeholder.keyword'),
|
|
11655
|
+
onChange: (currentRow)=>{
|
|
11656
|
+
const chargeItem = chargeItemList?.value?.find((item)=>item.commodityId === currentRow.commodityId);
|
|
11657
|
+
if (!chargeItem?.price && chargeItem?.price !== 0) {
|
|
11658
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error('添加失败!当前项目缺少价格信息,请联系管理员进行维护!');
|
|
11659
|
+
row.tabSelectRef?.clear();
|
|
11660
|
+
return;
|
|
11661
|
+
}
|
|
11662
|
+
row.selectLabel = chargeItem.commodityNameDisplay;
|
|
11663
|
+
row.tabSelectRef?.setCurrentRow(chargeItem);
|
|
11664
|
+
row.commodityId = chargeItem.commodityId;
|
|
11665
|
+
row.commodityNo = chargeItem.commodityNo;
|
|
11666
|
+
row.commoditySpec = chargeItem.commoditySpec;
|
|
11667
|
+
row.price = chargeItem.price;
|
|
11668
|
+
row.unitName = chargeItem.unitName;
|
|
11669
|
+
row.unitId = chargeItem.unitId;
|
|
11670
|
+
row.commodityNameDisplay = chargeItem.commodityNameDisplay;
|
|
11671
|
+
row.commodityPriceId = chargeItem.commodityPriceId;
|
|
11672
|
+
}
|
|
11673
|
+
}, null, 8, [
|
|
11674
|
+
"remote-method",
|
|
11675
|
+
"loading",
|
|
11676
|
+
"selectLabel",
|
|
11677
|
+
"columns",
|
|
11678
|
+
"data",
|
|
11679
|
+
"placeholder",
|
|
11680
|
+
"onChange"
|
|
11681
|
+
])
|
|
11682
|
+
},
|
|
11683
|
+
{
|
|
11684
|
+
label: t('global:spec', '规格'),
|
|
11685
|
+
minWidth: 100,
|
|
11686
|
+
prop: 'commoditySpec'
|
|
11687
|
+
},
|
|
11688
|
+
{
|
|
11689
|
+
label: t('global:quantity', '数量'),
|
|
11690
|
+
prop: 'presQty',
|
|
11691
|
+
minWidth: 156,
|
|
11692
|
+
editable: true,
|
|
11693
|
+
rules: [
|
|
11694
|
+
{
|
|
11695
|
+
validator: (rule, value, callback)=>{
|
|
11696
|
+
if (value) callback();
|
|
11697
|
+
else callback(new Error(t('global:placeholder.input.template', {
|
|
11698
|
+
content: t('global:quantity', '数量')
|
|
11699
|
+
})));
|
|
11700
|
+
},
|
|
11701
|
+
trigger: 'change'
|
|
11702
|
+
}
|
|
11703
|
+
],
|
|
11704
|
+
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-input-number"), {
|
|
11705
|
+
clearable: false,
|
|
11706
|
+
modelValue: row.presQty,
|
|
11707
|
+
"onUpdate:modelValue": ($event)=>row.presQty = $event,
|
|
11708
|
+
min: 1
|
|
11709
|
+
}, null, 8, [
|
|
11710
|
+
"modelValue",
|
|
11711
|
+
"onUpdate:modelValue"
|
|
11712
|
+
])
|
|
11713
|
+
},
|
|
11714
|
+
{
|
|
11715
|
+
label: t('unitPrice', '单价'),
|
|
11716
|
+
prop: 'price',
|
|
11717
|
+
minWidth: 150,
|
|
11718
|
+
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
|
|
11719
|
+
row?.price || row?.price === 0 ? (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.formatDecimalNumber)(row.price) : '--'
|
|
11720
|
+
])
|
|
11721
|
+
},
|
|
11722
|
+
{
|
|
11723
|
+
label: t('order.unit', '单位'),
|
|
11724
|
+
prop: 'unitName',
|
|
11725
|
+
minWidth: 150
|
|
11726
|
+
},
|
|
11727
|
+
{
|
|
11728
|
+
label: t('global:operation'),
|
|
11729
|
+
prop: 'operation',
|
|
11730
|
+
minWidth: 100,
|
|
11731
|
+
render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button"), {
|
|
11732
|
+
key: `operation-delete-${index}`,
|
|
11733
|
+
type: "danger",
|
|
11734
|
+
link: true,
|
|
11735
|
+
icon: "Delete",
|
|
11736
|
+
onClick: ()=>{
|
|
11737
|
+
delItem(index);
|
|
11738
|
+
}
|
|
11739
|
+
}, null, 8, [
|
|
11740
|
+
"onClick"
|
|
11741
|
+
])
|
|
11742
|
+
}
|
|
11743
|
+
]
|
|
11744
|
+
});
|
|
11745
|
+
return {
|
|
11746
|
+
columnsConfig,
|
|
11747
|
+
addItem
|
|
11748
|
+
};
|
|
11749
|
+
} /** 手工单 */
|
|
11750
|
+
function useChargeOrderConfig(options) {
|
|
11751
|
+
const { orderInfo, userList, getUserList, userLoading, currentOrg } = options;
|
|
11752
|
+
return useConfigData_useFormConfig({
|
|
11753
|
+
getData: (t)=>[
|
|
11754
|
+
{
|
|
11755
|
+
label: t('order.department', '开立科室'),
|
|
11756
|
+
name: 'presBizUnitId',
|
|
11757
|
+
component: 'bizUnitSelect',
|
|
11758
|
+
rules: [
|
|
11759
|
+
{
|
|
11760
|
+
required: true,
|
|
11761
|
+
message: t('global:placeholder.select.template', {
|
|
11762
|
+
name: t('order.department', '开立科室')
|
|
11763
|
+
}),
|
|
11764
|
+
trigger: 'change'
|
|
11765
|
+
}
|
|
11766
|
+
],
|
|
11767
|
+
extraProps: {
|
|
11768
|
+
style: 'width: 180px',
|
|
11769
|
+
selectProps: {
|
|
11770
|
+
placeholder: t('global:placeholder.select.template', {
|
|
11771
|
+
name: t('order.department', '开立科室')
|
|
11772
|
+
})
|
|
11773
|
+
},
|
|
11774
|
+
hospitalId: currentOrg?.orgId || '',
|
|
11775
|
+
orgTypeCodes: [
|
|
11776
|
+
__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT
|
|
11777
|
+
],
|
|
11778
|
+
encounterTypeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENCOUNTER_TYPE_CODE.OUTPATIENT,
|
|
11779
|
+
orgLocationId: currentOrg?.orgLocationId ?? ''
|
|
11780
|
+
}
|
|
11781
|
+
},
|
|
11782
|
+
{
|
|
11783
|
+
label: t('order.doctor', '开立医生'),
|
|
11784
|
+
name: 'presUserId',
|
|
11785
|
+
component: 'select',
|
|
11786
|
+
placeholder: t('global:placeholder.select.template', {
|
|
11787
|
+
name: t('order.doctor', '开立医生')
|
|
11788
|
+
}),
|
|
11789
|
+
rules: [
|
|
11790
|
+
{
|
|
11791
|
+
required: true,
|
|
11792
|
+
message: t('global:placeholder.select.template', {
|
|
11793
|
+
name: t('order.doctor', '开立医生')
|
|
11794
|
+
}),
|
|
11795
|
+
trigger: 'change'
|
|
11796
|
+
}
|
|
11797
|
+
],
|
|
11798
|
+
extraProps: {
|
|
11799
|
+
style: 'width: 180px',
|
|
11800
|
+
remote: true,
|
|
11801
|
+
filterable: true,
|
|
11802
|
+
remoteShowSuffix: true,
|
|
11803
|
+
options: userList.value,
|
|
11804
|
+
loading: userLoading.value,
|
|
11805
|
+
remoteMethod: async (keyWord)=>{
|
|
11806
|
+
await getUserList({
|
|
11807
|
+
hospitalId: currentOrg?.orgId,
|
|
11808
|
+
keyWord: keyWord
|
|
11809
|
+
});
|
|
11810
|
+
},
|
|
11811
|
+
props: {
|
|
11812
|
+
label: 'userNameDisplay',
|
|
11813
|
+
value: 'userId'
|
|
11814
|
+
}
|
|
11815
|
+
}
|
|
11816
|
+
},
|
|
11817
|
+
{
|
|
11818
|
+
label: t('order.createTime', '开立时间'),
|
|
11819
|
+
name: 'presAt',
|
|
11820
|
+
component: 'date-picker',
|
|
11821
|
+
type: 'datetime',
|
|
11822
|
+
placeholder: t('global:placeholder.select.template', {
|
|
11823
|
+
name: t('order.createTime', '开立时间')
|
|
11824
|
+
}),
|
|
11825
|
+
extraProps: {
|
|
11826
|
+
clearable: false,
|
|
11827
|
+
type: 'datetime',
|
|
11828
|
+
format: 'YYYY-MM-DD HH:mm:ss',
|
|
11829
|
+
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
11830
|
+
disabledDate: (time)=>time.getTime() > Date.now() - 8.64e6,
|
|
11831
|
+
disabledHours: ()=>{
|
|
11832
|
+
const hours = [];
|
|
11833
|
+
for(let i = 0; i < 24; i++)if (!(new Date().getHours() > i - 1)) hours.push(i);
|
|
11834
|
+
return hours;
|
|
11835
|
+
},
|
|
11836
|
+
disabledMinutes: ()=>{
|
|
11837
|
+
const minutes = [];
|
|
11838
|
+
for(let i = 0; i < 60; i++)if (!(new Date().getMinutes() > i - 1)) minutes.push(i);
|
|
11839
|
+
return minutes;
|
|
11840
|
+
}
|
|
11841
|
+
},
|
|
11842
|
+
rules: [
|
|
11843
|
+
{
|
|
11844
|
+
required: true,
|
|
11845
|
+
message: t('global:placeholder.select.template', {
|
|
11846
|
+
name: t('order.createTime', '开立时间')
|
|
11847
|
+
}),
|
|
11848
|
+
trigger: 'change'
|
|
11849
|
+
}
|
|
11850
|
+
]
|
|
11851
|
+
},
|
|
11852
|
+
{
|
|
11853
|
+
label: t('order.execDept', '执行科室'),
|
|
11854
|
+
name: 'execBizUnitId',
|
|
11855
|
+
component: 'bizUnitSelect',
|
|
11856
|
+
rules: [
|
|
11857
|
+
{
|
|
11858
|
+
required: true,
|
|
11859
|
+
message: t('global:placeholder.select.template', {
|
|
11860
|
+
name: t('order.execDept', '执行科室')
|
|
11861
|
+
}),
|
|
11862
|
+
trigger: 'change'
|
|
11863
|
+
}
|
|
11864
|
+
],
|
|
11865
|
+
formItemProps: {
|
|
11866
|
+
style: 'margin-bottom: 0; margin-right: 0'
|
|
11867
|
+
},
|
|
11868
|
+
extraProps: {
|
|
11869
|
+
style: 'width: 180px',
|
|
11870
|
+
selectProps: {
|
|
11871
|
+
placeholder: t('global:placeholder.select.template', {
|
|
11872
|
+
name: t('patient.patientName', '执行科室/病区')
|
|
11873
|
+
})
|
|
11874
|
+
},
|
|
11875
|
+
hospitalId: currentOrg?.orgId || '',
|
|
11876
|
+
/** 可选科室+病区选项 */ orgTypeCodes: [
|
|
11877
|
+
__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.AREA,
|
|
11878
|
+
__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT
|
|
11879
|
+
],
|
|
11880
|
+
encounterTypeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENCOUNTER_TYPE_CODE.OUTPATIENT,
|
|
11881
|
+
orgLocationId: currentOrg?.orgLocationId ?? '',
|
|
11882
|
+
onChange: (val, data)=>{
|
|
11883
|
+
orderInfo.value.execBizUnitCategCode = data.orgTypeCode ?? '';
|
|
11884
|
+
}
|
|
11885
|
+
}
|
|
11886
|
+
}
|
|
11887
|
+
]
|
|
11888
|
+
});
|
|
11889
|
+
}
|
|
11890
|
+
/** 获取收费项目 */ function useFetchChargeItemList() {
|
|
11891
|
+
const chargeItemList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
11892
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
11893
|
+
const getChargeItemList = async (params)=>{
|
|
11894
|
+
loading.value = true;
|
|
11895
|
+
const [, res] = await queryChargeItemList(params);
|
|
11896
|
+
loading.value = false;
|
|
11897
|
+
chargeItemList.value = res?.data ? res.data : [];
|
|
11898
|
+
};
|
|
11899
|
+
return {
|
|
11900
|
+
loading,
|
|
11901
|
+
chargeItemList,
|
|
11902
|
+
getChargeItemList
|
|
11903
|
+
};
|
|
11904
|
+
}
|
|
11905
|
+
// 获取操作员、获取就诊医生
|
|
11906
|
+
function useFetchUserList() {
|
|
11907
|
+
const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
|
|
11908
|
+
const userList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
11909
|
+
const getUserList = async (params)=>{
|
|
11910
|
+
loading.value = true;
|
|
11911
|
+
const [, res] = await queryUserListByExample({
|
|
11912
|
+
pageNumber: 1,
|
|
11913
|
+
pageSize: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ONE_PAGE_SIZE,
|
|
11914
|
+
enabledFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
11915
|
+
...params
|
|
11916
|
+
});
|
|
11917
|
+
loading.value = false;
|
|
11918
|
+
if (res?.success) userList.value = res.data ?? [];
|
|
11919
|
+
};
|
|
11920
|
+
return {
|
|
11921
|
+
loading,
|
|
11922
|
+
userList,
|
|
11923
|
+
getUserList
|
|
11924
|
+
};
|
|
11925
|
+
}
|
|
11926
|
+
/* ESM default export */ const charge_order_dialogvue_type_script_setup_true_lang_ts = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
11927
|
+
__name: 'index',
|
|
11928
|
+
emits: [
|
|
11929
|
+
'success'
|
|
11930
|
+
],
|
|
11931
|
+
setup (__props, { expose: __expose, emit: __emit }) {
|
|
11932
|
+
const emits = __emit;
|
|
11933
|
+
const dialogRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
11934
|
+
const tableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
11935
|
+
const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
|
|
11936
|
+
const paramsData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
|
|
11937
|
+
chargeReqTypeCode: '',
|
|
11938
|
+
patientId: '',
|
|
11939
|
+
hospitalId: ''
|
|
11940
|
+
});
|
|
11941
|
+
const orderInfo = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
|
|
11942
|
+
presBizUnitId: '',
|
|
11943
|
+
presUserId: '',
|
|
11944
|
+
presAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)(),
|
|
11945
|
+
execBizUnitId: ''
|
|
11946
|
+
});
|
|
11947
|
+
const detailList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
|
|
11948
|
+
const { userList, getUserList, loading: userLoading } = useFetchUserList();
|
|
11949
|
+
const { chargeItemList, loading: chargeLoading, getChargeItemList } = useFetchChargeItemList();
|
|
11950
|
+
const currentOrg = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
11951
|
+
orgId: '',
|
|
11952
|
+
orgLocationId: ''
|
|
11953
|
+
});
|
|
11954
|
+
const createConfig = useChargeOrderConfig({
|
|
11955
|
+
orderInfo,
|
|
11956
|
+
userList,
|
|
11957
|
+
getUserList,
|
|
11958
|
+
userLoading,
|
|
11959
|
+
currentOrg
|
|
11960
|
+
});
|
|
11961
|
+
const tableSelectConfig = useChargeTableConfig();
|
|
11962
|
+
const { columnsConfig: columns, addItem } = useFeeColumnConfig({
|
|
11963
|
+
tableRef,
|
|
11964
|
+
data: detailList,
|
|
11965
|
+
columns: tableSelectConfig,
|
|
11966
|
+
chargeItemList,
|
|
11967
|
+
chargeLoading,
|
|
11968
|
+
getChargeItemList,
|
|
11969
|
+
currentOrg
|
|
11970
|
+
});
|
|
11971
|
+
const addNewDtItem = ()=>{
|
|
11972
|
+
addItem({
|
|
11973
|
+
key: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.generateUUID)(),
|
|
11974
|
+
editable: true,
|
|
11975
|
+
unitName: '',
|
|
11976
|
+
price: 0,
|
|
11977
|
+
presQty: 1,
|
|
11978
|
+
commoditySpec: '',
|
|
11979
|
+
unitId: '',
|
|
11980
|
+
commodityNameDisplay: '',
|
|
11981
|
+
commodityId: '',
|
|
11982
|
+
commodityNo: ''
|
|
11983
|
+
});
|
|
11984
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
11985
|
+
const row = tableRef.value?.proTableRef?.$el?.querySelector(`.el-table__body-wrapper tbody tr:nth-child(${detailList.value.length - 1})`);
|
|
11986
|
+
row?.scrollIntoView({
|
|
11987
|
+
behavior: 'smooth',
|
|
11988
|
+
block: 'center'
|
|
11989
|
+
});
|
|
11990
|
+
});
|
|
11991
|
+
};
|
|
11992
|
+
const normalizeCreateParams = ()=>({
|
|
11993
|
+
chargeReqTypeCode: paramsData.value.chargeReqTypeCode,
|
|
11994
|
+
patientId: paramsData.value.patientId,
|
|
11995
|
+
regId: paramsData.value.regId === NO_REGISTER ? void 0 : paramsData.value.regId,
|
|
11996
|
+
hospitalId: paramsData.value.hospitalId,
|
|
11997
|
+
chargeReqList: [
|
|
11998
|
+
{
|
|
11999
|
+
orderFormTypeId: CLI_ORDER_TYPE_ID,
|
|
12000
|
+
presBizUnitCategCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ORG_TYPE_CODE.DEPARTMENT,
|
|
12001
|
+
presBizUnitId: orderInfo.value.presBizUnitId,
|
|
12002
|
+
presUserId: orderInfo.value.presUserId,
|
|
12003
|
+
presAt: orderInfo.value.presAt,
|
|
12004
|
+
herbNum: 1,
|
|
12005
|
+
execBizUnitCategCode: orderInfo.value.execBizUnitCategCode,
|
|
12006
|
+
execBizUnitId: orderInfo.value.execBizUnitId,
|
|
12007
|
+
expiredAt: '2099-12-31 23:59:59',
|
|
12008
|
+
chargeReqItemDtList: detailList?.value?.map((item)=>({
|
|
12009
|
+
reqItemTypeCode: constants_REQ_ITEM_TYPE_CODE.COMMODITY,
|
|
12010
|
+
medicineFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
|
|
12011
|
+
reqItemId: item.commodityId,
|
|
12012
|
+
presQty: item.presQty,
|
|
12013
|
+
presUnitId: item.unitId,
|
|
12014
|
+
chargeReqQty: item.presQty,
|
|
12015
|
+
chargeUnitId: item.unitId,
|
|
12016
|
+
chargeReqFeeDtList: [
|
|
12017
|
+
{
|
|
12018
|
+
commodityTypeCode: constants_COMMODITY_TYPE_CODE.CHARGE_ITEM,
|
|
12019
|
+
commodityId: item.commodityId,
|
|
12020
|
+
commodityPriceId: item.commodityPriceId,
|
|
12021
|
+
chargePrice: item.price,
|
|
12022
|
+
chargeUnitId: item.unitId,
|
|
12023
|
+
chargeReqQty: item.presQty,
|
|
12024
|
+
needMedApproveFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
|
|
12025
|
+
medApproveStatusCode: constants_MED_APPROVE_STATUS_CODE.NOT_APPROVE,
|
|
12026
|
+
needUploadFlag: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
|
|
12027
|
+
herbPerQty: 1,
|
|
12028
|
+
chargeUnitFactor: 1,
|
|
12029
|
+
chargeReqItemFactor: 1
|
|
12030
|
+
}
|
|
12031
|
+
]
|
|
12032
|
+
}))
|
|
12033
|
+
}
|
|
12034
|
+
]
|
|
12035
|
+
});
|
|
12036
|
+
const confirmFn = async ()=>{
|
|
12037
|
+
const isValid = await formRef.value.ref.validate();
|
|
12038
|
+
const isDetailValid = await tableRef?.value?.formRef?.validate();
|
|
12039
|
+
if (!isValid || !isDetailValid) return [
|
|
12040
|
+
{
|
|
12041
|
+
message: '请填写必填项'
|
|
12042
|
+
}
|
|
12043
|
+
];
|
|
12044
|
+
const orderData = normalizeCreateParams();
|
|
12045
|
+
const [err, res] = await createChargeRequisition(orderData);
|
|
12046
|
+
return [
|
|
12047
|
+
err,
|
|
12048
|
+
res
|
|
12049
|
+
];
|
|
12050
|
+
};
|
|
12051
|
+
const resetOrderInfo = async ()=>{
|
|
12052
|
+
orderInfo.value = {
|
|
12053
|
+
presBizUnitId: paramsData.value.presBizUnitId || '',
|
|
12054
|
+
presUserId: paramsData.value.presUserId || '',
|
|
12055
|
+
execBizUnitId: paramsData.value.execBizUnitId || '',
|
|
12056
|
+
presAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
|
|
12057
|
+
};
|
|
12058
|
+
};
|
|
12059
|
+
__expose({
|
|
12060
|
+
open: async (params)=>{
|
|
12061
|
+
paramsData.value = params;
|
|
12062
|
+
currentOrg.orgId = params.hospitalId;
|
|
12063
|
+
currentOrg.orgLocationId = params.orgLocationId;
|
|
12064
|
+
resetOrderInfo();
|
|
12065
|
+
getUserList({
|
|
12066
|
+
hospitalId: params.hospitalId
|
|
12067
|
+
});
|
|
12068
|
+
dialogRef.value.open();
|
|
12069
|
+
await addNewDtItem();
|
|
12070
|
+
await getChargeItemList({
|
|
12071
|
+
hospitalId: params.hospitalId,
|
|
12072
|
+
encounterTypeCode: '1',
|
|
12073
|
+
priceAt: (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)()
|
|
12074
|
+
});
|
|
12075
|
+
}
|
|
12076
|
+
});
|
|
12077
|
+
return (_ctx, _cache)=>{
|
|
12078
|
+
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|
|
12079
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_dialog), {
|
|
12080
|
+
ref_key: "dialogRef",
|
|
12081
|
+
ref: dialogRef,
|
|
12082
|
+
"confirm-fn": confirmFn,
|
|
12083
|
+
title: _ctx.$t('newChargeOrder', '新处方'),
|
|
12084
|
+
"before-close": (done)=>{
|
|
12085
|
+
formRef.value.ref.resetFields();
|
|
12086
|
+
resetOrderInfo();
|
|
12087
|
+
detailList.value = [];
|
|
12088
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
|
|
12089
|
+
done && done();
|
|
12090
|
+
});
|
|
12091
|
+
},
|
|
12092
|
+
"close-on-click-modal": false,
|
|
12093
|
+
onSuccess: _cache[1] || (_cache[1] = ($event)=>emits('success')),
|
|
12094
|
+
width: 1220
|
|
12095
|
+
}, {
|
|
12096
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
12097
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
|
|
12098
|
+
ref_key: "formRef",
|
|
12099
|
+
ref: formRef,
|
|
12100
|
+
modelValue: orderInfo.value,
|
|
12101
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>orderInfo.value = $event),
|
|
12102
|
+
data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(createConfig),
|
|
12103
|
+
"layout-mode": "inline"
|
|
12104
|
+
}, null, 8, [
|
|
12105
|
+
"modelValue",
|
|
12106
|
+
"data"
|
|
12107
|
+
]),
|
|
12108
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
|
|
12109
|
+
title: _ctx.$t('feeList', '费用明细'),
|
|
12110
|
+
class: "mb-2"
|
|
12111
|
+
}, null, 8, [
|
|
12112
|
+
"title"
|
|
12113
|
+
]),
|
|
12114
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_table), {
|
|
12115
|
+
"max-height": "calc(100vh - 550px)",
|
|
12116
|
+
"row-key": "commodityNo",
|
|
12117
|
+
ref_key: "tableRef",
|
|
12118
|
+
ref: tableRef,
|
|
12119
|
+
editable: true,
|
|
12120
|
+
columns: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(columns),
|
|
12121
|
+
data: detailList.value
|
|
12122
|
+
}, null, 8, [
|
|
12123
|
+
"columns",
|
|
12124
|
+
"data"
|
|
12125
|
+
]),
|
|
12126
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_button, {
|
|
12127
|
+
class: "rounded-0 w-full border-t-0",
|
|
12128
|
+
style: {
|
|
12129
|
+
"border-top-width": "0",
|
|
12130
|
+
"border-radius": "0"
|
|
12131
|
+
},
|
|
12132
|
+
onClick: addNewDtItem,
|
|
12133
|
+
icon: "Plus"
|
|
12134
|
+
}, {
|
|
12135
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
12136
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(_ctx.$t('global:add')), 1)
|
|
12137
|
+
]),
|
|
12138
|
+
_: 1
|
|
12139
|
+
})
|
|
12140
|
+
]),
|
|
12141
|
+
_: 1
|
|
12142
|
+
}, 8, [
|
|
12143
|
+
"title",
|
|
12144
|
+
"before-close"
|
|
12145
|
+
]);
|
|
12146
|
+
};
|
|
12147
|
+
}
|
|
12148
|
+
});
|
|
12149
|
+
const charge_order_dialog_exports_ = charge_order_dialogvue_type_script_setup_true_lang_ts;
|
|
12150
|
+
/* ESM default export */ const charge_order_dialog = charge_order_dialog_exports_;
|
|
11738
12151
|
const utils_DICT_SELECT = 'dictSelect';
|
|
11739
12152
|
/**
|
|
11740
12153
|
* 集合规则
|
|
@@ -12065,6 +12478,7 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
12065
12478
|
emit('searchChange', data);
|
|
12066
12479
|
};
|
|
12067
12480
|
/** 新患者按钮 */ const clearFn = async ()=>{
|
|
12481
|
+
bannerRef.value?.clearTags?.();
|
|
12068
12482
|
emit('clear');
|
|
12069
12483
|
};
|
|
12070
12484
|
/** 票据方法 */ const handleInvoiceChange = async (data)=>{
|
|
@@ -13732,4 +14146,4 @@ const form_design_render_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(f
|
|
|
13732
14146
|
]);
|
|
13733
14147
|
/* ESM default export */ const form_design_render = form_design_render_exports_;
|
|
13734
14148
|
/** 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,
|
|
14149
|
+
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 };
|