| xqd
@@ -1,12 +1,13 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="form-box">
|
|
|
- <picker mode="region" @change="bindPickerRegion">
|
|
|
+ <picker mode="selector" @change="bindPickerBillType" :range="billType">
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">票据类型<text>*</text></view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <text :class="{'val':region!=='请选择','pla':region==='请选择'}">{{region}}</text>
|
|
|
- <image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode="">
|
|
|
+ <text :class="{'val':invoice_info.bill_type!=='','pla':invoice_info.bill_type===''}">{{invoice_info.bill_type!==''?invoice_info.bill_type:'请选择'}}</text>
|
|
|
+ <image class="arrow-right"
|
|
|
+ src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode="">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -14,12 +15,13 @@
|
|
|
</view>
|
|
|
<view class="form-box">
|
|
|
<!-- <view class="title">楼盘信息</view> -->
|
|
|
- <picker mode="region" @change="bindPickerRegion">
|
|
|
+ <picker mode="selector" @change="bindPickerHeaderType" :range="headerType">
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">抬头类型<text>*</text></view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <text :class="{'val':region!=='请选择','pla':region==='请选择'}">{{region}}</text>
|
|
|
- <image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode="">
|
|
|
+ <text :class="{'val':invoice_info.header_type!=='','pla':invoice_info.header_type===''}">{{invoice_info.header_type!==''?invoice_info.header_type:'请选择'}}</text>
|
|
|
+ <image class="arrow-right"
|
|
|
+ src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode="">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -28,7 +30,7 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">发票抬头<text>*</text></view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="企业名称" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.header_name" placeholder="企业名称" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -36,7 +38,7 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">税号</view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="抬头为企业单位时填写" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.duty_number" placeholder="抬头为企业单位时填写" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -44,17 +46,17 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">单位地址</view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="请输入" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.company_address" placeholder="请输入" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<view class="form-box">
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">电话号码</view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="请输入" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.phone" placeholder="请输入" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -62,7 +64,7 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">开户银行</view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="请输入" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.bank_name" placeholder="请输入" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -70,7 +72,7 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">银行账户</view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="请输入" style="text-align: right;"
|
|
|
+ <input type="text" v-model="invoice_info.bank_account" placeholder="请输入" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -78,13 +80,13 @@
|
|
|
<view class="main-between cross-center item">
|
|
|
<view class="title_1">开票金额<text>*</text></view>
|
|
|
<view class="main-right cross-center">
|
|
|
- <input type="text" value="" placeholder="请输入" style="text-align: right;"
|
|
|
+ <input type="digit" v-model="invoice_info.amount" placeholder="请输入" style="text-align: right;font-size: 28rpx;"
|
|
|
placeholder-style="font-size: 28rpx;font-weight: 500;color: #999999;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
- <button type="default" :class="{'add':true, 'allow-add':true, 'not-add':false}" :disabled="fasle">提交</button>
|
|
|
+ <button type="default" :class="{'add':true, 'allow-add':isAllowSub, 'not-add':!isAllowSub}" @click="submit">提交</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
| xqd
@@ -92,28 +94,61 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- region: '请选择',
|
|
|
- nature: '请选择',
|
|
|
+ billType:['发票(普通)'],
|
|
|
+ headerType:['个人/非企事业单位'],
|
|
|
|
|
|
- natureList: ['住宅用房', '非住宅用房']
|
|
|
+ invoice_info: {
|
|
|
+ bill_type: "",
|
|
|
+ header_type: "",
|
|
|
+ header_name: "",
|
|
|
+ duty_number: "",
|
|
|
+ company_address: "",
|
|
|
+ phone: "",
|
|
|
+ bank_name: "",
|
|
|
+ bank_account: "",
|
|
|
+ amount: '',
|
|
|
+ delivery_address: "",
|
|
|
+ user_address_id: ''
|
|
|
+ },
|
|
|
+ isAllowSub:false
|
|
|
};
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ invoice_info:{
|
|
|
+ handler:function(nVal,oVal){
|
|
|
+ if(nVal.bill_type && nVal.header_type && nVal.header_name &&nVal.amount){
|
|
|
+ this.isAllowSub=true
|
|
|
+ }else{
|
|
|
+ this.isAllowSub=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep:true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ let storageInvoiceInfo=this.$storage.getStorageSync('invoice_info')
|
|
|
+ if(storageInvoiceInfo){
|
|
|
+ this.invoice_info.delivery_address=storageInvoiceInfo.delivery_address
|
|
|
+ this.invoice_info.user_address_id=storageInvoiceInfo.user_address_id
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- selectBuild() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/sale/properties/addProperties'
|
|
|
- })
|
|
|
- },
|
|
|
- selectSale() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/index/binding/bindingSale'
|
|
|
- })
|
|
|
+ submit(){
|
|
|
+ if(this.isAllowSub){
|
|
|
+ this.$storage.setStorageSync('invoice_info', this.invoice_info);
|
|
|
+ uni.navigateBack()
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:'请填写完整信息',
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
- bindPickerRegion(e) {
|
|
|
- this.region = e.target.value.join('')
|
|
|
+ bindPickerBillType(e) {
|
|
|
+ this.invoice_info.bill_type = this.billType[e.target.value]
|
|
|
},
|
|
|
- bindPickerNature(e) {
|
|
|
- this.nature = this.natureList[e.target.value]
|
|
|
+ bindPickerHeaderType(e) {
|
|
|
+ this.invoice_info.header_type = this.headerType[e.target.value]
|
|
|
}
|
|
|
}
|
|
|
}
|