jufubao-base 1.0.305-beta51 → 1.0.305

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.
@@ -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-detail {
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-detail {
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-detail'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ userInvoiceDetail: { "invoice_result": { "id": 8, "open_nnid": "Gymwql5D5WzlEFrqSZ233", "partner_id": 161, "supplier_id": 0, "site_id": "04c78d51890a18b8", "user_id": 5000358, "issuer": "platform", "category": "normal", "category_name": "数电发票(普通发票)", "content_type": "detail", "content_type_name": "", "invoice_header": "123", "invoice_header_type": "person", "invoice_header_type_name": "个人", "invoice_amount": 1, "invoice_number": "", "phone_number": "18888888888", "email": "163@163.com", "status": "Y", "pay_order_id": "781837433628017018", "main_order_id": "c781837426608848897", "scene": "offline", "supplier_fulfil_type": "wallet", "file_info": "[{\"uid\":1765158999985,\"url\":\"\\\/uploads\\\/20251208\\\/9a2a54219b56dca6ebd1fdd1fd5681b5.jpg\",\"name\":\"ceshi.jpg\",\"path\":\"\\\/\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/9a2a54219b56dca6ebd1fdd1fd5681b5.jpg?v=1765159000689\",\"size\":841679,\"type\":\"image\\\/jpeg\",\"width\":1080,\"height\":1620,\"preview_url\":\"https:\\\/\\\/sandbox-private-file.jufubao.cn\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/9a2a54219b56dca6ebd1fdd1fd5681b5.jpg%3Fv%3D1765159000689?Expires=1765244996&OSSAccessKeyId=LTAI5t5x3fSKzMHkbH54VFGi&Signature=x9%2Fvhu7y95Yo%2BmezI5pnYAP%2BczU%3D\"},{\"uid\":1765158999989,\"url\":\"\\\/uploads\\\/20251208\\\/0710b7c47859bfab774a43335378cbd4.jpeg\",\"name\":\"d5eb1020142d38771f897368ac3e577c.jpeg\",\"path\":\"\\\/\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/0710b7c47859bfab774a43335378cbd4.jpeg?v=1765159000526\",\"size\":36934,\"type\":\"image\\\/jpeg\",\"width\":800,\"height\":800,\"preview_url\":\"https:\\\/\\\/sandbox-private-file.jufubao.cn\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/0710b7c47859bfab774a43335378cbd4.jpeg%3Fv%3D1765159000526?Expires=1765244996&OSSAccessKeyId=LTAI5t5x3fSKzMHkbH54VFGi&Signature=xFXXhr%2BLeMiObcaUeHA91te6FUk%3D\"},{\"uid\":1765158999990,\"url\":\"\\\/uploads\\\/20251208\\\/45c20724c94a768ef22b196b0f720054.jpeg\",\"name\":\"d9cecdeeaab3c0d7a105417f2f01a1984767.jpeg\",\"path\":\"\\\/\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/45c20724c94a768ef22b196b0f720054.jpeg?v=1765159000528\",\"size\":25981,\"type\":\"image\\\/jpeg\",\"width\":610,\"height\":488,\"preview_url\":\"https:\\\/\\\/sandbox-private-file.jufubao.cn\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/45c20724c94a768ef22b196b0f720054.jpeg%3Fv%3D1765159000528?Expires=1765244996&OSSAccessKeyId=LTAI5t5x3fSKzMHkbH54VFGi&Signature=zDkZe%2FvJZjV1LdAE1417byZZWus%3D\"},{\"uid\":1765158999992,\"url\":\"\\\/uploads\\\/20251208\\\/f2a84bf4bc08805b775337223b1b1307.jpeg\",\"name\":\"f1a393f1c007477c1424fa19185447d4.jpeg\",\"path\":\"\\\/\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/f2a84bf4bc08805b775337223b1b1307.jpeg?v=1765159000554\",\"size\":37881,\"type\":\"image\\\/jpeg\",\"width\":500,\"height\":647,\"preview_url\":\"https:\\\/\\\/sandbox-private-file.jufubao.cn\\\/sandbox-img.jufubao.cn\\\/uploads\\\/20251208\\\/f2a84bf4bc08805b775337223b1b1307.jpeg%3Fv%3D1765159000554?Expires=1765244996&OSSAccessKeyId=LTAI5t5x3fSKzMHkbH54VFGi&Signature=uUoAnINhVh0WzKGEvAb2NUzxis0%3D\"}]", "product_data": [], "open_user_id": "lichao", "open_username": "lichao", "comment": "", "apply_time": 1764923171, "open_time": 1765159004, "created_time": 1764923171, "updated_time": 1765159004, "issuer_name": "平台", "product_num": 1, "status_name": "已开票", "total_amount": 1, "channel_amount": 1, "error_info": "", "status_desc": "已开发票金额:¥0.01" }, "request_id": "2f2265fc4c01f34b" },
6
+
7
+ userInvoiceSend: { "email": "1212@163.com", "request_id": "a4b209365a869944" },
8
+
9
+ }
@@ -0,0 +1,6 @@
1
+ import {
2
+ dataVal,
3
+ } from "@/utils/AttrTools";
4
+ export default (data, gValue, gColor, oldData = {}) => {
5
+ return [].filter(i => i);
6
+ }
@@ -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
+ }
@@ -61,5 +61,17 @@ module.exports = [
61
61
  },
62
62
  isConsole: true,
63
63
  disabled: true,
64
- }
64
+ },
65
+ {
66
+ mapFnName: 'getCheckInvoice',
67
+ title: '用户开票 - 检查订单是否支持开票',
68
+ path: '/pay/v1/user-invoice/check-allow-open',
69
+ isRule: false,
70
+ params: {
71
+ main_order_id: ['订单编号', 'Number', '必选'],
72
+ pay_order_id: ['支付订单号', 'Number', '必选'],
73
+ },
74
+ isConsole: true,
75
+ disabled: true,
76
+ },
65
77
  ];
@@ -300,6 +300,20 @@ export default {
300
300
  { label: '不允许', value: 'N' },
301
301
  ]
302
302
  },
303
+ {
304
+ label: "发票申请:",
305
+ ele: 'xd-radio',
306
+ valueKey: "is_show_invoice",
307
+ value: data['is_show_invoice'] || 'N',
308
+ groupKey: 'content',
309
+ placeholder: '请选择是否发票申请',
310
+ multiple: false,
311
+ className: 'input80',
312
+ list: [
313
+ { label: '显示', value: 'Y' },
314
+ { label: '隐藏', value: 'N' },
315
+ ]
316
+ },
303
317
  {
304
318
  label: '外填充:',
305
319
  ele: 'xd-margin-padding',
@@ -530,6 +544,30 @@ export default {
530
544
  },
531
545
  inline: false,
532
546
  },
547
+ {
548
+ label: '发票申请页面路径:',
549
+ ele: 'xd-select-pages-path',
550
+ valueKey: 'invoicePath',
551
+ groupKey: 'advanced',
552
+ placeholder: '发票申请页面路径',
553
+ value: data['invoicePath'] || null,
554
+ setting: {
555
+ router: XdBus.getParentApi('getPagesTree'),
556
+ },
557
+ inline: false,
558
+ },
559
+ {
560
+ label: '查看发票页面路径:',
561
+ ele: 'xd-select-pages-path',
562
+ valueKey: 'viewInvoicePath',
563
+ groupKey: 'advanced',
564
+ placeholder: '发票申请页面路径',
565
+ value: data['viewInvoicePath'] || null,
566
+ setting: {
567
+ router: XdBus.getParentApi('getPagesTree'),
568
+ },
569
+ inline: false,
570
+ },
533
571
 
534
572
 
535
573
  // 废弃 - 隐藏
@@ -784,9 +784,11 @@
784
784
  <view class="jfb-base-order-detail__body-line"></view>
785
785
  <view class="jfb-base-order-detail__body-booking-list">
786
786
  <view v-for="(item,index) in info.contacts_v2['data']" :key="index" class="jfb-base-order-detail__body-booking-list-item">
787
- <view :style="{color:mainColor,background:bgColor}" class="jfb-base-order-detail__body-booking-list-item-num">{{item.sub_title}}</view>
787
+ <view :style="{color:mainColor,background:bgColor}" class="jfb-base-order-detail__body-booking-list-item-num">{{biz_code==='travel'?'出行人':'观演人'}}{{index+1}}</view>
788
788
  <view class="jfb-base-order-detail__body-booking-list-item-info">
789
- <view class="jfb-base-order-detail__body-booking-list-item-info-item" v-for="(ls,index) in item['contact']" :key="index">{{ls.label}}:{{ls.value}}</view>
789
+ <view class="jfb-base-order-detail__body-booking-list-item-info-name">{{item.name}}</view>
790
+ <view v-if="item.id_card" class="jfb-base-order-detail__body-booking-list-item-info-item">身份证:{{item.id_card}}</view>
791
+ <view v-if="item.phone" class="jfb-base-order-detail__body-booking-list-item-info-item">手机号:{{item.phone}}</view>
790
792
  </view>
791
793
  </view>
792
794
  </view>
@@ -892,6 +894,32 @@
892
894
  @click="handleAction(item)"
893
895
  >{{ item.text }}</xd-button>
894
896
  </view>
897
+ <view v-else-if="item.action === 'invoice'">
898
+ <xd-button
899
+ v-if="isShowInvoice && is_show_invoice==='Y'&&invoiceStatus==='N'"
900
+ size="small"
901
+ :type="item.type !== undefined ? item.type: 'primary'"
902
+ :radius="bottomBtnRadius + 'rpx'"
903
+ :style="{
904
+ height: bottomBtnHeight + 'rpx',
905
+ lineHeight: bottomBtnHeight + 'rpx',
906
+ }"
907
+ @click="handleAction(item)"
908
+ >{{ item.text }}</xd-button>
909
+ </view>
910
+ <view v-else-if="item.action === 'viewInvoice'">
911
+ <xd-button
912
+ v-if="isShowInvoice && is_show_invoice==='Y'&&invoiceStatus!=='N'"
913
+ size="small"
914
+ :type="item.type !== undefined ? item.type: 'primary'"
915
+ :radius="bottomBtnRadius + 'rpx'"
916
+ :style="{
917
+ height: bottomBtnHeight + 'rpx',
918
+ lineHeight: bottomBtnHeight + 'rpx',
919
+ }"
920
+ @click="handleAction(item)"
921
+ >{{ item.text }}</xd-button>
922
+ </view>
895
923
  <view v-else>
896
924
  <xd-button
897
925
  size="small"
@@ -1055,7 +1083,12 @@ export default {
1055
1083
  supplementList: [],
1056
1084
  supplementTitle: "",
1057
1085
 
1058
- code_location:'none',
1086
+ code_location: 'none',
1087
+ is_show_invoice: 'N',
1088
+ invoicePath: '',
1089
+ isShowInvoice: false,
1090
+ invoiceStatus: '',
1091
+ viewInvoicePath: ''
1059
1092
  };
1060
1093
  },
1061
1094
  watch: {
@@ -1079,6 +1112,11 @@ export default {
1079
1112
  this.getOrderDetail();
1080
1113
  }
1081
1114
  },
1115
+ is_show_invoice(){
1116
+ if (this.isPreview) {
1117
+ this.getOrderDetail();
1118
+ }
1119
+ },
1082
1120
  },
1083
1121
  computed: {
1084
1122
  ...mapState(['siteInfo']),
@@ -1157,6 +1195,18 @@ export default {
1157
1195
  this.getCountDown();
1158
1196
  }
1159
1197
  },
1198
+ getIsInvoice() {
1199
+ jfbRootExec("getCheckInvoice", {
1200
+ vm: this,
1201
+ data: {
1202
+ main_order_id: this.main_order_id,
1203
+ pay_order_id: this.info.pay_info.pay_order_id,
1204
+ },
1205
+ }).then(res => {
1206
+ this.isShowInvoice = res.is_allow_open === 'Y'
1207
+ this.invoiceStatus = res.status
1208
+ })
1209
+ },
1160
1210
  getOrderDetail() {
1161
1211
  jfbRootExec("getBaseOrderDetail", {
1162
1212
  vm: this,
@@ -1329,6 +1379,21 @@ export default {
1329
1379
  });
1330
1380
  }
1331
1381
 
1382
+ //增加删除订单按钮
1383
+ if(this.is_show_invoice === 'Y') {
1384
+ let pay = (res.buttons||[]).filter(item => item.action === 'invoice');
1385
+ let del = [{action:'invoice', text:'申请开票'}];
1386
+ if(pay.length === 1) del = []
1387
+ res.buttons = del.concat(res.buttons || [])
1388
+ }
1389
+ //增加删除订单按钮
1390
+ if(this.is_show_invoice === 'Y') {
1391
+ let pay = (res.buttons||[]).filter(item => item.action === 'viewInvoice');
1392
+ let del = [{action:'viewInvoice', text:'查看开票'}];
1393
+ if(pay.length === 1) del = []
1394
+ res.buttons = del.concat(res.buttons || [])
1395
+ }
1396
+
1332
1397
  if (res.product) {
1333
1398
  try {
1334
1399
  jfbRootExec("getBaseProductDetail", {
@@ -1356,6 +1421,9 @@ export default {
1356
1421
  }
1357
1422
  else {
1358
1423
  this.info = res;
1424
+ if (this.is_show_invoice === 'Y') {
1425
+ this.getIsInvoice()
1426
+ }
1359
1427
  if (this.info.status.loading_timeout != "-1") {
1360
1428
  this.timeDown();
1361
1429
  }
@@ -1430,6 +1498,9 @@ export default {
1430
1498
  this.showPreviewCode = true;
1431
1499
  }
1432
1500
  }
1501
+ this.is_show_invoice = getContainerPropsValue(container, "content.is_show_invoice", "N");
1502
+ this.invoicePath = getContainerPropsValue(container, "content.invoicePath", { value: "", }).value;
1503
+ this.viewInvoicePath = getContainerPropsValue(container, "content.viewInvoicePath", { value: "", }).value;
1433
1504
  },
1434
1505
  getCountDown() {
1435
1506
  this.timer = setInterval(() => {
@@ -1592,6 +1663,14 @@ export default {
1592
1663
  }).catch(err => {
1593
1664
  this.$xdHideLoading();
1594
1665
  })
1666
+ }if (item.action === "invoice") {
1667
+ this.$xdUniHelper.navigateTo({
1668
+ url: `${this.invoicePath}?main_order_id=${this.main_order_id}&pay_order_id=${this.info.pay_info.pay_order_id}`,
1669
+ });
1670
+ }if (item.action === "viewInvoice") {
1671
+ this.$xdUniHelper.navigateTo({
1672
+ url: `${this.viewInvoicePath}?main_order_id=${this.main_order_id}&pay_order_id=${this.info.pay_info.pay_order_id}`,
1673
+ });
1595
1674
  }
1596
1675
  else {
1597
1676
  console.error(`item.action=${item.action}, 此action不可用`)
@@ -102,5 +102,6 @@ module.exports = {
102
102
  "request_id": "6178d3499b91f274"
103
103
  },
104
104
  cancelBaseOrder:{"pay_order_id": "488003809474256896","request_id": "6178d3499b91f274"},
105
- deleteBaseOrder:{"pay_order_id": "488003809474256896","request_id": "6178d3499b91f274"},
105
+ deleteBaseOrder: { "pay_order_id": "488003809474256896", "request_id": "6178d3499b91f274" },
106
+ getCheckInvoice: { "partner_id": 0, "site_id": "", "user_id": 5000358, "is_allow_open": "Y", "error_reason": "", "open_nnid": "", "status": "N", "status_name": "未开票", "request_id": "420fc4fe050beb91" }
106
107
  }