|
@@ -23,7 +23,7 @@
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
</view>
|
|
|
- <view class="invoice-main from" v-if="invoiceType == '3'">
|
|
|
+ <view class="invoice-main from" v-if="invoiceType == '2'">
|
|
|
<view class="invoice-from">
|
|
|
<view class="label">单位名称:</view>
|
|
|
<input class="form-input" type="text" v-model="invoiceData.invoiceTitle" placeholder="请填写单位信息(必填)" maxlength="20">
|
|
@@ -53,7 +53,7 @@
|
|
|
maxlength="19">
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="invoice-main" v-if="invoiceType == '2'">
|
|
|
+ <view class="invoice-main" v-if="invoiceType == '3'">
|
|
|
<view class="invoice-ltitle">发票内容</view>
|
|
|
<view class="invoice-group tit">
|
|
|
<checkbox-group class="row-group" @change="checkboxChange">
|
|
@@ -95,7 +95,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getFindInvoice,updateInvoice } from "@/api/order.js"
|
|
|
export default{
|
|
|
name:"invoice",
|
|
|
data() {
|
|
@@ -107,9 +106,8 @@
|
|
|
titleCurrent:0,
|
|
|
inventoryChecked:false,
|
|
|
invoiceTypeList:[
|
|
|
- {value:'1',name:'不开发票'},
|
|
|
- {value:'2',name:'普通发票'},
|
|
|
- {value:'3',name:'增值税发票'},
|
|
|
+ {value:'1',name:'不要发票'},
|
|
|
+ {value:'2',name:'要发票'},
|
|
|
],
|
|
|
invoiceTitleList:[
|
|
|
{value:'0',name:'个人'},
|
|
@@ -141,7 +139,7 @@
|
|
|
methods:{
|
|
|
getUseFindInvoice(){//获取发票信息
|
|
|
this.$api.getStorage().then((resolve) => {
|
|
|
- getFindInvoice({userId:resolve.userID}).then(response =>{
|
|
|
+ this.OrderService.GetFindInvoice({userId:resolve.userID}).then(response =>{
|
|
|
if(response.data == null){
|
|
|
this.invoiceData = Object.assign(this.invoiceData,'',{type:0})
|
|
|
}else{
|
|
@@ -153,7 +151,7 @@
|
|
|
updateInvoiceFn(){//保存发票信息
|
|
|
this.$api.getStorage().then((resolve) => {
|
|
|
let params =Object.assign(this.invoiceData,'',{userId:resolve.userID})
|
|
|
- updateInvoice(params).then(response =>{})
|
|
|
+ this.OrderService.UpdateInvoice(params).then(response =>{})
|
|
|
})
|
|
|
},
|
|
|
choiceaInvoiceConfim(){
|
|
@@ -162,11 +160,11 @@
|
|
|
this.choiceaInvoiceThree()
|
|
|
this.invoiceText = '不开发票'
|
|
|
break;
|
|
|
+ // case '2':
|
|
|
+ // this.choiceaInvoiceTwo()
|
|
|
+ // this.invoiceText = this.peopleInvoiceData.invoiceTitle
|
|
|
+ // break;
|
|
|
case '2':
|
|
|
- this.choiceaInvoiceTwo()
|
|
|
- this.invoiceText = this.peopleInvoiceData.invoiceTitle
|
|
|
- break;
|
|
|
- case '3':
|
|
|
this.choiceaInvoiceFirst()
|
|
|
this.invoiceText = this.invoiceData.invoiceTitle
|
|
|
break;
|
|
@@ -204,7 +202,7 @@
|
|
|
this.$emit('handleChoiceaInvoice',Object.assign(this.invoiceData,'',{type:2}))
|
|
|
this.hideSpec()
|
|
|
},
|
|
|
- choiceaInvoiceTwo(){//普通发票
|
|
|
+ choiceaInvoiceTwo(){//取消普通发票.(可删除)
|
|
|
switch(this.peopleInvoiceData.invoiceTitleType){
|
|
|
case '0':
|
|
|
if(this.peopleInvoiceData.invoiceContent == ''){
|
|
@@ -258,12 +256,13 @@
|
|
|
}
|
|
|
switch(this.invoiceType){
|
|
|
case '2':
|
|
|
- this.peopleInvoiceData.invoiceTitleType = "0"
|
|
|
- this.titleCurrent = 0
|
|
|
- break;
|
|
|
- case '3':
|
|
|
this.getUseFindInvoice()
|
|
|
break;
|
|
|
+ //取消普通发票.(可删除)
|
|
|
+ // case '3':
|
|
|
+ // this.peopleInvoiceData.invoiceTitleType = "0"
|
|
|
+ // this.titleCurrent = 0
|
|
|
+ // break;
|
|
|
}
|
|
|
},
|
|
|
radioChangeTitle(e) {
|