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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseInvoice/Api.js +49 -0
  3. package/src/components/JfbBaseInvoice/Attr.js +21 -0
  4. package/src/components/JfbBaseInvoice/JfbBaseInvoice.vue +503 -0
  5. package/src/components/JfbBaseInvoice/JfbBaseInvoiceLess.less +79 -0
  6. package/src/components/JfbBaseInvoice/JfbBaseInvoiceMixin.js +30 -0
  7. package/src/components/JfbBaseInvoice/Mock.js +13 -0
  8. package/src/components/JfbBaseInvoice/cusAttr/advanced.js +33 -0
  9. package/src/components/JfbBaseInvoice/cusAttr/content.js +12 -0
  10. package/src/components/JfbBaseInvoice/cusAttr/style.js +41 -0
  11. package/src/components/JfbBaseInvoiceConfirm/Api.js +24 -0
  12. package/src/components/JfbBaseInvoiceConfirm/Attr.js +21 -0
  13. package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirm.vue +208 -0
  14. package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirmLess.less +79 -0
  15. package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirmMixin.js +30 -0
  16. package/src/components/JfbBaseInvoiceConfirm/Mock.js +13 -0
  17. package/src/components/JfbBaseInvoiceConfirm/cusAttr/advanced.js +33 -0
  18. package/src/components/JfbBaseInvoiceConfirm/cusAttr/content.js +12 -0
  19. package/src/components/JfbBaseInvoiceConfirm/cusAttr/style.js +12 -0
  20. package/src/components/JfbBaseInvoiceDetail/Api.js +35 -0
  21. package/src/components/JfbBaseInvoiceDetail/Attr.js +21 -0
  22. package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetail.vue +453 -0
  23. package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetailLess.less +79 -0
  24. package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetailMixin.js +30 -0
  25. package/src/components/JfbBaseInvoiceDetail/Mock.js +13 -0
  26. package/src/components/JfbBaseInvoiceDetail/cusAttr/advanced.js +6 -0
  27. package/src/components/JfbBaseInvoiceDetail/cusAttr/content.js +12 -0
  28. package/src/components/JfbBaseInvoiceDetail/cusAttr/style.js +41 -0
  29. package/src/components/JfbBaseOrderDetail/Api.js +13 -1
  30. package/src/components/JfbBaseOrderDetail/Attr.js +38 -0
  31. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +79 -1
@@ -0,0 +1,33 @@
1
+ import {
2
+ dataVal,
3
+ } from "@/utils/AttrTools";
4
+ export default (data, gValue, gColor, oldData = {}) => {
5
+ return [
6
+ {
7
+ label: '确认开票',
8
+ ele: 'xd-select-pages-path',
9
+ valueKey: 'confirmPath',
10
+ placeholder: '请选择确认开票页面',
11
+ value: data['confirmPath'] || {},
12
+ labelInline: true,
13
+ setting: {
14
+ router: XdBus.getParentApi('getPagesTree'),
15
+ },
16
+ className: 'input100',
17
+ groupKey: 'advanced',
18
+ },
19
+ {
20
+ label: '开票详情',
21
+ ele: 'xd-select-pages-path',
22
+ valueKey: 'detailPath',
23
+ placeholder: '请选择开票详情页面',
24
+ value: data['detailPath'] || {},
25
+ labelInline: true,
26
+ setting: {
27
+ router: XdBus.getParentApi('getPagesTree'),
28
+ },
29
+ className: 'input100',
30
+ groupKey: 'advanced',
31
+ },
32
+ ].filter(i => i);
33
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal,
4
+ statusDataVal,
5
+ statusShow,
6
+ customVal,
7
+ getRemoteOptions
8
+ } from "@/utils/AttrTools";
9
+
10
+ export default (data, gValue, gColor, oldData = {}) => {
11
+ return [].filter(i => i);
12
+ }
@@ -0,0 +1,41 @@
1
+ import {
2
+ dataVal,
3
+ statusDataVal,
4
+ statusShow,
5
+ cRaBorShadow,
6
+ cusDisabled,
7
+ getCustomAttr,
8
+ TestCssInfo
9
+ } from "@/utils/AttrTools";
10
+ export default (data, gValue, gColor, oldData = {}) => {
11
+ return [
12
+ {
13
+ label: '背景图',
14
+ ele: 'xd-upload',
15
+ labelInline: true,
16
+ valueKey: 'statusBg',
17
+ value: dataVal({
18
+ data,
19
+ key: 'statusBg',
20
+ dValue: null,
21
+ gValue,
22
+ }),
23
+ defaultValue: dataVal({
24
+ data,
25
+ key: 'statusBg',
26
+ dValue: null,
27
+ gValue,
28
+ }),
29
+ slot: true,
30
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议宽度为:<span style="color:red">750</span>像素',
31
+ type: ['jpg', 'png', 'jpeg'],
32
+ styleType: 'one',
33
+ uploadType: 'aliyun',
34
+ oneHeight: 90,
35
+ oneWidth: 375,
36
+ size: 5,
37
+ action: 'aliyun',
38
+ groupKey: 'style',
39
+ },
40
+ ].filter(i => i);
41
+ }
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Invoice
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ //设置方法名字当别忘记加上【模块名字】:Invoice
10
+ mapFnName: 'userInvoiceSubmit',
11
+ title: '用户开票 - 申请开票',
12
+ path: '/pay/v1/user-invoice/submit',
13
+ isRule: false,
14
+ data: {
15
+ main_order_id: ['订单编号', 'Number', '必选'],
16
+ pay_order_id: ['支付订单号', 'Number', '必选'],
17
+ email: ['邮箱', 'Number', '必选'],
18
+ invoice_header: ['发票抬头', 'Number', '必选'],
19
+ invoice_header_type: ['发票抬头类型', 'Number', '必选'],
20
+ },
21
+ isConsole: true,
22
+ disabled: true,
23
+ },
24
+ ];
@@ -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,208 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-invoice-confirm"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-invoice-confirm__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-invoice-confirm__edit-icon" @click="delEdit"
14
+ >删除</view
15
+ >
16
+ </view>
17
+ <!-- #endif -->
18
+ <view
19
+ class="jfb-base-invoice-confirm__body"
20
+ :style="{ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx' }"
21
+ >
22
+
23
+ </view>
24
+ </view>
25
+ </template>
26
+
27
+ <script>
28
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
29
+ import { jfbRootExec } from "@/utils/xd.event";
30
+ import JfbBaseInvoiceConfirmMixin from "./JfbBaseInvoiceConfirmMixin";
31
+ import { getContainerPropsValue } from "@/utils/xd.base";
32
+ import componentsMixins from "@/mixins/componentsMixins";
33
+ import extsMixins from "@/mixins/extsMixins";
34
+ export default {
35
+ name: "JfbBaseInvoiceConfirm",
36
+ components: {
37
+ XdFontIcon,
38
+ },
39
+ mixins: [componentsMixins, extsMixins, JfbBaseInvoiceConfirmMixin],
40
+ data() {
41
+ return {
42
+ confirmPath: "",
43
+ invoicePath: "",
44
+ main_order_id: "",
45
+ pay_order_id: "",
46
+ invoice_amount: 0,
47
+ invoice_header_type: "",
48
+ invoice_header: "",
49
+ phone_number: "",
50
+ invoice_number: "",
51
+ email: "",
52
+ };
53
+ },
54
+ computed: {
55
+ prod_bottom() {
56
+ return this.fixedStyle({ height: 0, zIndex: 111 });
57
+ },
58
+ btnStyle() {
59
+ return {
60
+ color: this.mainColor,
61
+ border: `1px solid ${this.mainColor}`,
62
+ };
63
+ },
64
+ },
65
+ watch: {
66
+ container(value, oldValue) {
67
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
68
+ if (this.$configProject["isPreview"]) this.init(value);
69
+ },
70
+ },
71
+ created() {
72
+ this.init(this.container);
73
+
74
+ //todo
75
+ },
76
+ methods: {
77
+ onJfbLoad(options) {
78
+ this.main_order_id = options.main_order_id;
79
+ this.pay_order_id = options.pay_order_id;
80
+ this.invoice_amount = options.invoice_amount;
81
+ this.invoice_header_type = options.invoice_header_type;
82
+ this.invoice_header = options.invoice_header;
83
+ this.phone_number = options.phone_number;
84
+ this.invoice_number = options.invoice_number;
85
+ this.email = options.email;
86
+ // jfbRootExec('baiduUserLogin', {
87
+ // vm: this,// data: {
88
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
89
+ // }
90
+ // }).then().catch()
91
+ },
92
+ /**
93
+ * @description 监听事件变化
94
+ * @param container {object} 业务组件对象自己
95
+ */
96
+ init(container) {
97
+ this.confirmPath = getContainerPropsValue(
98
+ container,
99
+ "content.confirmPath",
100
+ { value: "" }
101
+ ).value;
102
+ this.invoicePath = getContainerPropsValue(
103
+ container,
104
+ "content.invoicePath",
105
+ { value: "" }
106
+ ).value;
107
+ },
108
+ handleConfirm() {
109
+ //调用确认提交接口并跳转详情页面
110
+ jfbRootExec("userInvoiceSubmit", {
111
+ vm: this,
112
+ data: {
113
+ main_order_id: this.main_order_id,
114
+ pay_order_id: this.pay_order_id,
115
+ email: this.email,
116
+ invoice_header_type: this.invoice_header_type,
117
+ invoice_header: this.invoice_header,
118
+ phone_number: this.phone_number,
119
+ invoice_number: this.invoice_number,
120
+ },
121
+ }).then((res) => {
122
+ let params = {
123
+ main_order_id: this.main_order_id,
124
+ pay_order_id: this.pay_order_id,
125
+ };
126
+ params = this.convertObjToQueryString(params);
127
+ params = this.$xdUniHelper.navigateTo({
128
+ url: `${this.detailPath}?${params}`,
129
+ });
130
+ });
131
+ },
132
+ handleBack() {
133
+ //返回修改页面
134
+ this.$xdUniHelper.navigateBack();
135
+ // this.$xdUniHelper.navigateTo({
136
+ // url: `${this.invoicePath}?main_order_id=${this.main_order_id}&pay_order_id=${this.pay_order_id}`,
137
+ // });
138
+ },
139
+ onJfbScroll(options) {
140
+ console.log("event.onJfbScroll", options);
141
+ },
142
+ onJfbReachBottom(options) {
143
+ console.log("event.onJfbReachBottom", options);
144
+ },
145
+ onJfbShow(options) {
146
+ console.log("event.onJfbShow", options);
147
+ },
148
+ onJfbHide(options) {
149
+ console.log("event.onJfbHide", options);
150
+ },
151
+ onJfbBack(options) {
152
+ console.log("event.onJfbBack", options);
153
+ },
154
+ onJfbUpdate(...data) {
155
+ console.log("event.onJfbUpdate", data);
156
+ },
157
+ onJfbCustomEvent(options) {
158
+ console.log("event.onJfbReachBottom", options);
159
+ },
160
+ },
161
+ };
162
+ </script>
163
+
164
+ <style scoped lang="less">
165
+ @import "./JfbBaseInvoiceConfirmLess.less";
166
+
167
+ .jfb-base-invoice-confirm {
168
+ &__body {
169
+ &-content {
170
+ padding: 24rpx;
171
+ border-radius: 16rpx;
172
+ &-item {
173
+ background: #fff;
174
+ border-radius: 8rpx;
175
+ &-info {
176
+ padding: 20rpx 48rpx;
177
+ display: flex;
178
+ justify-content: space-between;
179
+ align-items: center;
180
+ color: #333333;
181
+ font-size: 28rpx;
182
+ border-bottom: 2rpx solid #f7f7f7;
183
+ }
184
+ }
185
+ }
186
+ .fixe_bottom {
187
+ display: flex;
188
+ align-items: center;
189
+ justify-content: space-around;
190
+ height: unit(100, rpx);
191
+ padding: 0 unit(40, rpx);
192
+ flex-flow: nowrap;
193
+ background: #fff;
194
+ box-shadow: 0 0 unit(16, rpx) rgba(0, 0, 0, 0.05);
195
+ .flex_l {
196
+ display: flex;
197
+ align-items: center;
198
+ font-size: unit(32, rpx);
199
+ }
200
+
201
+ & > view {
202
+ flex: 1;
203
+ padding: 0 unit(15, rpx);
204
+ }
205
+ }
206
+ }
207
+ }
208
+ </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-confirm {
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-confirm {
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-confirm'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ getInvoiceByIdFilmSquate:{},
6
+
7
+ updateInvoiceFilmPaiqiDate:{},
8
+
9
+ removeInvoiceFilmAddress:{},
10
+
11
+ addInvoiceFilmcart:{},
12
+
13
+ }
@@ -0,0 +1,33 @@
1
+ import {
2
+ dataVal,
3
+ } from "@/utils/AttrTools";
4
+ export default (data, gValue, gColor, oldData = {}) => {
5
+ return [
6
+ {
7
+ label: '开票详情',
8
+ ele: 'xd-select-pages-path',
9
+ valueKey: 'detailPath',
10
+ placeholder: '请选择开票详情页面',
11
+ value: data['detailPath'] || {},
12
+ labelInline: true,
13
+ setting: {
14
+ router: XdBus.getParentApi('getPagesTree'),
15
+ },
16
+ className: 'input100',
17
+ groupKey: 'advanced',
18
+ },
19
+ {
20
+ label: '申请开票',
21
+ ele: 'xd-select-pages-path',
22
+ valueKey: 'invoicePath',
23
+ placeholder: '请选择申请开票页面',
24
+ value: data['invoicePath'] || {},
25
+ labelInline: true,
26
+ setting: {
27
+ router: XdBus.getParentApi('getPagesTree'),
28
+ },
29
+ className: 'input100',
30
+ groupKey: 'advanced',
31
+ },
32
+ ].filter(i => i);
33
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal,
4
+ statusDataVal,
5
+ statusShow,
6
+ customVal,
7
+ getRemoteOptions
8
+ } from "@/utils/AttrTools";
9
+
10
+ export default (data, gValue, gColor, oldData = {}) => {
11
+ return [].filter(i => i);
12
+ }
@@ -0,0 +1,12 @@
1
+ import {
2
+ dataVal,
3
+ statusDataVal,
4
+ statusShow,
5
+ cRaBorShadow,
6
+ cusDisabled,
7
+ getCustomAttr,
8
+ TestCssInfo
9
+ } from "@/utils/AttrTools";
10
+ export default (data, gValue, gColor, oldData = {}) => {
11
+ return [].filter(i => i);
12
+ }
@@ -0,0 +1,35 @@
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
+ {
22
+ //设置方法名字当别忘记加上【模块名字】:Invoice
23
+ mapFnName: 'userInvoiceSend',
24
+ title: '用户开票 - 发送邮箱',
25
+ path: '/pay/v1/user-invoice/send',
26
+ isRule: false,
27
+ data: {
28
+ main_order_id: ['订单编号', 'Number', '必选'],
29
+ pay_order_id: ['支付订单号', 'Number', '必选'],
30
+ email: ['邮箱', 'String', '必选'],
31
+ },
32
+ isConsole: true,
33
+ disabled: true,
34
+ },
35
+ ];
@@ -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
+ };