ls-pro-common 3.0.71 → 3.0.72

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.
@@ -2,21 +2,21 @@ import type { ActionType } from 'ls-pro-table';
2
2
  import type { ProFormInstance } from 'ls-pro-form';
3
3
  import type { SingleParamType } from '../useSingle';
4
4
  export declare type DtlParamType = SingleParamType & {
5
- /**重置主表对象方法 */
5
+ /** 重置主表对象方法 */
6
6
  setMaster?: (item: any) => void;
7
- /**@name 主表主键字段 */
7
+ /** @name 主表主键字段 */
8
8
  mstKeyField: string;
9
- /**@name 从表服务 */
9
+ /** @name 从表服务 */
10
10
  dtlService: any;
11
- /**@name 从表关联字段 */
11
+ /** @name 从表关联字段 */
12
12
  relationField: string;
13
- /**@name 从表新增行时默认值 */
13
+ /** @name 从表新增行时默认值 */
14
14
  dtlItem: any;
15
- /**@name 从表名,主从表一起保存时必传参 */
15
+ /** @name 从表名,主从表一起保存时必传参 */
16
16
  dtlName?: string;
17
- /**@name 单据类型,主从表一起保存时必传参 */
17
+ /** @name 单据类型,主从表一起保存时必传参 */
18
18
  billType?: string;
19
- /**@name 动态编码规则字段,主从表一起保存传参 */
19
+ /** @name 动态编码规则字段,主从表一起保存传参 */
20
20
  codeRuleDynamicField?: string;
21
21
  /** 是否查询历史数据,通过主表查询面板用户受控组件传入 */
22
22
  ifHistory?: 0 | 1;
@@ -64,7 +64,7 @@ function useDtl(dtlParam) {
64
64
  var formRef = useRef();
65
65
  /** @name 从表编辑表单Ref */
66
66
  var dtlFormRef = useRef();
67
- /**@name 判断是否已审核 */
67
+ /** @name 判断是否已审核 */
68
68
  var isAudit = useCallback(function () {
69
69
  if (!auditStatus || !statusField) return false;
70
70
  return Number(masterObject[statusField] || 0) >= auditStatus;
@@ -769,7 +769,7 @@ function useDtl(dtlParam) {
769
769
  param.searchData = arr.join('&');
770
770
  } else {
771
771
  otherArr = searchArr.filter(function (item) {
772
- return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=');
772
+ return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=') || item.startsWith('resCode=');
773
773
  });
774
774
  whereArr = searchArr.filter(function (item) {
775
775
  return !otherArr.includes(item);
@@ -780,7 +780,7 @@ function useDtl(dtlParam) {
780
780
  var itemArr = item.split('=');
781
781
  where[itemArr[0]] = itemArr[1];
782
782
  });
783
- otherArr.push("where=" + JSON.stringify(where));
783
+ otherArr.push('where=' + JSON.stringify(where));
784
784
  param.searchData = otherArr.join('&');
785
785
  }
786
786
  }
@@ -1009,5 +1009,4 @@ function useDtl(dtlParam) {
1009
1009
  onAudit: onAudit
1010
1010
  };
1011
1011
  }
1012
- ;
1013
1012
  export default useDtl;
@@ -21,6 +21,7 @@ export declare type SingleParamType = {
21
21
  };
22
22
  /**
23
23
  * 单表基本增删改查 hooks
24
+ *
24
25
  * @param service 单表服务
25
26
  * @param toolConfig 定义基础功能按钮
26
27
  * @param initItem 对象初始值,新增时设置默认值
@@ -14,6 +14,7 @@ import { httpPost } from '../../http';
14
14
  import usePermission from '../usePermission';
15
15
  /**
16
16
  * 单表基本增删改查 hooks
17
+ *
17
18
  * @param service 单表服务
18
19
  * @param toolConfig 定义基础功能按钮
19
20
  * @param initItem 对象初始值,新增时设置默认值
@@ -67,9 +68,9 @@ function useSingle(inParam) {
67
68
  var tableRef = useRef();
68
69
  /** @name 查询表单Ref */
69
70
  var formRef = useRef();
70
- /**@name 编辑表单Ref */
71
+ /** @name 编辑表单Ref */
71
72
  var editFormRef = useRef();
72
- /**@name 查看历史数据 */
73
+ /** @name 查看历史数据 */
73
74
  var _useState7 = useState(0),
74
75
  _useState8 = _slicedToArray(_useState7, 2),
75
76
  ifHistory = _useState8[0],
@@ -567,7 +568,7 @@ function useSingle(inParam) {
567
568
  param.searchData = arr.join('&');
568
569
  } else {
569
570
  otherArr = searchArr.filter(function (item) {
570
- return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=');
571
+ return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=') || item.startsWith('resCode=');
571
572
  });
572
573
  whereArr = searchArr.filter(function (item) {
573
574
  return !otherArr.includes(item);
@@ -578,7 +579,7 @@ function useSingle(inParam) {
578
579
  var itemArr = item.split('=');
579
580
  where[itemArr[0]] = itemArr[1];
580
581
  });
581
- otherArr.push("where=" + JSON.stringify(where));
582
+ otherArr.push('where=' + JSON.stringify(where));
582
583
  param.searchData = otherArr.join('&');
583
584
  }
584
585
  }
@@ -625,6 +626,7 @@ function useSingle(inParam) {
625
626
  }();
626
627
  /**
627
628
  * 判断按钮状态
629
+ *
628
630
  * @param key
629
631
  * @returns
630
632
  */
@@ -717,5 +719,4 @@ function useSingle(inParam) {
717
719
  setIfHistory: setIfHistory
718
720
  };
719
721
  }
720
- ;
721
722
  export default useSingle;
@@ -2,21 +2,21 @@ import type { ActionType } from 'ls-pro-table';
2
2
  import type { ProFormInstance } from 'ls-pro-form';
3
3
  import type { SingleParamType } from '../useSingle';
4
4
  export declare type DtlParamType = SingleParamType & {
5
- /**重置主表对象方法 */
5
+ /** 重置主表对象方法 */
6
6
  setMaster?: (item: any) => void;
7
- /**@name 主表主键字段 */
7
+ /** @name 主表主键字段 */
8
8
  mstKeyField: string;
9
- /**@name 从表服务 */
9
+ /** @name 从表服务 */
10
10
  dtlService: any;
11
- /**@name 从表关联字段 */
11
+ /** @name 从表关联字段 */
12
12
  relationField: string;
13
- /**@name 从表新增行时默认值 */
13
+ /** @name 从表新增行时默认值 */
14
14
  dtlItem: any;
15
- /**@name 从表名,主从表一起保存时必传参 */
15
+ /** @name 从表名,主从表一起保存时必传参 */
16
16
  dtlName?: string;
17
- /**@name 单据类型,主从表一起保存时必传参 */
17
+ /** @name 单据类型,主从表一起保存时必传参 */
18
18
  billType?: string;
19
- /**@name 动态编码规则字段,主从表一起保存传参 */
19
+ /** @name 动态编码规则字段,主从表一起保存传参 */
20
20
  codeRuleDynamicField?: string;
21
21
  /** 是否查询历史数据,通过主表查询面板用户受控组件传入 */
22
22
  ifHistory?: 0 | 1;
@@ -64,7 +64,7 @@ function useDtl(dtlParam) {
64
64
  var formRef = useRef();
65
65
  /** @name 从表编辑表单Ref */
66
66
  var dtlFormRef = useRef();
67
- /**@name 判断是否已审核 */
67
+ /** @name 判断是否已审核 */
68
68
  var isAudit = useCallback(function () {
69
69
  if (!auditStatus || !statusField) return false;
70
70
  return Number(masterObject[statusField] || 0) >= auditStatus;
@@ -769,7 +769,7 @@ function useDtl(dtlParam) {
769
769
  param.searchData = arr.join('&');
770
770
  } else {
771
771
  otherArr = searchArr.filter(function (item) {
772
- return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=');
772
+ return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=') || item.startsWith('resCode=');
773
773
  });
774
774
  whereArr = searchArr.filter(function (item) {
775
775
  return !otherArr.includes(item);
@@ -780,7 +780,7 @@ function useDtl(dtlParam) {
780
780
  var itemArr = item.split('=');
781
781
  where[itemArr[0]] = itemArr[1];
782
782
  });
783
- otherArr.push("where=" + JSON.stringify(where));
783
+ otherArr.push('where=' + JSON.stringify(where));
784
784
  param.searchData = otherArr.join('&');
785
785
  }
786
786
  }
@@ -1009,5 +1009,4 @@ function useDtl(dtlParam) {
1009
1009
  onAudit: onAudit
1010
1010
  };
1011
1011
  }
1012
- ;
1013
1012
  export default useDtl;
@@ -21,6 +21,7 @@ export declare type SingleParamType = {
21
21
  };
22
22
  /**
23
23
  * 单表基本增删改查 hooks
24
+ *
24
25
  * @param service 单表服务
25
26
  * @param toolConfig 定义基础功能按钮
26
27
  * @param initItem 对象初始值,新增时设置默认值
@@ -14,6 +14,7 @@ import { httpPost } from '../../http';
14
14
  import usePermission from '../usePermission';
15
15
  /**
16
16
  * 单表基本增删改查 hooks
17
+ *
17
18
  * @param service 单表服务
18
19
  * @param toolConfig 定义基础功能按钮
19
20
  * @param initItem 对象初始值,新增时设置默认值
@@ -67,9 +68,9 @@ function useSingle(inParam) {
67
68
  var tableRef = useRef();
68
69
  /** @name 查询表单Ref */
69
70
  var formRef = useRef();
70
- /**@name 编辑表单Ref */
71
+ /** @name 编辑表单Ref */
71
72
  var editFormRef = useRef();
72
- /**@name 查看历史数据 */
73
+ /** @name 查看历史数据 */
73
74
  var _useState7 = useState(0),
74
75
  _useState8 = _slicedToArray(_useState7, 2),
75
76
  ifHistory = _useState8[0],
@@ -567,7 +568,7 @@ function useSingle(inParam) {
567
568
  param.searchData = arr.join('&');
568
569
  } else {
569
570
  otherArr = searchArr.filter(function (item) {
570
- return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=');
571
+ return item.startsWith('page=') || item.startsWith('pageSize=') || item.startsWith('ifPage=') || item.startsWith('ifHistory=') || item.startsWith('sort=') || item.startsWith('resCode=');
571
572
  });
572
573
  whereArr = searchArr.filter(function (item) {
573
574
  return !otherArr.includes(item);
@@ -578,7 +579,7 @@ function useSingle(inParam) {
578
579
  var itemArr = item.split('=');
579
580
  where[itemArr[0]] = itemArr[1];
580
581
  });
581
- otherArr.push("where=" + JSON.stringify(where));
582
+ otherArr.push('where=' + JSON.stringify(where));
582
583
  param.searchData = otherArr.join('&');
583
584
  }
584
585
  }
@@ -625,6 +626,7 @@ function useSingle(inParam) {
625
626
  }();
626
627
  /**
627
628
  * 判断按钮状态
629
+ *
628
630
  * @param key
629
631
  * @returns
630
632
  */
@@ -717,5 +719,4 @@ function useSingle(inParam) {
717
719
  setIfHistory: setIfHistory
718
720
  };
719
721
  }
720
- ;
721
722
  export default useSingle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "3.0.71",
3
+ "version": "3.0.72",
4
4
  "description": "ls-pro-common",
5
5
  "license": "MIT",
6
6
  "sideEffects": [