jufubao-base 1.0.301 → 1.0.302-beta2
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/package.json +1 -1
- package/src/components/JfbBaseInvoice/Api.js +49 -0
- package/src/components/JfbBaseInvoice/Attr.js +21 -0
- package/src/components/JfbBaseInvoice/JfbBaseInvoice.vue +503 -0
- package/src/components/JfbBaseInvoice/JfbBaseInvoiceLess.less +79 -0
- package/src/components/JfbBaseInvoice/JfbBaseInvoiceMixin.js +30 -0
- package/src/components/JfbBaseInvoice/Mock.js +13 -0
- package/src/components/JfbBaseInvoice/cusAttr/advanced.js +33 -0
- package/src/components/JfbBaseInvoice/cusAttr/content.js +12 -0
- package/src/components/JfbBaseInvoice/cusAttr/style.js +41 -0
- package/src/components/JfbBaseInvoiceConfirm/Api.js +24 -0
- package/src/components/JfbBaseInvoiceConfirm/Attr.js +21 -0
- package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirm.vue +208 -0
- package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirmLess.less +79 -0
- package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirmMixin.js +30 -0
- package/src/components/JfbBaseInvoiceConfirm/Mock.js +13 -0
- package/src/components/JfbBaseInvoiceConfirm/cusAttr/advanced.js +33 -0
- package/src/components/JfbBaseInvoiceConfirm/cusAttr/content.js +12 -0
- package/src/components/JfbBaseInvoiceConfirm/cusAttr/style.js +12 -0
- package/src/components/JfbBaseInvoiceDetail/Api.js +35 -0
- package/src/components/JfbBaseInvoiceDetail/Attr.js +21 -0
- package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetail.vue +453 -0
- package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetailLess.less +79 -0
- package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetailMixin.js +30 -0
- package/src/components/JfbBaseInvoiceDetail/Mock.js +13 -0
- package/src/components/JfbBaseInvoiceDetail/cusAttr/advanced.js +6 -0
- package/src/components/JfbBaseInvoiceDetail/cusAttr/content.js +12 -0
- package/src/components/JfbBaseInvoiceDetail/cusAttr/style.js +41 -0
- package/src/components/JfbBaseOrderDetail/Api.js +13 -1
- package/src/components/JfbBaseOrderDetail/Attr.js +38 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +79 -1
package/package.json
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @description 接口配置,
|
|
4
|
+
* 在设置方法名字当时候,别忘记加上【模块名字】:Invoice
|
|
5
|
+
* @type {*[]}
|
|
6
|
+
*/
|
|
7
|
+
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
//设置方法名字当别忘记加上【模块名字】:Invoice
|
|
10
|
+
mapFnName: 'userInvoiceDetail',
|
|
11
|
+
title: '用户开票 - 详情',
|
|
12
|
+
path: '/pay/v1/user-invoice/detail',
|
|
13
|
+
isRule: false,
|
|
14
|
+
params: {
|
|
15
|
+
main_order_id: ['订单编号', 'Number', '必选'],
|
|
16
|
+
pay_order_id: ['支付订单号', 'Number', '必选'],
|
|
17
|
+
},
|
|
18
|
+
isConsole: true,
|
|
19
|
+
disabled: true,
|
|
20
|
+
}, {
|
|
21
|
+
//设置方法名字当别忘记加上【模块名字】:Invoice
|
|
22
|
+
mapFnName: 'userInvoiceOptions',
|
|
23
|
+
title: '用户开票 - options',
|
|
24
|
+
path: '/pay/v1/user-invoice/options',
|
|
25
|
+
isRule: false,
|
|
26
|
+
params: {
|
|
27
|
+
main_order_id: ['订单编号', 'Number', '必选'],
|
|
28
|
+
pay_order_id: ['支付订单号', 'Number', '必选'],
|
|
29
|
+
},
|
|
30
|
+
isConsole: true,
|
|
31
|
+
disabled: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
//设置方法名字当别忘记加上【模块名字】:Invoice
|
|
35
|
+
mapFnName: 'userInvoiceSubmit',
|
|
36
|
+
title: '用户开票 - 申请开票',
|
|
37
|
+
path: '/pay/v1/user-invoice/submit',
|
|
38
|
+
isRule: false,
|
|
39
|
+
data: {
|
|
40
|
+
main_order_id: ['订单编号', 'Number', '必选'],
|
|
41
|
+
pay_order_id: ['支付订单号', 'Number', '必选'],
|
|
42
|
+
email: ['邮箱', 'Number', '必选'],
|
|
43
|
+
invoice_header: ['发票抬头', 'Number', '必选'],
|
|
44
|
+
invoice_header_type: ['发票抬头类型', 'Number', '必选'],
|
|
45
|
+
},
|
|
46
|
+
isConsole: true,
|
|
47
|
+
disabled: true,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import Content from './cusAttr/content'
|
|
3
|
+
import Style from './cusAttr/style'
|
|
4
|
+
import Advanced from './cusAttr/advanced'
|
|
5
|
+
/**
|
|
6
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
style: [],
|
|
10
|
+
content: (data, gValue, gColor, oldData = {}) => {
|
|
11
|
+
return [
|
|
12
|
+
...Content(data, gValue, gColor, oldData),
|
|
13
|
+
...Style(data, gValue, gColor, oldData),
|
|
14
|
+
...Advanced(data, gValue, gColor, oldData),
|
|
15
|
+
|
|
16
|
+
].filter(i => i)
|
|
17
|
+
},
|
|
18
|
+
advanced: [
|
|
19
|
+
|
|
20
|
+
],
|
|
21
|
+
};
|
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-invoice"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-invoice__edit"
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-invoice__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view
|
|
17
|
+
class="jfb-base-invoice__body"
|
|
18
|
+
:style="{ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx' }"
|
|
19
|
+
>
|
|
20
|
+
<view v-if="firstStep">
|
|
21
|
+
<view :style="[statusStyle]" class="jfb-base-invoice__body-status">
|
|
22
|
+
<XdFontIcon icon="iconmingchengtubiao"></XdFontIcon>
|
|
23
|
+
<view>{{ status_name }}</view>
|
|
24
|
+
</view>
|
|
25
|
+
<view class="jfb-base-invoice__body-content">
|
|
26
|
+
<view class="jfb-base-invoice__body-content-item">
|
|
27
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
28
|
+
<view>订单编号</view>
|
|
29
|
+
<view>{{ main_order_id }}</view>
|
|
30
|
+
</view>
|
|
31
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
32
|
+
<view>开票金额</view>
|
|
33
|
+
<XdUnit :price="invoice_amount" :isOld="false"></XdUnit>
|
|
34
|
+
</view>
|
|
35
|
+
</view>
|
|
36
|
+
<view
|
|
37
|
+
style="margin-top: 24rpx"
|
|
38
|
+
class="jfb-base-invoice__body-content-item"
|
|
39
|
+
>
|
|
40
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
41
|
+
<view>发票类型</view>
|
|
42
|
+
<view>(普通发票)数电发票</view>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
45
|
+
<view><text class="required">*</text>抬头类型</view>
|
|
46
|
+
<view>
|
|
47
|
+
<radio-group @change="radioChange">
|
|
48
|
+
<label
|
|
49
|
+
style="margin-left: 10rpx"
|
|
50
|
+
v-for="(item, index) in invoice_header_type_list"
|
|
51
|
+
:key="index"
|
|
52
|
+
>
|
|
53
|
+
<radio
|
|
54
|
+
style="transform: scale(0.7)"
|
|
55
|
+
:value="item.value"
|
|
56
|
+
:checked="item.value === invoice_header_type"
|
|
57
|
+
:activeBackgroundColor="mainColor"
|
|
58
|
+
:activeBorderColor="mainColor"
|
|
59
|
+
:color="mainColor"
|
|
60
|
+
/>
|
|
61
|
+
<text
|
|
62
|
+
:style="{
|
|
63
|
+
color:
|
|
64
|
+
item.value === invoice_header_type ? mainColor : '',
|
|
65
|
+
}"
|
|
66
|
+
>{{ item.label }}</text
|
|
67
|
+
>
|
|
68
|
+
</label>
|
|
69
|
+
</radio-group>
|
|
70
|
+
</view>
|
|
71
|
+
</view>
|
|
72
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
73
|
+
<view><text class="required">*</text>发票抬头</view>
|
|
74
|
+
<view class="jfb-base-invoice__body-content-item-info-input">
|
|
75
|
+
<input
|
|
76
|
+
type="text"
|
|
77
|
+
v-model="invoice_header"
|
|
78
|
+
placeholder="填写需要开具发票的抬头"
|
|
79
|
+
/>
|
|
80
|
+
</view>
|
|
81
|
+
</view>
|
|
82
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
83
|
+
<view><text class="required">*</text>联系电话</view>
|
|
84
|
+
<view class="jfb-base-invoice__body-content-item-info-input">
|
|
85
|
+
<input
|
|
86
|
+
type="text"
|
|
87
|
+
v-model="phone_number"
|
|
88
|
+
placeholder="填写联系电话"
|
|
89
|
+
/>
|
|
90
|
+
</view>
|
|
91
|
+
</view>
|
|
92
|
+
<view
|
|
93
|
+
v-if="invoice_header_type === 'company'"
|
|
94
|
+
class="jfb-base-invoice__body-content-item-info"
|
|
95
|
+
>
|
|
96
|
+
<view><text class="required">*</text>税号</view>
|
|
97
|
+
<view class="jfb-base-invoice__body-content-item-info-input">
|
|
98
|
+
<input
|
|
99
|
+
type="text"
|
|
100
|
+
v-model="invoice_number"
|
|
101
|
+
placeholder="填写税号"
|
|
102
|
+
/>
|
|
103
|
+
</view>
|
|
104
|
+
</view>
|
|
105
|
+
<view class="jfb-base-invoice__body-content-item-info">
|
|
106
|
+
<view><text class="required">*</text>接收邮箱</view>
|
|
107
|
+
<view class="jfb-base-invoice__body-content-item-info-input">
|
|
108
|
+
<input
|
|
109
|
+
type="text"
|
|
110
|
+
v-model="email"
|
|
111
|
+
placeholder="开票成功后将发往您的邮箱"
|
|
112
|
+
/>
|
|
113
|
+
</view>
|
|
114
|
+
</view>
|
|
115
|
+
</view>
|
|
116
|
+
</view>
|
|
117
|
+
<view class="fixe_bottom" :style="prod_bottom">
|
|
118
|
+
<XdButton @click="handleToSecondStep" size="small" type="primary"
|
|
119
|
+
>下一步</XdButton
|
|
120
|
+
>
|
|
121
|
+
</view>
|
|
122
|
+
</view>
|
|
123
|
+
<view v-else>
|
|
124
|
+
<view class="jfb-base-invoice__body-step2-content">
|
|
125
|
+
<view class="jfb-base-invoice__body-step2-content-item">
|
|
126
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
127
|
+
<view>开票金额</view>
|
|
128
|
+
<XdUnit :isOld="false" :price="invoice_amount"></XdUnit>
|
|
129
|
+
</view>
|
|
130
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
131
|
+
<view>发票类型</view>
|
|
132
|
+
<view>(普通发票)数电发票</view>
|
|
133
|
+
</view>
|
|
134
|
+
</view>
|
|
135
|
+
<view
|
|
136
|
+
style="margin-top: 24rpx"
|
|
137
|
+
class="jfb-base-invoice__body-step2-content-item"
|
|
138
|
+
>
|
|
139
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
140
|
+
<view>抬头类型</view>
|
|
141
|
+
<view>{{
|
|
142
|
+
invoice_header_type === "company" ? "单位" : "个人"
|
|
143
|
+
}}</view>
|
|
144
|
+
</view>
|
|
145
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
146
|
+
<view>发票抬头</view>
|
|
147
|
+
<view>{{ invoice_header }}</view>
|
|
148
|
+
</view>
|
|
149
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
150
|
+
<view>联系电话</view>
|
|
151
|
+
<view>{{ phone_number }}</view>
|
|
152
|
+
</view>
|
|
153
|
+
<view
|
|
154
|
+
v-if="invoice_header_type === 'company'"
|
|
155
|
+
class="jfb-base-invoice__body-step2-content-item-info"
|
|
156
|
+
>
|
|
157
|
+
<view>税号</view>
|
|
158
|
+
<view>{{ invoice_number }}</view>
|
|
159
|
+
</view>
|
|
160
|
+
<view class="jfb-base-invoice__body-step2-content-item-info">
|
|
161
|
+
<view>接收邮箱</view>
|
|
162
|
+
<view>{{ email }}</view>
|
|
163
|
+
</view>
|
|
164
|
+
</view>
|
|
165
|
+
</view>
|
|
166
|
+
<view class="fixe_bottom" :style="prod_bottom">
|
|
167
|
+
<XdButton
|
|
168
|
+
:cusStyle="[btnStyle]"
|
|
169
|
+
@click="handleBack"
|
|
170
|
+
size="small"
|
|
171
|
+
type="default"
|
|
172
|
+
>返回修改</XdButton
|
|
173
|
+
>
|
|
174
|
+
<XdButton @click="handleConfirm" size="small" type="primary"
|
|
175
|
+
>确认提交</XdButton
|
|
176
|
+
>
|
|
177
|
+
</view>
|
|
178
|
+
</view>
|
|
179
|
+
</view>
|
|
180
|
+
</view>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<script>
|
|
184
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
185
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
186
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
187
|
+
import JfbBaseInvoiceMixin from "./JfbBaseInvoiceMixin";
|
|
188
|
+
import { getContainerPropsValue, gCPVal } from "@/utils/xd.base";
|
|
189
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
190
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
191
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
192
|
+
import XdUnit from "../XdUnit/XdUnit.vue";
|
|
193
|
+
export default {
|
|
194
|
+
name: "JfbBaseInvoice",
|
|
195
|
+
components: {
|
|
196
|
+
XdFontIcon,
|
|
197
|
+
XdUnit,
|
|
198
|
+
XdButton,
|
|
199
|
+
},
|
|
200
|
+
mixins: [componentsMixins, extsMixins, JfbBaseInvoiceMixin],
|
|
201
|
+
data() {
|
|
202
|
+
return {
|
|
203
|
+
statusBg: "",
|
|
204
|
+
invoice_header_type_list: [],
|
|
205
|
+
invoice_header_type: "",
|
|
206
|
+
invoice_header: "",
|
|
207
|
+
phone_number: "",
|
|
208
|
+
email: "",
|
|
209
|
+
confirmPath: "",
|
|
210
|
+
detailPath: "",
|
|
211
|
+
main_order_id: "",
|
|
212
|
+
pay_order_id: "",
|
|
213
|
+
invoice_amount: "",
|
|
214
|
+
invoice_number: "",
|
|
215
|
+
status_name: "",
|
|
216
|
+
firstStep: true,
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
computed: {
|
|
220
|
+
statusStyle() {
|
|
221
|
+
return {
|
|
222
|
+
backgroundImage: `url(${this.statusBg})`,
|
|
223
|
+
backgroundRepeat: "no-repeat",
|
|
224
|
+
backgroundSize: "100% 100%",
|
|
225
|
+
};
|
|
226
|
+
},
|
|
227
|
+
prod_bottom() {
|
|
228
|
+
return this.fixedStyle({ height: 0, zIndex: 111 });
|
|
229
|
+
},
|
|
230
|
+
btnStyle() {
|
|
231
|
+
return {
|
|
232
|
+
color: this.mainColor,
|
|
233
|
+
border: `1px solid ${this.mainColor}`,
|
|
234
|
+
};
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
watch: {
|
|
238
|
+
container(value, oldValue) {
|
|
239
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
240
|
+
if (this.$configProject["isPreview"]) this.init(value);
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
created() {
|
|
244
|
+
this.init(this.container);
|
|
245
|
+
|
|
246
|
+
//todo
|
|
247
|
+
},
|
|
248
|
+
methods: {
|
|
249
|
+
async onJfbLoad(options) {
|
|
250
|
+
this.main_order_id = options.main_order_id;
|
|
251
|
+
this.pay_order_id = options.pay_order_id;
|
|
252
|
+
await jfbRootExec("userInvoiceOptions", {
|
|
253
|
+
vm: this,
|
|
254
|
+
data: {},
|
|
255
|
+
})
|
|
256
|
+
.then((res) => {
|
|
257
|
+
this.invoice_header_type_list = res.invoice_header_type_list;
|
|
258
|
+
})
|
|
259
|
+
.catch();
|
|
260
|
+
await jfbRootExec("userInvoiceDetail", {
|
|
261
|
+
vm: this,
|
|
262
|
+
data: {
|
|
263
|
+
main_order_id: this.main_order_id,
|
|
264
|
+
pay_order_id: this.pay_order_id,
|
|
265
|
+
},
|
|
266
|
+
})
|
|
267
|
+
.then((res) => {
|
|
268
|
+
this.invoice_amount = res.invoice_result.invoice_amount;
|
|
269
|
+
this.status_name = res.invoice_result.status_name;
|
|
270
|
+
})
|
|
271
|
+
.catch();
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
* @description 监听事件变化
|
|
275
|
+
* @param container {object} 业务组件对象自己
|
|
276
|
+
*/
|
|
277
|
+
init(container) {
|
|
278
|
+
this.statusBg = getServiceUrl(
|
|
279
|
+
gCPVal(container, "statusBg", { url: "" }, {}).url
|
|
280
|
+
);
|
|
281
|
+
this.confirmPath = getContainerPropsValue(
|
|
282
|
+
container,
|
|
283
|
+
"content.confirmPath",
|
|
284
|
+
{ value: "" }
|
|
285
|
+
).value;
|
|
286
|
+
this.detailPath = getContainerPropsValue(
|
|
287
|
+
container,
|
|
288
|
+
"content.detailPath",
|
|
289
|
+
{ value: "" }
|
|
290
|
+
).value;
|
|
291
|
+
debugger
|
|
292
|
+
},
|
|
293
|
+
radioChange: function (evt) {
|
|
294
|
+
for (let i = 0; i < this.invoice_header_type_list.length; i++) {
|
|
295
|
+
if (this.invoice_header_type_list[i].value === evt.detail.value) {
|
|
296
|
+
this.invoice_header_type = evt.detail.value;
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
convertObjToQueryString(obj, prefix = "this.", encode = true) {
|
|
302
|
+
// 过滤掉值为 undefined/null 的属性,避免生成空参数
|
|
303
|
+
const validEntries = Object.entries(obj).filter(
|
|
304
|
+
([_, value]) => value !== undefined && value !== null
|
|
305
|
+
);
|
|
306
|
+
|
|
307
|
+
// 拼接每个键值对:key=prefix.key(支持编码)
|
|
308
|
+
const querySegments = validEntries.map(([key, _]) => {
|
|
309
|
+
const valueStr = this[key];
|
|
310
|
+
// 根据需求决定是否对值进行 URL 编码(避免特殊字符问题)
|
|
311
|
+
const encodedValue = encode ? encodeURIComponent(valueStr) : valueStr;
|
|
312
|
+
return `${encodeURIComponent(key)}=${encodedValue}`;
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// 用 & 连接所有段,返回最终查询字符串
|
|
316
|
+
return querySegments.join("&");
|
|
317
|
+
},
|
|
318
|
+
handleToSecondStep() {
|
|
319
|
+
if (!this.invoice_header_type) {
|
|
320
|
+
this.$xdAlert({ content: "请选择发票抬头类型" });
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (!this.invoice_header) {
|
|
324
|
+
this.$xdAlert({ content: "请填写发票抬头" });
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (this.invoice_header_type == "company") {
|
|
328
|
+
if (!this.invoice_number) {
|
|
329
|
+
this.$xdAlert({ content: "请填写税号" });
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (!this.email) {
|
|
334
|
+
this.$xdAlert({ content: "请填写接收邮箱" });
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
if (!this.phone_number) {
|
|
338
|
+
this.$xdAlert({ content: "请填写联系电话" });
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
this.firstStep = false;
|
|
342
|
+
},
|
|
343
|
+
handleConfirm() {
|
|
344
|
+
//调用确认提交接口并跳转详情页面
|
|
345
|
+
jfbRootExec("userInvoiceSubmit", {
|
|
346
|
+
vm: this,
|
|
347
|
+
data: {
|
|
348
|
+
main_order_id: this.main_order_id,
|
|
349
|
+
pay_order_id: this.pay_order_id,
|
|
350
|
+
email: this.email,
|
|
351
|
+
invoice_header_type: this.invoice_header_type,
|
|
352
|
+
invoice_header: this.invoice_header,
|
|
353
|
+
phone_number: this.phone_number,
|
|
354
|
+
invoice_number: this.invoice_number,
|
|
355
|
+
},
|
|
356
|
+
}).then((res) => {
|
|
357
|
+
let params = {
|
|
358
|
+
main_order_id: this.main_order_id,
|
|
359
|
+
pay_order_id: this.pay_order_id,
|
|
360
|
+
};
|
|
361
|
+
params = this.convertObjToQueryString(params);
|
|
362
|
+
params = this.$xdUniHelper.navigateTo({
|
|
363
|
+
url: `${this.detailPath}?${params}`,
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
},
|
|
367
|
+
handleBack() {
|
|
368
|
+
this.firstStep = true;
|
|
369
|
+
},
|
|
370
|
+
onJfbScroll(options) {
|
|
371
|
+
console.log("event.onJfbScroll", options);
|
|
372
|
+
},
|
|
373
|
+
onJfbReachBottom(options) {
|
|
374
|
+
console.log("event.onJfbReachBottom", options);
|
|
375
|
+
},
|
|
376
|
+
onJfbShow(options) {
|
|
377
|
+
console.log("event.onJfbShow", options);
|
|
378
|
+
},
|
|
379
|
+
onJfbHide(options) {
|
|
380
|
+
console.log("event.onJfbHide", options);
|
|
381
|
+
},
|
|
382
|
+
onJfbBack(options) {
|
|
383
|
+
console.log("event.onJfbBack", options);
|
|
384
|
+
},
|
|
385
|
+
onJfbUpdate(...data) {
|
|
386
|
+
console.log("event.onJfbUpdate", data);
|
|
387
|
+
},
|
|
388
|
+
onJfbCustomEvent(options) {
|
|
389
|
+
console.log("event.onJfbReachBottom", options);
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
</script>
|
|
394
|
+
|
|
395
|
+
<style scoped lang="less">
|
|
396
|
+
@import "./JfbBaseInvoiceLess.less";
|
|
397
|
+
|
|
398
|
+
.jfb-base-invoice {
|
|
399
|
+
&__body {
|
|
400
|
+
&-status {
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
justify-content: center;
|
|
404
|
+
font-size: 36rpx;
|
|
405
|
+
height: 180rpx;
|
|
406
|
+
color: #fff;
|
|
407
|
+
& > view {
|
|
408
|
+
margin-left: 16rpx;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
&-content {
|
|
412
|
+
padding: 24rpx;
|
|
413
|
+
position: relative;
|
|
414
|
+
top: -18rpx;
|
|
415
|
+
border-radius: 16rpx;
|
|
416
|
+
background: #f8f8f8;
|
|
417
|
+
&-item {
|
|
418
|
+
background: #fff;
|
|
419
|
+
border-radius: 8rpx;
|
|
420
|
+
&-info {
|
|
421
|
+
padding: 20rpx 48rpx;
|
|
422
|
+
display: flex;
|
|
423
|
+
justify-content: space-between;
|
|
424
|
+
align-items: center;
|
|
425
|
+
color: #333333;
|
|
426
|
+
font-size: 28rpx;
|
|
427
|
+
border-bottom: 2rpx solid #f7f7f7;
|
|
428
|
+
position: relative;
|
|
429
|
+
&-input {
|
|
430
|
+
flex: 1;
|
|
431
|
+
}
|
|
432
|
+
input {
|
|
433
|
+
font-size: 26rpx;
|
|
434
|
+
text-align: end;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
.required {
|
|
438
|
+
color: red;
|
|
439
|
+
position: absolute;
|
|
440
|
+
left: 30rpx;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
.fixe_bottom {
|
|
445
|
+
display: flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
justify-content: space-around;
|
|
448
|
+
height: unit(100, rpx);
|
|
449
|
+
padding: 0 unit(40, rpx);
|
|
450
|
+
flex-flow: nowrap;
|
|
451
|
+
background: #fff;
|
|
452
|
+
box-shadow: 0 0 unit(16, rpx) rgba(0, 0, 0, 0.05);
|
|
453
|
+
.flex_l {
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
font-size: unit(32, rpx);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
& > view {
|
|
460
|
+
flex: 1;
|
|
461
|
+
padding: 0 unit(15, rpx);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
&-step2-content {
|
|
465
|
+
padding: 24rpx;
|
|
466
|
+
border-radius: 16rpx;
|
|
467
|
+
&-item {
|
|
468
|
+
background: #fff;
|
|
469
|
+
border-radius: 8rpx;
|
|
470
|
+
&-info {
|
|
471
|
+
padding: 20rpx 48rpx;
|
|
472
|
+
display: flex;
|
|
473
|
+
justify-content: space-between;
|
|
474
|
+
align-items: center;
|
|
475
|
+
color: #333333;
|
|
476
|
+
font-size: 28rpx;
|
|
477
|
+
border-bottom: 2rpx solid #f7f7f7;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
.fixe_bottom {
|
|
482
|
+
display: flex;
|
|
483
|
+
align-items: center;
|
|
484
|
+
justify-content: space-around;
|
|
485
|
+
height: unit(100, rpx);
|
|
486
|
+
padding: 0 unit(40, rpx);
|
|
487
|
+
flex-flow: nowrap;
|
|
488
|
+
background: #fff;
|
|
489
|
+
box-shadow: 0 0 unit(16, rpx) rgba(0, 0, 0, 0.05);
|
|
490
|
+
.flex_l {
|
|
491
|
+
display: flex;
|
|
492
|
+
align-items: center;
|
|
493
|
+
font-size: unit(32, rpx);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
& > view {
|
|
497
|
+
flex: 1;
|
|
498
|
+
padding: 0 unit(15, rpx);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-invoice {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: 4;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(-52, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
line-height: unit(50, rpx);
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .6);
|
|
54
|
+
border-radius: unit(10, rpx);
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
|
|
59
|
+
&-icon{
|
|
60
|
+
padding: 0 unit(20, rpx);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.editx {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**notPreview**/
|
|
73
|
+
.jfb-base-invoice {
|
|
74
|
+
//&:before {
|
|
75
|
+
//content: " ";
|
|
76
|
+
//display: table;
|
|
77
|
+
//}
|
|
78
|
+
}
|
|
79
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-invoice'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|