gcs-ui-lib 1.2.14 → 1.2.16

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.14",
3
+ "version": "1.2.16",
4
4
  "private": false,
5
5
  "main": "./lib/gcs-ui-lib.common.js",
6
6
  "scripts": {
@@ -235,6 +235,7 @@ import {
235
235
  } from "@/api/setting.js";
236
236
  import { AutoFillListHeader, AutoFillListFilter } from "./components/config";
237
237
  import downloadBlob from "n20-common-lib/src/utils/downloadBlob.js";
238
+ import n20, { linkPush } from "n20-common-lib";
238
239
  import {
239
240
  Pagination,
240
241
  AdvancedFilter,
@@ -355,17 +356,14 @@ export default {
355
356
  },
356
357
  methods: {
357
358
  handleClick(row) {
358
- this.$router.push({
359
- path: "/RulesDetail",
360
- query: { id: row.matchingId, fillType: row.usedAccountType },
359
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/RulesDetail`, {
360
+ id: row.matchingId,
361
+ fillType: row.usedAccountType,
361
362
  });
362
363
  },
363
364
  handleAdd() {
364
- this.$router.push({
365
- path: "/AddRules",
366
- query: {
367
- title: this.$l("新增补填规则"),
368
- },
365
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/AddRules`, {
366
+ title: this.$l("新增补填规则"),
369
367
  });
370
368
  },
371
369
  viewsMulti(val) {
@@ -373,9 +371,7 @@ export default {
373
371
  return "--";
374
372
  },
375
373
  detection() {
376
- this.$router.push({
377
- path: "/checkRules",
378
- });
374
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/checkRules`);
379
375
  },
380
376
  async paginationChange(val) {
381
377
  this.pagination = val;
@@ -392,34 +388,25 @@ export default {
392
388
  }
393
389
  },
394
390
  editFn(row) {
395
- this.$router.push({
396
- path: "/editeRules",
397
- query: {
398
- matchingId: row.matchingId,
399
- type: "edit",
400
- fillType: row.usedAccountType,
401
- title: this.$l("修改补填规则"),
402
- },
391
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/editeRules`, {
392
+ matchingId: row.matchingId,
393
+ type: "edit",
394
+ fillType: row.usedAccountType,
395
+ title: this.$l("修改补填规则"),
403
396
  });
404
397
  },
405
398
  copyFn(row) {
406
- this.$router.push({
407
- path: "/AddRules",
408
- query: {
409
- matchingId: row.matchingId,
410
- type: "copy",
411
- fillType: row.usedAccountType,
412
- title: this.$l("复制补填规则"),
413
- },
399
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/AddRules`, {
400
+ matchingId: row.matchingId,
401
+ type: "copy",
402
+ fillType: row.usedAccountType,
403
+ title: this.$l("复制补填规则"),
414
404
  });
415
405
  },
416
406
  goAutoMerge(row) {
417
- this.$router.push({
418
- path: "/historyRules",
419
- query: {
420
- settingSource: this.settingSource,
421
- fillType: row.usedAccountType,
422
- },
407
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/historyRules`, {
408
+ settingSource: this.settingSource,
409
+ fillType: row.usedAccountType,
423
410
  });
424
411
  },
425
412
  // 后端导出
@@ -462,21 +449,21 @@ export default {
462
449
  this.fillField = await matchingSetting(
463
450
  2,
464
451
  this.settingSource,
465
- this.type == "merageFill" ? "THIRD_ACCOUNT" : "BANK_ACCOUNT",
452
+ this.type == "merageFill" ? "THIRD_ACCOUNT" : "BANK_ACCOUNT"
466
453
  );
467
454
  this.fillField = this.fillField.filter(
468
- (item) => !item.fieldCode.includes("Extend"),
455
+ (item) => !item.fieldCode.includes("Extend")
469
456
  );
470
457
  //1:收入 2: 支出
471
458
  if (this.settingSource == "2") {
472
459
  this.fillField = this.fillField.filter(
473
- (item) => item.fieldCode != "paymentCategory",
460
+ (item) => item.fieldCode != "paymentCategory"
474
461
  );
475
462
  }
476
463
  // 收款排除付款类型
477
464
  if (this.settingSource == "1") {
478
465
  this.fillField = this.fillField.filter(
479
- (item) => !["paymentTypeNo", "fundsUseCode"].includes(item.fieldCode),
466
+ (item) => !["paymentTypeNo", "fundsUseCode"].includes(item.fieldCode)
480
467
  );
481
468
  }
482
469
  for (let i of this.fillField) {
@@ -154,13 +154,11 @@ import {
154
154
  TablePro as CLTablePro,
155
155
  PageHeader as ClPageHeader,
156
156
  } from "n20-common-lib";
157
- import {
158
- AutoFillListFilter,
159
- AutoFillListHeader,
160
- } from "./components/config";
157
+ import { AutoFillListFilter, AutoFillListHeader } from "./components/config";
161
158
  import { matchingHisList, matchingSetting } from "@/api/setting";
162
159
  import downloadBlob from "n20-common-lib/src/utils/downloadBlob";
163
160
  import { deepClone } from "@/utils/index";
161
+ import n20, { linkPush } from "n20-common-lib";
164
162
  export default {
165
163
  name: "NstcAutoFillRuleHistory",
166
164
  components: {
@@ -252,7 +250,7 @@ export default {
252
250
  tableHeader: deepClone(AutoFillListHeader),
253
251
  fillCommonConditionList: [],
254
252
  orders: { action: "DESC", key: "updateTime" },
255
- filterKey:0,
253
+ filterKey: 0,
256
254
  };
257
255
  },
258
256
 
@@ -262,9 +260,9 @@ export default {
262
260
  },
263
261
  methods: {
264
262
  handleClick(row) {
265
- this.$router.push({
266
- path: "/RulesDetailHiId",
267
- query: { id: row.matchingIdHi, fillType: row.usedAccountType },
263
+ linkPush(`/${this.settingSource == 2?'payment':'payee'}/RulesDetailHiId`, {
264
+ id: row.matchingIdHi,
265
+ fillType: row.usedAccountType,
268
266
  });
269
267
  },
270
268
  clearSearch() {
@@ -302,7 +300,7 @@ export default {
302
300
  let res = await this.$axios.post(
303
301
  "/api/aims/record/record-matching/1.0/history/export",
304
302
  params,
305
- { responseType: "blob" },
303
+ { responseType: "blob" }
306
304
  );
307
305
  let t = dayjs().format("YYYYMMDD");
308
306
  let fn = this.$l("历史规则查询") + "-" + t + "." + type;
@@ -315,21 +313,21 @@ export default {
315
313
  this.fillField = await matchingSetting(
316
314
  2,
317
315
  this.settingSource,
318
- this.type == "merageFill" ? "THIRD_ACCOUNT" : "BANK_ACCOUNT",
316
+ this.type == "merageFill" ? "THIRD_ACCOUNT" : "BANK_ACCOUNT"
319
317
  );
320
318
  this.fillField = this.fillField.filter(
321
- (item) => !item.fieldCode.includes("Extend"),
319
+ (item) => !item.fieldCode.includes("Extend")
322
320
  );
323
321
  //1:收入 2: 支出
324
322
  if (this.settingSource == "2") {
325
323
  this.fillField = this.fillField.filter(
326
- (item) => item.fieldCode != "paymentCategory",
324
+ (item) => item.fieldCode != "paymentCategory"
327
325
  );
328
326
  }
329
327
  // 收款排除付款类型
330
328
  if (this.settingSource == "1") {
331
329
  this.fillField = this.fillField.filter(
332
- (item) => item.fieldCode != "paymentTypeNo",
330
+ (item) => item.fieldCode != "paymentTypeNo"
333
331
  );
334
332
  }
335
333
  for (let i of this.fillField) {
@@ -351,7 +349,7 @@ export default {
351
349
  });
352
350
  }
353
351
  }
354
- this.filterKey += 1
352
+ this.filterKey += 1;
355
353
  },
356
354
  refresh() {
357
355
  this.pagination.current = 1;
@@ -385,6 +385,7 @@ export default {
385
385
  prop: "amount",
386
386
  minWidth: "190",
387
387
  align: "right",
388
+ sortable: true,
388
389
  formatter: "formatAmount", // 金额格式化
389
390
  isDefault: true,
390
391
  },
@@ -1,69 +1,84 @@
1
- import { axios } from 'n20-common-lib'
1
+ import { axios } from "n20-common-lib";
2
2
 
3
3
  export default {
4
4
  data() {
5
5
  return {
6
- eyeView: false
7
- }
6
+ eyeView: false,
7
+ };
8
8
  },
9
9
  methods: {
10
10
  // 排序
11
- sortMethod({ data, column, property, order }) {
11
+ sortMethod({ data, sortList }) {
12
+ //兼容预算的高版本
13
+ if (!sortList || sortList.length === 0) return;
14
+ let { field, order } = sortList[0];
12
15
  data.sort((a, b) => {
13
16
  // 处理字段为空的情况,确保空值始终排在最后
14
- const aValue = a[property]
15
- const bValue = b[property]
17
+ const aValue = a[field];
18
+ const bValue = b[field];
16
19
 
17
20
  // 统一比较逻辑
18
21
  const compare = (v1, v2) => {
19
- if (typeof v1 === 'string' && typeof v2 === 'string') {
20
- return v1.localeCompare(v2)
22
+ if (typeof v1 === "string" && typeof v2 === "string") {
23
+ return v1.localeCompare(v2);
21
24
  } else {
22
- return v1 - v2
25
+ return v1 - v2;
23
26
  }
24
- }
27
+ };
25
28
  // 处理空值,确保空值始终排在最后
26
- if (aValue === 0 || aValue === null) return order === 'asc' ? 1 : -1
27
- if (bValue === 0 || bValue === null) return order === 'asc' ? -1 : 1
29
+ if (aValue === 0 || aValue === null) return order === "asc" ? 1 : -1;
30
+ if (bValue === 0 || bValue === null) return order === "asc" ? -1 : 1;
28
31
  // 根据排序顺序返回结果
29
- return order === 'desc' ? compare(bValue, aValue) : compare(aValue, bValue)
30
- })
32
+ return order === "desc"
33
+ ? compare(bValue, aValue)
34
+ : compare(aValue, bValue);
35
+ });
31
36
  },
32
37
  getDynamicColumn(typeCode = undefined, approvalType) {
33
- axios.get(`/bems/activiti/actNsSortColumn/querySortColumn/${typeCode}/${approvalType}`).then(({ data }) => {
34
- this.checkColumns =
35
- data && data.sortColumn && data.sortColumn.length > 0 ? JSON.parse(data.sortColumn) : this.originColumn
36
- })
38
+ axios
39
+ .get(
40
+ `/bems/activiti/actNsSortColumn/querySortColumn/${typeCode}/${approvalType}`
41
+ )
42
+ .then(({ data }) => {
43
+ this.checkColumns =
44
+ data && data.sortColumn && data.sortColumn.length > 0
45
+ ? JSON.parse(data.sortColumn)
46
+ : this.originColumn;
47
+ });
37
48
  },
38
49
  saveDynamicColumn(data) {
39
50
  axios.post(`/bems/activiti/actNsSortColumn/saveOrUpDateColumn`, data, {
40
- noMsg: true
41
- })
42
- this.dialogVisible = false
51
+ noMsg: true,
52
+ });
53
+ this.dialogVisible = false;
43
54
  },
44
55
  /**
45
56
  * 查看业务状态
46
57
  */
47
58
  async seeBussStatus() {
48
59
  if (!this.eyeView) {
49
- this.eyeView = true
50
- let dto = (this.tableDate||[]).map((res) => {
60
+ this.eyeView = true;
61
+ let dto = (this.tableDate || []).map((res) => {
51
62
  return {
52
63
  businessId: res.businessId,
53
- typeCode: res.typeCode
54
- }
55
- })
64
+ typeCode: res.typeCode,
65
+ };
66
+ });
56
67
  let dtos = {
57
- dtos: dto
58
- }
59
- const { data, code } = await this.$axios.post(`/api/settlement-order/api/position/order/work/flow`, dtos)
68
+ dtos: dto,
69
+ };
70
+ const { data, code } = await this.$axios.post(
71
+ `/api/settlement-order/api/position/order/work/flow`,
72
+ dtos
73
+ );
60
74
  if (code === 200) {
61
- this.tableDate = (this.tableDate||[]).map((res) => {
62
- res[`${res.businessId}${res.typeCode}`] = data[`${res.businessId}${res.typeCode}`]
63
- return res
64
- })
75
+ this.tableDate = (this.tableDate || []).map((res) => {
76
+ res[`${res.businessId}${res.typeCode}`] =
77
+ data[`${res.businessId}${res.typeCode}`];
78
+ return res;
79
+ });
65
80
  }
66
81
  }
67
- }
68
- }
69
- }
82
+ },
83
+ },
84
+ };
package/src/App.vue CHANGED
@@ -7,7 +7,7 @@
7
7
  <el-container>
8
8
  <el-header>组件演示</el-header>
9
9
  <el-main>
10
- <router-view />
10
+ <router-view style="height: calc(100% - 60px);"/>
11
11
  </el-main>
12
12
  </el-container>
13
13
  </el-container>