xyvcard-paper-buyer 0.0.39 → 0.0.41

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 (25) hide show
  1. package/dist/{applyEdit-Bcl_bli2.mjs → applyEdit-Cyj9Q0lP.mjs} +36 -36
  2. package/dist/{confirm-BIHrk7gs.mjs → confirm-BYEYokBP.mjs} +24 -26
  3. package/dist/{index-DISDK9IB.mjs → index-DrADb2uC.mjs} +2 -1
  4. package/dist/{index-TclOpCe_.mjs → index-DspCttgG.mjs} +10 -27
  5. package/dist/index.mjs +6 -10
  6. package/dist/{invoice-N1lsQHhB.mjs → invoice-Ca967WuM.mjs} +1 -1
  7. package/dist/{invoiceEdit-CILq1n3W.mjs → invoiceEdit-jwC6d-7m.mjs} +62 -61
  8. package/dist/{invoiceView-ClfMLUV3.mjs → invoiceView-BQ20QFpo.mjs} +5 -4
  9. package/dist/{list-BPfP8vsl.mjs → list-CeY2OdrK.mjs} +28 -25
  10. package/dist/{onlineBanking-DfzIYOBF.mjs → onlineBanking-BjnT3Pli.mjs} +42 -39
  11. package/dist/{orderAddress-CK22n9R3.mjs → orderAddress-DBPQQVGw.mjs} +72 -71
  12. package/dist/{orderInfo-DKPnxmRD.mjs → orderInfo-D_KS6_dc.mjs} +21 -18
  13. package/dist/orderPaper-DAXED5UU.mjs +148 -0
  14. package/dist/{sendDialog-Bf8rP763.mjs → sendDialog-B0HE_2cs.mjs} +1 -1
  15. package/dist/style.css +1 -1
  16. package/dist/{userInvoice-S09QEhkA.mjs → userInvoice-DhoqnQE4.mjs} +1 -1
  17. package/dist/{userInvoice.vue_vue_type_script_setup_true_lang-cUHb_KPE.mjs → userInvoice.vue_vue_type_script_setup_true_lang-DV5JSa_i.mjs} +119 -100
  18. package/dts/api/buyer/lqfp-fp/index.d.ts +1 -3
  19. package/dts/api/buyer/lqfp-fp/types.d.ts +1 -32
  20. package/dts/api/buyer/order-newspaper/types.d.ts +1 -1
  21. package/dts/api/buyer/order-user-address/types.d.ts +1 -0
  22. package/dts/api/buyer/user_invoice/index.d.ts +9 -0
  23. package/dts/api/buyer/user_invoice/types.d.ts +38 -0
  24. package/package.json +4 -4
  25. package/dist/orderPaper-Cscnx-MT.mjs +0 -153
@@ -1,16 +1,16 @@
1
- import { defineComponent as z, ref as d, computed as q, resolveComponent as m, createElementBlock as F, openBlock as k, createElementVNode as o, createBlock as E, createCommentVNode as U, toDisplayString as p, createVNode as n, withCtx as i, createTextVNode as g, unref as $ } from "vue";
1
+ import { defineComponent as F, ref as d, computed as E, reactive as G, resolveComponent as m, createElementBlock as J, openBlock as h, createElementVNode as o, createBlock as q, createCommentVNode as U, toDisplayString as p, createVNode as l, withCtx as i, createTextVNode as g, unref as $ } from "vue";
2
2
  import { o as D } from "./index-B90ZLkZ9.mjs";
3
3
  import { o as M } from "./index-BP8zUjOw.mjs";
4
- import { useTableHooks as G } from "jmash-core";
5
- import { useI18n as J } from "vue-i18n";
6
- import { useRoute as K, useRouter as W } from "vue-router";
7
- import X from "./edit-BgQo-uqd.mjs";
8
- import { E as y } from "./el-message-VSzNakoG.mjs";
9
- import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
10
- const Z = { class: "app-container" }, ee = { class: "search-container" }, te = { class: "address-management-container" }, oe = { class: "subscription-info" }, se = { class: "info-item" }, ne = { class: "value" }, le = { class: "info-item" }, ae = { class: "value" }, de = { class: "info-item" }, re = { class: "value" }, ie = { class: "action-bar" }, ue = { class: "address-table" }, me = { class: "footer" }, pe = /* @__PURE__ */ z({
4
+ import { useTableHooks as K } from "jmash-core";
5
+ import { useI18n as W } from "vue-i18n";
6
+ import { useRoute as X, useRouter as Y } from "vue-router";
7
+ import Z from "./edit-BgQo-uqd.mjs";
8
+ import { E as N } from "./el-message-VSzNakoG.mjs";
9
+ import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
10
+ const te = { class: "app-container" }, oe = { class: "search-container" }, se = { class: "address-management-container" }, le = { class: "subscription-info" }, ne = { class: "info-item" }, ae = { class: "value" }, de = { class: "info-item" }, re = { class: "value" }, ie = { class: "info-item" }, ue = { class: "value" }, me = { class: "action-bar" }, pe = { class: "address-table" }, ce = { class: "footer" }, ve = /* @__PURE__ */ F({
11
11
  __name: "orderAddress",
12
- setup(ce) {
13
- const { t: c } = J(), f = d([]), I = K(), B = W(), v = d(0), x = d(""), r = d({
12
+ setup(fe) {
13
+ const { t: c } = W(), v = d([]), k = X(), B = Y(), f = d(0), x = d(""), r = d({
14
14
  title: c("common.edit"),
15
15
  visible: !1
16
16
  });
@@ -18,96 +18,96 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
18
18
  r.value.title = c("common.add"), r.value.visible = !0;
19
19
  }
20
20
  const C = d("");
21
- D.findOrderInfoById({ orderId: I.query.orderId }).then((t) => {
22
- var l, a, _, b;
23
- x.value = (a = (l = t.data.orderItemList) == null ? void 0 : l.results[0]) == null ? void 0 : a.itemId;
21
+ D.findOrderInfoById({ orderId: k.query.orderId }).then((t) => {
22
+ var n, a, _, b;
23
+ x.value = (a = (n = t.data.orderItemList) == null ? void 0 : n.results[0]) == null ? void 0 : a.itemId;
24
24
  const e = (b = (_ = t.data.orderItemList) == null ? void 0 : _.results[0]) == null ? void 0 : b.quantity;
25
- v.value = typeof e == "number" ? e : 0, C.value = t.data.shopId;
25
+ f.value = typeof e == "number" ? e : 0, C.value = t.data.shopId;
26
26
  });
27
- const h = q(() => f.value.reduce((t, e) => t + (e.goodsNum || 0), 0)), P = q(() => v.value - h.value), V = (t) => {
28
- const e = h.value - (t.goodsNum || 0);
29
- return v.value - e;
27
+ const y = E(() => v.value.reduce((t, e) => t + (e.goodsNum || 0), 0)), P = E(() => f.value - y.value), V = (t) => {
28
+ const e = y.value - (t.goodsNum || 0);
29
+ return f.value - e;
30
30
  }, T = (t) => {
31
31
  const e = t.goodsNum ?? 0;
32
32
  e < 0 && (t.goodsNum = 0);
33
- const l = V(t);
34
- e > l && (t.goodsNum = l, y.warning(`订阅份数不能超过${l}份`));
33
+ const n = V(t);
34
+ e > n && (t.goodsNum = n, N.warning(`订阅份数不能超过${n}份`));
35
35
  };
36
- N();
37
- function N() {
36
+ I();
37
+ function I() {
38
38
  M.findList().then((t) => {
39
- f.value = t.data.results.map((e) => ({
39
+ v.value = t.data.results.map((e) => ({
40
40
  ...e,
41
41
  goodsNum: 0
42
42
  // 初始化为0
43
43
  }));
44
44
  });
45
45
  }
46
- const R = () => {
47
- const t = f.value.filter((e) => e.goodsNum && e.goodsNum > 0).map((e) => ({
46
+ const R = G({
47
+ requestId: Math.random() * 10 + ""
48
+ }), j = () => {
49
+ const t = v.value.filter((e) => e.goodsNum && e.goodsNum > 0).map((e) => ({
48
50
  addressId: e.addressId,
49
51
  goodsNum: e.goodsNum
50
52
  }));
51
53
  if (t.length === 0) {
52
- y.warning("请至少为一个地址分配订阅份数");
54
+ N.warning("请至少为一个地址分配订阅份数");
53
55
  return;
54
56
  }
55
57
  D.createOrderAddress({
56
- tenant: I.query.tenant,
57
- requestId: Math.random().toString(),
58
+ ...R,
58
59
  orderItemId: x.value,
59
60
  userAddresses: t
60
61
  }).then((e) => {
61
- e && e.data === !0 && (y({
62
+ e && e.data === !0 && (N({
62
63
  message: "提交成功",
63
64
  type: "success"
64
65
  }), B.push({
65
66
  path: "/buyer/order-newspaper/orderDetails",
66
67
  query: {
67
- orderId: I.query.orderId,
68
+ orderId: k.query.orderId,
68
69
  shopId: C.value
69
70
  }
70
71
  }));
71
72
  }).catch((e) => {
72
- y.error("提交失败,请稍后重试");
73
73
  });
74
74
  };
75
- function j(t) {
76
- t && N();
75
+ function H(t) {
76
+ t && I();
77
77
  }
78
- const u = d(!1), H = d({}), { tableHooks: A } = G(c, M, H);
79
- function O() {
78
+ const u = d(!1), O = d({}), { tableHooks: A } = K(c, M, O);
79
+ function Q() {
80
80
  u.value = !1;
81
81
  }
82
- function Q(t) {
82
+ function S(t) {
83
83
  t.updateMask = "", A.importExcel(t).then(() => {
84
- u.value = !1, N();
84
+ u.value = !1, I();
85
85
  });
86
86
  }
87
87
  return (t, e) => {
88
- const l = m("el-button"), a = m("el-table-column"), _ = m("el-input"), b = m("el-table"), S = m("jmash-import-upload");
89
- return k(), F("div", Z, [
90
- o("div", ee, [
91
- o("div", te, [
88
+ const n = m("el-button"), a = m("el-table-column"), _ = m("el-input"), b = m("el-table"), z = m("jmash-import-upload");
89
+ return h(), J("div", te, [
90
+ o("div", oe, [
91
+ o("div", se, [
92
92
  e[11] || (e[11] = o("div", { class: "header" }, [
93
93
  o("h2", null, "收报地址")
94
94
  ], -1)),
95
- o("div", oe, [
96
- o("div", se, [
95
+ o("div", le, [
96
+ o("div", ne, [
97
97
  e[5] || (e[5] = o("span", null, "总订阅份数:", -1)),
98
- o("span", ne, p(v.value) + "份", 1)
98
+ o("span", ae, p(f.value) + "份", 1)
99
99
  ]),
100
- o("div", le, [
100
+ o("div", de, [
101
101
  e[6] || (e[6] = o("span", null, "已分配:", -1)),
102
- o("span", ae, p(h.value) + "份", 1)
102
+ o("span", re, p(y.value) + "份", 1)
103
103
  ]),
104
- o("div", de, [
104
+ o("div", ie, [
105
105
  e[7] || (e[7] = o("span", null, "待分配:", -1)),
106
- o("span", re, p(P.value) + "份", 1)
106
+ o("span", ue, p(P.value) + "份", 1)
107
107
  ])
108
108
  ]),
109
- o("div", ie, [
110
- n(l, {
109
+ o("div", me, [
110
+ l(n, {
111
111
  type: "danger",
112
112
  class: "add-button",
113
113
  onClick: e[0] || (e[0] = (s) => L())
@@ -118,7 +118,7 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
118
118
  _: 1,
119
119
  __: [8]
120
120
  }),
121
- n(l, {
121
+ l(n, {
122
122
  type: "danger",
123
123
  class: "add-button",
124
124
  onClick: e[1] || (e[1] = (s) => u.value = !0)
@@ -130,38 +130,38 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
130
130
  __: [9]
131
131
  })
132
132
  ]),
133
- o("div", ue, [
134
- n(b, {
135
- data: f.value,
133
+ o("div", pe, [
134
+ l(b, {
135
+ data: v.value,
136
136
  border: "",
137
137
  style: { width: "100%" },
138
138
  "header-cell-style": { backgroundColor: "#fafafa", color: "#333" }
139
139
  }, {
140
140
  default: i(() => [
141
- n(a, {
141
+ l(a, {
142
142
  label: "序号",
143
143
  width: "80",
144
144
  align: "center",
145
145
  type: "index"
146
146
  }),
147
- n(a, {
147
+ l(a, {
148
148
  prop: "note",
149
149
  label: "收报单位",
150
150
  "min-width": "180"
151
151
  }),
152
- n(a, {
152
+ l(a, {
153
153
  prop: "userName",
154
154
  label: "收报人",
155
155
  width: "120",
156
156
  align: "center"
157
157
  }),
158
- n(a, {
158
+ l(a, {
159
159
  prop: "mobilePhone",
160
160
  label: "联系电话",
161
161
  width: "150",
162
162
  align: "center"
163
163
  }),
164
- n(a, {
164
+ l(a, {
165
165
  prop: "detailInfo",
166
166
  label: "收报地址",
167
167
  "min-width": "250"
@@ -171,13 +171,13 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
171
171
  ]),
172
172
  _: 1
173
173
  }),
174
- n(a, {
174
+ l(a, {
175
175
  label: "订阅份数",
176
176
  width: "100",
177
177
  align: "center"
178
178
  }, {
179
179
  default: i(({ row: s }) => [
180
- n(_, {
180
+ l(_, {
181
181
  modelValue: s.goodsNum,
182
182
  "onUpdate:modelValue": (w) => s.goodsNum = w,
183
183
  modelModifiers: { number: !0 },
@@ -193,11 +193,11 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
193
193
  _: 1
194
194
  }, 8, ["data"])
195
195
  ]),
196
- o("div", me, [
197
- n(l, {
196
+ o("div", ce, [
197
+ l(n, {
198
198
  type: "danger",
199
199
  class: "confirm-button",
200
- onClick: e[2] || (e[2] = (s) => R())
200
+ onClick: e[2] || (e[2] = (s) => j())
201
201
  }, {
202
202
  default: i(() => e[10] || (e[10] = [
203
203
  g("确定")
@@ -208,26 +208,27 @@ const Z = { class: "app-container" }, ee = { class: "search-container" }, te = {
208
208
  ])
209
209
  ])
210
210
  ]),
211
- r.value.visible ? (k(), E(X, {
211
+ r.value.visible ? (h(), q(Z, {
212
212
  key: 0,
213
213
  modelValue: r.value.visible,
214
214
  "onUpdate:modelValue": e[3] || (e[3] = (s) => r.value.visible = s),
215
215
  title: r.value.title,
216
- onRefresh: j,
217
- width: "500px"
216
+ onRefresh: H,
217
+ width: "500px",
218
+ "close-on-click-modal": !1
218
219
  }, null, 8, ["modelValue", "title"])) : U("", !0),
219
- u.value ? (k(), E(S, {
220
+ u.value ? (h(), q(z, {
220
221
  key: 1,
221
222
  "upload-visible": u.value,
222
223
  "template-title": t.$t("sysUser.templateDownload"),
223
224
  onTemplateDown: e[4] || (e[4] = (s) => $(A).downloadTemplate($(c)("newsPapepr.names"))),
224
- onImportEvents: Q,
225
- onUploadClosed: O
225
+ onImportEvents: S,
226
+ onUploadClosed: Q
226
227
  }, null, 8, ["upload-visible", "template-title"])) : U("", !0)
227
228
  ]);
228
229
  };
229
230
  }
230
- }), ke = /* @__PURE__ */ Y(pe, [["__scopeId", "data-v-fffbc646"]]);
231
+ }), Ce = /* @__PURE__ */ ee(ve, [["__scopeId", "data-v-493b298b"]]);
231
232
  export {
232
- ke as default
233
+ Ce as default
233
234
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as we, ref as _, reactive as h, onMounted as Ke, resolveComponent as m, createElementBlock as Le, openBlock as k, createVNode as r, createBlock as B, createCommentVNode as D, withCtx as c, createElementVNode as t, unref as O, toDisplayString as a, createTextVNode as fe } from "vue";
1
+ import { defineComponent as we, ref as _, reactive as h, onMounted as Ke, resolveComponent as c, createElementBlock as Le, openBlock as k, createVNode as r, createBlock as B, createCommentVNode as D, withCtx as m, createElementVNode as t, unref as O, toDisplayString as a, createTextVNode as fe } from "vue";
2
2
  import { useI18n as Ae } from "vue-i18n";
3
3
  import { D as ve } from "./index-BGqp7CRm.mjs";
4
4
  import { o as be } from "./index-BKZPqxLM.mjs";
5
5
  import { fileApi as ye } from "jmash-core";
6
6
  import { useRoute as $e, useRouter as Ue } from "vue-router";
7
7
  import { goodsSpuApi as Me } from "xyvcard-paper-goods";
8
- import qe from "./onlineBanking-DfzIYOBF.mjs";
8
+ import qe from "./onlineBanking-BjnT3Pli.mjs";
9
9
  import Se from "./prompt-DQX4apPU.mjs";
10
- import Te from "./confirm-BIHrk7gs.mjs";
10
+ import Te from "./confirm-BYEYokBP.mjs";
11
11
  import { o as Ie } from "./index-B90ZLkZ9.mjs";
12
12
  import { E as _e } from "./el-message-VSzNakoG.mjs";
13
13
  import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
14
- const xe = { class: "app-container" }, ze = { class: "subscription-container" }, Re = { class: "newspaper-image" }, Fe = { class: "shanxi-worker-paper" }, We = { class: "subscription-info" }, Ye = { class: "magazine-title" }, Ge = { class: "info-item" }, He = { class: "info-label" }, Je = { class: "info-item" }, Qe = { class: "info-label" }, Xe = { class: "price" }, Ze = { class: "price-value" }, eo = { class: "orderAddresmargin" }, oo = { class: "subscription-container" }, to = { class: "order-container" }, so = { class: "order-info" }, no = { class: "status" }, lo = { class: "order-detail" }, ro = { class: "value" }, io = { class: "order-detail" }, ao = { class: "value" }, po = { class: "payment-section" }, mo = { class: "amount" }, co = { class: "pay-methods" }, uo = /* @__PURE__ */ we({
14
+ const xe = { class: "app-container" }, ze = { class: "subscription-container" }, Re = { class: "newspaper-image" }, Fe = { class: "shanxi-worker-paper" }, We = { class: "subscription-info" }, Ye = { class: "magazine-title" }, Ge = { class: "info-item" }, He = { class: "info-label" }, Je = { class: "info-item" }, Qe = { class: "info-label" }, Xe = { class: "price" }, Ze = { class: "price-value" }, eo = { class: "orderAddresmargin" }, oo = { class: "subscription-container" }, to = { class: "order-container" }, so = { class: "order-info" }, no = { class: "status" }, lo = { class: "order-detail" }, ro = { class: "value" }, io = { class: "order-detail" }, ao = { class: "value" }, po = { class: "payment-section" }, co = { class: "amount" }, mo = { class: "pay-methods" }, uo = /* @__PURE__ */ we({
15
15
  __name: "orderInfo",
16
16
  setup(fo) {
17
17
  const u = $e(), he = Ue(), { t: P } = Ae(), n = _([]), w = _([]), K = _([]), s = h({
@@ -125,11 +125,11 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
125
125
  L(), A(), U();
126
126
  }
127
127
  return (o, e) => {
128
- const d = m("el-image"), i = m("el-table-column"), y = m("jmash-mobileIns-component"), I = m("el-table"), V = m("SuccessFilled"), De = m("el-icon"), Oe = m("el-card");
128
+ const d = c("el-image"), i = c("el-table-column"), y = c("jmash-mobileIns-component"), I = c("el-table"), V = c("SuccessFilled"), De = c("el-icon"), Oe = c("el-card");
129
129
  return k(), Le("div", xe, [
130
130
  r(Oe, { shadow: "never" }, {
131
- footer: c(() => [
132
- t("div", co, [
131
+ footer: m(() => [
132
+ t("div", mo, [
133
133
  t("button", {
134
134
  class: "pay-btn",
135
135
  onClick: e[0] || (e[0] = (l) => Ce())
@@ -140,8 +140,8 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
140
140
  }, "扫码支付")
141
141
  ])
142
142
  ]),
143
- default: c(() => {
144
- var l, q, S, T, j, x, z, R, F, W, Y, G, H, J, Q, X, Z, ee, oe, te, se, ne, le, re, ie, ae, de, pe, me, ce, ue;
143
+ default: m(() => {
144
+ var l, q, S, T, j, x, z, R, F, W, Y, G, H, J, Q, X, Z, ee, oe, te, se, ne, le, re, ie, ae, de, pe, ce, me, ue;
145
145
  return [
146
146
  e[13] || (e[13] = t("div", { class: "title-content" }, "订单详情", -1)),
147
147
  t("div", ze, [
@@ -187,7 +187,7 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
187
187
  data: w.value,
188
188
  border: ""
189
189
  }, {
190
- default: c(() => [
190
+ default: m(() => [
191
191
  r(i, {
192
192
  prop: "note",
193
193
  label: o.$t("orderInfo.unitNames"),
@@ -202,7 +202,7 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
202
202
  label: o.$t("orderInfo.mobilePhone"),
203
203
  width: "170"
204
204
  }, {
205
- default: c(({ row: p }) => [
205
+ default: m(({ row: p }) => [
206
206
  r(y, {
207
207
  mobileEncrypt: p.mobileEncrypt,
208
208
  mobilePhoneIns: p.mobilePhoneIns,
@@ -216,7 +216,7 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
216
216
  prop: "detailInfo",
217
217
  label: o.$t("orderInfo.address")
218
218
  }, {
219
- default: c(({ row: p }) => [
219
+ default: m(({ row: p }) => [
220
220
  fe(a(p.cityName) + a(p.detailInfo), 1)
221
221
  ]),
222
222
  _: 1
@@ -238,7 +238,7 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
238
238
  color: "#42b983",
239
239
  class: "status-icon"
240
240
  }, {
241
- default: c(() => [
241
+ default: m(() => [
242
242
  r(V)
243
243
  ]),
244
244
  _: 1
@@ -256,7 +256,7 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
256
256
  ]),
257
257
  t("div", po, [
258
258
  e[12] || (e[12] = t("div", { class: "label" }, "支付金额", -1)),
259
- t("div", mo, " ¥" + a((ue = (ce = (me = (pe = (de = n.value) == null ? void 0 : de[0]) == null ? void 0 : pe.orderItemList) == null ? void 0 : me.results) == null ? void 0 : ce[0]) == null ? void 0 : ue.paymentPrice), 1)
259
+ t("div", co, " ¥" + a((ue = (me = (ce = (pe = (de = n.value) == null ? void 0 : de[0]) == null ? void 0 : pe.orderItemList) == null ? void 0 : ce.results) == null ? void 0 : me[0]) == null ? void 0 : ue.paymentPrice), 1)
260
260
  ])
261
261
  ])
262
262
  ])
@@ -274,7 +274,8 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
274
274
  onRefresh: M,
275
275
  onClose: e[3] || (e[3] = (l) => N("bank")),
276
276
  width: "550px",
277
- onOpenPrompt: Ee
277
+ onOpenPrompt: Ee,
278
+ "close-on-click-modal": !1
278
279
  }, null, 8, ["modelValue", "title", "bank-Key"])) : D("", !0),
279
280
  s.prompt.visible ? (k(), B(Se, {
280
281
  key: 1,
@@ -286,7 +287,8 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
286
287
  onClose: e[5] || (e[5] = (l) => N("prompt")),
287
288
  onOpenConfirm: Ne,
288
289
  onBack: Ve,
289
- width: "550px"
290
+ width: "550px",
291
+ "close-on-click-modal": !1
290
292
  }, null, 8, ["modelValue", "title", "prompt-Key"])) : D("", !0),
291
293
  s.confirm.visible ? (k(), B(Te, {
292
294
  key: 2,
@@ -295,12 +297,13 @@ const xe = { class: "app-container" }, ze = { class: "subscription-container" },
295
297
  title: s.confirm.title,
296
298
  "confirm-Key": E,
297
299
  onClose: e[7] || (e[7] = (l) => N("confirm")),
298
- width: "550px"
300
+ width: "550px",
301
+ "close-on-click-modal": !1
299
302
  }, null, 8, ["modelValue", "title", "confirm-Key"])) : D("", !0)
300
303
  ]);
301
304
  };
302
305
  }
303
- }), Do = /* @__PURE__ */ je(uo, [["__scopeId", "data-v-61c21712"]]);
306
+ }), Do = /* @__PURE__ */ je(uo, [["__scopeId", "data-v-173f91ce"]]);
304
307
  export {
305
308
  Do as default
306
309
  };
@@ -0,0 +1,148 @@
1
+ import { defineComponent as E, ref as c, computed as g, reactive as C, resolveComponent as B, createElementBlock as L, openBlock as A, createElementVNode as t, createVNode as M, unref as I, toDisplayString as l, withDirectives as V, vModelText as $ } from "vue";
2
+ import { useRouter as z, useRoute as F } from "vue-router";
3
+ import { o as p } from "./index-B90ZLkZ9.mjs";
4
+ import { useUserStore as O, fileApi as h } from "jmash-core";
5
+ import { E as y } from "./el-message-VSzNakoG.mjs";
6
+ import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
+ const J = { class: "app-container" }, T = { class: "search-container" }, W = { class: "newspaper-info" }, j = { class: "newspaper-preview" }, G = { class: "subscription-form" }, H = { style: { "font-weight": "bold" } }, K = { class: "form-group" }, Q = { class: "form-value order-day" }, X = { class: "form-group" }, Y = { class: "price-info" }, Z = { class: "price" }, ee = { class: "form-group" }, te = { class: "quantity-selector" }, se = { class: "total-price" }, oe = { class: "price" }, re = /* @__PURE__ */ E({
8
+ __name: "orderPaper",
9
+ setup(ae) {
10
+ const s = c({
11
+ picUrls: ""
12
+ }), k = z(), v = F(), m = localStorage.getItem("unionUserInfo"), b = (m ? JSON.parse(m) : {}).orgId;
13
+ p.findById({ spuId: v.query.spuId }).then((o) => {
14
+ s.value = o.data;
15
+ });
16
+ const w = g(() => s.value.goodsStartDate && s.value.goodsEndDate ? `${s.value.goodsStartDate}至${s.value.goodsEndDate}` : ""), r = c(1), U = () => {
17
+ r.value > 1 && r.value--;
18
+ }, N = () => {
19
+ r.value++;
20
+ }, u = g(() => {
21
+ var i, a, n;
22
+ const o = ((n = (a = (i = s.value.skuList) == null ? void 0 : i.results) == null ? void 0 : a[0]) == null ? void 0 : n.salePrice) || 0, e = r.value * o;
23
+ return parseFloat(e.toFixed(2));
24
+ }), P = (o) => {
25
+ const e = parseInt(o.target.value);
26
+ isNaN(e) || e < 1 ? r.value = 1 : r.value = e;
27
+ }, f = c(""), D = O().user.tenant;
28
+ function q() {
29
+ p.findUnionName({ tenant: D }).then((o) => {
30
+ f.value = o.data.orgName;
31
+ });
32
+ }
33
+ q();
34
+ const x = C({
35
+ requestId: Math.random() * 10 + ""
36
+ });
37
+ function S() {
38
+ var i, a, n, _;
39
+ const o = (a = (i = s.value.skuList) == null ? void 0 : i.results) == null ? void 0 : a[0], e = (_ = (n = s.value.skuList) == null ? void 0 : n.results) == null ? void 0 : _[0];
40
+ if (v.query.tenant, !o || !e) {
41
+ y({
42
+ message: "商品信息不完整",
43
+ type: "error"
44
+ });
45
+ return;
46
+ }
47
+ p.create({
48
+ ...x,
49
+ shopId: s.value.shopId,
50
+ spuId: s.value.spuId,
51
+ shopBrancheId: b,
52
+ salesPrice: u.value,
53
+ orderPrice: u.value,
54
+ deliveryWay: "self_pickup",
55
+ remark: w.value,
56
+ unitName: f.value,
57
+ orderItems: [
58
+ {
59
+ skuId: e.skuId,
60
+ quantity: r.value
61
+ }
62
+ ]
63
+ }).then((d) => {
64
+ d.status === 200 && (y({
65
+ message: "提交成功",
66
+ type: "success"
67
+ }), k.push({
68
+ path: "/buyer/order-newspaper/orderAddress",
69
+ query: {
70
+ orderPrice: u.value,
71
+ orderId: d.data.orderId
72
+ }
73
+ }));
74
+ }).catch((d) => {
75
+ });
76
+ }
77
+ return (o, e) => {
78
+ var a;
79
+ const i = B("el-image");
80
+ return A(), L("div", J, [
81
+ t("div", T, [
82
+ t("div", W, [
83
+ t("div", j, [
84
+ M(i, {
85
+ src: I(h).imageUrl(s.value.picUrls, 0, 0),
86
+ "preview-src-list": [I(h).imageUrl(s.value.picUrls)],
87
+ "preview-teleported": "",
88
+ "hide-on-click-modal": "",
89
+ fit: "contain"
90
+ }, null, 8, ["src", "preview-src-list"])
91
+ ]),
92
+ t("div", G, [
93
+ t("div", H, l(s.value.spuName), 1),
94
+ t("div", K, [
95
+ e[2] || (e[2] = t("label", { class: "order-label" }, "订阅周期", -1)),
96
+ t("div", Q, l(s.value.goodsStartDate) + "至" + l(s.value.goodsEndDate), 1)
97
+ ]),
98
+ t("div", X, [
99
+ e[4] || (e[4] = t("label", { style: { "font-weight": "600", color: "#000", "font-size": "13px" } }, "价格信息", -1)),
100
+ t("div", Y, [
101
+ e[3] || (e[3] = t("span", { class: "form-value" }, "单价:", -1)),
102
+ t("div", Z, " ¥" + l((a = s.value.skuList) == null ? void 0 : a.results[0].salePrice), 1)
103
+ ])
104
+ ]),
105
+ t("div", ee, [
106
+ t("div", te, [
107
+ e[5] || (e[5] = t("label", { class: "form-value" }, "订阅份数:", -1)),
108
+ t("button", {
109
+ class: "btn-minus",
110
+ onClick: U
111
+ }, "-"),
112
+ V(t("input", {
113
+ type: "text",
114
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => r.value = n),
115
+ class: "quantity-input",
116
+ onInput: P
117
+ }, null, 544), [
118
+ [
119
+ $,
120
+ r.value,
121
+ void 0,
122
+ { number: !0 }
123
+ ]
124
+ ]),
125
+ t("button", {
126
+ class: "btn-plus",
127
+ onClick: N
128
+ }, "+")
129
+ ])
130
+ ]),
131
+ t("div", se, [
132
+ e[6] || (e[6] = t("span", { style: { "font-weight": "600", color: "#000", "font-size": "13px" } }, "总价", -1)),
133
+ t("div", oe, "¥" + l(u.value), 1)
134
+ ])
135
+ ])
136
+ ]),
137
+ t("button", {
138
+ class: "order-btn",
139
+ onClick: e[1] || (e[1] = (n) => S())
140
+ }, "立即订阅")
141
+ ])
142
+ ]);
143
+ };
144
+ }
145
+ }), ve = /* @__PURE__ */ R(re, [["__scopeId", "data-v-3ad371c0"]]);
146
+ export {
147
+ ve as default
148
+ };
@@ -3,7 +3,7 @@ import { useRoute as A } from "vue-router";
3
3
  import { useI18n as O } from "vue-i18n";
4
4
  import { ElMessage as T } from "element-plus";
5
5
  import { useUserStore as z, validateEmail as G } from "jmash-core";
6
- import { l as H } from "./index-TclOpCe_.mjs";
6
+ import { l as H } from "./index-DspCttgG.mjs";
7
7
  import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
8
  const L = { class: "dialog-footer" }, P = /* @__PURE__ */ U({
9
9
  __name: "sendDialog",