|
@@ -8,7 +8,7 @@
|
|
|
<view class="open" v-if="current == 0">
|
|
|
<view class="form">
|
|
|
<u-form :model="form" ref="uForm">
|
|
|
- <u-form-item label="发票类型" label-width="130" required prop="type" >
|
|
|
+ <u-form-item label="发票类型" label-width="150" required prop="type" >
|
|
|
<u-radio-group v-model="form.type" @change="formTypeChange">
|
|
|
<u-radio v-for="(item, index) in typeList" :key="index" :name="item.value">
|
|
|
{{ item.name }}
|
|
@@ -19,7 +19,7 @@
|
|
|
<!-- 增值税发票 -->
|
|
|
<template v-if="form.type == 2">
|
|
|
|
|
|
- <u-form-item label="申请主体" label-width="130" required prop="subject">
|
|
|
+ <u-form-item label="申请主体" label-width="150" required prop="subject">
|
|
|
<u-radio-group v-model="form.subject">
|
|
|
<u-radio :key="index" name="2">
|
|
|
企业
|
|
@@ -27,32 +27,32 @@
|
|
|
</u-radio-group>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label="发票抬头" label-width="130" required prop="invoiceTitle" >
|
|
|
- <u-input placeholder="请输入" v-model="form.invoiceTitle" />
|
|
|
+ <u-form-item label="发票抬头" label-width="150" required prop="invoiceTitle" >
|
|
|
+ <u-input placeholder="请输入发票抬头" v-model="form.invoiceTitle" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="单位税号" label-width="130" required prop="taxRegistryNumber" >
|
|
|
- <u-input placeholder="请输入" v-model="form.taxRegistryNumber" />
|
|
|
+ <u-form-item label="纳税登记号" label-width="150" required prop="taxRegistryNumber" >
|
|
|
+ <u-input placeholder="请输入纳税登记号" v-model="form.taxRegistryNumber" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="单位地址" label-width="130" required prop="companyAddress" >
|
|
|
- <u-input placeholder="请输入" v-model="form.companyAddress" />
|
|
|
+ <u-form-item label="单位地址" label-width="150" required prop="companyAddress" >
|
|
|
+ <u-input placeholder="请输入单位地址" v-model="form.companyAddress" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="电话号码" label-width="130" required prop="phone" >
|
|
|
- <u-input placeholder="请输入" type="number" v-model="form.phone" />
|
|
|
+ <u-form-item label="电话号码" label-width="150" required prop="phone" >
|
|
|
+ <u-input placeholder="请输入电话号码" type="number" v-model="form.phone" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="开户银行" label-width="130" required prop="bankName" >
|
|
|
- <u-input placeholder="请输入" v-model="form.bankName" />
|
|
|
+ <u-form-item label="开户银行" label-width="150" required prop="bankName" >
|
|
|
+ <u-input placeholder="请输入开户银行" v-model="form.bankName" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="银行账号" label-width="130" required prop="bankAccount" >
|
|
|
- <u-input placeholder="请输入" type="number" v-model="form.bankAccount" />
|
|
|
+ <u-form-item label="银行账号" label-width="150" required prop="bankAccount" >
|
|
|
+ <u-input placeholder="请输入银行账号" type="number" v-model="form.bankAccount" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="收件地址" label-width="130" required prop="receivingAddress" >
|
|
|
- <u-input placeholder="请输入" v-model="form.receivingAddress" />
|
|
|
+ <u-form-item label="收件地址" label-width="150" required prop="receivingAddress" >
|
|
|
+ <u-input placeholder="请输入收件地址" v-model="form.receivingAddress" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="收件人" label-width="130" required prop="receivingName" >
|
|
|
- <u-input placeholder="请输入" v-model="form.receivingName" />
|
|
|
+ <u-form-item label="收件人" label-width="150" required prop="receivingName" >
|
|
|
+ <u-input placeholder="请输入收件人" v-model="form.receivingName" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="收件手机" label-width="130" required prop="receivingTel" >
|
|
|
- <u-input placeholder="请输入" v-model="form.receivingTel" />
|
|
|
+ <u-form-item label="收件手机" label-width="150" required prop="receivingTel" >
|
|
|
+ <u-input placeholder="请输入收件手机" v-model="form.receivingTel" />
|
|
|
</u-form-item>
|
|
|
|
|
|
</template>
|
|
@@ -60,7 +60,7 @@
|
|
|
|
|
|
<!-- 普通发票 -->
|
|
|
<template v-else>
|
|
|
- <u-form-item label="申请主体" label-width="130" required prop="subject">
|
|
|
+ <u-form-item label="申请主体" label-width="150" required prop="subject">
|
|
|
<u-radio-group v-model="form.subject">
|
|
|
<u-radio v-for="(item, index) in mainList" :key="index" :name="item.value">
|
|
|
{{ item.name }}
|
|
@@ -68,14 +68,17 @@
|
|
|
</u-radio-group>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label="发票抬头" label-width="130" required prop="invoiceTitle" >
|
|
|
- <u-input placeholder="请输入" v-model="form.invoiceTitle" />
|
|
|
+ <u-form-item label="发票抬头" label-width="150" required prop="invoiceTitle" >
|
|
|
+ <u-input placeholder="请输入发票抬头" v-model="form.invoiceTitle" />
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item v-if="form.subject == '2'" label="纳税登记号" label-width="150" required prop="taxRegistryNumber" >
|
|
|
+ <u-input placeholder="请输入纳税登记号" v-model="form.taxRegistryNumber" />
|
|
|
</u-form-item>
|
|
|
</template>
|
|
|
<!-- 普通发票 -->
|
|
|
|
|
|
|
|
|
- <u-form-item label="选择订单" label-width="130" required prop="orderGoodsIds" right-icon="arrow-right" ref="orderGoodsIds">
|
|
|
+ <u-form-item label="选择订单" label-width="150" required prop="orderGoodsIds" right-icon="arrow-right" ref="orderGoodsIds">
|
|
|
<view class="form-item" @click="selectOrderModal = true">
|
|
|
<u-input placeholder="请选择" disabled @click="selectOrderModal = true" v-model="form.orderGoodsIds" />
|
|
|
</view>
|
|
@@ -228,41 +231,44 @@
|
|
|
<view slot="title">发票抬头:</view>
|
|
|
<text>{{invoiceDetail.invoiceTitle}}</text>
|
|
|
</u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">单位税号:</view>
|
|
|
- <text>{{invoiceDetail.taxRegistryNumber || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">单位地址:</view>
|
|
|
- <text>{{invoiceDetail.companyAddress || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">电话号码:</view>
|
|
|
- <text>{{invoiceDetail.phone || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">开户银行:</view>
|
|
|
- <text>{{invoiceDetail.bankName || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">银行账号:</view>
|
|
|
- <text>{{invoiceDetail.bankAccount || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">收件地址:</view>
|
|
|
- <text>{{invoiceDetail.receivingAddress || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
- <view slot="title">收件人:</view>
|
|
|
- <text>{{invoiceDetail.receivingName || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
|
|
|
- <view slot="title">收件手机:</view>
|
|
|
- <text>{{invoiceDetail.receivingTel || ''}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
|
|
|
- <view slot="title">开票订单:</view>
|
|
|
- </u-cell-item>
|
|
|
+ <template v-if="invoiceDetail.type == 2">
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">纳税登记号:</view>
|
|
|
+ <text>{{invoiceDetail.taxRegistryNumber || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">单位地址:</view>
|
|
|
+ <text>{{invoiceDetail.companyAddress || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">电话号码:</view>
|
|
|
+ <text>{{invoiceDetail.phone || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">开户银行:</view>
|
|
|
+ <text>{{invoiceDetail.bankName || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">银行账号:</view>
|
|
|
+ <text>{{invoiceDetail.bankAccount || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">收件地址:</view>
|
|
|
+ <text>{{invoiceDetail.receivingAddress || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">收件人:</view>
|
|
|
+ <text>{{invoiceDetail.receivingName || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
|
|
|
+ <view slot="title">收件手机:</view>
|
|
|
+ <text>{{invoiceDetail.receivingTel || ''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
|
|
|
+ <view slot="title">开票订单:</view>
|
|
|
+ </u-cell-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<view class="order-list">
|
|
|
<view class="order-item" :key="orderIndex" v-for="(orderItem,orderIndex) in invoiceDetail.orderList">
|
|
|
<view class="order-title">{{orderItem.goodsName}}</view>
|
|
@@ -285,6 +291,10 @@
|
|
|
<text class="text agree" v-if="invoiceDetail.periodStatus == 3">通过</text>
|
|
|
<text class="text refuse" v-if="invoiceDetail.periodStatus == 2">驳回</text>
|
|
|
</u-cell-item>
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <view slot="title">审核反馈:</view>
|
|
|
+ <text class="text">{{invoiceDetail.periodReason||''}}</text>
|
|
|
+ </u-cell-item>
|
|
|
<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
<view slot="title">发票状态:</view>
|
|
|
<text class="text refuse" v-if="invoiceDetail.invoiceStatus == 1">未开票</text>
|
|
@@ -301,13 +311,13 @@
|
|
|
</u-cell-item>
|
|
|
|
|
|
|
|
|
- <u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <u-cell-item :border-bottom="false" hover-class="none" :arrow="false" v-if="invoiceDetail.periodStatus == 3 && invoiceDetail.invoiceStatus == 2 && invoiceDetail.type == 2 && invoiceDetail.subject == 2">
|
|
|
<view slot="title">机构发票邮寄状态:</view>
|
|
|
<text class="text" v-if="invoiceDetail.sendInvoice == 1">是</text>
|
|
|
<text class="text" v-else>否</text>
|
|
|
</u-cell-item>
|
|
|
|
|
|
- <u-cell-item v-if="invoiceDetail.sendInvoice == 1" @click.stop="copy(invoiceDetail.trackingNum)" :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
+ <u-cell-item v-if="invoiceDetail.periodStatus == 3 && invoiceDetail.invoiceStatus == 2 && invoiceDetail.sendInvoice == 1 && invoiceDetail.type == 2 && invoiceDetail.subject == 2" @click.stop="copy(invoiceDetail.trackingNum)" :border-bottom="false" hover-class="none" :arrow="false">
|
|
|
<view slot="title">发票邮寄快递单号:(点击可复制)</view>
|
|
|
<text class="text">{{invoiceDetail.trackingNum}}</text>
|
|
|
</u-cell-item>
|
|
@@ -370,7 +380,7 @@ export default {
|
|
|
},
|
|
|
form:{
|
|
|
type:'1',
|
|
|
- subject:'',
|
|
|
+ subject:'1',
|
|
|
invoiceTitle:'',
|
|
|
orderGoodsIds:'',
|
|
|
taxRegistryNumber:'',
|
|
@@ -428,7 +438,7 @@ export default {
|
|
|
taxRegistryNumber: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请输入单位税号',
|
|
|
+ message: '请输入纳税登记号',
|
|
|
// 可以单个或者同时写两个触发验证方式
|
|
|
trigger: ['change'],
|
|
|
}
|
|
@@ -576,15 +586,34 @@ export default {
|
|
|
formSubmit() {
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
if(valid) {
|
|
|
+
|
|
|
+ if(this.invoicePirce > 10000) {
|
|
|
+ uni.showModal({
|
|
|
+ title:'提示',
|
|
|
+ content:'您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单',
|
|
|
+ showCancel:false,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
let data = JSON.parse(JSON.stringify(this.form));
|
|
|
data.orderGoodsIds = data.orderGoodsIds.split(',')
|
|
|
- data.amount = this.invoicePirce
|
|
|
+ data.amount = this.invoicePirce;
|
|
|
+ if(data.subject == '1') {
|
|
|
+ data.taxRegistryNumber = '';
|
|
|
+ data.companyAddress = '';
|
|
|
+ data.phone = '';
|
|
|
+ data.bankName = '';
|
|
|
+ data.bankAccount = '';
|
|
|
+ data.receivingAddress = '';
|
|
|
+ data.receivingName = '';
|
|
|
+ data.receivingTel = '';
|
|
|
+ }
|
|
|
this.$api.orderInvoice(data).then(res => {
|
|
|
if(res.data.code == 200) {
|
|
|
this.orderInvoiceCanInvoiceList();
|
|
|
this.form = {
|
|
|
- type:'',
|
|
|
- subject:'',
|
|
|
+ type:'1',
|
|
|
+ subject:'1',
|
|
|
invoiceTitle:'',
|
|
|
orderGoodsIds:'',
|
|
|
taxRegistryNumber:'',
|
|
@@ -596,6 +625,7 @@ export default {
|
|
|
receivingName:'',
|
|
|
receivingTel:'',
|
|
|
};
|
|
|
+ this.invoicePirce = 0;
|
|
|
uni.showToast({
|
|
|
title:'申请成功'
|
|
|
})
|
|
@@ -618,7 +648,7 @@ export default {
|
|
|
if(e == '2') {
|
|
|
this.$set(this.form,'subject','2')
|
|
|
} else {
|
|
|
- this.$set(this.form,'subject','')
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
/**
|