2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
"use strict"; (self.webpackChunk = self.webpackChunk || []).push([[117], { 53006: function (Je, Z, o) { o.r(Z), o.d(Z, { default: function () { return Ee } }); var te = o(15009), d = o.n(te), ne = o(64599), re = o.n(ne), ae = o(99289), f = o.n(ae), ie = o(5574), E = o.n(ie), x = o(67294), se = o(30518), A = o(78158), ue = o(97857), H = o.n(ue), le = o(54683), O = o(16568), Ze = o(81354), He = { NODE_ENV: "production", PUBLIC_PATH: "/cloudMenu/" }.UMI_APP_BASEURL, j = le.Z.create({ baseURL: "https://eshangtech.com:18900//EShangApiMain" }); j.interceptors.request.use(function (a) { return a.headers = H()(H()({}, a.headers), {}, { Authorization: "Bearer ".concat(localStorage.getItem("Authorization") || ""), "Content-Type": "application/json;charset=utf-8" }), a }, function (a) { return Promise.reject(a) }), j.interceptors.response.use(function (a) { var n = a.data; n.code !== 200 && n.Result_Code !== 100 && O.ZP.error({ message: n.message }); var t = k(); return n }, function (a) { var n, t = a.response; if (!(t && t.status === 401)) { var s; O.ZP.error({ message: (t == null || (s = t.data) === null || s === void 0 ? void 0 : s.message) || "\u8BF7\u6C42\u5931\u8D25", description: a.message }) } return Promise.reject({ code: (t == null ? void 0 : t.status) || 500, message: (t == null || (n = t.data) === null || n === void 0 ? void 0 : n.message) || "\u8BF7\u6C42\u5931\u8D25" }) }); var de = function (n, t) { var s = CryptoJS.enc.Utf8.parse(t), i = CryptoJS.AES.encrypt(n, s, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }), r = i.ciphertext.toString(CryptoJS.enc.Hex); return r }, Oe = function (n, t) { var s = CryptoJS.enc.Utf8.parse(t), i = CryptoJS.enc.Hex.parse(n), r = CryptoJS.AES.decrypt({ ciphertext: i }, s, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }), D = r.toString(CryptoJS.enc.Utf8); return D }, oe = function (n, t, s) { var i = "s" + n + t + s; return CryptoJS.MD5(i).toString(CryptoJS.enc.Hex) }, k = function () { var n = new Date, t = n.getFullYear(), s = String(n.getMonth() + 1).padStart(2, "0"), i = String(n.getDate()).padStart(2, "0"), r = String(n.getHours()).padStart(2, "0"); return "es0".concat(t).concat(s).concat(i).concat(r, "0es") }, ke = function (n) { console.log("data", n); var t = k(); console.log("timestamp", t); var s = parseInt((new Date().getTime() / 1e3).toString()); console.log("timeSecond", s); var i = de(n, t); console.log("encryptionData", i); var r = oe(t, i, t); console.log("md5Data", r); var D = { data: i, timestamp: s, sign: r }; return console.log("res", D), D }, ce = j; function ze(a) { return F.apply(this, arguments) } function F() { return F = _asyncToGenerator(_regeneratorRuntime().mark(function a(n) { var t; return _regeneratorRuntime().wrap(function (i) { for (; ;)switch (i.prev = i.next) { case 0: return i.next = 2, request.get("/baiwang/auth/token", { params: n }); case 2: return t = i.sent, i.abrupt("return", t); case 4: case "end": return i.stop() } }, a) })), F.apply(this, arguments) } function pe(a, n) { return B.apply(this, arguments) } function B() { return B = f()(d()().mark(function a(n, t) { var s; return d()().wrap(function (r) { for (; ;)switch (r.prev = r.next) { case 0: return r.next = 2, A.Z.post("/baiwang/auth/certify-qrcode/".concat(n), t); case 2: return s = r.sent, r.abrupt("return", s); case 4: case "end": return r.stop() } }, a) })), B.apply(this, arguments) } function he(a, n) { return Y.apply(this, arguments) } function Y() { return Y = f()(d()().mark(function a(n, t) { var s; return d()().wrap(function (r) { for (; ;)switch (r.prev = r.next) { case 0: return r.next = 2, A.Z.post("/baiwang/auth/certify-result/".concat(n), t); case 2: return s = r.sent, r.abrupt("return", s); case 4: case "end": return r.stop() } }, a) })), Y.apply(this, arguments) } function ve(a, n) { return N.apply(this, arguments) } function N() { return N = f()(d()().mark(function a(n, t) { var s; return d()().wrap(function (r) { for (; ;)switch (r.prev = r.next) { case 0: return r.next = 2, A.Z.post("/api/baiwang/invoice/query-page/".concat(n), t); case 2: return s = r.sent, r.abrupt("return", s); case 4: case "end": return r.stop() } }, a) })), N.apply(this, arguments) } function fe(a) { return G.apply(this, arguments) } function G() { return G = f()(d()().mark(function a(n) { var t; return d()().wrap(function (i) { for (; ;)switch (i.prev = i.next) { case 0: return i.next = 2, A.Z.get("/baiwang-config/".concat(n)); case 2: return t = i.sent, i.abrupt("return", t); case 4: case "end": return i.stop() } }, a) })), G.apply(this, arguments) } function ge(a, n) { return R.apply(this, arguments) } function R() { return R = f()(d()().mark(function a(n, t) { var s; return d()().wrap(function (r) { for (; ;)switch (r.prev = r.next) { case 0: return r.next = 2, A.Z.post("/api/baiwang/invoice/push/".concat(n), t); case 2: return s = r.sent, r.abrupt("return", s); case 4: case "end": return r.stop() } }, a) })), R.apply(this, arguments) } function ye(a, n) { return U.apply(this, arguments) } function U() { return U = f()(d()().mark(function a(n, t) { var s; return d()().wrap(function (r) { for (; ;)switch (r.prev = r.next) { case 0: return r.next = 2, A.Z.post("/api/baiwang/invoice/invalid/".concat(n), t); case 2: return s = r.sent, r.abrupt("return", s); case 4: case "end": return r.stop() } }, a) })), U.apply(this, arguments) } function me(a) { return M.apply(this, arguments) } function M() { return M = f()(d()().mark(function a(n) { var t; return d()().wrap(function (i) { for (; ;)switch (i.prev = i.next) { case 0: return i.next = 2, ce.get("/Logging/GetPassportInfoById?UserIdEncrypted=".concat(n.UserIdEncrypted), n); case 2: return t = i.sent, i.abrupt("return", t); case 4: case "end": return i.stop() } }, a) })), M.apply(this, arguments) } var Ie = o(17788), xe = o(2453), Se = o(78957), De = o(22253), Ce = o(30381), S = o.n(Ce), u = o(85893), we = Ie.Z.confirm, Ae = function (n) { var t = (0, x.useRef)(null), s = (0, x.useRef)(), i = (0, x.useRef)(), r = (0, x.useState)(), D = E()(r, 2), Le = D[0], We = D[1], Te = (0, x.useState)(), z = E()(Te, 2), L = z[0], je = z[1], Fe = (0, x.useState)(!1), W = E()(Fe, 2), Be = W[0], Ye = W[1], Ne = (0, x.useState)(), Q = E()(Ne, 2), Qe = Q[0], Ge = Q[1]; (0, x.useEffect)(function () { Re() }, []); var Re = function () { var h = f()(d()().mark(function l() { var e, c, v, g, p, y, m, P, I, b, $e, K, C, V, X, q, _; return d()().wrap(function (w) { for (; ;)switch (w.prev = w.next) { case 0: e = window.location.search.split("?")[1], console.log("url", e), c = new URLSearchParams(e), console.log("params", c), v = {}, g = re()(c.entries()); try { for (g.s(); !(p = g.n()).done;)y = E()(p.value, 2), m = y[0], P = y[1], v[m] = P } catch ($) { g.e($) } finally { g.f() } return console.log("resultObj", v), I = "menuCloud", v.UserIdEncrypted && be(v.UserIdEncrypted), w.next = 12, fe(I); case 12: return b = w.sent, $e = b.data, je(b.data), K = { qrCodeType: 0, operatorType: 0 }, w.next = 18, pe("menuCloud", K); case 18: C = w.sent, console.log("qrCodeData", C), console.log("321", C.data.response.qrCode), V = C.data.response.qrCode.split(",") && C.data.response.qrCode.split(",").length > 0 ? C.data.response.qrCode.split(",").length : 0, X = C.data.response.qrCode.split(",")[V - 1], q = "data:image/png;base64,".concat(X), _ = we({ width: 600, content: (0, u.jsxs)("div", { children: [(0, u.jsx)("div", { style: { fontSize: "18px", fontWeight: 600, display: "flex", justifyContent: "center" }, children: "\u8BF7\u5148\u626B\u7801\u8FDB\u884C\u4EBA\u8138\u8BA4\u8BC1\uFF01" }), (0, u.jsx)("div", { style: { width: "100%", height: "300px", display: "flex", justifyContent: "center" }, children: (0, u.jsx)("img", { style: { width: "300px", height: "300px" }, src: q }) })] }), footer: !1 }), t.current = setInterval(f()(d()().mark(function $() { var ee, J; return d()().wrap(function (T) { for (; ;)switch (T.prev = T.next) { case 0: return T.next = 2, he("menuCloud", { certifyQueryType: 1 }); case 2: ee = T.sent, J = ee.data.response, console.log("res", J), J.certificationStatus == "1" && (t.current && (clearInterval(t.current), t.current = null), _.destroy(), xe.ZP.success({ content: "\u8BA4\u8BC1\u6210\u529F\uFF01" }), Ye(!0)); case 6: case "end": return T.stop() } }, $) })), 2e3); case 26: case "end": return w.stop() } }, l) })); return function () { return h.apply(this, arguments) } }(), Ue = [{ title: "\u7EDF\u8BA1\u65E5\u671F", dataIndex: "staticDate", hideInTable: !0, valueType: "dateRange", initialValue: [S()().startOf("M"), S()()], search: { transform: function (l) { return { beginDate: S()(l[0]).format("YYYY-MM-DD"), endDate: S()(l[1]).format("YYYY-MM-DD") } } }, fieldProps: { picker: "day", format: "YYYY-MM-DD" } }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u7533\u8BF7\u6D41\u6C34\u53F7" }), dataIndex: "serialNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u5F00\u7968\u5355\u53F7" }), dataIndex: "orderNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u8BA2\u5355\u65E5\u671F" }), dataIndex: "orderDateTime", hideInSearch: !0, width: 150, ellipsis: !0, render: function (l, e) { return e != null && e.orderDateTime ? S()(e == null ? void 0 : e.orderDateTime).format("YYYY-MM-DD HH:mm:ss") : "" } }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u5F00\u7968\u65F6\u95F4" }), dataIndex: "invoiceTime", hideInSearch: !0, width: 150, ellipsis: !0, render: function (l, e) { return e != null && e.invoiceTime ? S()(e == null ? void 0 : e.invoiceTime).format("YYYY-MM-DD HH:mm:ss") : "" } }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u5F00\u7968\u7EC8\u7AEF" }), dataIndex: "invoiceTerminalCode", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u9500\u65B9\u7A0E\u53F7" }), dataIndex: "taxNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u9500\u65B9\u540D\u79F0" }), dataIndex: "sellerName", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u8D2D\u65B9\u7A0E\u53F7" }), dataIndex: "buyerTaxNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u8D2D\u65B9\u540D\u79F0" }), dataIndex: "buyerName", hideInSearch: !0, width: 150, ellipsis: !0 }, { dataIndex: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "invoiceType" }), title: "\u5F00\u7968\u7C7B\u578B", hideInSearch: !0, width: 150, ellipsis: !0, render: function (l, e) { return (e == null ? void 0 : e.invoiceType) === 1 ? "\u84DD\u7968" : (e == null ? void 0 : e.invoiceType) === 2 ? "\u7EA2\u7968" : "" } }, { dataIndex: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "invoiceTypeCode" }), title: "\u53D1\u7968\u79CD\u7C7B\u7F16\u7801", hideInSearch: !0, width: 150, ellipsis: !0 }, { dataIndex: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "remarks" }), title: "\u5907\u6CE8", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u53D1\u7968\u4EE3\u7801" }), dataIndex: "invoiceCode", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u53D1\u7968\u53F7\u7801" }), dataIndex: "invoiceNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u6570\u7535\u53D1\u7968\u53F7\u7801" }), dataIndex: "digitInvoiceNo", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u4E0D\u542B\u7A0E\u91D1\u989D" }), dataIndex: "invoiceTotalPrice", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u7A0E\u989D" }), dataIndex: "invoiceTotalTax", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u542B\u7A0E\u91D1\u989D" }), dataIndex: "invoiceTotalPriceTax", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u53D1\u7968\u72B6\u6001" }), dataIndex: "status", hideInSearch: !0, width: 150, ellipsis: !0, render: function (l, e) { return (e == null ? void 0 : e.status) === 0 ? "\u5F00\u7968\u4E2D" : (e == null ? void 0 : e.status) === 1 ? "\u5F00\u7968\u5B8C\u6210" : (e == null ? void 0 : e.status) === 2 ? "\u5F00\u7968\u5931\u8D25" : (e == null ? void 0 : e.status) === 3 ? "\u53D1\u7968\u5DF2\u4F5C\u5E9F" : (e == null ? void 0 : e.status) === 4 ? "\u53D1\u7968\u4F5C\u5E9F\u4E2D" : "" } }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u53D1\u7968\u72B6\u6001\u63CF\u8FF0" }), dataIndex: "statusMessage", hideInSearch: !0, width: 150, ellipsis: !0 }, { title: (0, u.jsx)("div", { style: { textAlign: "center" }, children: "\u9644\u4EF6\u5730\u5740" }), dataIndex: "pdfUrl", hideInSearch: !0, width: 150, ellipsis: !0, render: function (l, e) { return (0, u.jsx)("a", { children: "\u67E5\u770B\u9644\u4EF6" }) } }, { title: "\u64CD\u4F5C", dataIndex: "options", width: 100, hideInSearch: !0, fixed: "right", render: function (l, e) { return (0, u.jsxs)(Se.Z, { children: [(0, u.jsx)("a", { onClick: function () { console.log("record", e), Me(e) }, children: "\u5F00\u7968" }), (0, u.jsx)("a", { onClick: function () { Pe(e) }, children: "\u4F5C\u5E9F" })] }) } }], Me = function () { var h = f()(d()().mark(function l(e) { var c, v; return d()().wrap(function (p) { for (; ;)switch (p.prev = p.next) { case 0: return c = { invoiceCode: e.invoiceCode, invoiceNo: e.invoiceNo, digitInvoiceNo: e.digitInvoiceNo, pushPhone: e.pushPhone, pushEmail: e.pushEmail }, console.log("req", c), p.next = 4, ge("menuCloud", c); case 4: v = p.sent, console.log("data", v); case 6: case "end": return p.stop() } }, l) })); return function (e) { return h.apply(this, arguments) } }(), Pe = function () { var h = f()(d()().mark(function l(e) { var c, v; return d()().wrap(function (p) { for (; ;)switch (p.prev = p.next) { case 0: return console.log("obj", e), c = { taxNo: L.taxNo, serialNo: e.serialNo, orderNo: e.orderNo, invoiceCode: e.invoiceCode, invoiceNo: e.invoiceNo, invalidOperator: "\u64CD\u4F5C\u4EBA" }, p.next = 4, ye("menuCloud", c); case 4: v = p.sent; case 5: case "end": return p.stop() } }, l) })); return function (e) { return h.apply(this, arguments) } }(), be = function () { var h = f()(d()().mark(function l(e) { var c, v, g; return d()().wrap(function (y) { for (; ;)switch (y.prev = y.next) { case 0: return c = { UserIdEncrypted: e }, y.next = 3, me(c); case 3: v = y.sent, console.log("handleGetUserInfo", v), g = v.Result_Data, Ge(g); case 7: case "end": return y.stop() } }, l) })); return function (e) { return h.apply(this, arguments) } }(); return (0, u.jsx)("div", { children: Be ? (0, u.jsx)(De.Z, { actionRef: s, formRef: i, columns: Ue, bordered: !0, expandable: { expandRowByClick: !0 }, rowKey: function (l) { return "".concat(l == null ? void 0 : l.id) }, scroll: { x: "100%", y: "calc(100vh - 400px)" }, headerTitle: (0, u.jsx)("span", { style: { color: "#1890ff", fontSize: 14, fontWeight: 600 }, children: "\u53D1\u7968\u5217\u8868" }), search: { span: 6 }, request: function () { var h = f()(d()().mark(function l(e) { var c, v, g, p, y, m; return d()().wrap(function (I) { for (; ;)switch (I.prev = I.next) { case 0: return console.log("params", e), c = [S()().format("YYYY-MM-DD 00:00:00"), S()().format("YYYY-MM-DD 23:59:59")], v = c[0], g = c[1], p = { taxNo: L.taxNo || "", pageNo: (e == null ? void 0 : e.current) || 1, pageSize: (e == null ? void 0 : e.pageSize) || 1, beginDate: v || "", endDate: g || "" }, I.next = 5, ve("menuCloud", p); case 5: if (y = I.sent, console.log("data3232", y), m = y.data.response, console.log("tableData3232", m), !(m.list && m.list.length > 0)) { I.next = 11; break } return I.abrupt("return", { data: m.list, success: !0, total: m.total, current: m.pageNo, pageSize: m.pageSize }); case 11: return I.abrupt("return", { data: [], success: !0 }); case 12: case "end": return I.stop() } }, l) })); return function (l) { return h.apply(this, arguments) } }() }) : "" }) }, Ee = (0, se.connect)(function (a) { var n = a.user; return { currentUser: n.data } })(Ae) } }]);
|