gcs-ui-lib 1.2.37 → 1.2.38

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": "gcs-ui-lib",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "private": false,
5
5
  "main": "./lib/gcs-ui-lib.common.js",
6
6
  "scripts": {
@@ -524,7 +524,7 @@ const AutoFillListHeader = [
524
524
  align: "center",
525
525
  width: "120",
526
526
  formatter: ({ row }) => {
527
- return row.isAutoConfirm ? "是" : "否";
527
+ return row.isAutoConfirm ? $l("是") : $l("否");
528
528
  },
529
529
  },
530
530
  {
@@ -188,7 +188,7 @@ export default {
188
188
  } else if (this.type == "paymentCategory") {
189
189
  params = {
190
190
  activeFlag: 1,
191
- direction: this.settingSource == '1' ? 1 : 0,
191
+ directionList: [this.settingSource == '1' ? 1 : 0, 2].join(','),
192
192
  resultType: 2,
193
193
  };
194
194
  } else {
@@ -198,33 +198,8 @@ export default {
198
198
  }
199
199
  let res = await this.Api(params);
200
200
  res = this.tranData(res);
201
- if (this.type === "paymentCategory"){
202
- const res1 = await getPaymentCategory({ ...params, direction: "2" })
203
- this.treeData = this.mergeTree(res, res1);
204
- } else {
205
- this.type == "cashflow" && this.handleData(res);
206
- this.treeData = res;
207
- }
208
- },
209
-
210
- // 递归合并两棵款项类别树(按paymentCategoryNo去重)
211
- mergeTree(arr1, arr2) {
212
- const map = new Map();
213
- arr1?.forEach((item) => {
214
- map.set(item.paymentCategoryNo, item);
215
- });
216
- arr2?.forEach((item) => {
217
- if (map.has(item.paymentCategoryNo)) {
218
- const existing = map.get(item.paymentCategoryNo);
219
- existing.children = this.mergeTree(
220
- existing.children,
221
- item.children
222
- );
223
- } else {
224
- map.set(item.paymentCategoryNo, item);
225
- }
226
- });
227
- return Array.from(map.values());
201
+ this.type == "cashflow" && this.handleData(res);
202
+ this.treeData = res;
228
203
  },
229
204
  tranData(res) {
230
205
  const eachItem = (parent, list) => {