|
|
@@ -27,7 +27,12 @@
|
|
|
|
|
|
<!-- 发票抬头表单 -->
|
|
|
<view class="block mt-20">
|
|
|
- <view class="fs-30 fw-600 color-333 mb-28">填写发票信息</view>
|
|
|
+ <view class="flex-align-center flex-between mb-28">
|
|
|
+ <view class="fs-30 fw-600 color-333">填写发票信息</view>
|
|
|
+ <view class="import-btn flex-center br-20 fs-24 color-theme py-8 px-16" @click="importWechatTitle">
|
|
|
+ 导入微信抬头
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
<!-- 接收邮箱 -->
|
|
|
<view class="form-item">
|
|
|
@@ -153,6 +158,25 @@ onLoad((options: any) => {
|
|
|
.catch(() => {});
|
|
|
});
|
|
|
|
|
|
+const importWechatTitle = () => {
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ wx.chooseInvoiceTitle({
|
|
|
+ success: (res: any) => {
|
|
|
+ form.invoiceType = res.type === '1' ? 'ORGANIZATION' : 'INDIVIDUAL';
|
|
|
+ form.invoiceTitle = res.title || '';
|
|
|
+ form.taxId = res.taxNumber || '';
|
|
|
+ form.address = res.companyAddress || '';
|
|
|
+ form.phone = res.telephone || '';
|
|
|
+ form.bankName = res.bankName || '';
|
|
|
+ form.bankAccount = res.bankAccount || '';
|
|
|
+ },
|
|
|
+ fail: (err: any) => {
|
|
|
+ console.log('取消选择微信抬头', err);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
+};
|
|
|
+
|
|
|
const selectTitle = (item: any) => {
|
|
|
selectedTitleId.value = item.id;
|
|
|
form.invoiceType = item.invoiceType || "ORGANIZATION";
|
|
|
@@ -247,6 +271,13 @@ const submit = () => {
|
|
|
line-height: 80rpx;
|
|
|
}
|
|
|
|
|
|
+.flex-between { justify-content: space-between; }
|
|
|
+
|
|
|
+.import-btn {
|
|
|
+ border: 2rpx solid #419D95;
|
|
|
+ background: rgba(65, 157, 149, 0.06);
|
|
|
+}
|
|
|
+
|
|
|
.type-selector {
|
|
|
.type-option {
|
|
|
border: 2rpx solid #e0e0e0;
|