@bit-sun/business-component 4.0.12-alpha.2 → 4.0.12-alpha.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.0.12-alpha.2",
3
+ "version": "4.0.12-alpha.4",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -326,7 +326,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
326
326
  tableSearchForm = [
327
327
  { name: 'qp-skuCode-in', label: 'SKU编码',type:'multipleQueryInput' },
328
328
  { name: 'qp-skuName-like', label: 'SKU名称' },
329
- { name: 'qp-spuCode-like', label: '外部SPU编码' },
329
+ { name: 'qp-itemCode-like', label: '外部SPU编码' },
330
330
  { name: 'qp-eancode-in', label: '商品条码', field: {
331
331
  type: 'multipleQueryInput',
332
332
  props: {
@@ -212,4 +212,4 @@
212
212
  .ant-dropdown-link {
213
213
  cursor: pointer;
214
214
  }
215
- }
215
+ }
@@ -159,7 +159,7 @@ export default class ColumnSettingTable extends React.Component {
159
159
  ...restProps,
160
160
  };
161
161
  let showSummary = null;
162
- if (this.state.showColumns.length) {
162
+ if (this.state.showColumns.length && !Array.isArray(summary)) {
163
163
  if (summary && summary().diy) {
164
164
  showSummary = this.getTableSummaryInfo();
165
165
  } else {
@@ -201,7 +201,9 @@ export default class ColumnSettingTable extends React.Component {
201
201
  ...scroll,
202
202
  x: restProps.overScrollX || this.getTableScrollXWidth(showCol)
203
203
  },
204
- summary: showSummary,
204
+ ...(
205
+ showSummary ? { summary: showSummary } : {}
206
+ )
205
207
  }
206
208
  return (
207
209
  <div style={{ position: 'relative' }}>
@@ -227,6 +229,35 @@ export default class ColumnSettingTable extends React.Component {
227
229
  ...otherTableInfo
228
230
  }
229
231
  />
232
+ {Array.isArray(summary) && (
233
+ <>
234
+ <div
235
+ className='table-bssula-summary'
236
+ style={{
237
+ right: '20%',
238
+ bottom: 0,
239
+ whiteSpace: 'nowrap',
240
+ overflowX: 'auto',
241
+ }}
242
+ >
243
+ {summary.map(item => (
244
+ <Text type='danger'>
245
+ {item.label}: <span className='table-bssula-summary-count'>{item.count || 0}</span>
246
+ </Text>
247
+ ))}
248
+ </div>
249
+ <div style={{
250
+ width: '16px',
251
+ height: '26px',
252
+ opacity: 0.32,
253
+ transform: 'scaleX(-1)',
254
+ backgroundImage:'linear-gradient(270deg, #ffffff00 0%, #A4A4A4 100%)',
255
+ right: '20%',
256
+ position: 'absolute',
257
+ bottom: 0,
258
+ }}></div>
259
+ </>
260
+ )}
230
261
  </div >
231
262
  )
232
263
  }
@@ -156,7 +156,7 @@ export default class ColumnSettingSulaTable extends React.Component {
156
156
  ...restProps,
157
157
  };
158
158
  let showSummary = null;
159
- if (this.state.showColumns.length) {
159
+ if (this.state.showColumns.length && !Array.isArray(summary)) {
160
160
  if (summary && summary().diy) {
161
161
  showSummary = this.getTableSummaryInfo();
162
162
  } else {
@@ -197,7 +197,9 @@ export default class ColumnSettingSulaTable extends React.Component {
197
197
  ...scroll,
198
198
  x: restProps.overScrollX || this.getTableScrollXWidth(showCol)
199
199
  },
200
- summary: showSummary,
200
+ ...(
201
+ showSummary ? { summary: showSummary } : {}
202
+ )
201
203
  }
202
204
  return (
203
205
  <div style={{ position: 'relative' }}>
@@ -223,6 +225,35 @@ export default class ColumnSettingSulaTable extends React.Component {
223
225
  ...otherTableInfo
224
226
  }
225
227
  />
228
+ {Array.isArray(summary) && (
229
+ <>
230
+ <div
231
+ className='table-bssula-summary'
232
+ style={{
233
+ right: '20%',
234
+ bottom: 0,
235
+ whiteSpace: 'nowrap',
236
+ overflowX: 'auto',
237
+ }}
238
+ >
239
+ {summary.map(item => (
240
+ <Text type='danger'>
241
+ {item.label}: <span className='table-bssula-summary-count'>{item.count || 0}</span>
242
+ </Text>
243
+ ))}
244
+ </div>
245
+ <div style={{
246
+ width: '16px',
247
+ height: '26px',
248
+ opacity: 0.32,
249
+ transform: 'scaleX(-1)',
250
+ backgroundImage:'linear-gradient(270deg, #ffffff00 0%, #A4A4A4 100%)',
251
+ right: '20%',
252
+ position: 'absolute',
253
+ bottom: 0,
254
+ }}></div>
255
+ </>
256
+ )}
226
257
  </div >
227
258
  )
228
259
  }
@@ -834,9 +834,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
834
834
 
835
835
  const renderShowTable = (tableList, type) => {
836
836
  const tableBoxHeighth = getTableHeigth(modalTableProps?.tableSearchForm);
837
- const oSY = `calc(100vh - 391px - 82px)`; // 分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
837
+ const oSY = `calc(100vh - ${tableBoxHeighth}px - 82px)`; // 分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
838
838
  return (
839
- <div style={{ height: `calc(100vh - 391px)` }}>
839
+ <div style={{ height: `calc(100vh - ${tableBoxHeighth}px)` }}>
840
840
  <Table
841
841
  bordered
842
842
  size="middle"
@@ -889,7 +889,12 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
889
889
  }
890
890
 
891
891
  const onClear = () => {
892
+ // 执行父组件 onClear 事件
893
+ props?.onClear?.();
894
+ // 清空下拉框 / 弹窗 选中数据
892
895
  formaData([], items);
896
+ onChangeSelectedKeys([], [])
897
+ // 重置下拉框数据源
893
898
  resetSelectDataSource();
894
899
  }
895
900
 
@@ -33,6 +33,6 @@ export const getRealStr = (oldSelect: any,newSelect: any, record: any) => {
33
33
 
34
34
  export const getTableHeigth = (list: any) => {
35
35
  const totalRows = Math.ceil((list?.length+1) / 4);
36
- if(totalRows == 1) return 502; // modal弹窗760 调整为700 适应小屏
37
- return 488 - totalRows*10
36
+ if(totalRows == 1) return 358; // modal弹窗760 调整为700 适应小屏
37
+ return 411 - totalRows*10
38
38
  }