|
|
|
@ -5,20 +5,83 @@
|
|
|
|
|
<div class="section mt5"> <span class="line"> </span>发票</div>
|
|
|
|
|
<div class="trips-box">
|
|
|
|
|
<div class="item-box">
|
|
|
|
|
<UploadImagePdf ref="UploadImagePdf" @endCheck="handelEndCheck" :disabled="disabled || form.status == 1" :fileList="fileList" :isChecked="isChecked" @onCheck="handleCheck" :scanRes="scanRes" @scanRes="hanadleScanRes" @onConfirm="handleImgConfirm" />
|
|
|
|
|
<UploadImagePdf ref="UploadImagePdf" @endCheck="handelEndCheck" :type="invoiceType" :disabled="disabled || form.status == 1" :fileList="fileList" :isChecked="isChecked" @onCheck="handleCheck" :scanRes="scanRes" @scanRes="hanadleScanRes" @onConfirm="handleImgConfirm" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class=""></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section"> <span class="line"> </span> 基本信息</div>
|
|
|
|
|
<div class="trips-box">
|
|
|
|
|
<div class="item-box">
|
|
|
|
|
<RePick v-model="form.type" label="发票类型" :disabled="isChecked || disabled" :name="`type`" :list="stateList" isRequrie title="发票类型" titleKey="label" idKey="value" isCell clearable />
|
|
|
|
|
<div class="item-box" v-if="invoiceType == '01'">
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.serviceType ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.serviceType" @click="handleServiceTypeShow" label="发票消费类型" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.invoiceCode" label="发票代码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.invoiceNum" label="发票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.time ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.time" @click="handleDateShow" label="开票日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.taxAmount" @blur="handleBlur1" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="税额" />
|
|
|
|
|
<van-field v-model="form.excludingTaxAmount" @blur="handleBlur2" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="不含税金额" />
|
|
|
|
|
<van-field v-model="form.totalAmount" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="价税合计" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.invoiceDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.invoiceDate1" @click="handleDateShow('invoiceDate')" label="开票日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.totalTax" label="税额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.totalAmount" label="不含税金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.amountInFiguers" label="价税合计" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.sellerName" label="销售方名称" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.invoiceType ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.invoiceType" @click="handleInvoiceTypeShow" label="发票种类" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.purchaserName" label="购方名称" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.purchaserRegisterNum" label="购方纳税人识别号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.commodityTaxRate" label="税率" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.agent ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.agent1" @click="handleAgentTypeShow" label="是否代开" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.sellerRegisterNum" label="销售方纳税人识别号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-box" v-if="invoiceType == '02'">
|
|
|
|
|
<van-field v-model="form.ticketNum" label="车票号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.startingStation" label="始发站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.destinationStation" label="到达站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="出发日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.trainNum" label="车次号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.ticketRates" label="车票金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.name" label="乘客姓名" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingTime" @click="handleTimeShow('startingTime',form.startingTime)" label="时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.seatNum" label="座位号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-box" v-if="invoiceType == '03'">
|
|
|
|
|
<van-field v-model="form.name" label="姓名" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.startingStation" label="始发站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.destinationStation" label="目的站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.flight" label="航班号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.carrier" label="承运人" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.seatClass" label="座位等级" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingTime" @click="handleTimeShow('startingTime',form.startingTime)" label="时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.ticketNumber" label="电子客票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.fare" label="票价" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.fuelSurcharge" label="燃油附加费" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.devFund" label="民航发展基金/基建费" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.endorsement" label="签注" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.ticketRates" label="合计金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-box" v-if="invoiceType == '04'">
|
|
|
|
|
<van-field v-model="form.serviceProvider" label="服务商" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="行程开始时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="行程结束时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.phone" label="行程人手机号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.applicationDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.applicationDate1" @click="handleDateShow('applicationDate')" label="申请日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.totalFare" label="总金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<div v-for="(items,index) in form.items">
|
|
|
|
|
<span style="padding: 10px 0;font-size: 12px;font-weight: bold">行程 {{index+1}}</span>
|
|
|
|
|
<van-field v-model="items.carType" label="车型" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="items.distance" label="里程" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="items.startPlace" label="起点" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="items.destinationPlace" label="终点" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="items.city" label="城市" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="items.fare" label="金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-box" v-if="invoiceType == '05'">
|
|
|
|
|
<van-field v-model="form.invoiceCode" label="发票代码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.invoiceNum" label="发票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.taxiNum" label="车牌号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="日期" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.pickupTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.pickupTime" @click="handleTimeShow('pickupTime',form.pickupTime)" label="上车时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.dropoffTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dropoffTime" @click="handleTimeShow('dropoffTime',form.dropoffTime)" label="下车时间" required clear-trigger="always" input-align="right" />
|
|
|
|
|
<van-field v-model="form.totalFare" label="总金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.location" label="开票城市" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.pricePerkm" label="单价" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
<van-field v-model="form.distance" label="里程" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</van-form>
|
|
|
|
@ -31,7 +94,37 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 时间选择框-->
|
|
|
|
|
<van-popup v-model="timeShow" position="bottom">
|
|
|
|
|
<van-datetime-picker @confirm="timeConfirm" @cancel="timeCancel" v-model="currentTime" type="time" :min-hour="1" :max-hour="23" />
|
|
|
|
|
</van-popup>
|
|
|
|
|
<!-- 消费类型 -->
|
|
|
|
|
<van-popup v-model="serviceTypeShow" position="bottom">
|
|
|
|
|
<van-picker
|
|
|
|
|
show-toolbar
|
|
|
|
|
:columns="ServiceTypeList"
|
|
|
|
|
@cancel="serviceTypeShow = false"
|
|
|
|
|
@confirm="serviceTypeOnConfirm"
|
|
|
|
|
/>
|
|
|
|
|
</van-popup>
|
|
|
|
|
<!-- 发票种类 -->
|
|
|
|
|
<van-popup v-model="invoiceTypeShow" position="bottom">
|
|
|
|
|
<van-picker
|
|
|
|
|
show-toolbar
|
|
|
|
|
:columns="InvoiceTypeList"
|
|
|
|
|
@cancel="invoiceTypeShow = false"
|
|
|
|
|
@confirm="invoiceTypeOnConfirm"
|
|
|
|
|
/>
|
|
|
|
|
</van-popup>
|
|
|
|
|
<!-- 是否代开 -->
|
|
|
|
|
<van-popup v-model="agentTypeShow" position="bottom">
|
|
|
|
|
<van-picker
|
|
|
|
|
show-toolbar
|
|
|
|
|
:columns="agentList"
|
|
|
|
|
@cancel="agentTypeShow = false"
|
|
|
|
|
@confirm="agentTypeOnConfirm"
|
|
|
|
|
/>
|
|
|
|
|
</van-popup>
|
|
|
|
|
<!--行程时间范围选择 -->
|
|
|
|
|
<van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" color="#0088FE" @confirm="handleDateSelect" />
|
|
|
|
|
</div>
|
|
|
|
@ -39,7 +132,39 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import { deleteInvoice, createInvoice, getInvoice, updateInvoice } from "@/api/bs/invoice";
|
|
|
|
|
import {
|
|
|
|
|
deleteInvoice01,
|
|
|
|
|
deleteInvoice02,
|
|
|
|
|
deleteInvoice03,
|
|
|
|
|
deleteInvoice04,
|
|
|
|
|
deleteInvoice05,
|
|
|
|
|
createInvoice01,
|
|
|
|
|
updateInvoice01,
|
|
|
|
|
getInvoice01,
|
|
|
|
|
invoiceScanApi01,
|
|
|
|
|
invoiceCheckApi01,
|
|
|
|
|
createInvoice02,
|
|
|
|
|
updateInvoice02,
|
|
|
|
|
getInvoice02,
|
|
|
|
|
invoiceScanApi02,
|
|
|
|
|
invoiceCheckApi02,
|
|
|
|
|
createInvoice03,
|
|
|
|
|
updateInvoice03,
|
|
|
|
|
getInvoice03,
|
|
|
|
|
invoiceScanApi03,
|
|
|
|
|
invoiceCheckApi03,
|
|
|
|
|
createInvoice04,
|
|
|
|
|
updateInvoice04,
|
|
|
|
|
getInvoice04,
|
|
|
|
|
invoiceScanApi04,
|
|
|
|
|
invoiceCheckApi04,
|
|
|
|
|
createInvoice05,
|
|
|
|
|
updateInvoice05,
|
|
|
|
|
getInvoice05,
|
|
|
|
|
invoiceScanApi05,
|
|
|
|
|
invoiceCheckApi05,
|
|
|
|
|
exportInvoiceExcel01, exportInvoiceExcel02, exportInvoiceExcel03, exportInvoiceExcel04, exportInvoiceExcel05
|
|
|
|
|
} from "@/api/bs/invoice";
|
|
|
|
|
import { listData } from "@/api/system/dict/data";
|
|
|
|
|
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
|
|
|
|
|
import VerifyFunc from '@/utils/verify'
|
|
|
|
@ -84,6 +209,39 @@ export default {
|
|
|
|
|
defaultDate: new Date(),
|
|
|
|
|
dateShow: false,
|
|
|
|
|
form: {},
|
|
|
|
|
invoiceType:'01',
|
|
|
|
|
dateType:'',
|
|
|
|
|
timeShow:false,
|
|
|
|
|
currentTime:'',
|
|
|
|
|
timeType:'',
|
|
|
|
|
ServiceTypeList: [
|
|
|
|
|
{ text: '餐饮', value: '餐饮' },
|
|
|
|
|
{ text: '电器设备', value: '电器设备' },
|
|
|
|
|
{ text: '通讯', value: '通讯' },
|
|
|
|
|
{ text: '服务', value: '服务' },
|
|
|
|
|
{ text: '日用品食品', value: '日用品食品' },
|
|
|
|
|
{ text: '医疗', value: '医疗' },
|
|
|
|
|
{ text: '交通', value: '交通' },
|
|
|
|
|
{ text: '其他', value: '其他' },
|
|
|
|
|
],
|
|
|
|
|
InvoiceTypeList: [
|
|
|
|
|
{ text: '普通发票', value: '普通发票' },
|
|
|
|
|
{ text: '专用发票', value: '专用发票' },
|
|
|
|
|
{ text: '电子普通发票', value: '电子普通发票' },
|
|
|
|
|
{ text: '电子专用发票', value: '电子专用发票' },
|
|
|
|
|
{ text: '通行费电子普票', value: '通行费电子普票' },
|
|
|
|
|
{ text: '区块链发票', value: '区块链发票' },
|
|
|
|
|
{ text: '通用机打电子发票', value: '通用机打电子发票' },
|
|
|
|
|
{ text: '电子发票(专用发票)', value: '电子发票(专用发票)' },
|
|
|
|
|
{ text: '电子发票(普通发票)', value: '电子发票(普通发票)' },
|
|
|
|
|
],
|
|
|
|
|
agentList:[
|
|
|
|
|
{ text: '否', value: false },
|
|
|
|
|
{ text: '是', value: true },
|
|
|
|
|
],
|
|
|
|
|
serviceTypeShow:false,
|
|
|
|
|
invoiceTypeShow:false,
|
|
|
|
|
agentTypeShow:false
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
@ -129,12 +287,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handelEndCheck(obj) {
|
|
|
|
|
const { isChecked } = obj
|
|
|
|
|
this.isChecked = isChecked
|
|
|
|
|
this.form = {
|
|
|
|
|
...this.form,
|
|
|
|
|
...obj
|
|
|
|
|
}
|
|
|
|
|
this.form.status = obj
|
|
|
|
|
// const { isChecked } = obj
|
|
|
|
|
// this.isChecked = isChecked
|
|
|
|
|
// this.form = {
|
|
|
|
|
// ...this.form,
|
|
|
|
|
// ...obj
|
|
|
|
|
// }
|
|
|
|
|
// if (isChecked) {
|
|
|
|
|
// } else
|
|
|
|
|
},
|
|
|
|
@ -159,7 +318,12 @@ export default {
|
|
|
|
|
hanadleScanRes(res) {
|
|
|
|
|
this.form = {
|
|
|
|
|
...(res.data || {}),
|
|
|
|
|
time: `${res.data.invoiceDate ? dayjs(res.data.invoiceDate).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
invoiceDate1: `${res.data.invoiceDate ? dayjs(res.data.invoiceDate).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
startingDate1:`${res.data.startingDate ? dayjs(res.data.startingDate).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
startTime1:`${res.data.startTime ? dayjs(res.data.startTime).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
endTime1:`${res.data.endTime ? dayjs(res.data.endTime).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
applicationDate1:`${res.data.applicationDate ? dayjs(res.data.applicationDate).format('YYYY/MM/DD') : ''}`,
|
|
|
|
|
agent1:res.data.agent,
|
|
|
|
|
type: res.data.type
|
|
|
|
|
}
|
|
|
|
|
this.scanRes = res.data || {}
|
|
|
|
@ -168,10 +332,13 @@ export default {
|
|
|
|
|
this.fileList = list
|
|
|
|
|
},
|
|
|
|
|
handleInitForm() {
|
|
|
|
|
const { id, type } = this.$route.query || {}
|
|
|
|
|
let _this = this
|
|
|
|
|
const { id, type,invoiceType } = this.$route.query || {}
|
|
|
|
|
this.typeStr = type
|
|
|
|
|
this.invoiceType = invoiceType
|
|
|
|
|
if (id) {
|
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
|
const getInvoice = _this.invoiceType == '01' ? getInvoice01 : _this.invoiceType == '02' ? getInvoice02 : _this.invoiceType == '03' ? getInvoice03 : _this.invoiceType == '04' ? getInvoice04 : getInvoice05;
|
|
|
|
|
getInvoice(id).then((res) => {
|
|
|
|
|
let backRes = res.data || {}
|
|
|
|
|
this.form = {
|
|
|
|
@ -243,6 +410,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.$loading(true, 'form')
|
|
|
|
|
const deleteInvoice = this.invoiceType == '01' ? deleteInvoice01 : this.invoiceType == '02' ? deleteInvoice02 : this.invoiceType == '03' ? deleteInvoice03 : this.invoiceType == '04' ? deleteInvoice04 : deleteInvoice05;
|
|
|
|
|
deleteInvoice(this.form.id).then(() => {
|
|
|
|
|
// 清楚缓存
|
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'company-myInvoice')
|
|
|
|
@ -266,6 +434,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.$loading(true, 'form')
|
|
|
|
|
if (newForm.id != null) {
|
|
|
|
|
const updateInvoice = this.invoiceType == '01' ? updateInvoice01 : this.invoiceType == '02' ? updateInvoice02 : this.invoiceType == '03' ? updateInvoice03 : this.invoiceType == '04' ? updateInvoice04 : updateInvoice05;
|
|
|
|
|
updateInvoice(newForm).then(() => {
|
|
|
|
|
history.back()
|
|
|
|
|
this.$modal.msgSuccess("修改成功!");
|
|
|
|
@ -275,6 +444,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const createInvoice = this.invoiceType == '01' ? createInvoice01 : this.invoiceType == '02' ? createInvoice02 : this.invoiceType == '03' ? createInvoice03 : this.invoiceType == '04' ? createInvoice04 : createInvoice05;
|
|
|
|
|
createInvoice(newForm).then(() => {
|
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
|
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
|
|
|
|
@ -326,23 +496,79 @@ export default {
|
|
|
|
|
this.tripTypeList = res.data.list || []
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleDateShow() {
|
|
|
|
|
console.log('handleDateShow...');
|
|
|
|
|
const { invoiceDate } = this.form
|
|
|
|
|
handleDateShow(dateType) {
|
|
|
|
|
this.dateType = dateType
|
|
|
|
|
let date = dateType == 'invoiceDate'?this.form.invoiceDate:dateType=='startingDate'?this.form.startingDate:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:dateType=='applicationDate'?this.form.applicationDate:''
|
|
|
|
|
// const { date } = this.form
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
|
|
|
|
|
this.dateShow = true
|
|
|
|
|
if (invoiceDate) {
|
|
|
|
|
let time = dayjs(Number(invoiceDate)).format('YYYY/MM/DD');
|
|
|
|
|
if (date) {
|
|
|
|
|
let time = dayjs(Number(date)).format('YYYY/MM/DD');
|
|
|
|
|
this.defaultDate = new Date(time)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleDateSelect(val) {
|
|
|
|
|
this.$set(this.form, 'time', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
if(this.dateType == 'invoiceDate'){
|
|
|
|
|
this.$set(this.form, 'invoiceDate1', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
this.$set(this.form, 'invoiceDate', `${dayjs(val).valueOf()}`)
|
|
|
|
|
}else if(this.dateType == 'startingDate'){
|
|
|
|
|
this.$set(this.form, 'startingDate1', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
this.$set(this.form, 'startingDate', `${dayjs(val).valueOf()}`)
|
|
|
|
|
}else if(this.dateType == 'startTime'){
|
|
|
|
|
this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
|
|
|
|
|
}else if(this.dateType == 'endTime'){
|
|
|
|
|
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
|
|
|
|
|
}else if(this.dateType == 'applicationDate'){
|
|
|
|
|
this.$set(this.form, 'applicationDate1', `${dayjs(val).format('YYYY/MM/DD')}`)
|
|
|
|
|
this.$set(this.form, 'applicationDate', `${dayjs(val).valueOf()}`)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.dateShow = false
|
|
|
|
|
},
|
|
|
|
|
handleTimeShow(timeType,date){
|
|
|
|
|
this.timeShow = true
|
|
|
|
|
this.currentTime = date
|
|
|
|
|
this.timeType = timeType
|
|
|
|
|
},
|
|
|
|
|
timeConfirm(val){
|
|
|
|
|
if(this.timeType=='pickupTime'){
|
|
|
|
|
this.form.pickupTime = val
|
|
|
|
|
}else if(this.timeType=='dropoffTime'){
|
|
|
|
|
this.form.dropoffTime = val
|
|
|
|
|
}else if(this.timeType=='startingTime'){
|
|
|
|
|
this.form.startingTime = val
|
|
|
|
|
}
|
|
|
|
|
this.timeShow = false
|
|
|
|
|
},
|
|
|
|
|
timeCancel(){
|
|
|
|
|
this.timeShow = false
|
|
|
|
|
},
|
|
|
|
|
serviceTypeOnConfirm(value){
|
|
|
|
|
this.form.serviceType = value.text
|
|
|
|
|
this.serviceTypeShow = false
|
|
|
|
|
},
|
|
|
|
|
invoiceTypeOnConfirm(value){
|
|
|
|
|
this.form.invoiceType = value.text
|
|
|
|
|
this.invoiceTypeShow = false
|
|
|
|
|
},
|
|
|
|
|
agentTypeOnConfirm(value){
|
|
|
|
|
this.form.agent1 = value.text
|
|
|
|
|
this.form.agent = value.value
|
|
|
|
|
this.agentTypeShow = false
|
|
|
|
|
},
|
|
|
|
|
handleServiceTypeShow(){
|
|
|
|
|
this.serviceTypeShow = true
|
|
|
|
|
},
|
|
|
|
|
handleInvoiceTypeShow(){
|
|
|
|
|
this.invoiceTypeShow = true
|
|
|
|
|
},
|
|
|
|
|
handleAgentTypeShow(){
|
|
|
|
|
this.agentTypeShow = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|