xyvcard-paper-buyer 0.0.40 → 0.0.42
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/README.md +51 -51
- package/dist/{applyEdit-B0CKdbR2.mjs → applyEdit-PZxjIdlm.mjs} +6 -5
- package/dist/{confirm-HoPA9uSr.mjs → confirm-BYEYokBP.mjs} +24 -26
- package/dist/{edit-CgLvvQy2.mjs → edit--iYDGPN6.mjs} +9 -9
- package/dist/edit-DxbJEXn-.mjs +260 -0
- package/dist/{index-DyTbbNUO.mjs → index-BKZPqxLM.mjs} +518 -500
- package/dist/{index-CX-7x1SL.mjs → index-BRBqB4uC.mjs} +44 -37
- package/dist/{index-BqwYBqQF.mjs → index-BWV5njqv.mjs} +1 -1
- package/dist/{index-BGqp7CRm.mjs → index-CUfcoWMj.mjs} +1 -2
- package/dist/{index-C8vnqMMv.mjs → index-C_O5LkoO.mjs} +3 -2
- package/dist/index.mjs +6 -10
- package/dist/{info-BhjWwF6z.mjs → info-yQ5o6UTa.mjs} +15 -15
- package/dist/{invoice-DppfMFDj.mjs → invoice-Ca967WuM.mjs} +2 -2
- package/dist/{invoiceEdit-BKEb7oNj.mjs → invoiceEdit-BPyK5oBD.mjs} +31 -30
- package/dist/{invoiceView-41EDyu0B.mjs → invoiceView-BQ20QFpo.mjs} +4 -3
- package/dist/{list-DNIbCic-.mjs → list-CeY2OdrK.mjs} +28 -25
- package/dist/{onlineBanking-BIjxFuQ5.mjs → onlineBanking-CdDAY0YQ.mjs} +47 -44
- package/dist/{orderAddress-BHmLnG9Z.mjs → orderAddress-BXu0z9LD.mjs} +80 -79
- package/dist/{orderInfo-CiPVCQxz.mjs → orderInfo-CxDN2Vgs.mjs} +24 -21
- package/dist/orderPaper-DAXED5UU.mjs +148 -0
- package/dist/{payment-B8q1Mpiy.mjs → payment-DD_Lhvf0.mjs} +7 -7
- package/dist/{prompt-CF5J3V95.mjs → prompt-DQX4apPU.mjs} +1 -1
- package/dist/{sendDialog-D50t3cjw.mjs → sendDialog-B0HE_2cs.mjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{userInvoice-DhoqnQE4.mjs → userInvoice-ByXwccaa.mjs} +1 -1
- package/dist/{userInvoice.vue_vue_type_script_setup_true_lang-DV5JSa_i.mjs → userInvoice.vue_vue_type_script_setup_true_lang-BaWmhSHl.mjs} +1 -1
- package/dts/api/buyer/lqfp-fp/types.d.ts +1 -0
- package/dts/api/buyer/order-newspaper/types.d.ts +1 -1
- package/dts/api/buyer/order-user-address/types.d.ts +1 -0
- package/dts/utils/momentPlugin.d.ts +5 -0
- package/dts/views/buyer/order-newspaper/payment copy.vue.d.ts +2 -0
- package/package.json +62 -62
- package/dist/edit-D2_W7oIL.mjs +0 -227
- package/dist/orderPaper-DLv8c7Hi.mjs +0 -153
package/README.md
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# pnpm publish --no-git-checks
|
|
2
|
-
npm config set registry https://registry.npmjs.org/
|
|
3
|
-
|
|
4
|
-
# pnpm install
|
|
5
|
-
npm config set registry https://registry.npmmirror.com/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
This template should help get you started developing with Vue 3 in Vite.
|
|
9
|
-
|
|
10
|
-
## Recommended IDE Setup
|
|
11
|
-
|
|
12
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
13
|
-
|
|
14
|
-
## Type Support for `.vue` Imports in TS
|
|
15
|
-
|
|
16
|
-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
17
|
-
|
|
18
|
-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
19
|
-
|
|
20
|
-
1. Disable the built-in TypeScript Extension
|
|
21
|
-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
22
|
-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
23
|
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
24
|
-
|
|
25
|
-
## Customize configuration
|
|
26
|
-
|
|
27
|
-
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
28
|
-
|
|
29
|
-
## Project Setup
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
pnpm install
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Compile and Hot-Reload for Development
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
pnpm dev
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Type-Check, Compile and Minify for Production
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
pnpm build
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Lint with [ESLint](https://eslint.org/)
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
pnpm lint
|
|
51
|
-
```
|
|
1
|
+
# pnpm publish --no-git-checks
|
|
2
|
+
npm config set registry https://registry.npmjs.org/
|
|
3
|
+
|
|
4
|
+
# pnpm install
|
|
5
|
+
npm config set registry https://registry.npmmirror.com/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
9
|
+
|
|
10
|
+
## Recommended IDE Setup
|
|
11
|
+
|
|
12
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
13
|
+
|
|
14
|
+
## Type Support for `.vue` Imports in TS
|
|
15
|
+
|
|
16
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
17
|
+
|
|
18
|
+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
19
|
+
|
|
20
|
+
1. Disable the built-in TypeScript Extension
|
|
21
|
+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
22
|
+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
23
|
+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
24
|
+
|
|
25
|
+
## Customize configuration
|
|
26
|
+
|
|
27
|
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
28
|
+
|
|
29
|
+
## Project Setup
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
pnpm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Compile and Hot-Reload for Development
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pnpm dev
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Type-Check, Compile and Minify for Production
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
pnpm build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pnpm lint
|
|
51
|
+
```
|
|
@@ -3,9 +3,9 @@ import { useI18n as O } from "vue-i18n";
|
|
|
3
3
|
import "element-plus";
|
|
4
4
|
import { routerUtil as D } from "jmash-core";
|
|
5
5
|
import { useRouter as Q, useRoute as W } from "vue-router";
|
|
6
|
-
import { D as U } from "./index-
|
|
7
|
-
import { _ as X, u as Y } from "./userInvoice.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { o as Z } from "./index-
|
|
6
|
+
import { D as U } from "./index-CUfcoWMj.mjs";
|
|
7
|
+
import { _ as X, u as Y } from "./userInvoice.vue_vue_type_script_setup_true_lang-BaWmhSHl.mjs";
|
|
8
|
+
import { o as Z } from "./index-BKZPqxLM.mjs";
|
|
9
9
|
import { E as x } from "./el-message-VSzNakoG.mjs";
|
|
10
10
|
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
11
11
|
const le = { class: "app-container" }, oe = { class: "search-container" }, te = { class: "form-footer" }, ae = /* @__PURE__ */ J({
|
|
@@ -245,12 +245,13 @@ const le = { class: "app-container" }, oe = { class: "search-container" }, te =
|
|
|
245
245
|
"onUpdate:modelValue": l[5] || (l[5] = (o) => p.value.visible = o),
|
|
246
246
|
title: p.value.title,
|
|
247
247
|
onRefresh: B,
|
|
248
|
-
width: "900px"
|
|
248
|
+
width: "900px",
|
|
249
|
+
"close-on-click-modal": !1
|
|
249
250
|
}, null, 8, ["modelValue", "title"])) : K("", !0)
|
|
250
251
|
]);
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
|
-
}), be = /* @__PURE__ */ ee(ae, [["__scopeId", "data-v-
|
|
254
|
+
}), be = /* @__PURE__ */ ee(ae, [["__scopeId", "data-v-9797cd8c"]]);
|
|
254
255
|
export {
|
|
255
256
|
be as default
|
|
256
257
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Y, mergeModels as h, useModel as U, ref as E, reactive as y, resolveComponent as n, createBlock as H, openBlock as B, withCtx as o, createVNode as e, unref as
|
|
1
|
+
import { defineComponent as Y, mergeModels as h, useModel as U, ref as E, reactive as y, resolveComponent as n, createBlock as H, openBlock as B, withCtx as o, createVNode as e, unref as r, createElementVNode as F, createTextVNode as V, toDisplayString as g } from "vue";
|
|
2
2
|
import { useI18n as K } from "vue-i18n";
|
|
3
3
|
import { useRouter as j, useRoute as O } from "vue-router";
|
|
4
4
|
import { ElMessage as k } from "element-plus";
|
|
@@ -26,10 +26,8 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
26
26
|
}),
|
|
27
27
|
emits: /* @__PURE__ */ h(["close"], ["update:modelValue"]),
|
|
28
28
|
setup(i, { emit: v }) {
|
|
29
|
-
const _ = i, u = U(i, "modelValue"), R = v, { t: c } = K(), P = j(), D = O(), w = E(),
|
|
30
|
-
requestId: Math.random() * 10 + ""
|
|
31
|
-
opponentAccountNo: "",
|
|
32
|
-
bankSerialNo: ""
|
|
29
|
+
const _ = i, u = U(i, "modelValue"), R = v, { t: c } = K(), P = j(), D = O(), w = E(), a = y({
|
|
30
|
+
requestId: Math.random() * 10 + ""
|
|
33
31
|
}), q = y({
|
|
34
32
|
opponentAccountNo: [
|
|
35
33
|
{
|
|
@@ -51,7 +49,7 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
51
49
|
if (t)
|
|
52
50
|
try {
|
|
53
51
|
(await z.completedTransfer({
|
|
54
|
-
...
|
|
52
|
+
...a,
|
|
55
53
|
shopPayInfoId: _.confirmKey.shopPayInfoId,
|
|
56
54
|
orderCode: _.confirmKey.orderCode
|
|
57
55
|
})).data === "success" && (k.success(c("common.submitSuccess")), f(), P.push({
|
|
@@ -67,8 +65,8 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
67
65
|
R("close"), u.value = !1;
|
|
68
66
|
}
|
|
69
67
|
return (l, t) => {
|
|
70
|
-
const p = n("el-input"), s = n("el-form-item"), m = n("el-col"),
|
|
71
|
-
return B(), H(
|
|
68
|
+
const p = n("el-input"), s = n("el-form-item"), m = n("el-col"), C = n("el-date-picker"), I = n("el-divider"), M = n("el-image"), S = n("el-row"), T = n("el-form"), b = n("el-button"), A = n("el-dialog");
|
|
69
|
+
return B(), H(A, {
|
|
72
70
|
modelValue: u.value,
|
|
73
71
|
"onUpdate:modelValue": t[4] || (t[4] = (d) => u.value = d),
|
|
74
72
|
title: i.title,
|
|
@@ -96,16 +94,16 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
96
94
|
])
|
|
97
95
|
]),
|
|
98
96
|
default: o(() => [
|
|
99
|
-
e(
|
|
97
|
+
e(T, {
|
|
100
98
|
ref_key: "confirmFormRef",
|
|
101
99
|
ref: w,
|
|
102
|
-
model: a
|
|
100
|
+
model: r(a),
|
|
103
101
|
"label-width": "120px",
|
|
104
|
-
rules:
|
|
102
|
+
rules: r(q),
|
|
105
103
|
style: { "margin-top": "20px" }
|
|
106
104
|
}, {
|
|
107
105
|
default: o(() => [
|
|
108
|
-
e(
|
|
106
|
+
e(S, { gutter: 20 }, {
|
|
109
107
|
default: o(() => [
|
|
110
108
|
e(m, { span: 20 }, {
|
|
111
109
|
default: o(() => [
|
|
@@ -115,8 +113,8 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
115
113
|
}, {
|
|
116
114
|
default: o(() => [
|
|
117
115
|
e(p, {
|
|
118
|
-
modelValue: a
|
|
119
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) => a
|
|
116
|
+
modelValue: r(a).opponentAccountNo,
|
|
117
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => r(a).opponentAccountNo = d),
|
|
120
118
|
placeholder: l.$t("newsPapepr.opponentAccountNoRequired"),
|
|
121
119
|
"show-word-limit": "",
|
|
122
120
|
clearable: ""
|
|
@@ -134,9 +132,9 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
134
132
|
prop: "tradeDateTime"
|
|
135
133
|
}, {
|
|
136
134
|
default: o(() => [
|
|
137
|
-
e(
|
|
138
|
-
modelValue: a
|
|
139
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) => a
|
|
135
|
+
e(C, {
|
|
136
|
+
modelValue: r(a).tradeDateTime,
|
|
137
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => r(a).tradeDateTime = d),
|
|
140
138
|
type: "datetime",
|
|
141
139
|
placeholder: l.$t("newsPapepr.tradeDateTimeRequired"),
|
|
142
140
|
format: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -157,8 +155,8 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
157
155
|
}, {
|
|
158
156
|
default: o(() => [
|
|
159
157
|
e(p, {
|
|
160
|
-
modelValue: a
|
|
161
|
-
"onUpdate:modelValue": t[2] || (t[2] = (d) => a
|
|
158
|
+
modelValue: r(a).bankSerialNo,
|
|
159
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => r(a).bankSerialNo = d),
|
|
162
160
|
placeholder: l.$t("newsPapepr.bankSerialNoRequired"),
|
|
163
161
|
"show-word-limit": "",
|
|
164
162
|
clearable: ""
|
|
@@ -177,8 +175,8 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
177
175
|
}, {
|
|
178
176
|
default: o(() => [
|
|
179
177
|
e(p, {
|
|
180
|
-
modelValue: a
|
|
181
|
-
"onUpdate:modelValue": t[3] || (t[3] = (d) => a
|
|
178
|
+
modelValue: r(a).handleRemark,
|
|
179
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => r(a).handleRemark = d),
|
|
182
180
|
placeholder: l.$t("newsPapepr.handleRemarkRequired"),
|
|
183
181
|
"show-word-limit": "",
|
|
184
182
|
clearable: ""
|
|
@@ -189,16 +187,16 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
189
187
|
]),
|
|
190
188
|
_: 1
|
|
191
189
|
}),
|
|
192
|
-
e(
|
|
190
|
+
e(I),
|
|
193
191
|
e(m, { span: 24 }, {
|
|
194
192
|
default: o(() => [
|
|
195
193
|
e(s, {
|
|
196
194
|
label: l.$t("newsPapepr.image")
|
|
197
195
|
}, {
|
|
198
196
|
default: o(() => [
|
|
199
|
-
e(
|
|
200
|
-
src:
|
|
201
|
-
"preview-src-list": [
|
|
197
|
+
e(M, {
|
|
198
|
+
src: r(N),
|
|
199
|
+
"preview-src-list": [r(N)],
|
|
202
200
|
"preview-teleported": "",
|
|
203
201
|
"hide-on-click-modal": "",
|
|
204
202
|
fit: "contain",
|
|
@@ -221,7 +219,7 @@ const J = { class: "footer" }, L = /* @__PURE__ */ Y({
|
|
|
221
219
|
}, 8, ["modelValue", "title", "width"]);
|
|
222
220
|
};
|
|
223
221
|
}
|
|
224
|
-
}), le = /* @__PURE__ */ G(L, [["__scopeId", "data-v-
|
|
222
|
+
}), le = /* @__PURE__ */ G(L, [["__scopeId", "data-v-df1b6dc1"]]);
|
|
225
223
|
export {
|
|
226
224
|
le as default
|
|
227
225
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, mergeModels as y, ref as
|
|
1
|
+
import { defineComponent as S, mergeModels as y, ref as f, reactive as A, useModel as T, resolveComponent as m, createBlock as D, openBlock as J, withCtx as a, createVNode as l, unref as d, createElementVNode as z, createTextVNode as q, toDisplayString as R } from "vue";
|
|
2
2
|
import { ElMessage as w } from "element-plus";
|
|
3
3
|
import { JmashRegionTree as C, dictRegionApi as G } from "jmash-region";
|
|
4
4
|
import { useI18n as H } from "vue-i18n";
|
|
@@ -18,7 +18,7 @@ const Q = { class: "dialog-footer" }, W = /* @__PURE__ */ S({
|
|
|
18
18
|
}),
|
|
19
19
|
emits: /* @__PURE__ */ y(["refresh"], ["update:modelValue"]),
|
|
20
20
|
setup(b, { emit: I }) {
|
|
21
|
-
const { t: u } = H(), g =
|
|
21
|
+
const { t: u } = H(), g = f();
|
|
22
22
|
let t = A({
|
|
23
23
|
requestId: Math.random() * 10 + "",
|
|
24
24
|
updateMask: "note,userName,mobilePhone,provinceName,detailInfo"
|
|
@@ -61,7 +61,7 @@ const Q = { class: "dialog-footer" }, W = /* @__PURE__ */ S({
|
|
|
61
61
|
trigger: "change"
|
|
62
62
|
}
|
|
63
63
|
]
|
|
64
|
-
}), i = T(b, "modelValue"), v = b, N = I, M = Object.keys(v.entityKey), _ =
|
|
64
|
+
}), i = T(b, "modelValue"), v = b, N = I, M = Object.keys(v.entityKey), _ = f(M.length >= 1);
|
|
65
65
|
_.value && h.findById(v.entityKey).then(({ data: e }) => {
|
|
66
66
|
Object.assign(t, e);
|
|
67
67
|
});
|
|
@@ -70,23 +70,23 @@ const Q = { class: "dialog-footer" }, W = /* @__PURE__ */ S({
|
|
|
70
70
|
t.cityName = e;
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const c = f(/* @__PURE__ */ new Map());
|
|
74
74
|
async function B(e) {
|
|
75
75
|
if (!e)
|
|
76
76
|
return "";
|
|
77
|
-
if (
|
|
78
|
-
return
|
|
77
|
+
if (c.value.has(e))
|
|
78
|
+
return c.value.get(e) || e;
|
|
79
79
|
try {
|
|
80
80
|
const r = await G.findByCode({
|
|
81
81
|
regionCode: e
|
|
82
82
|
});
|
|
83
83
|
if (r.data) {
|
|
84
84
|
const o = F(r.data);
|
|
85
|
-
return
|
|
85
|
+
return c.value.set(e, o), o;
|
|
86
86
|
}
|
|
87
87
|
return e;
|
|
88
88
|
} catch {
|
|
89
|
-
return
|
|
89
|
+
return c.value.set(e, e), e;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
function F(e) {
|
|
@@ -262,7 +262,7 @@ const Q = { class: "dialog-footer" }, W = /* @__PURE__ */ S({
|
|
|
262
262
|
}, 8, ["modelValue"]);
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
|
-
}), oe = /* @__PURE__ */ L(W, [["__scopeId", "data-v-
|
|
265
|
+
}), oe = /* @__PURE__ */ L(W, [["__scopeId", "data-v-42b751e7"]]);
|
|
266
266
|
export {
|
|
267
267
|
oe as default
|
|
268
268
|
};
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { defineComponent as B, mergeModels as b, ref as _, reactive as N, useModel as E, resolveComponent as i, createBlock as T, openBlock as j, withCtx as t, createVNode as o, unref as s, createElementVNode as D, createTextVNode as v, toDisplayString as V } from "vue";
|
|
2
|
+
import { ElMessage as S } from "element-plus";
|
|
3
|
+
import { JmashRegionTree as J, dictRegionApi as K } from "jmash-region";
|
|
4
|
+
import { useI18n as O } from "vue-i18n";
|
|
5
|
+
import { o as z } from "./index-BP8zUjOw.mjs";
|
|
6
|
+
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
|
+
const G = { class: "dialog-footer" }, H = /* @__PURE__ */ B({
|
|
8
|
+
__name: "edit",
|
|
9
|
+
props: /* @__PURE__ */ b({
|
|
10
|
+
entityKey: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}, {
|
|
16
|
+
modelValue: { type: Boolean },
|
|
17
|
+
modelModifiers: {}
|
|
18
|
+
}),
|
|
19
|
+
emits: /* @__PURE__ */ b(["refresh"], ["update:modelValue"]),
|
|
20
|
+
setup(U, { emit: A }) {
|
|
21
|
+
const { t: u } = O(), f = _();
|
|
22
|
+
let a = N({
|
|
23
|
+
requestId: Math.random() * 10 + "",
|
|
24
|
+
updateMask: ""
|
|
25
|
+
});
|
|
26
|
+
const q = (e, r, l) => {
|
|
27
|
+
r && !/^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/.test(r) ? l(new Error(u("orderUserAddress.mobilePhoneTrueRequired"))) : l();
|
|
28
|
+
}, R = N({
|
|
29
|
+
note: [
|
|
30
|
+
{
|
|
31
|
+
required: !0,
|
|
32
|
+
message: u("orderUserAddress.noteRequired"),
|
|
33
|
+
trigger: "change"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
userName: [
|
|
37
|
+
{
|
|
38
|
+
required: !0,
|
|
39
|
+
message: u("orderUserAddress.userNameRequired"),
|
|
40
|
+
trigger: "change"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
mobilePhone: [
|
|
44
|
+
{
|
|
45
|
+
required: !0,
|
|
46
|
+
validator: q,
|
|
47
|
+
trigger: "blur"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
detailInfo: [
|
|
51
|
+
{
|
|
52
|
+
required: !0,
|
|
53
|
+
message: u("orderUserAddress.detailInfoRequired"),
|
|
54
|
+
trigger: "change"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
provinceName: [
|
|
58
|
+
{
|
|
59
|
+
required: !0,
|
|
60
|
+
message: u("orderUserAddress.provinceNameRequired"),
|
|
61
|
+
trigger: "change"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}), m = E(U, "modelValue"), w = A;
|
|
65
|
+
function y() {
|
|
66
|
+
a.provinceName && $(a.provinceName).then((e) => {
|
|
67
|
+
a.cityName = e;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const c = _(/* @__PURE__ */ new Map());
|
|
71
|
+
async function $(e) {
|
|
72
|
+
if (!e)
|
|
73
|
+
return "";
|
|
74
|
+
if (c.value.has(e))
|
|
75
|
+
return c.value.get(e) || e;
|
|
76
|
+
try {
|
|
77
|
+
const r = await K.findByCode({
|
|
78
|
+
regionCode: e
|
|
79
|
+
});
|
|
80
|
+
if (r.data) {
|
|
81
|
+
const l = I(r.data);
|
|
82
|
+
return c.value.set(e, l), l;
|
|
83
|
+
}
|
|
84
|
+
return e;
|
|
85
|
+
} catch {
|
|
86
|
+
return c.value.set(e, e), e;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function I(e) {
|
|
90
|
+
const r = [];
|
|
91
|
+
function l(d) {
|
|
92
|
+
d && d.regionName && r.push(d.regionName), d && d.children && d.children.length > 0 && l(d.children[0]);
|
|
93
|
+
}
|
|
94
|
+
return l(e), r.join("");
|
|
95
|
+
}
|
|
96
|
+
const M = async () => {
|
|
97
|
+
var e;
|
|
98
|
+
await ((e = f.value) == null ? void 0 : e.validate((r) => {
|
|
99
|
+
r && z.create(a).then((l) => {
|
|
100
|
+
l.status === 200 && (S({
|
|
101
|
+
message: u("common.submitSuccess"),
|
|
102
|
+
type: "success"
|
|
103
|
+
}), m.value && (m.value = !1), w("refresh", l.status === 200));
|
|
104
|
+
});
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
function h() {
|
|
108
|
+
m.value && (m.value = !1);
|
|
109
|
+
}
|
|
110
|
+
return (e, r) => {
|
|
111
|
+
const l = i("el-input"), d = i("el-form-item"), p = i("el-col"), P = i("el-row"), k = i("el-form"), g = i("el-button"), F = i("el-dialog");
|
|
112
|
+
return j(), T(F, {
|
|
113
|
+
modelValue: m.value,
|
|
114
|
+
"onUpdate:modelValue": r[5] || (r[5] = (n) => m.value = n),
|
|
115
|
+
onClose: h
|
|
116
|
+
}, {
|
|
117
|
+
footer: t(() => [
|
|
118
|
+
D("div", G, [
|
|
119
|
+
o(g, { onClick: h }, {
|
|
120
|
+
default: t(() => [
|
|
121
|
+
v(V(e.$t("common.cancel")), 1)
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}),
|
|
125
|
+
o(g, {
|
|
126
|
+
type: "primary",
|
|
127
|
+
onClick: M
|
|
128
|
+
}, {
|
|
129
|
+
default: t(() => [
|
|
130
|
+
v(V(e.$t("common.confirm")), 1)
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
})
|
|
134
|
+
])
|
|
135
|
+
]),
|
|
136
|
+
default: t(() => [
|
|
137
|
+
o(k, {
|
|
138
|
+
ref_key: "orderUserAddressFormRef",
|
|
139
|
+
ref: f,
|
|
140
|
+
model: s(a),
|
|
141
|
+
"label-position": "top",
|
|
142
|
+
rules: R
|
|
143
|
+
}, {
|
|
144
|
+
default: t(() => [
|
|
145
|
+
o(P, { gutter: 20 }, {
|
|
146
|
+
default: t(() => [
|
|
147
|
+
o(p, { span: 24 }, {
|
|
148
|
+
default: t(() => [
|
|
149
|
+
o(d, {
|
|
150
|
+
label: e.$t("orderUserAddress.note"),
|
|
151
|
+
prop: "note"
|
|
152
|
+
}, {
|
|
153
|
+
default: t(() => [
|
|
154
|
+
o(l, {
|
|
155
|
+
modelValue: s(a).note,
|
|
156
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => s(a).note = n),
|
|
157
|
+
placeholder: e.$t("orderUserAddress.noteRequired"),
|
|
158
|
+
"show-word-limit": "",
|
|
159
|
+
clearable: ""
|
|
160
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["label"])
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}),
|
|
167
|
+
o(p, { span: 24 }, {
|
|
168
|
+
default: t(() => [
|
|
169
|
+
o(d, {
|
|
170
|
+
label: e.$t("orderUserAddress.userName"),
|
|
171
|
+
prop: "userName"
|
|
172
|
+
}, {
|
|
173
|
+
default: t(() => [
|
|
174
|
+
o(l, {
|
|
175
|
+
modelValue: s(a).userName,
|
|
176
|
+
"onUpdate:modelValue": r[1] || (r[1] = (n) => s(a).userName = n),
|
|
177
|
+
placeholder: e.$t("orderUserAddress.userNameRequired"),
|
|
178
|
+
"show-word-limit": "",
|
|
179
|
+
clearable: ""
|
|
180
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
181
|
+
]),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, ["label"])
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}),
|
|
187
|
+
o(p, { span: 24 }, {
|
|
188
|
+
default: t(() => [
|
|
189
|
+
o(d, {
|
|
190
|
+
label: e.$t("orderUserAddress.mobilePhone"),
|
|
191
|
+
prop: "mobilePhone"
|
|
192
|
+
}, {
|
|
193
|
+
default: t(() => [
|
|
194
|
+
o(l, {
|
|
195
|
+
modelValue: s(a).mobilePhone,
|
|
196
|
+
"onUpdate:modelValue": r[2] || (r[2] = (n) => s(a).mobilePhone = n),
|
|
197
|
+
placeholder: e.$t("orderUserAddress.mobilePhoneRequired"),
|
|
198
|
+
"show-word-limit": "",
|
|
199
|
+
clearable: ""
|
|
200
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["label"])
|
|
204
|
+
]),
|
|
205
|
+
_: 1
|
|
206
|
+
}),
|
|
207
|
+
o(p, { span: 24 }, {
|
|
208
|
+
default: t(() => [
|
|
209
|
+
o(d, {
|
|
210
|
+
prop: "provinceName",
|
|
211
|
+
label: s(u)("orderUserAddress.detailInfo"),
|
|
212
|
+
class: "form-item"
|
|
213
|
+
}, {
|
|
214
|
+
default: t(() => [
|
|
215
|
+
o(s(J), {
|
|
216
|
+
modelValue: s(a).provinceName,
|
|
217
|
+
"onUpdate:modelValue": r[3] || (r[3] = (n) => s(a).provinceName = n),
|
|
218
|
+
placeholder: e.$t("orderUserAddress.provinceNameRequired"),
|
|
219
|
+
clearable: "",
|
|
220
|
+
onChange: y
|
|
221
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["label"])
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}),
|
|
228
|
+
o(p, { span: 24 }, {
|
|
229
|
+
default: t(() => [
|
|
230
|
+
o(d, { prop: "detailInfo" }, {
|
|
231
|
+
default: t(() => [
|
|
232
|
+
o(l, {
|
|
233
|
+
modelValue: s(a).detailInfo,
|
|
234
|
+
"onUpdate:modelValue": r[4] || (r[4] = (n) => s(a).detailInfo = n),
|
|
235
|
+
placeholder: e.$t("orderUserAddress.detailInfoRequired"),
|
|
236
|
+
"show-word-limit": "",
|
|
237
|
+
clearable: "",
|
|
238
|
+
type: "textarea"
|
|
239
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
240
|
+
]),
|
|
241
|
+
_: 1
|
|
242
|
+
})
|
|
243
|
+
]),
|
|
244
|
+
_: 1
|
|
245
|
+
})
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
})
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["model", "rules"])
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["modelValue"]);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
}), x = /* @__PURE__ */ C(H, [["__scopeId", "data-v-31dcbcc0"]]);
|
|
258
|
+
export {
|
|
259
|
+
x as default
|
|
260
|
+
};
|