sun-biz 0.0.3-beta.22 → 0.0.3-beta.24
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/index.js
CHANGED
|
@@ -563,7 +563,6 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
563
563
|
minWidth: 170,
|
|
564
564
|
render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
565
565
|
maxLength: 16,
|
|
566
|
-
'controls-position': 'right',
|
|
567
566
|
min: 0,
|
|
568
567
|
modelValue: row.minWidth,
|
|
569
568
|
'onUpdate:modelValue': (value)=>row.minWidth = value,
|
|
@@ -578,7 +577,6 @@ function useTableConfigColumn(changeInputSort, length, disabledDraggable) {
|
|
|
578
577
|
render: (row, index)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElInputNumber, {
|
|
579
578
|
max: length,
|
|
580
579
|
min: 0,
|
|
581
|
-
'controls-position': 'right',
|
|
582
580
|
modelValue: row.sort,
|
|
583
581
|
disabled: disabledDraggable.value,
|
|
584
582
|
'onUpdate:modelValue': (value)=>row.sort = value,
|
|
@@ -751,6 +749,10 @@ const _hoisted_2 = {
|
|
|
751
749
|
type: Boolean,
|
|
752
750
|
default: false
|
|
753
751
|
},
|
|
752
|
+
closeOnClickModal: {
|
|
753
|
+
type: Boolean,
|
|
754
|
+
default: false
|
|
755
|
+
},
|
|
754
756
|
includeFooter: {
|
|
755
757
|
type: Boolean,
|
|
756
758
|
default: true
|
|
@@ -792,16 +794,16 @@ const _hoisted_2 = {
|
|
|
792
794
|
// 纯关闭弹窗,不执行其他操作,用于左上角X
|
|
793
795
|
const justCloseDialog = ()=>{
|
|
794
796
|
closeDialog();
|
|
795
|
-
emits(
|
|
797
|
+
emits('close');
|
|
796
798
|
};
|
|
797
799
|
// 处理常规关闭,支持before-close钩子
|
|
798
800
|
const handleClose = ()=>{
|
|
799
|
-
if (attrs?.[
|
|
801
|
+
if (attrs?.['before-close']) (attrs?.['before-close'])(closeDialog);
|
|
800
802
|
else closeDialog();
|
|
801
803
|
};
|
|
802
804
|
// 处理取消按钮点击
|
|
803
805
|
const handleCancel = ()=>{
|
|
804
|
-
emits(
|
|
806
|
+
emits('cancel');
|
|
805
807
|
if (__props.closeOnCancel) handleClose();
|
|
806
808
|
};
|
|
807
809
|
const handleConfirm = async ()=>{
|
|
@@ -812,7 +814,7 @@ const _hoisted_2 = {
|
|
|
812
814
|
loading.value = false;
|
|
813
815
|
if (!err) {
|
|
814
816
|
handleClose();
|
|
815
|
-
emits(
|
|
817
|
+
emits('success');
|
|
816
818
|
}
|
|
817
819
|
} catch {
|
|
818
820
|
loading.value = false;
|
|
@@ -820,7 +822,7 @@ const _hoisted_2 = {
|
|
|
820
822
|
}
|
|
821
823
|
};
|
|
822
824
|
const changeScreen = async (flag)=>{
|
|
823
|
-
emits(
|
|
825
|
+
emits('changeScreen', flag);
|
|
824
826
|
};
|
|
825
827
|
__expose({
|
|
826
828
|
ref: dialogRef,
|
|
@@ -835,6 +837,7 @@ const _hoisted_2 = {
|
|
|
835
837
|
ref_key: "dialogRef",
|
|
836
838
|
ref: dialogRef
|
|
837
839
|
}, _ctx.$attrs, {
|
|
840
|
+
"close-on-click-modal": _ctx.closeOnClickModal,
|
|
838
841
|
modelValue: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(visible),
|
|
839
842
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.isRef)(visible) ? visible.value = $event : null),
|
|
840
843
|
onClose: justCloseDialog
|
|
@@ -921,6 +924,7 @@ const _hoisted_2 = {
|
|
|
921
924
|
key: "0"
|
|
922
925
|
} : void 0
|
|
923
926
|
]), 1040, [
|
|
927
|
+
"close-on-click-modal",
|
|
924
928
|
"modelValue"
|
|
925
929
|
]),
|
|
926
930
|
_ctx.includeButton ? (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot)(_ctx.$slots, "button", {
|
|
@@ -934,7 +938,7 @@ const _hoisted_2 = {
|
|
|
934
938
|
onClick: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(openDialog)
|
|
935
939
|
}, {
|
|
936
940
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
937
|
-
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.[
|
|
941
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(__WEBPACK_EXTERNAL_MODULE_vue__.unref(attrs)?.['button-text']), 1)
|
|
938
942
|
]),
|
|
939
943
|
_: 1
|
|
940
944
|
}, 8, [
|
|
@@ -1218,6 +1222,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1218
1222
|
dbgridTableConfigRef?.value?.tableRef?.setCurrentRow(sourceData.value[findIndex]);
|
|
1219
1223
|
};
|
|
1220
1224
|
function handleScrollChange(value) {
|
|
1225
|
+
if (!value) return;
|
|
1221
1226
|
scrollToColumn(value);
|
|
1222
1227
|
scrollToRow(value);
|
|
1223
1228
|
}
|
|
@@ -1394,6 +1399,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1394
1399
|
filterable: true,
|
|
1395
1400
|
modelValue: scrollKeyWord.value,
|
|
1396
1401
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>scrollKeyWord.value = $event),
|
|
1402
|
+
clearable: true,
|
|
1397
1403
|
placeholder: "\n 选择后可自动定位到对应的属性\n ",
|
|
1398
1404
|
class: "w-64"
|
|
1399
1405
|
}, {
|
|
@@ -1444,7 +1450,7 @@ function dbgrid_component_settingvue_type_script_setup_true_lang_tsx_isSlot(s) {
|
|
|
1444
1450
|
const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
|
|
1445
1451
|
[
|
|
1446
1452
|
'__scopeId',
|
|
1447
|
-
"data-v-
|
|
1453
|
+
"data-v-71f309b8"
|
|
1448
1454
|
]
|
|
1449
1455
|
]);
|
|
1450
1456
|
/* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
|
|
@@ -1489,7 +1495,8 @@ const EXPORT_FILE = 'export-file';
|
|
|
1489
1495
|
columns: {},
|
|
1490
1496
|
componentNo: {},
|
|
1491
1497
|
columnsSetting: {},
|
|
1492
|
-
exportFileFlag: {}
|
|
1498
|
+
exportFileFlag: {},
|
|
1499
|
+
componentDesc: {}
|
|
1493
1500
|
},
|
|
1494
1501
|
emits: [
|
|
1495
1502
|
'success'
|
|
@@ -1533,7 +1540,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1533
1540
|
let [, res] = await exportData2File({
|
|
1534
1541
|
fileTypeCode: value,
|
|
1535
1542
|
dataSource: JSON.stringify({
|
|
1536
|
-
columnList: props.columns.filter((cur)=>cur.prop && cur.label && cur.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.
|
|
1543
|
+
columnList: props.columns.filter((cur)=>cur.prop && cur.label && cur.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES).map((item)=>({
|
|
1537
1544
|
columnIndex: item.prop,
|
|
1538
1545
|
columnTitle: item.label
|
|
1539
1546
|
})),
|
|
@@ -1548,7 +1555,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1548
1555
|
});
|
|
1549
1556
|
if (res?.success) {
|
|
1550
1557
|
(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.downloadFile)({
|
|
1551
|
-
fileName:
|
|
1558
|
+
fileName: `${props.componentDesc}.xlsx`,
|
|
1552
1559
|
data: res?.data?.fileString
|
|
1553
1560
|
});
|
|
1554
1561
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.success('导出成功');
|
|
@@ -1664,7 +1671,7 @@ const EXPORT_FILE = 'export-file';
|
|
|
1664
1671
|
const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(TableSettingButtonvue_type_script_setup_true_lang_tsx, [
|
|
1665
1672
|
[
|
|
1666
1673
|
'__scopeId',
|
|
1667
|
-
"data-v-
|
|
1674
|
+
"data-v-51d84f56"
|
|
1668
1675
|
]
|
|
1669
1676
|
]);
|
|
1670
1677
|
/* ESM default export */ const TableSettingButton = TableSettingButton_exports_;
|
|
@@ -1676,6 +1683,7 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
1676
1683
|
type: Boolean
|
|
1677
1684
|
},
|
|
1678
1685
|
exportFileFlag: {},
|
|
1686
|
+
componentDesc: {},
|
|
1679
1687
|
draggable: {
|
|
1680
1688
|
type: Boolean
|
|
1681
1689
|
},
|
|
@@ -1703,6 +1711,7 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
1703
1711
|
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
1704
1712
|
key: 0,
|
|
1705
1713
|
"table-data": selectedData.value,
|
|
1714
|
+
componentDesc: props.componentDesc,
|
|
1706
1715
|
"export-file-flag": props.exportFileFlag,
|
|
1707
1716
|
"component-no": props.componentNo,
|
|
1708
1717
|
"columns-setting": props.columnsSetting,
|
|
@@ -1711,6 +1720,7 @@ const TableSettingButton_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(T
|
|
|
1711
1720
|
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
1712
1721
|
}, null, 8, [
|
|
1713
1722
|
"table-data",
|
|
1723
|
+
"componentDesc",
|
|
1714
1724
|
"export-file-flag",
|
|
1715
1725
|
"component-no",
|
|
1716
1726
|
"columns-setting",
|
|
@@ -1927,6 +1937,7 @@ const SELECTION = 'selection';
|
|
|
1927
1937
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
1928
1938
|
const props = __props;
|
|
1929
1939
|
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
1940
|
+
const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('文件');
|
|
1930
1941
|
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
1931
1942
|
// 表格数据
|
|
1932
1943
|
tableData: props.data,
|
|
@@ -2035,6 +2046,7 @@ const SELECTION = 'selection';
|
|
|
2035
2046
|
});
|
|
2036
2047
|
if (result?.success) {
|
|
2037
2048
|
exportFileFlag.value = result.data.exportFileFlag;
|
|
2049
|
+
componentDesc.value = result.data.componentDesc;
|
|
2038
2050
|
try {
|
|
2039
2051
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2040
2052
|
serveColumns.value = column;
|
|
@@ -2205,6 +2217,7 @@ const SELECTION = 'selection';
|
|
|
2205
2217
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2206
2218
|
id: uuid.value,
|
|
2207
2219
|
"export-file-flag": exportFileFlag.value,
|
|
2220
|
+
componentDesc: componentDesc.value,
|
|
2208
2221
|
"common-columns": commonColumns.value,
|
|
2209
2222
|
"component-no": props.componentNo,
|
|
2210
2223
|
"columns-setting": props.columnsSetting,
|
|
@@ -2220,6 +2233,7 @@ const SELECTION = 'selection';
|
|
|
2220
2233
|
}), null, 16, [
|
|
2221
2234
|
"id",
|
|
2222
2235
|
"export-file-flag",
|
|
2236
|
+
"componentDesc",
|
|
2223
2237
|
"common-columns",
|
|
2224
2238
|
"component-no",
|
|
2225
2239
|
"columns-setting",
|
|
@@ -2269,6 +2283,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
2269
2283
|
draggable: {
|
|
2270
2284
|
type: Boolean
|
|
2271
2285
|
},
|
|
2286
|
+
componentDesc: {},
|
|
2272
2287
|
data: {},
|
|
2273
2288
|
componentNo: {},
|
|
2274
2289
|
rowKey: {},
|
|
@@ -2293,6 +2308,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
2293
2308
|
props.componentNo ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)(TableSettingButton, {
|
|
2294
2309
|
key: 0,
|
|
2295
2310
|
"table-data": selectedData.value,
|
|
2311
|
+
componentDesc: props.componentDesc,
|
|
2296
2312
|
"export-file-flag": props.exportFileFlag,
|
|
2297
2313
|
"component-no": props.componentNo,
|
|
2298
2314
|
"columns-setting": props.columnsSetting,
|
|
@@ -2301,6 +2317,7 @@ const Tablevue_type_script_setup_true_lang_tsx_name_Table_hoisted_1 = {
|
|
|
2301
2317
|
onSuccess: _cache[0] || (_cache[0] = ($event)=>emits('success'))
|
|
2302
2318
|
}, null, 8, [
|
|
2303
2319
|
"table-data",
|
|
2320
|
+
"componentDesc",
|
|
2304
2321
|
"export-file-flag",
|
|
2305
2322
|
"component-no",
|
|
2306
2323
|
"columns-setting",
|
|
@@ -2512,6 +2529,7 @@ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION =
|
|
|
2512
2529
|
setup (__props, { expose: __expose, emit: __emit }) {
|
|
2513
2530
|
const props = __props;
|
|
2514
2531
|
const exportFileFlag = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO);
|
|
2532
|
+
const componentDesc = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('文件');
|
|
2515
2533
|
let state = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
2516
2534
|
tableData: props.data,
|
|
2517
2535
|
loading: false,
|
|
@@ -2611,6 +2629,7 @@ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION =
|
|
|
2611
2629
|
});
|
|
2612
2630
|
if (result?.success) {
|
|
2613
2631
|
exportFileFlag.value = result.data.exportFileFlag;
|
|
2632
|
+
componentDesc.value = result.data.componentDesc;
|
|
2614
2633
|
try {
|
|
2615
2634
|
let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
|
|
2616
2635
|
serveColumns.value = column;
|
|
@@ -2825,6 +2844,7 @@ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION =
|
|
|
2825
2844
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(composables_Table, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2826
2845
|
id: uuid.value,
|
|
2827
2846
|
"export-file-flag": exportFileFlag.value,
|
|
2847
|
+
componentDesc: componentDesc.value,
|
|
2828
2848
|
"component-no": props.componentNo,
|
|
2829
2849
|
"columns-setting": props.columnsSetting,
|
|
2830
2850
|
loading: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(state).loading || props.loading,
|
|
@@ -2840,6 +2860,7 @@ const pro_table_v2vue_type_script_lang_tsx_setup_true_name_ProTable_SELECTION =
|
|
|
2840
2860
|
}), null, 16, [
|
|
2841
2861
|
"id",
|
|
2842
2862
|
"export-file-flag",
|
|
2863
|
+
"componentDesc",
|
|
2843
2864
|
"component-no",
|
|
2844
2865
|
"columns-setting",
|
|
2845
2866
|
"loading",
|
|
@@ -4010,6 +4031,7 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
4010
4031
|
const templateModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({
|
|
4011
4032
|
templateId: ""
|
|
4012
4033
|
});
|
|
4034
|
+
const operation = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)("");
|
|
4013
4035
|
const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)({
|
|
4014
4036
|
templateId: [
|
|
4015
4037
|
{
|
|
@@ -4034,9 +4056,11 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
4034
4056
|
};
|
|
4035
4057
|
// 提交
|
|
4036
4058
|
const handleConfirmSubmit = async ()=>{
|
|
4059
|
+
operation.value = "";
|
|
4037
4060
|
await formRef.value?.validate();
|
|
4038
4061
|
const printTemplate = printTemplateList.value.find((item)=>item.receiptTemplateRuleId === templateModel.value.templateId);
|
|
4039
4062
|
await props.onTemplateConfirm(printTemplate);
|
|
4063
|
+
operation.value = "confirm";
|
|
4040
4064
|
return [];
|
|
4041
4065
|
};
|
|
4042
4066
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
|
|
@@ -4054,11 +4078,10 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
4054
4078
|
"destroy-on-close": true,
|
|
4055
4079
|
"confirm-fn": ()=>handleConfirmSubmit(),
|
|
4056
4080
|
"align-center": true,
|
|
4057
|
-
|
|
4058
|
-
(
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
}
|
|
4081
|
+
onClose: _cache[1] || (_cache[1] = async ()=>{
|
|
4082
|
+
if (!operation.value || 'cancel' === operation.value) await props.onTemplateConfirm(void 0, 'cancel');
|
|
4083
|
+
}),
|
|
4084
|
+
onCancel: _cache[2] || (_cache[2] = ($event)=>operation.value = 'cancel')
|
|
4062
4085
|
}, {
|
|
4063
4086
|
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
4064
4087
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElForm), {
|
|
@@ -4107,8 +4130,7 @@ const BannerInfo_exports_ = BannerInfovue_type_script_setup_true_lang_ts_name_ba
|
|
|
4107
4130
|
]),
|
|
4108
4131
|
_: 1
|
|
4109
4132
|
}, 8, [
|
|
4110
|
-
"confirm-fn"
|
|
4111
|
-
"before-close"
|
|
4133
|
+
"confirm-fn"
|
|
4112
4134
|
]));
|
|
4113
4135
|
}
|
|
4114
4136
|
});
|
|
@@ -4542,110 +4564,184 @@ const createPrint = ()=>{
|
|
|
4542
4564
|
});
|
|
4543
4565
|
let defaultContext = initData();
|
|
4544
4566
|
let isLocalPrint = false;
|
|
4567
|
+
let breakPrint = false;
|
|
4545
4568
|
/** 获取当前是否是本地打印 */ const getIsLocalPrint = ()=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.getAppData)("isLocalPrint");
|
|
4569
|
+
/** 校验方法提取 */ const validateRequired = (value, errorMessage)=>{
|
|
4570
|
+
if (null == value) {
|
|
4571
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(errorMessage);
|
|
4572
|
+
breakPrint = true;
|
|
4573
|
+
return false;
|
|
4574
|
+
}
|
|
4575
|
+
return true;
|
|
4576
|
+
};
|
|
4577
|
+
/** 校验参数是否都传了 */ const validateParams = (params)=>{
|
|
4578
|
+
if (!validateRequired(params?.designFlag, "设计时标志不能为空")) return;
|
|
4579
|
+
if (!validateRequired(params?.sysMenuId, "系统菜单标识不能为空")) return;
|
|
4580
|
+
if (!validateRequired(params?.receiptId, "单据标识不能为空")) return;
|
|
4581
|
+
if (!validateRequired(params?.bizIdTypeCode, "业务标识类型代码不能为空")) return;
|
|
4582
|
+
if (!validateRequired(params?.bizIds, "业务标识集合不能为空")) return;
|
|
4583
|
+
if (params?.bizIds?.length === 0) {
|
|
4584
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("业务标识集合不能为空");
|
|
4585
|
+
breakPrint = true;
|
|
4586
|
+
return;
|
|
4587
|
+
}
|
|
4588
|
+
if (!validateRequired(params?.printType, "打印类型不能为空")) return;
|
|
4589
|
+
if (!validateRequired(params?.formOperationType, "打印类别不能为空")) return;
|
|
4590
|
+
if (params?.invoiceInfo) {
|
|
4591
|
+
if (!validateRequired(params?.invoiceInfo?.invOperateTypeCode, "票据操作类型代码不能为空")) return;
|
|
4592
|
+
if (!validateRequired(params?.invoiceInfo?.invoiceAllotId, "票据分配标识不能为空")) return;
|
|
4593
|
+
if (!validateRequired(params?.invoiceInfo?.invoiceUsageCode, "票据用途代码不能为空")) return;
|
|
4594
|
+
}
|
|
4595
|
+
};
|
|
4546
4596
|
// 打印
|
|
4547
4597
|
const printStart = async (params)=>{
|
|
4548
|
-
/** 初始化 */
|
|
4598
|
+
/** 初始化 */ breakPrint = false;
|
|
4599
|
+
validateParams(params);
|
|
4600
|
+
if (breakPrint) return;
|
|
4601
|
+
defaultContext = initData();
|
|
4549
4602
|
isLocalPrint = getIsLocalPrint();
|
|
4550
4603
|
defaultContext.printParams = params;
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
await
|
|
4556
|
-
if (
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4604
|
+
/** 1.查询单据信息 */ await fetchReceiptInfo();
|
|
4605
|
+
if (breakPrint) return;
|
|
4606
|
+
/** 2.弹窗询问 */ if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) await dialogAsk();
|
|
4607
|
+
if (breakPrint) return;
|
|
4608
|
+
/** 3.模版选择 */ await selectPrintTemplateFn();
|
|
4609
|
+
if (breakPrint) return;
|
|
4610
|
+
/** 5.单据重新组织分单 */ await splitReceiptFn();
|
|
4611
|
+
if (breakPrint) return;
|
|
4612
|
+
/** 6.票据组织分单 */ await splitInvoiceFn();
|
|
4613
|
+
if (breakPrint) return;
|
|
4614
|
+
return await printLoop();
|
|
4561
4615
|
};
|
|
4562
4616
|
/**
|
|
4563
|
-
*
|
|
4617
|
+
* 1.获取单据信息
|
|
4564
4618
|
*/ const fetchReceiptInfo = async ()=>{
|
|
4565
|
-
const [, res] = await queryReceiptByExample({
|
|
4619
|
+
const [err, res] = await queryReceiptByExample({
|
|
4566
4620
|
receiptIds: [
|
|
4567
4621
|
defaultContext.printParams?.receiptId
|
|
4568
4622
|
]
|
|
4569
4623
|
});
|
|
4570
|
-
if (
|
|
4624
|
+
if (err) {
|
|
4625
|
+
breakPrint = true;
|
|
4626
|
+
return;
|
|
4627
|
+
}
|
|
4628
|
+
if (!res?.data || res?.data?.length === 0) {
|
|
4629
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("单据不存在");
|
|
4630
|
+
breakPrint = true;
|
|
4631
|
+
return;
|
|
4632
|
+
}
|
|
4633
|
+
// 更新 defaultContext
|
|
4634
|
+
defaultContext = {
|
|
4571
4635
|
...defaultContext,
|
|
4572
4636
|
receiptInfo: res.data[0]
|
|
4573
4637
|
};
|
|
4574
4638
|
};
|
|
4575
4639
|
/**
|
|
4576
|
-
*
|
|
4640
|
+
* 2.弹窗询问
|
|
4577
4641
|
*/ const dialogAsk = async ()=>{
|
|
4578
|
-
if (defaultContext?.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) return nextAction();
|
|
4579
4642
|
const { receiptPrintRuleCode, receiptPrintCategCode, receiptNameDisplay, menuXReceiptList } = defaultContext.receiptInfo || {};
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
// 按菜单
|
|
4643
|
+
if (!receiptPrintRuleCode) return;
|
|
4644
|
+
let code = receiptPrintCategCode;
|
|
4583
4645
|
if (receiptPrintRuleCode === constant_RECEIPT_PRINT_RULE_CODE.MENU) {
|
|
4584
|
-
//获取菜单打印配置信息
|
|
4585
4646
|
const menuReceiptInfo = menuXReceiptList?.find((item)=>item.sysXMenuId === defaultContext.printParams?.sysMenuId);
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4647
|
+
code = menuReceiptInfo?.receiptPrintCategCode || receiptPrintCategCode;
|
|
4648
|
+
}
|
|
4649
|
+
const isConfirmed = await messageBoxAskJudge(code, receiptNameDisplay);
|
|
4650
|
+
if (!isConfirmed) {
|
|
4651
|
+
breakPrint = true; // 如果用户取消操作,设置 breakPrint 为 true
|
|
4652
|
+
return;
|
|
4589
4653
|
}
|
|
4590
4654
|
};
|
|
4591
4655
|
/**
|
|
4592
|
-
*
|
|
4656
|
+
* 2.弹窗询问判断方法
|
|
4593
4657
|
*/ const messageBoxAskJudge = async (receiptPrintCategCode, receiptNameDisplay)=>{
|
|
4594
4658
|
if (receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT || receiptPrintCategCode === constant_RECEIPT_PRINT_CATEG_CODE.ASK_ISSUE_NO_PRINT) return await messageBoxAsk(receiptPrintCategCode, receiptNameDisplay);
|
|
4595
|
-
return
|
|
4659
|
+
return true;
|
|
4596
4660
|
};
|
|
4597
4661
|
/**
|
|
4598
|
-
* ElMessageBox询问
|
|
4662
|
+
* 2.弹窗询问ElMessageBox询问
|
|
4599
4663
|
*/ const messageBoxAsk = async (code, receiptNameDisplay)=>{
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
return data;
|
|
4664
|
+
try {
|
|
4665
|
+
await __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessageBox.confirm(`是否${code === constant_RECEIPT_PRINT_CATEG_CODE.ASK_PRINT ? "打印" : "开具"} ${receiptNameDisplay}`, "提示", {
|
|
4666
|
+
confirmButtonText: "确定",
|
|
4667
|
+
cancelButtonText: "取消",
|
|
4668
|
+
type: "warning"
|
|
4669
|
+
});
|
|
4670
|
+
// 如果用户点击了“确定”,返回 true
|
|
4671
|
+
return true;
|
|
4672
|
+
} catch (error) {
|
|
4673
|
+
// 如果用户点击了“取消”、关闭按钮、遮罩层或按 ESC 键,返回 false
|
|
4674
|
+
return false;
|
|
4675
|
+
}
|
|
4613
4676
|
};
|
|
4614
|
-
/**
|
|
4615
|
-
* 打印模板选择
|
|
4616
|
-
*/ const printTemplateFn = async ()=>{
|
|
4677
|
+
/** 3.模板选择 */ const selectPrintTemplateFn = async ()=>{
|
|
4617
4678
|
const { chooseReceiptTemplateRuleList, receiptNameDisplay } = defaultContext?.receiptInfo || {};
|
|
4618
|
-
//
|
|
4679
|
+
// 过滤出启用的模板
|
|
4619
4680
|
defaultContext.printTemplateList = chooseReceiptTemplateRuleList?.filter((item)=>item.enabledFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES) ?? [];
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
onTemplateConfirm: templateConfirm
|
|
4623
|
-
});
|
|
4624
|
-
else if (defaultContext?.printTemplateList.length === 1) {
|
|
4625
|
-
defaultContext.printTemplate = defaultContext?.printTemplateList[0];
|
|
4626
|
-
await splitReceiptFn();
|
|
4627
|
-
return await printLoop();
|
|
4628
|
-
} else {
|
|
4681
|
+
// 如果没有有效的模板,报错并返回 false
|
|
4682
|
+
if (0 === defaultContext.printTemplateList.length) {
|
|
4629
4683
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(`${receiptNameDisplay} 没有有效的模板`);
|
|
4630
|
-
|
|
4684
|
+
breakPrint = true;
|
|
4685
|
+
return;
|
|
4686
|
+
}
|
|
4687
|
+
// 如果只有一条模板,直接选中
|
|
4688
|
+
if (1 === defaultContext.printTemplateList.length) {
|
|
4689
|
+
defaultContext.printTemplate = defaultContext.printTemplateList[0];
|
|
4690
|
+
return;
|
|
4631
4691
|
}
|
|
4692
|
+
// 如果有多条模板,弹出选择框
|
|
4693
|
+
if (defaultContext.printTemplateList.length > 1) return new Promise((resolve)=>{
|
|
4694
|
+
createPrintTemplate({
|
|
4695
|
+
printTemplateList: defaultContext.printTemplateList,
|
|
4696
|
+
onTemplateConfirm: async (template, operation)=>{
|
|
4697
|
+
await templateConfirm(template, operation);
|
|
4698
|
+
resolve(); // 用户选择完成后解析Promise
|
|
4699
|
+
}
|
|
4700
|
+
});
|
|
4701
|
+
});
|
|
4632
4702
|
};
|
|
4633
4703
|
/**
|
|
4634
|
-
*
|
|
4635
|
-
*/ const templateConfirm = async (template)=>{
|
|
4636
|
-
defaultContext.printTemplate = template;
|
|
4637
|
-
|
|
4638
|
-
|
|
4704
|
+
* 3.模板选择
|
|
4705
|
+
*/ const templateConfirm = async (template, operation)=>{
|
|
4706
|
+
if (template) defaultContext.printTemplate = template;
|
|
4707
|
+
if ("cancel" === operation) {
|
|
4708
|
+
breakPrint = true;
|
|
4709
|
+
return;
|
|
4710
|
+
}
|
|
4639
4711
|
};
|
|
4640
|
-
/**
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) {
|
|
4644
|
-
//5
|
|
4712
|
+
/** 5.组织单据分单 */ const splitReceiptFn = async ()=>{
|
|
4713
|
+
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) //5
|
|
4714
|
+
{
|
|
4645
4715
|
if (!defaultContext?.printParams?.dataSourceContent && (defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO || defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.ISSUE)) await receiptSplitResultFn();
|
|
4646
|
-
|
|
4716
|
+
}
|
|
4717
|
+
};
|
|
4718
|
+
/**
|
|
4719
|
+
* 5.单据分单接口
|
|
4720
|
+
*/ const receiptSplitResultFn = async ()=>{
|
|
4721
|
+
const [err, res] = await splitReceipt({
|
|
4722
|
+
receiptId: defaultContext?.printParams?.receiptId,
|
|
4723
|
+
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
4724
|
+
bizIds: defaultContext?.printParams?.bizIds
|
|
4725
|
+
});
|
|
4726
|
+
if (err) {
|
|
4727
|
+
breakPrint = true;
|
|
4728
|
+
return;
|
|
4729
|
+
}
|
|
4730
|
+
if (res?.success) {
|
|
4731
|
+
if (res.data?.receiptDataSourceList && res.data?.receiptDataSourceList.length > 0) defaultContext.splitResult = res.data?.receiptDataSourceList;
|
|
4732
|
+
}
|
|
4733
|
+
};
|
|
4734
|
+
/** 6.组织票据分单 */ const splitInvoiceFn = async ()=>{
|
|
4735
|
+
if (defaultContext.printParams?.designFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO) //6
|
|
4736
|
+
{
|
|
4647
4737
|
if (defaultContext?.printParams?.invoiceInfo?.invoiceAllotId && defaultContext?.receiptInfo?.invoiceFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES && defaultContext?.receiptInfo?.receiptPrintCategCode !== constant_RECEIPT_PRINT_CATEG_CODE.NO_PRINT) {
|
|
4648
|
-
const
|
|
4738
|
+
const interfaceId = defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId;
|
|
4739
|
+
if (!interfaceId) {
|
|
4740
|
+
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error("单据未配置票据接口,无法开票!");
|
|
4741
|
+
breakPrint = true;
|
|
4742
|
+
return;
|
|
4743
|
+
}
|
|
4744
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4649
4745
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4650
4746
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4651
4747
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV001,
|
|
@@ -4654,6 +4750,10 @@ const createPrint = ()=>{
|
|
|
4654
4750
|
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId
|
|
4655
4751
|
}
|
|
4656
4752
|
});
|
|
4753
|
+
if (err) {
|
|
4754
|
+
breakPrint = true;
|
|
4755
|
+
return;
|
|
4756
|
+
}
|
|
4657
4757
|
if (res?.success) {
|
|
4658
4758
|
defaultContext.receiptAllotInfo = res?.data?.bizOutputParam ?? [];
|
|
4659
4759
|
await invoiceSplitResultFn();
|
|
@@ -4662,44 +4762,44 @@ const createPrint = ()=>{
|
|
|
4662
4762
|
}
|
|
4663
4763
|
};
|
|
4664
4764
|
/**
|
|
4665
|
-
*
|
|
4666
|
-
*/ const receiptSplitResultFn = async ()=>{
|
|
4667
|
-
const [, res] = await splitReceipt({
|
|
4668
|
-
receiptId: defaultContext?.printParams?.receiptId,
|
|
4669
|
-
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
4670
|
-
bizIds: defaultContext?.printParams?.bizIds
|
|
4671
|
-
});
|
|
4672
|
-
if (res?.success) defaultContext.splitResult = res.data?.receiptDataSourceList ?? [];
|
|
4673
|
-
};
|
|
4674
|
-
/**
|
|
4675
|
-
* 票据分单
|
|
4765
|
+
* 6.票据分单
|
|
4676
4766
|
*/ const invoiceSplitResultFn = async ()=>{
|
|
4677
4767
|
// 票据操作类型代码---1开具
|
|
4678
4768
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.ISSUE) {
|
|
4679
4769
|
const invoiceInfo = (defaultContext?.receiptAllotInfo ?? [])[0];
|
|
4680
4770
|
if (invoiceInfo?.invoiceMediaTypeCode === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_MEDIA_TYPE_CODE.ELECTRONIC && (defaultContext?.splitResult?.length ?? 0) < (invoiceInfo?.residueCount ?? 0)) {
|
|
4681
4771
|
__WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.error(`当前票据数量不足,所需票据张数[${defaultContext?.splitResult?.length}],剩余张数[${invoiceInfo?.residueCount}]!`);
|
|
4682
|
-
|
|
4772
|
+
breakPrint = true;
|
|
4773
|
+
return;
|
|
4683
4774
|
}
|
|
4684
|
-
const
|
|
4775
|
+
const invoiceList = (defaultContext?.splitResult ?? []).map((item)=>({
|
|
4776
|
+
receiptSort: item.receiptSort,
|
|
4777
|
+
receiptSplitResultId: item.receiptSplitResultId,
|
|
4778
|
+
invoiceAmt: defaultContext?.printParams?.invoiceInfo?.invoiceAmt
|
|
4779
|
+
}));
|
|
4780
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4685
4781
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4686
4782
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4687
4783
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV101,
|
|
4688
4784
|
params: {
|
|
4689
|
-
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId,
|
|
4690
|
-
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
|
|
4691
|
-
orgIssueFlag: defaultContext?.printParams?.invoiceInfo?.orgIssueFlag,
|
|
4785
|
+
invoiceAllotId: defaultContext?.printParams?.invoiceInfo?.invoiceAllotId ?? void 0,
|
|
4786
|
+
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode ?? void 0,
|
|
4787
|
+
orgIssueFlag: defaultContext?.printParams?.invoiceInfo?.orgIssueFlag ?? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.NO,
|
|
4692
4788
|
issueOrgName: defaultContext?.printParams?.invoiceInfo?.issueOrgName,
|
|
4693
4789
|
socialCreditNo: defaultContext?.printParams?.invoiceInfo?.socialCreditNo,
|
|
4694
4790
|
invoiceMemo: defaultContext?.printParams?.invoiceInfo?.invoiceMemo,
|
|
4695
|
-
invoiceList:
|
|
4791
|
+
invoiceList: invoiceList ?? []
|
|
4696
4792
|
}
|
|
4697
4793
|
});
|
|
4698
|
-
if (
|
|
4794
|
+
if (err) {
|
|
4795
|
+
breakPrint = true;
|
|
4796
|
+
return;
|
|
4797
|
+
}
|
|
4798
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4699
4799
|
}
|
|
4700
4800
|
// 票据操作类型代码---6重开
|
|
4701
4801
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.REOPEN) {
|
|
4702
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4802
|
+
const [error, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4703
4803
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4704
4804
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4705
4805
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV104,
|
|
@@ -4708,11 +4808,15 @@ const createPrint = ()=>{
|
|
|
4708
4808
|
invoiceIds: defaultContext?.printParams?.invoiceInfo?.invoiceIds
|
|
4709
4809
|
}
|
|
4710
4810
|
});
|
|
4711
|
-
if (
|
|
4811
|
+
if (error) {
|
|
4812
|
+
breakPrint = true;
|
|
4813
|
+
return;
|
|
4814
|
+
}
|
|
4815
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4712
4816
|
}
|
|
4713
4817
|
// 票据操作类型代码---5换开
|
|
4714
4818
|
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.CHANGE) {
|
|
4715
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4819
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4716
4820
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4717
4821
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4718
4822
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV103,
|
|
@@ -4721,11 +4825,15 @@ const createPrint = ()=>{
|
|
|
4721
4825
|
invoiceIds: defaultContext?.printParams?.invoiceInfo?.invoiceIds
|
|
4722
4826
|
}
|
|
4723
4827
|
});
|
|
4724
|
-
if (
|
|
4828
|
+
if (err) {
|
|
4829
|
+
breakPrint = true;
|
|
4830
|
+
return;
|
|
4831
|
+
}
|
|
4832
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4725
4833
|
}
|
|
4726
4834
|
// 票据操作类型代码---3红冲
|
|
4727
|
-
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.
|
|
4728
|
-
const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4835
|
+
if (defaultContext?.printParams?.invoiceInfo?.invOperateTypeCode === constant_INV_OPERATE_TYPE_CODE.RED) {
|
|
4836
|
+
const [err, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.interfaceInvoke)({
|
|
4729
4837
|
interfaceId: defaultContext?.printParams?.invoiceInfo?.invoiceInterfaceId ?? defaultContext?.receiptInfo?.invoiceInterfaceId,
|
|
4730
4838
|
menuId: defaultContext?.printParams?.sysMenuId,
|
|
4731
4839
|
tradeCode: __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.INVOICE_CODE.INV102,
|
|
@@ -4734,14 +4842,18 @@ const createPrint = ()=>{
|
|
|
4734
4842
|
invoiceUsageCode: defaultContext?.printParams?.invoiceInfo?.invoiceUsageCode,
|
|
4735
4843
|
bizIdTypeCode: defaultContext?.printParams?.bizIdTypeCode,
|
|
4736
4844
|
oldBizId: defaultContext?.printParams?.invoiceInfo?.oldBizId,
|
|
4737
|
-
redBizId: defaultContext?.printParams?.bizIds,
|
|
4845
|
+
redBizId: defaultContext?.printParams?.bizIds ?? defaultContext?.printParams?.bizIds[0],
|
|
4738
4846
|
onlyRedFlag: defaultContext?.printParams?.invoiceInfo?.onlyRedFlag
|
|
4739
4847
|
}
|
|
4740
4848
|
});
|
|
4741
|
-
if (
|
|
4849
|
+
if (err) {
|
|
4850
|
+
breakPrint = true;
|
|
4851
|
+
return;
|
|
4852
|
+
}
|
|
4853
|
+
if (res?.success) defaultContext.splitResult = res.data?.bizOutputParam ?? [];
|
|
4742
4854
|
}
|
|
4743
4855
|
};
|
|
4744
|
-
/**
|
|
4856
|
+
/** 7.循环打印 */ const printLoop = async ()=>{
|
|
4745
4857
|
// 修改这里:使用 Promise.all 等待所有异步操作完成
|
|
4746
4858
|
const results = await Promise.all((defaultContext?.splitResult || []).map(async (item)=>await printReceiptFn(item)));
|
|
4747
4859
|
// 检查结果数组中是否所有项都是 undefined
|
|
@@ -5382,7 +5494,7 @@ const DICT_SELECT = 'dictSelect';
|
|
|
5382
5494
|
clearable: ""
|
|
5383
5495
|
}, {
|
|
5384
5496
|
...(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs)
|
|
5385
|
-
}), null, 16)) : 'checkbox' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component || 'radio-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(`el-${(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component}`), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
5497
|
+
}), null, 16)) : 'checkbox' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component || 'checkbox-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component || 'radio-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)(`el-${(0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component}`), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
5386
5498
|
key: 5,
|
|
5387
5499
|
ref_key: "componentRef",
|
|
5388
5500
|
ref: componentRef,
|
|
@@ -5404,8 +5516,21 @@ const DICT_SELECT = 'dictSelect';
|
|
|
5404
5516
|
}, 1032, [
|
|
5405
5517
|
"value"
|
|
5406
5518
|
]))), 128)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5407
|
-
'checkbox' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5519
|
+
'checkbox-group' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5408
5520
|
key: 1
|
|
5521
|
+
}, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).options, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent)('el-checkbox'), {
|
|
5522
|
+
key: item.value,
|
|
5523
|
+
value: item.value
|
|
5524
|
+
}, {
|
|
5525
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
5526
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)(item.label), 1)
|
|
5527
|
+
]),
|
|
5528
|
+
_: 2
|
|
5529
|
+
}, 1032, [
|
|
5530
|
+
"value"
|
|
5531
|
+
]))), 128)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true),
|
|
5532
|
+
'checkbox' === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).component ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, {
|
|
5533
|
+
key: 2
|
|
5409
5534
|
}, [
|
|
5410
5535
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.toDisplayString)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).label), 1)
|
|
5411
5536
|
], 64)) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
@@ -6615,8 +6740,8 @@ const access_infovue_type_script_setup_true_lang_ts_name_accessInfo_hoisted_3 =
|
|
|
6615
6740
|
(0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>__props.bannerConfig?.bizId, ()=>{});
|
|
6616
6741
|
__expose({
|
|
6617
6742
|
searchRef: searchRef,
|
|
6618
|
-
invoiceRef:
|
|
6619
|
-
bannerRef:
|
|
6743
|
+
invoiceRef: invoiceRef,
|
|
6744
|
+
bannerRef: bannerRef
|
|
6620
6745
|
});
|
|
6621
6746
|
return (_ctx, _cache)=>{
|
|
6622
6747
|
const _component_el_button = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-button");
|