gcs-ui-lib 1.2.35 → 1.2.36
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/lib/gcs-ui-lib.common.js +306 -503
- package/lib/gcs-ui-lib.css +3 -2
- package/lib/gcs-ui-lib.umd.js +306 -503
- package/lib/gcs-ui-lib.umd.min.js +17 -17
- package/package.json +1 -1
- package/packages/AutoFillService/src/components/paymentCategoryT.vue +29 -4
- package/packages/Trade/src/components/i18n.json +3337 -3337
- package/src/lang/i18n.json +1184 -1184
package/package.json
CHANGED
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import {getCashflow, getPaymentCategory, getRecUnit} from "@/api/common";
|
|
23
|
+
import {SelectTree} from "n20-common-lib";
|
|
24
|
+
|
|
24
25
|
export default {
|
|
25
26
|
props: {
|
|
26
27
|
value: {
|
|
@@ -197,10 +198,34 @@ export default {
|
|
|
197
198
|
}
|
|
198
199
|
let res = await this.Api(params);
|
|
199
200
|
res = this.tranData(res);
|
|
200
|
-
this.type
|
|
201
|
-
|
|
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
|
+
}
|
|
202
208
|
},
|
|
203
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());
|
|
228
|
+
},
|
|
204
229
|
tranData(res) {
|
|
205
230
|
const eachItem = (parent, list) => {
|
|
206
231
|
list.forEach((item) => {
|