123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <template>
- <view style="padding-bottom:220rpx;">
- <!-- 发票信息 -->
- <view class="box flex justify-center">
- <view class="box-con flex justify-center">
- <view class="box-con-c">
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 发票抬头
- <text style="color: red;font-size: 32rpx;margin-top: 20rpx;margin-left: 10rpx;">*</text>
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="taitou" input-align="right" type="text" placeholder="例:西安XXX有限公司" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 纳税人识别号
- <text style="color: red;font-size: 32rpx;margin-top: 20rpx;margin-left: 10rpx;">*</text>
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="shibiehao" input-align="right" type="text" placeholder="请填写纳税人识别号" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 发票类型
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="types" :disabled="true" input-align="right" type="text"
- placeholder="请填写发票类型" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 发票内容
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="contents" input-align="right" type="text" placeholder="请填写发票内容" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 发票金额
- <text style="color: red;font-size: 32rpx;margin-top: 20rpx;margin-left: 10rpx;">*</text>
- </view>
- <view class="box-con-c-item-r">
- <text style="color: #346EF6;">{{price}}元</text>
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 注册地址
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="address" input-align="right" type="text" placeholder="请填写注册地址" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 注册电话
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="zcphone" input-align="right" type="text" placeholder="请填写注册电话" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 开户银行
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="yh" input-align="right" type="text" placeholder="请填写开户银行" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 银行账号
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="yhzh" input-align="right" type="text" placeholder="请填写银行账号" />
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 收件人信息 -->
- <view class="info flex justify-center">
- <view class="info-box">
- 收件人信息
- </view>
- </view>
- <view class="box flex justify-center">
- <view class="box-con flex justify-center">
- <view class="box-con-c">
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 接收电子邮件
- <text style="color: red;font-size: 32rpx;margin-top: 20rpx;margin-left: 10rpx;">*</text>
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="email" input-align="right" type="text" placeholder="用于向你发送电子发票" />
- </view>
- </view>
- <view class="box-con-c-item flex justify-between align-center">
- <view class="box-con-c-item-l flex align-center">
- 接收手机号
- <text style="color: red;font-size: 32rpx;margin-top: 20rpx;margin-left: 10rpx;">*</text>
- </view>
- <view class="box-con-c-item-r">
- <u-input v-model="phone" input-align="right" type="number" maxlength="11"
- placeholder="订单记录通过短信发送" />
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 确认开票 -->
- <view class="btn flex justify-center">
- <view class="btn-box flex justify-center align-center" @click="submit">
- 提交
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- zcphone: '',
- yh: '',
- yhzh: '',
- email: '',
- phone: '',
- address: '',
- types: '电子发票',
- contents: '',
- taitou: '',
- shibiehao: '',
- indentNumber: '',
- type: '',
- price: 0,
- };
- },
- onLoad(e) {
- this.price = e.price
- this.indentNumber = e.indentNumber
- },
- methods: {
- //提交
- submit() {
- if (this.taitou == '') {
- uni.showToast({
- title: '请输入发票抬头',
- icon: 'none'
- })
- return
- }
- if (this.shibiehao == '') {
- uni.showToast({
- title: '请输入纳税人识别号',
- icon: 'none'
- })
- return
- }
- if (this.email == '') {
- uni.showToast({
- title: '请输入接收电子邮件',
- icon: 'none'
- })
- return
- }
- if (this.phone == '') {
- uni.showToast({
- title: '请输入接收手机号',
- icon: 'none'
- })
- return
- }
- // let invoiceContent =
- // `<p><em>发票抬头:${this.taitou}</em></p>`+`<p><em>纳税人识别号:${this.shibiehao}</em></p>`+`${this.address!=''?'<p><em>注册地址:'+this.address+'</em></p>':''}`+`${this.zcphone!=''?'<p><em>注册电话:'+this.zcphone+'</em></p>':''}`+`${this.yh!=''?'<p><em>开户银行:'+this.yh+'</em></p>':''}`+`${this.yhzh!=''?'<p><em>银行账号:'+this.yhzh+'</em></p>':''}`
-
- let data = {
- indentNumber: this.indentNumber,
- userType: 1,
- invoiceType: 1,
- invoiceTitle: this.contents,
- invoiceMoney: this.price,
- userEmail: this.email,
- userPhone: this.phone,
- invoiceHeader:this.taitou,
- taxPayerNumber:this.shibiehao,
- bankAddress:this.address,
- bankPhone:this.zcphone,
- bankDeposit:this.yh,
- bankNumber:this.yhzh
- }
- this.$Request.postJson("/app/invoice/applyInvoice", data).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '提交成功!'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 1000)
- }else{
- uni.showToast({
- title:res.msg,
- icon:'none'
- })
- }
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .box {
- width: 100%;
- height: auto;
- margin-top: 20rpx;
- .box-con {
- width: 686rpx;
- height: 100%;
- background-color: #ffffff;
- border-radius: 16rpx;
- .box-con-c {
- width: 646rpx;
- height: 100%;
- }
- .box-con-c-item {
- width: 100%;
- height: 100rpx;
- border-bottom: 1rpx solid #f2f2f2;
- .box-con-c-item-l {
- width: 240rpx;
- height: 100%;
- }
- }
- }
- }
- .info {
- width: 100%;
- height: auto;
- margin-top: 20rpx;
- .info-box {
- width: 686rpx;
- color: #999999;
- padding-left: 20rpx;
- }
- }
- .btn {
- width: 100%;
- position: fixed;
- bottom: 0rpx;
- height: 200rpx;
- background-color: #ffffff;
- .btn-box {
- width: 686rpx;
- height: 100rpx;
- border-radius: 50rpx;
- background-color: #346EF6;
- color: #ffffff;
- margin-top: 40rpx;
- }
- }
- </style>
|