jufubao-base 1.0.302-beta1 → 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 +20 -29
- package/src/components/JfbBaseInvoice/Attr.js +12 -39
- package/src/components/JfbBaseInvoice/JfbBaseInvoice.vue +470 -78
- 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 +9 -43
- package/src/components/JfbBaseInvoiceConfirm/Attr.js +12 -39
- package/src/components/JfbBaseInvoiceConfirm/JfbBaseInvoiceConfirm.vue +177 -80
- 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 +12 -35
- package/src/components/JfbBaseInvoiceDetail/Attr.js +12 -39
- package/src/components/JfbBaseInvoiceDetail/JfbBaseInvoiceDetail.vue +422 -80
- 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
|
@@ -894,6 +894,32 @@
|
|
|
894
894
|
@click="handleAction(item)"
|
|
895
895
|
>{{ item.text }}</xd-button>
|
|
896
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>
|
|
897
923
|
<view v-else>
|
|
898
924
|
<xd-button
|
|
899
925
|
size="small"
|
|
@@ -1057,7 +1083,12 @@ export default {
|
|
|
1057
1083
|
supplementList: [],
|
|
1058
1084
|
supplementTitle: "",
|
|
1059
1085
|
|
|
1060
|
-
code_location:'none',
|
|
1086
|
+
code_location: 'none',
|
|
1087
|
+
is_show_invoice: 'N',
|
|
1088
|
+
invoicePath: '',
|
|
1089
|
+
isShowInvoice: false,
|
|
1090
|
+
invoiceStatus: '',
|
|
1091
|
+
viewInvoicePath: ''
|
|
1061
1092
|
};
|
|
1062
1093
|
},
|
|
1063
1094
|
watch: {
|
|
@@ -1081,6 +1112,11 @@ export default {
|
|
|
1081
1112
|
this.getOrderDetail();
|
|
1082
1113
|
}
|
|
1083
1114
|
},
|
|
1115
|
+
is_show_invoice(){
|
|
1116
|
+
if (this.isPreview) {
|
|
1117
|
+
this.getOrderDetail();
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1084
1120
|
},
|
|
1085
1121
|
computed: {
|
|
1086
1122
|
...mapState(['siteInfo']),
|
|
@@ -1159,6 +1195,18 @@ export default {
|
|
|
1159
1195
|
this.getCountDown();
|
|
1160
1196
|
}
|
|
1161
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
|
+
},
|
|
1162
1210
|
getOrderDetail() {
|
|
1163
1211
|
jfbRootExec("getBaseOrderDetail", {
|
|
1164
1212
|
vm: this,
|
|
@@ -1331,6 +1379,21 @@ export default {
|
|
|
1331
1379
|
});
|
|
1332
1380
|
}
|
|
1333
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
|
+
|
|
1334
1397
|
if (res.product) {
|
|
1335
1398
|
try {
|
|
1336
1399
|
jfbRootExec("getBaseProductDetail", {
|
|
@@ -1358,6 +1421,9 @@ export default {
|
|
|
1358
1421
|
}
|
|
1359
1422
|
else {
|
|
1360
1423
|
this.info = res;
|
|
1424
|
+
if (this.is_show_invoice === 'Y') {
|
|
1425
|
+
this.getIsInvoice()
|
|
1426
|
+
}
|
|
1361
1427
|
if (this.info.status.loading_timeout != "-1") {
|
|
1362
1428
|
this.timeDown();
|
|
1363
1429
|
}
|
|
@@ -1432,6 +1498,9 @@ export default {
|
|
|
1432
1498
|
this.showPreviewCode = true;
|
|
1433
1499
|
}
|
|
1434
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;
|
|
1435
1504
|
},
|
|
1436
1505
|
getCountDown() {
|
|
1437
1506
|
this.timer = setInterval(() => {
|
|
@@ -1594,6 +1663,15 @@ export default {
|
|
|
1594
1663
|
}).catch(err => {
|
|
1595
1664
|
this.$xdHideLoading();
|
|
1596
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.viewInvoicePath='/plus/invoice/detail'
|
|
1672
|
+
this.$xdUniHelper.navigateTo({
|
|
1673
|
+
url: `${this.viewInvoicePath}?main_order_id=${this.main_order_id}&pay_order_id=${this.info.pay_info.pay_order_id}`,
|
|
1674
|
+
});
|
|
1597
1675
|
}
|
|
1598
1676
|
else {
|
|
1599
1677
|
console.error(`item.action=${item.action}, 此action不可用`)
|