gcs-ui-lib 1.2.2 → 1.2.3

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.
Files changed (50) hide show
  1. package/lib/gcs-ui-lib.common.js +20326 -17567
  2. package/lib/gcs-ui-lib.css +1 -1
  3. package/lib/gcs-ui-lib.umd.js +20326 -17567
  4. package/lib/gcs-ui-lib.umd.min.js +110 -110
  5. package/package.json +7 -1
  6. package/packages/AutoFillDetail/src/components/fillDetail.vue +0 -15
  7. package/packages/AutoFillDetail/src/demo/index.vue +1 -1
  8. package/packages/AutoFillDetail/src/main.vue +22 -7
  9. package/packages/AutoFillDetection/src/components/HandEntred.vue +24 -51
  10. package/packages/AutoFillDetection/src/components/HandEntredThird.vue +225 -0
  11. package/packages/AutoFillDetection/src/components/RuleHit.vue +1 -0
  12. package/packages/AutoFillDetection/src/components/THIRD_ACCOUNT.vue +200 -0
  13. package/packages/AutoFillDetection/src/components/config.js +214 -3
  14. package/packages/AutoFillDetection/src/main.vue +38 -15
  15. package/packages/AutoFillList/src/components/config.js +56 -12
  16. package/packages/AutoFillList/src/main.vue +60 -15
  17. package/packages/AutoFillRuleHistory/src/main.vue +158 -133
  18. package/packages/AutoFillService/src/components/ConditionGroup.vue +36 -18
  19. package/packages/AutoFillService/src/components/basic.vue +162 -119
  20. package/packages/AutoFillService/src/components/fillRules.vue +28 -19
  21. package/packages/AutoFillService/src/demo/index.vue +17 -6
  22. package/packages/AutoFillService/src/main.vue +14 -9
  23. package/packages/Bank/src/main.vue +5 -1
  24. package/packages/CommonExport/index.js +7 -0
  25. package/packages/CommonExport/src/demo/index.vue +18 -0
  26. package/packages/CommonExport/src/main.vue +76 -0
  27. package/packages/MergeAutoFill/demo/NstcMergeAutoFillList.vue +47 -0
  28. package/packages/MergeAutoFill/index.js +28 -0
  29. package/packages/MergeAutoFill/merge/ExtendMergeHistory.vue +62 -0
  30. package/packages/MergeAutoFill/merge/merageBasic.vue +390 -0
  31. package/packages/MergeAutoFill/merge/merageFillService.vue +168 -0
  32. package/packages/MergeAutoFill/merge/merageHistoryRules.vue +133 -0
  33. package/packages/MergeAutoFill/merge/mergeFillDetail.vue +148 -0
  34. package/packages/MergeAutoFill/merge/mergeFillList.vue +94 -0
  35. package/packages/Trade/src/components/all/index.vue +1 -1
  36. package/packages/Trade/src/components/pendingEvent/index.vue +49 -44
  37. package/src/api/setting.js +17 -1
  38. package/src/index.js +18 -0
  39. package/src/preview/router.js +5 -0
  40. package/src/utils/index.js +31 -16
  41. package/.env.development +0 -5
  42. package/.env.production +0 -7
  43. package/.eslintrc.js +0 -5
  44. package/_webpack.config.js +0 -135
  45. package/babel.config.js +0 -16
  46. package/docs/README.md +0 -246
  47. package/npm +0 -1
  48. package/public/favicon.ico +0 -0
  49. package/public/index.html +0 -19
  50. package/vue.config.js +0 -49
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <n20-page class="content-box">
3
+ <n20-page-header
4
+ @back="
5
+ () => {
6
+ this.$destroy();
7
+ this.$goBackCommon();
8
+ }
9
+ "
10
+ :content="headerTitle"
11
+ slot="header"
12
+ class="m-b-s"
13
+ ></n20-page-header>
14
+ <add-template
15
+ :form="form"
16
+ @unitOptions="unitOptions"
17
+ @changeDimensions="changeDimensions"
18
+ ref="basicRef"
19
+ :settingSource="settingSource"
20
+ />
21
+ <n20-secondary-tab :init.sync="activeName" :data="list" @click="clickTab" />
22
+ <div :class="{ 'm-l-32': activeValue == 'ConditionGroup' }">
23
+ <div v-if="activeValue == 'ConditionGroup'" class="m-b-s">
24
+ <i class="el-icon-warning-outline color-warning m-r-s"></i
25
+ >{{ $l("匹配值为多个时,点击编辑按钮,在编辑弹窗中以换行形式维护") }}
26
+ </div>
27
+ <keep-alive>
28
+ <component
29
+ :is="activeValue"
30
+ :ref="activeValue"
31
+ :localNode="tree"
32
+ :cltNos="cltNos"
33
+ :basicForm="form"
34
+ :options="options"
35
+ :settingSource="settingSource"
36
+ :emptyList="emptyList"
37
+ :filedList="filedList"
38
+ :NoNeedDefaultValue="true"
39
+ ></component>
40
+ </keep-alive>
41
+ </div>
42
+ <div slot="footer" class="page-button-shadow flex-box flex-c flex-v">
43
+ <el-button type="primary" @click="submit">{{ $l("保存") }}</el-button>
44
+ <el-button plain @click="$goBackCommon">{{ $l("取消") }}</el-button>
45
+ </div>
46
+ </n20-page>
47
+ </template>
48
+
49
+ <script>
50
+ import NstcAutoFillService from "../../AutoFillService/src/main.vue";
51
+ import { uuid ,deepClone} from "@/utils/index";
52
+ import { NODE_GROUP } from "../../AutoFillService/src/components/config.js";
53
+ import { axios } from "n20-common-lib";
54
+ NODE_GROUP.matchingFieldCode = "";
55
+ const tempTree = {
56
+ logicalOperation: "AND",
57
+ root: true,
58
+ matchingRules: [
59
+ // 条件项
60
+ { ...NODE_GROUP, key: uuid() },
61
+ ],
62
+ children: [
63
+ {
64
+ logicalOperation: "AND",
65
+ matchingRules: [
66
+ {
67
+ ...NODE_GROUP,
68
+ key: uuid(),
69
+ },
70
+ {
71
+ ...NODE_GROUP,
72
+ key: uuid(),
73
+ },
74
+ ],
75
+ },
76
+ ],
77
+ };
78
+ //递归处理动态值的匹配内容
79
+ function flatData(node, vm) {
80
+ node?.matchingRules?.forEach((i) => {
81
+ if (!i.matchingValueType) {
82
+ i.matchingValueType = "FIXED";
83
+ }
84
+ if (i.matchingValueType === "DYNAMIC") {
85
+ vm.$set(i, "TmValues", i.matchingValues[0]?.split("."));
86
+ }
87
+ vm.$set(i, "mValues", i.matchingValues);
88
+ vm.$set(i, "key", uuid());
89
+ });
90
+ if (node?.children?.length) {
91
+ for (let i of node?.children) {
92
+ flatData(i, vm);
93
+ }
94
+ }
95
+ }
96
+ export default {
97
+ name: "NstcMergeAutoFillService",
98
+ extends: NstcAutoFillService,
99
+ components: {
100
+ addTemplate: () => import("./merageBasic.vue"),
101
+ },
102
+ data() {
103
+ return {
104
+ type: this.$route.query.type,
105
+ };
106
+ },
107
+ async mounted() {
108
+ this.$set(this.form, "usedAccountType", "THIRD_ACCOUNT");
109
+ },
110
+ methods: {
111
+ async matchingSetting() {
112
+ this.tree = deepClone(tempTree);
113
+ },
114
+ changeDimensions(val) {
115
+ this.filedList = val;
116
+ },
117
+ async init() {
118
+ if (!this.mcId) return;
119
+ let { data: res } = await axios.get(
120
+ `/api/aims/record/record-matching/1.0/matching-info/${this.mcId}`,
121
+ );
122
+ this.form = res || {};
123
+ if (res.usedBanks) {
124
+ let usedBank = res.usedBanks.map((item) => item.bankCode);
125
+ this.form.usedBank = usedBank[0];
126
+ }
127
+
128
+ //处理不填信息,通用补填信息补填内容
129
+ this.form.matchingFillCommons = res.matchingFillCommons.map((i) =>
130
+ this.list2obj(i),
131
+ );
132
+ this.form.matchingFillDimensions = res.matchingFillDimensions.map((i) =>
133
+ this.list2obj(i),
134
+ );
135
+ let treeData = { ...res.matchingHierarchy, root: true };
136
+ flatData(treeData, this);
137
+ this.tree = treeData;
138
+ this.form.frequencyMergingName = "日";
139
+ //修改复制时,通过选中的维度,设置匹配字段的下拉值.
140
+ this.$refs.basicRef?.changeDimensions(this.form.dimensionsMergingList);
141
+ },
142
+ async submit() {
143
+ await this.$refs.basicRef.submit();
144
+ //校验基本信息
145
+ if (this.activeValue == "ConditionGroup") {
146
+ let res = await this.vaiildGroup();
147
+ if (!res) return;
148
+ } else await this.vaildFill();
149
+
150
+ //主要处理扩展字段多选的问题,还要兼容历史数据。
151
+ let mc = this.dealMC();
152
+ let data = {
153
+ ...this.form,
154
+ refillBasis: 3,
155
+ matchingFillCommons: mc,
156
+ matchingHierarchy: this.delData(this.tree),
157
+ settingSource: this.settingSource, //设置来源(1-收款,2-付款)
158
+ };
159
+ if (this.$route.query.type == "copy") {
160
+ delete data.matchingId;
161
+ }
162
+ await axios.post("/api/aims/record/record-matching/1.0/save", data);
163
+ this.$message.success(this.$l("保存成功"));
164
+ this.$goBackCommon();
165
+ },
166
+ },
167
+ };
168
+ </script>
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <NstcAutoFillRuleHistory
3
+ :setting-source="2"
4
+ :pageRelaNo="pageRelaNo"
5
+ key="nafh"
6
+ :type="'merge'"
7
+ :fList="filterList"
8
+ :hList="tableHeader"
9
+ />
10
+ </template>
11
+
12
+ <script>
13
+ import {
14
+ AutoFillListHeader,
15
+ AutoFillListFilter,
16
+ } from "gcs-ui-lib/packages/AutoFillList/src/components/config";
17
+ import { $l } from "n20-common-lib";
18
+ export default {
19
+ components: {
20
+ NstcAutoFillRuleHistory: () => import("./ExtendMergeHistory.vue"),
21
+ },
22
+ async mounted() {
23
+ this.pushHeader();
24
+ this.pushFilter();
25
+ },
26
+ data() {
27
+ return {
28
+ filterList: [],
29
+ tableHeader: [],
30
+ pageRelaNo: {
31
+ export: "payment001",
32
+ },
33
+ };
34
+ },
35
+ methods: {
36
+ pushFilter() {
37
+ let rbs = [
38
+ {
39
+ id: "refillBasis",
40
+ label: $l("补填依据"), //自动确认
41
+ type: "select",
42
+ value: "refillBasis",
43
+ isDefault: false,
44
+ options: [
45
+ { value: 1, label: $l("流水要素") },
46
+ { value: 2, label: $l("关联对私批量指令") },
47
+ ],
48
+ props: {
49
+ clearable: true,
50
+ filterable: true,
51
+ },
52
+ },
53
+ {
54
+ label: $l("适用银行"),
55
+ type: "select",
56
+ value: "usedBankCodeList",
57
+ id: "usedBankCodeList",
58
+ multiple: true,
59
+ options: [],
60
+ props: {
61
+ filterable: true,
62
+ labelKey: "bankName",
63
+ valueKey: "bankNo",
64
+ },
65
+ width: "168px",
66
+ reqOptions: {
67
+ method: "get",
68
+ url: "/api/nstc-mdm/1.0/bank",
69
+ resList: "data",
70
+ params: { isEnable: 1 },
71
+ },
72
+ },
73
+ {
74
+ id: "isMatchChildOrder",
75
+ label: $l("是否匹配子指令"), //自动确认
76
+ type: "select",
77
+ value: "isMatchChildOrder",
78
+ isDefault: false,
79
+ options: [
80
+ { value: 1, label: $l("是") },
81
+ { value: 0, label: $l("否") },
82
+ ],
83
+ props: {
84
+ clearable: true,
85
+ filterable: true,
86
+ },
87
+ },
88
+ ];
89
+ this.filterList = [...AutoFillListFilter, ...rbs].filter(
90
+ (item) => !["usedBusiness", "usedAccountType"].includes(item.id),
91
+ );
92
+ },
93
+ pushHeader() {
94
+ this.tableHeader = [...AutoFillListHeader];
95
+ let rbs = {
96
+ label: $l("合并频次"),
97
+ prop: "frequencyMerging",
98
+ align: "center",
99
+ minWidth: "144",
100
+ "show-overflow-tooltip": true,
101
+ formatter: ({ row }) => {
102
+ let doc = {
103
+ day: "日",
104
+ };
105
+ return doc[row.frequencyMerging];
106
+ },
107
+ };
108
+ let ctn = {
109
+ label: $l("规则类型"),
110
+ prop: "matchingRuleType",
111
+ align: "center",
112
+ minWidth: "114",
113
+ "show-overflow-tooltip": true,
114
+ formatter: ({ cellValue }) => {
115
+ let doc = {
116
+ GENERAL: $l("预先补填"),
117
+ INDEPENDENT: $l("完结补填"),
118
+ };
119
+ return doc[cellValue] || "--";
120
+ },
121
+ };
122
+
123
+ // this.tableHeader = [...this.tableHeader, ...ctn];
124
+ //保证顺序与ui一致(直接修改this.tableHeader,会修改了config的值。历史规则同步修改了)
125
+ this.tableHeader.splice(3, 0, rbs);
126
+ this.tableHeader.splice(5, 0, ctn);
127
+ this.tableHeader = this.tableHeader.filter(
128
+ (item) => !["usedBusiness", "usedAccountType"].includes(item.prop),
129
+ );
130
+ },
131
+ },
132
+ };
133
+ </script>
@@ -0,0 +1,148 @@
1
+ <template>
2
+ <n20-page class="content-box">
3
+ <div slot="header" v-if="needHeaderGo">
4
+ <n20-page-header
5
+ @back="goBackCommon"
6
+ :content="$l('合并补填规则详情')"
7
+ ></n20-page-header>
8
+ </div>
9
+ <!-- 基本匹配规则 -->
10
+ <n20-expandable-pane :title="$l('基本匹配规则')" class="m-t-m">
11
+ <n20-descriptions>
12
+ <el-descriptions-item :label="$l('规则编号')"
13
+ >{{ detail.matchingId }}
14
+ <span v-if="detail.matchingIdHi"
15
+ >-{{ detail.matchingIdHi }}</span
16
+ ></el-descriptions-item
17
+ >
18
+ <!-- 规则名称 -->
19
+ <el-descriptions-item :label="$l('规则名称')">{{
20
+ detail.matchingRuleName || "--"
21
+ }}</el-descriptions-item>
22
+ <!-- 适用范围 -->
23
+ <el-descriptions-item :label="$l('适用范围')">{{
24
+ detail.usedScope | usedScopeFilter
25
+ }}</el-descriptions-item>
26
+ <!-- 规则类型 -->
27
+ <el-descriptions-item :label="$l('规则类型')">{{
28
+ detail.matchingRuleType == "GENERAL" ? $l("预先补填") : $l("完结补填")
29
+ }}</el-descriptions-item>
30
+ <!-- 适用单位 -->
31
+ <el-descriptions-item :label="$l('适用单位')">{{
32
+ detail.usedUnits | usedUnitsFilter
33
+ }}</el-descriptions-item>
34
+ <!-- 匹配优先级 -->
35
+ <el-descriptions-item :label="$l('匹配优先级')">{{
36
+ detail.matchingPriority ?? "--"
37
+ }}</el-descriptions-item>
38
+ <el-descriptions-item :label="$l('是否自动确认')">{{
39
+ detail.isAutoConfirm | isAutoConfirmFilter
40
+ }}</el-descriptions-item>
41
+ <el-descriptions-item :label="$l('合并频次')">日</el-descriptions-item>
42
+ <el-descriptions-item :label="$l('生效时间')">{{
43
+ detail.updateTime || "--"
44
+ }}</el-descriptions-item>
45
+ <el-descriptions-item :label="$l('操作人')">{{
46
+ detail.updator || "--"
47
+ }}</el-descriptions-item>
48
+ <el-descriptions-item :label="$l('合并维度')">
49
+ <el-checkbox-group v-model="detail.dimensionsMergingList" disabled>
50
+ <el-checkbox
51
+ :label="item.fieldCode"
52
+ v-for="item in dimensionsList"
53
+ :key="item.fieldCode"
54
+ >{{ item.fieldName }}</el-checkbox
55
+ >
56
+ </el-checkbox-group>
57
+ </el-descriptions-item>
58
+ </n20-descriptions>
59
+ </n20-expandable-pane>
60
+ <n20-secondary-tab :init.sync="activeName" :data="list" @click="clickTab" />
61
+ <div :class="{ 'm-l-32': activeValue == 'ConditionGroup' }">
62
+ <keep-alive>
63
+ <component
64
+ disabled
65
+ :is="activeValue"
66
+ :DetailFormData="detail"
67
+ :options="options"
68
+ :localNode="detail.matchingHierarchy"
69
+ :filedList="dimensionsList"
70
+ ></component>
71
+ </keep-alive>
72
+ </div>
73
+ </n20-page>
74
+ </template>
75
+
76
+ <script>
77
+ import NstcAutoFillDetail from "../../AutoFillDetail/src/main.vue";
78
+ import { $l } from "n20-common-lib/src/utils/i18n";
79
+ import { axios, dayjs } from "n20-common-lib";
80
+ export default {
81
+ name: "NstcMergeAutoFillDetail",
82
+ extends: NstcAutoFillDetail,
83
+ data() {
84
+ return {
85
+ dimensionsList: [],
86
+ options: [],
87
+ dayjs,
88
+ tableData: [],
89
+ list: [
90
+ {
91
+ name: "匹配规则",
92
+ value: "ConditionGroup",
93
+ },
94
+ { name: "补填信息", value: "FillDetail" },
95
+ ],
96
+ activeName: "匹配规则",
97
+ activeValue: "ConditionGroup",
98
+ detail: {
99
+ matchingFillDimensions: [],
100
+ matchingFillCommons: [],
101
+ matchingHierarchy: {},
102
+ },
103
+ filedList: [],
104
+ };
105
+ },
106
+ filters: {
107
+ usedBanksFilter(val) {
108
+ if (!val) return "--";
109
+ let temp = val.map((item) => item.bankName);
110
+ if (temp.length == 0) return "--";
111
+ return temp.join(",");
112
+ },
113
+ refillBasisFilter(val) {
114
+ if (val == "1") {
115
+ return $l("流水要素");
116
+ } else if (val == "2") {
117
+ return $l("关联对私批量指令");
118
+ } else {
119
+ return "--";
120
+ }
121
+ },
122
+ },
123
+ async created() {
124
+ this.queryDatasetList();
125
+ this.getDetail();
126
+ this.init();
127
+ },
128
+ mounted() {},
129
+ methods: {
130
+ async init() {
131
+ let res = await axios.get(
132
+ `/api/aims/record/record-matching/1.0/matching-field-setting/3/2`,
133
+ {
134
+ usedAccountType: "THIRD_ACCOUNT",
135
+ },
136
+ );
137
+ // matchingSetting(3, 2, "THIRD_ACCOUNT");
138
+ this.dimensionsList = (res.data || []).map((item) => {
139
+ return {
140
+ ...item,
141
+ disabled: ["unitName", "currencyName"].includes(item.fieldCode),
142
+ };
143
+ });
144
+ },
145
+ async handleOrder(val = 0) {},
146
+ },
147
+ };
148
+ </script>
@@ -0,0 +1,94 @@
1
+ <script>
2
+ import NstcAutoFillList from "../../AutoFillList/src/main.vue";
3
+
4
+ export default {
5
+ name: "NstcMergeAutoFillList",
6
+ extends: NstcAutoFillList,
7
+ async mounted() {
8
+ await this.$nextTick();
9
+ this.filterList = this.fList;
10
+ this.tableHeader = this.hList;
11
+ this.queryData();
12
+ },
13
+ props: {
14
+ // 列表类型
15
+ type: {
16
+ type: String,
17
+ default: "single",
18
+ },
19
+ // 1:收入 2: 支出
20
+ settingSource: {
21
+ type: [Number, String],
22
+ default: "2",
23
+ },
24
+ test: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ pageRelaNo: {
29
+ type: Object,
30
+ default: () => {
31
+ return {
32
+ add: null, //新增
33
+ delete: null, //删除
34
+ detection: null, //检测
35
+ import: null, //导入
36
+ export: null, //导出
37
+ edit: null, //编辑
38
+ copy: null, //复制
39
+ };
40
+ },
41
+ },
42
+ fList: {
43
+ type: Array,
44
+ default: () => [],
45
+ },
46
+ hList: {
47
+ type: Array,
48
+ default: () => [],
49
+ },
50
+ },
51
+ methods: {
52
+ editFn(row) {
53
+ this.$router.push({
54
+ path: "/editMergeRules",
55
+ query: {
56
+ matchingId: row.matchingId,
57
+ type: "edit",
58
+ },
59
+ });
60
+ },
61
+ copyFn(row) {
62
+ this.$router.push({
63
+ path: "/AddMergeRules",
64
+ query: {
65
+ matchingId: row.matchingId,
66
+ type: "copy",
67
+ },
68
+ });
69
+ },
70
+ handleClick(row) {
71
+ this.$router.push({
72
+ path: "/merageRulesDetail",
73
+ query: { id: row.matchingId },
74
+ });
75
+ },
76
+ goAutoMerge() {
77
+ return this.$router.push({
78
+ path: "/merageHistoryRules",
79
+ query: {
80
+ type: this.type,
81
+ },
82
+ });
83
+ },
84
+ handleAdd() {
85
+ return this.$router.push({
86
+ path: "/AddMergeRules",
87
+ query: {
88
+ type: this.type,
89
+ },
90
+ });
91
+ },
92
+ },
93
+ };
94
+ </script>
@@ -572,7 +572,7 @@ export default {
572
572
  });
573
573
  },
574
574
  setChange(list) {
575
- const index = list.findIndex((res) => res.isNew && !res.children);
575
+ const index = list.findIndex((res) => !res.children);
576
576
  if (index !== -1) return this.$message.warning(`新增字段必须包含子级!`);
577
577
  let dto = {
578
578
  approvalType: "6",