PageSourceSearch

https://asketch.ai/_nuxt/Drftv68b.js

js asketch.ai collected 2026-10-05 11:52:12 UTC 20,407 bytes, 652 lines download raw bytes

1import { _ as oe, __tla as __tla_0 } from "./BcSfRJ2E.js";
2import { i as S, __tla as __tla_1 } from "./CevamKTt.js";
3import { A as v, c as fe, a as ye, d as te, e as ke, f as ve, h as xe, __tla as __tla_2 } from "./B1aLcS8p.js";
4import { fn as ie, cY as Z, d5 as le, dn as Ie, bn as Ce, cV as Te, di as be, dj as Se, fS as $e, cR as Ae, n as Ne, __tla as __tla_3 } from "./D9BjAukf.js";
5import { a as b } from "./DAOyHtfJ.js";
6import { a as Re, __tla as __tla_4 } from "./kb8yb1ET.js";
7import { U as re, __tla as __tla_5 } from "./DVdjmazH.js";
8import { _ as se, __tla as __tla_6 } from "./Ck92sr5C.js";
9let ct;
10let __tla = Promise.all([
11  (() => {
12    try {
13      return __tla_0;
14    } catch {
15    }
16  })(),
17  (() => {
18    try {
19      return __tla_1;
20    } catch {
21    }
22  })(),
23  (() => {
24    try {
25      return __tla_2;
26    } catch {
27    }
28  })(),
29  (() => {
30    try {
31      return __tla_3;
32    } catch {
33    }
34  })(),
35  (() => {
36    try {
37      return __tla_4;
38    } catch {
39    }
40  })(),
41  (() => {
42    try {
43      return __tla_5;
44    } catch {
45    }
46  })(),
47  (() => {
48    try {
49      return __tla_6;
50    } catch {
51    }
52  })()
53]).then(async () => {
54  let Ee, Ve, Ue, l, ze, E, c, V, w, I, ut, C, O, J, Be, M, ae, De, Le, Fe, U, W, Me, Pe, Ye, Oe, We, je, ne, qe, d, u, j, Q, z, k, B, T, mt, P, X, Ge, Ke, D, He, Je, Qe, Xe, Ze, et;
55  ({ unref: Ee } = await S("vue"));
56  ({ withAsyncContext: Ve, defineComponent: Ue } = await S("vue"));
57  ({ unref: l, renderList: ze, Fragment: E, openBlock: c, createElementBlock: V, toDisplayString: w, createTextVNode: I, resolveComponent: ut, withCtx: C, createBlock: O, createElementVNode: J, createCommentVNode: Be, createVNode: M, isRef: ae } = await S("vue"));
58  De = {
59    class: "mb-4 flex gap-2"
60  };
61  Le = {
62    class: "mb-2 text-sm"
63  };
64  Fe = {
65    class: "grid grid-cols-1 gap-4"
66  };
67  ({ ref: U, computed: W, watch: Me, nextTick: Pe, useTemplateRef: Ye } = await S("vue"));
68  Oe = 10;
69  We = Ue({
70    __name: "UserIncomeInfo",
71    props: {
72      userId: {},
73      amountUnit: {
74        default: v.CNY
75      }
76    },
77    emits: [
78      "close-dialog"
79    ],
80    async setup(ee, { emit: h }) {
81      let _, Y;
82      const m = ee, $ = h, A = U(1), N = U(10), p = U([]), L = W(() => m.amountUnit === v.CNY ? [
83        {
84          title: "\u65F6\u95F4",
85          dataIndex: "created_at",
86          key: "created_at",
87          width: 180
88        },
89        {
90          title: "\u7528\u6237\u4FE1\u606F",
91          key: "owner",
92          width: 200
93        },
94        {
95          title: "\u6536\u76CA\u7C7B\u578B",
96          key: "incomeType",
97          width: 150
98        },
99        {
100          title: "\u91D1\u989D",
101          key: "realIncomeAmount",
102          width: 120,
103          align: "right"
104        },
105        {
106          title: "\u5DF2\u63D0\u73B0\u91D1\u989D",
107          dataIndex: "withdrawalAmount",
108          key: "withdrawalAmount",
109          width: 120,
110          align: "right"
111        },
112        {
113          title: "\u63D0\u73B0\u72B6\u6001",
114          key: "withdrawalStatus",
115          width: 120,
116          align: "center"
117        }
118      ] : m.amountUnit === v.POINT ? [
119        {
120          title: "\u65F6\u95F4",
121          dataIndex: "created_at",
122          key: "created_at",
123          width: 180
124        },
125        {
126          title: "\u7528\u6237\u4FE1\u606F",
127          key: "owner",
128          width: 200
129        },
130        {
131          title: "\u6536\u76CA\u7C7B\u578B",
132          key: "incomeType",
133          width: 150
134        },
135        {
136          title: "\u79EF\u5206",
137          dataIndex: "incomeAmount",
138          key: "incomeAmount",
139          width: 100,
140          align: "right"
141        },
142        {
143          title: "\u79EF\u5206\u53EF\u5151\u6362\u91D1\u989D",
144          key: "realIncomeAmount",
145          width: 150,
146          align: "right"
147        },
148        {
149          title: "\u5DF2\u63D0\u73B0\u91D1\u989D",
150          dataIndex: "withdrawalAmount",
151          key: "withdrawalAmount",
152          width: 120,
153          align: "right"
154        },
155        {
156          title: "\u63D0\u73B0\u72B6\u6001",
157          key: "withdrawalStatus",
158          width: 120,
159          align: "center"
160        }
161      ] : []), { data: g, refresh: F } = ([_, Y] = Ve(() => fe({
162        userId: m.userId,
163        amountUnit: m.amountUnit,
164        pageNumber: A,
165        pageSize: N
166      })), _ = await _, Y(), _), R = U({
167        list: [],
168        total: 0
169      });
170      Me(g, (e) => {
171        e ? R.value = e : Pe(() => {
172          F();
173        });
174      }, {
175        immediate: true
176      });
177      const f = U(false), q = () => {
178        f.value = true;
179      }, G = W(() => {
180        var _a, _b;
181        return (_b = (_a = g.value) == null ? void 0 : _a.list) == null ? void 0 : _b.filter((e) => p.value.includes(e == null ? void 0 : e._id)).reduce((e, o) => {
182          const x = o.amountUnit === v.CNY ? o.incomeAmount : o.incomeAmount * 100 * o.pointsToRMBRate;
183          return e += x, e -= o.withdrawalAmount || 0, e;
184        }, 0);
185      }), t = U(0), n = async () => {
186        const e = await Re({
187          ownerId: m.userId,
188          incomeIds: p.value,
189          totalAmount: t.value * 100
190        });
191        Ae.success({
192          title: "\u7ED3\u7B97\u6210\u529F\uFF01\u662F\u5426\u7EE7\u7EED\u524D\u5F80\u7ED9\u7528\u6237\u63D0\u73B0\uFF1F",
193          okText: "\u53BB\u63D0\u73B0\u9875\u9762",
194          cancelText: "\u53D6\u6D88",
195          async onOk() {
196            $("close-dialog"), await Ne(`/admin/finance/withdrawal?id=${e == null ? void 0 : e._id}`);
197          },
198          onCancel() {
199            F();
200          }
201        });
202      }, y = Ye("formRef"), K = async () => {
203        var _a;
204        try {
205          await ((_a = y.value) == null ? void 0 : _a.validate()), await n(), p.value = [], f.value = false;
206        } catch (e) {
207          console.warn("\u6821\u9A8C\u672A\u901A\u8FC7", e);
208        }
209      }, i = (e) => e.withdrawalStatus !== ve.Settled, r = (e) => {
210        if (e.amountUnit === v.CNY) return `${b(e.incomeAmount)} \u5143`;
211        if (e.amountUnit === v.POINT) return `${b(e.incomeAmount * e.pointsToRMBRate * 100)} \u5143`;
212      }, H = (e) => e ? `${b(e)} \u5143` : "--", ue = [
213        {
214          required: true,
215          message: "\u8BF7\u8F93\u5165\u7ED3\u7B97\u91D1\u989D"
216        },
217        {
218          validator: (e, o) => o > 0 ? Promise.resolve() : Promise.reject(new Error("\u7ED3\u7B97\u91D1\u989D\u5FC5\u987B\u5927\u4E8E 0")),
219          trigger: "blur"
220        }
221      ], me = W(() => [
222        {
223          text: "\u7ED3\u7B97",
224          onClick: q,
225          disabled: !p.value.length
226        }
227      ]), ce = W(() => {
228        var _a;
229        const e = ((_a = R.value) == null ? void 0 : _a.total) || 0;
230        return e <= Oe ? false : {
231          current: A.value,
232          pageSize: N.value,
233          total: e,
234          showSizeChanger: true,
235          showTotal: (o) => `\u5171 ${o} \u6761`,
236          pageSizeOptions: [
237            "10",
238            "20",
239            "50",
240            "100"
241          ],
242          onChange: (o, x) => {
243            A.value = o, N.value = x;
244          },
245          onShowSizeChange: (o, x) => {
246            A.value = 1, N.value = x;
247          }
248        };
249      }), de = (e) => typeof e.owner == "object" && e.owner ? e.owner : null;
250      return (e, o) => {
251        const x = Te, _e = le, pe = $e, ge = Se, we = be, he = oe;
252        return c(), O(ie, {
253          "max-width": "1400"
254        }, {
255          default: C(() => [
256            J("div", De, [
257              (c(true), V(E, null, ze(l(me), (a, s) => (c(), O(Z, {
258                key: s,
259                variant: s === 0 ? "flat" : "text",
260                color: "primary",
261                size: "small",
262                disabled: a.disabled,
263                onClick: a.onClick
264              }, {
265                default: C(() => [
266                  I(w(a.text), 1)
267                ]),
268                _: 2
269              }, 1032, [
270                "variant",
271                "disabled",
272                "onClick"
273              ]))), 128))
274            ]),
275            M(_e, {
276              columns: l(L),
277              "data-source": l(R).list,
278              "row-key": (a) => a._id,
279              "row-selection": {
280                selectedRowKeys: l(p),
281                onChange: (a) => {
282                  p.value = a;
283                },
284                getCheckboxProps: (a) => ({
285                  disabled: !i(a)
286                })
287              },
288              scroll: {
289                x: 1200
290              },
291              pagination: l(ce),
292              size: "small",
293              bordered: "",
294              class: "user-income-table"
295            }, {
296              bodyCell: C(({ column: a, record: s }) => [
297                a.key === "created_at" ? (c(), V(E, {
298                  key: 0
299                }, [
300                  I(w(l(Ie)(new Date(s.created_at))), 1)
301                ], 64)) : a.key === "owner" ? (c(), O(re, {
302                  key: 1,
303                  user: de(s),
304                  "avatar-size": 32,
305                  "max-name-length": 10
306                }, null, 8, [
307                  "user"
308                ])) : a.key === "incomeType" ? (c(), V(E, {
309                  key: 2
310                }, [
311                  I(w(("$t" in e ? e.$t : Ee(Ce))(l(ye)[s.incomeType])), 1)
312                ], 64)) : a.key === "realIncomeAmount" ? (c(), V(E, {
313                  key: 3
314                }, [
315                  I(w(r(s)), 1)
316                ], 64)) : a.key === "incomeAmount" ? (c(), V(E, {
317                  key: 4
318                }, [
319                  I(w(s.incomeAmount), 1)
320                ], 64)) : a.key === "withdrawalAmount" ? (c(), V(E, {
321                  key: 5
322                }, [
323                  I(w(H(s.withdrawalAmount)), 1)
324                ], 64)) : a.key === "withdrawalStatus" ? (c(), O(x, {
325                  key: 6,
326                  color: l(te)[s.withdrawalStatus] === "warning" ? "orange" : l(te)[s.withdrawalStatus] === "success" ? "green" : ""
327                }, {
328                  default: C(() => [
329                    I(w(l(ke)[s.withdrawalStatus] ?? "\u672A\u7ED3\u7B97"), 1)
330                  ]),
331                  _: 2
332                }, 1032, [
333                  "color"
334                ])) : Be("", true)
335              ]),
336              _: 1
337            }, 8, [
338              "columns",
339              "data-source",
340              "row-key",
341              "row-selection",
342              "pagination"
343            ]),
344            M(he, {
345              modelValue: l(f),
346              "onUpdate:modelValue": o[1] || (o[1] = (a) => ae(f) ? f.value = a : null),
347              "max-width": "600",
348              configs: {
349                title: "\u786E\u8BA4\u7ED3\u7B97",
350                icon: "mdi-cash"
351              },
352              onSave: K
353            }, {
354              default: C(() => [
355                J("div", Le, " \u4F60\u9009\u62E9\u4E86 " + w(l(p).length) + " \u6761\u8BB0\u5F55\u8FDB\u884C\u7ED3\u7B97\uFF1B\u603B\u5171 " + w(l(b)(l(G))) + " \u5143 ", 1),
356                M(we, {
357                  ref_key: "formRef",
358                  ref: y,
359                  model: {
360                    settleTotalAmount: l(t)
361                  },
362                  layout: "vertical"
363                }, {
364                  default: C(() => [
365                    J("div", Fe, [
366                      M(ge, {
367                        label: "\u7ED3\u7B97\u91D1\u989D",
368                        name: "settleTotalAmount",
369                        required: "",
370                        rules: ue
371                      }, {
372                        default: C(() => [
373                          M(pe, {
374                            value: l(t),
375                            "onUpdate:value": o[0] || (o[0] = (a) => ae(t) ? t.value = a : null),
376                            min: 0,
377                            precision: 2,
378                            style: {
379                              width: "100%"
380                            },
381                            placeholder: "\u8BF7\u8F93\u5165\u91D1\u989D\uFF0C\u5355\u4F4D\u5143",
382                            step: 0.01
383                          }, null, 8, [
384                            "value"
385                          ])
386                        ]),
387                        _: 1
388                      })
389                    ])
390                  ]),
391                  _: 1
392                }, 8, [
393                  "model"
394                ])
395              ]),
396              _: 1
397            }, 8, [
398              "modelValue"
399            ])
400          ]),
401          _: 1
402        });
403      };
404    }
405  });
406  je = se(We, [
407    [
408      "__scopeId",
409      "data-v-122101d2"
410    ]
411  ]);
412  ({ withAsyncContext: ne, defineComponent: qe } = await S("vue"));
413  ({ unref: d, openBlock: u, createBlock: j, createCommentVNode: Q, toDisplayString: z, createTextVNode: k, Fragment: B, createElementBlock: T, resolveComponent: mt, withCtx: P, createVNode: X, isRef: Ge } = await S("vue"));
414  Ke = {
415    key: 7,
416    class: "flex gap-1 items-center justify-center flex-wrap"
417  };
418  ({ ref: D, onMounted: He, watch: Je, nextTick: Qe, computed: Xe } = await S("vue"));
419  Ze = 10;
420  et = qe({
421    __name: "index",
422    async setup(ee) {
423      let h, _;
424      const Y = [
425        {
426          title: "\u7528\u6237\u4FE1\u606F",
427          key: "user",
428          width: 200
429        },
430        {
431          title: "\u7D2F\u8BA1\u5145\u503C\u5206\u6210",
432          dataIndex: "rmbTotalExchangeable",
433          key: "rmbTotalExchangeable",
434          align: "right"
435        },
436        {
437          title: "\u5DF2\u7ED3\u7B97",
438          dataIndex: "rmbTotalExchanged",
439          key: "rmbTotalExchanged",
440          align: "right"
441        },
442        {
443          title: "\u672A\u7ED3\u7B97",
444          key: "rmbTotalRemain",
445          align: "right"
446        },
447        {
448          title: "\u7D2F\u8BA1\u79EF\u5206\u6536\u76CA",
449          dataIndex: "pointTotalExchangeable",
450          key: "pointTotalExchangeable",
451          align: "right"
452        },
453        {
454          title: "\u5DF2\u7ED3\u7B97",
455          dataIndex: "pointTotalExchanged",
456          key: "pointTotalExchanged",
457          align: "right"
458        },
459        {
460          title: "\u672A\u7ED3\u7B97",
461          key: "pointTotalRemain",
462          align: "right"
463        },
464        {
465          title: "\u64CD\u4F5C",
466          key: "action",
467          width: 200,
468          align: "center",
469          fixed: "right"
470        }
471      ], m = D(1), $ = D(10), { data: A, execute: N, refresh: p } = ([h, _] = ne(() => xe(m, $)), h = await h, _(), h);
472      [h, _] = ne(() => N()), await h, _();
473      const L = D({
474        list: [],
475        total: 0
476      });
477      He(async () => {
478        Je(A, (t) => {
479          t ? L.value = t : Qe(() => {
480            p();
481          });
482        }, {
483          immediate: true
484        });
485      });
486      const g = D(false), F = D(""), R = D(""), f = (t, n) => {
487        F.value = t, R.value = n, g.value = true;
488      }, q = Xe(() => {
489        var _a;
490        const t = ((_a = L.value) == null ? void 0 : _a.total) || 0;
491        return t <= Ze ? false : {
492          current: m.value,
493          pageSize: $.value,
494          total: t,
495          showSizeChanger: true,
496          showTotal: (n) => `\u5171 ${n} \u6761`,
497          pageSizeOptions: [
498            "10",
499            "20",
500            "50",
501            "100"
502          ],
503          onChange: (n, y) => {
504            m.value = n, $.value = y;
505          },
506          onShowSizeChange: (n, y) => {
507            m.value = 1, $.value = y;
508          }
509        };
510      }), G = (t) => t.userId ? {
511        _id: t.userId,
512        username: t.username,
513        nickname: t.nickname,
514        mobile: t.mobile,
515        email: t.email,
516        avatar_url: t.avatar_url
517      } : null;
518      return (t, n) => {
519        const y = le, K = oe;
520        return u(), j(ie, {
521          "max-width": "1400"
522        }, {
523          default: P(() => {
524            var _a;
525            return [
526              X(y, {
527                columns: Y,
528                "data-source": (_a = d(L)) == null ? void 0 : _a.list,
529                "row-key": (i) => i.userId,
530                scroll: {
531                  x: 1200
532                },
533                pagination: d(q),
534                size: "small",
535                bordered: "",
536                class: "income-summary-table"
537              }, {
538                bodyCell: P(({ column: i, record: r }) => [
539                  i.key === "user" ? (u(), j(re, {
540                    key: 0,
541                    user: G(r),
542                    "avatar-size": 32,
543                    "max-name-length": 10
544                  }, null, 8, [
545                    "user"
546                  ])) : i.key === "rmbTotalExchangeable" ? (u(), T(B, {
547                    key: 1
548                  }, [
549                    k(z(d(b)(r.rmbTotalExchangeable)) + " \u5143 ", 1)
550                  ], 64)) : i.key === "rmbTotalExchanged" ? (u(), T(B, {
551                    key: 2
552                  }, [
553                    k(z(d(b)(r.rmbTotalExchanged)) + " \u5143 ", 1)
554                  ], 64)) : i.key === "rmbTotalRemain" ? (u(), T(B, {
555                    key: 3
556                  }, [
557                    k(z(d(b)(r.rmbTotalRemain)) + " \u5143 ", 1)
558                  ], 64)) : i.key === "pointTotalExchangeable" ? (u(), T(B, {
559                    key: 4
560                  }, [
561                    k(z(r.pointTotalExchangeable), 1)
562                  ], 64)) : i.key === "pointTotalExchanged" ? (u(), T(B, {
563                    key: 5
564                  }, [
565                    k(z(r.pointTotalExchanged), 1)
566                  ], 64)) : i.key === "pointTotalRemain" ? (u(), T(B, {
567                    key: 6
568                  }, [
569                    k(z(r.pointTotalRemain), 1)
570                  ], 64)) : i.key === "action" ? (u(), T("div", Ke, [
571                    r.rmbTotalRemain > 0 ? (u(), j(Z, {
572                      key: 0,
573                      variant: "outlined",
574                      color: "primary",
575                      size: "small",
576                      onClick: (H) => f(r.userId, d(v).CNY)
577                    }, {
578                      default: P(() => [
579                        ...n[3] || (n[3] = [
580                          k(" \u4EBA\u6C11\u5E01\u7ED3\u7B97 ", -1)
581                        ])
582                      ]),
583                      _: 1
584                    }, 8, [
585                      "onClick"
586                    ])) : Q("", true),
587                    r.pointTotalRemain > 0 ? (u(), j(Z, {
588                      key: 1,
589                      variant: "outlined",
590                      color: "primary",
591                      size: "small",
592                      onClick: (H) => f(r.userId, d(v).POINT)
593                    }, {
594                      default: P(() => [
595                        ...n[4] || (n[4] = [
596                          k(" \u79EF\u5206\u7ED3\u7B97 ", -1)
597                        ])
598                      ]),
599                      _: 1
600                    }, 8, [
601                      "onClick"
602                    ])) : Q("", true)
603                  ])) : Q("", true)
604                ]),
605                _: 1
606              }, 8, [
607                "data-source",
608                "row-key",
609                "pagination"
610              ]),
611              X(K, {
612                modelValue: d(g),
613                "onUpdate:modelValue": n[1] || (n[1] = (i) => Ge(g) ? g.value = i : null),
614                width: "1200",
615                configs: {
616                  title: "\u786E\u8BA4\u7ED3\u7B97",
617                  icon: "mdi-cash"
618                },
619                onSave: n[2] || (n[2] = (i) => g.value = false)
620              }, {
621                default: P(() => [
622                  X(je, {
623                    "user-id": d(F),
624                    "amount-unit": d(R),
625                    onCloseDialog: n[0] || (n[0] = (i) => g.value = false)
626                  }, null, 8, [
627                    "user-id",
628                    "amount-unit"
629                  ])
630                ]),
631                _: 1
632              }, 8, [
633                "modelValue"
634              ])
635            ];
636          }),
637          _: 1
638        });
639      };
640    }
641  });
642  ct = se(et, [
643    [
644      "__scopeId",
645      "data-v-c6ec5835"
646    ]
647  ]);
648});
649export {
650  __tla,
651  ct as default
652};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.