sun-biz 0.0.4-beta.54 → 0.0.4-beta.55

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.
@@ -7271,7 +7271,8 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7271
7271
  allowSelectDisabledFlag: {}
7272
7272
  },
7273
7273
  emits: [
7274
- 'change'
7274
+ 'change',
7275
+ 'update:modelValue'
7275
7276
  ],
7276
7277
  setup (__props, { expose: __expose, emit: __emit }) {
7277
7278
  const props = __props;
@@ -7336,23 +7337,6 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7336
7337
  deep: true,
7337
7338
  immediate: true
7338
7339
  });
7339
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
7340
- if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
7341
- const list = props.defaultValue.map((item)=>({
7342
- ...item,
7343
- userId: item.value || item.userId,
7344
- userName: item.label || item.userName,
7345
- value: item.value || item.userId,
7346
- label: item.label || item.userName
7347
- }));
7348
- userList.value = [
7349
- ...list
7350
- ];
7351
- }
7352
- }, {
7353
- deep: true,
7354
- immediate: true
7355
- });
7356
7340
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.userJobCodes, (newVal, oldVal)=>{
7357
7341
  if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
7358
7342
  });
@@ -7437,34 +7421,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7437
7421
  ...item,
7438
7422
  label: item.userName,
7439
7423
  value: item.userId
7440
- })); // 保留已选中的项,确保选中状态能正确回显
7441
- // 只有在非搜索状态下(没有关键字)才合并选中项,搜索时以搜索结果为准
7442
- const isSearch = !!data?.keyWord;
7443
- if (!isSearch && selectedRows.value?.length) {
7444
- const selectedList = selectedRows.value.map((item)=>({
7445
- ...item,
7446
- userId: item.value || item.userId,
7447
- userName: item.label || item.userName,
7448
- value: item.value || item.userId,
7449
- label: item.label || item.userName
7450
- }));
7451
- list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7452
- ...list,
7453
- ...selectedList
7454
- ], 'userId');
7455
- } else if (!isSearch && attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) {
7456
- const defaultList = props.defaultValue.map((item)=>({
7457
- ...item,
7458
- userId: item.value || item.userId,
7459
- userName: item.label || item.userName,
7460
- value: item.value || item.userId,
7461
- label: item.label || item.userName
7462
- }));
7463
- list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
7464
- ...list,
7465
- ...defaultList
7466
- ], 'userId');
7467
- }
7424
+ }));
7468
7425
  userList.value = list;
7469
7426
  currentRowIndex.value = -1;
7470
7427
  tableRef.value?.eleTable?.setCurrentRow?.(void 0);
@@ -7482,7 +7439,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7482
7439
  };
7483
7440
  const handleChange = ()=>{
7484
7441
  let value = selectedRows.value.map((item)=>item.value || item.userId);
7485
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
7442
+ emit('update:modelValue', props.multiSelectFlag ? value : value[0]);
7486
7443
  if (props.multiSelectFlag) emit('change', value, selectedRows.value);
7487
7444
  else {
7488
7445
  const data = value[0] ? userList.value.find((item)=>item.value === value[0] || item.userId === value[0]) : void 0;
@@ -12002,7 +11959,7 @@ function useUpdateInvoiceFormConfig(options) {
12002
11959
  reasonLoading.value = true;
12003
11960
  const [, res] = await queryReasonList(constant_REASON_USE_SCOPE_CODE.ADJUST_NUMBER);
12004
11961
  reasonLoading.value = false;
12005
- if (res?.success) reasonList.value = res?.data;
11962
+ if (res?.success) reasonList.value = res?.data?.filter((item)=>item.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
12006
11963
  };
12007
11964
  /** 提交 */ const confirmFn = async ()=>{
12008
11965
  const isValid = await formRef.value.ref.validate();
package/dist/index.js CHANGED
@@ -7940,7 +7940,8 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
7940
7940
  allowSelectDisabledFlag: {}
7941
7941
  },
7942
7942
  emits: [
7943
- 'change'
7943
+ 'change',
7944
+ 'update:modelValue'
7944
7945
  ],
7945
7946
  setup (__props, { expose: __expose, emit: __emit }) {
7946
7947
  const props = __props;
@@ -8005,23 +8006,6 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
8005
8006
  deep: true,
8006
8007
  immediate: true
8007
8008
  });
8008
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.defaultValue, ()=>{
8009
- if (attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length && !defaultSetTableSelected.value) {
8010
- const list = props.defaultValue.map((item)=>({
8011
- ...item,
8012
- userId: item.value || item.userId,
8013
- userName: item.label || item.userName,
8014
- value: item.value || item.userId,
8015
- label: item.label || item.userName
8016
- }));
8017
- userList.value = [
8018
- ...list
8019
- ];
8020
- }
8021
- }, {
8022
- deep: true,
8023
- immediate: true
8024
- });
8025
8009
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.userJobCodes, (newVal, oldVal)=>{
8026
8010
  if (newVal && !(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.isEqual)(oldVal, newVal)) initComponentData();
8027
8011
  });
@@ -8106,34 +8090,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
8106
8090
  ...item,
8107
8091
  label: item.userName,
8108
8092
  value: item.userId
8109
- })); // 保留已选中的项,确保选中状态能正确回显
8110
- // 只有在非搜索状态下(没有关键字)才合并选中项,搜索时以搜索结果为准
8111
- const isSearch = !!data?.keyWord;
8112
- if (!isSearch && selectedRows.value?.length) {
8113
- const selectedList = selectedRows.value.map((item)=>({
8114
- ...item,
8115
- userId: item.value || item.userId,
8116
- userName: item.label || item.userName,
8117
- value: item.value || item.userId,
8118
- label: item.label || item.userName
8119
- }));
8120
- list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
8121
- ...list,
8122
- ...selectedList
8123
- ], 'userId');
8124
- } else if (!isSearch && attrs.modelValue && Array.isArray(props.defaultValue) && props.defaultValue.length) {
8125
- const defaultList = props.defaultValue.map((item)=>({
8126
- ...item,
8127
- userId: item.value || item.userId,
8128
- userName: item.label || item.userName,
8129
- value: item.value || item.userId,
8130
- label: item.label || item.userName
8131
- }));
8132
- list = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.uniqBy)([
8133
- ...list,
8134
- ...defaultList
8135
- ], 'userId');
8136
- }
8093
+ }));
8137
8094
  userList.value = list;
8138
8095
  currentRowIndex.value = -1;
8139
8096
  tableRef.value?.eleTable?.setCurrentRow?.(void 0);
@@ -8151,7 +8108,7 @@ const CLOSE_OTHER_POPOVERS_EVENT = 'user-select:close-others'; /*
8151
8108
  };
8152
8109
  const handleChange = ()=>{
8153
8110
  let value = selectedRows.value.map((item)=>item.value || item.userId);
8154
- if (attrs['onUpdate:modelValue']) attrs['onUpdate:modelValue'](props.multiSelectFlag ? value : value[0]);
8111
+ emit('update:modelValue', props.multiSelectFlag ? value : value[0]);
8155
8112
  if (props.multiSelectFlag) emit('change', value, selectedRows.value);
8156
8113
  else {
8157
8114
  const data = value[0] ? userList.value.find((item)=>item.value === value[0] || item.userId === value[0]) : void 0;
@@ -10837,7 +10794,7 @@ const Title_exports_ = Titlevue_type_script_setup_true_lang_ts_name_sunTitle;
10837
10794
  reasonLoading.value = true;
10838
10795
  const [, res] = await queryReasonList(constant_REASON_USE_SCOPE_CODE.ADJUST_NUMBER);
10839
10796
  reasonLoading.value = false;
10840
- if (res?.success) reasonList.value = res?.data;
10797
+ if (res?.success) reasonList.value = res?.data?.filter((item)=>item.displayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES);
10841
10798
  };
10842
10799
  /** 提交 */ const confirmFn = async ()=>{
10843
10800
  const isValid = await formRef.value.ref.validate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.4-beta.54",
3
+ "version": "0.0.4-beta.55",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "src/*",