|
@@ -4,7 +4,9 @@
|
|
|
<div class="item">
|
|
|
<div class="text_box">
|
|
|
<p class="title">订单编号:</p>
|
|
|
- <p class="value">{{ infoMap.code }}</p>
|
|
|
+ <p class="value">
|
|
|
+ {{ infoMap.code }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item mt-10">
|
|
@@ -12,7 +14,7 @@
|
|
|
<p class="title">开票金额:</p>
|
|
|
<p class="value">{{ infoMap.price }}元</p>
|
|
|
</div>
|
|
|
- <div class="rightBtn" @click="tipShow = true" v-if="!$envs.inApp">
|
|
|
+ <div v-if="!$envs.inApp" class="rightBtn" @click="tipShow = true">
|
|
|
开票规则
|
|
|
</div>
|
|
|
</div>
|
|
@@ -21,209 +23,211 @@
|
|
|
<div class="j-content">
|
|
|
<div class="item-box-type">
|
|
|
<div class="item-box-title redstar">发票类型</div>
|
|
|
- <radioGroup
|
|
|
+ <RadioGroup
|
|
|
v-model="infoMap.type"
|
|
|
:list="typelist"
|
|
|
@change="initshowModule"
|
|
|
- ></radioGroup>
|
|
|
+ />
|
|
|
</div>
|
|
|
<van-field
|
|
|
v-model.trim="infoMap.content"
|
|
|
label="发票内容"
|
|
|
readonly
|
|
|
- @click="chooseContent"
|
|
|
right-icon="arrow"
|
|
|
right-icon-size="14"
|
|
|
- ></van-field>
|
|
|
+ @click="chooseContent"
|
|
|
+ />
|
|
|
<div class="item-box-type">
|
|
|
<div class="item-box-title redstar">发票抬头</div>
|
|
|
- <radioGroup
|
|
|
+ <RadioGroup
|
|
|
v-model="infoMap.invoiceHeader"
|
|
|
:list="invoiceHeaderlist"
|
|
|
@change="initshowModule"
|
|
|
- ></radioGroup>
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<div class="companybox">
|
|
|
- <div class="associate-ent-group" v-show="isAssociateShow">
|
|
|
+ <div v-show="isAssociateShow" class="associate-ent-group">
|
|
|
<div
|
|
|
+ v-for="(item, i) in searchList"
|
|
|
+ :key="i"
|
|
|
class="associate-ent-item"
|
|
|
@click="selectEnt(item)"
|
|
|
- v-for="(item, i) in searchList"
|
|
|
- v-bind:key="i"
|
|
|
v-html="highlightText(item.name, infoMap.company)"
|
|
|
- ></div>
|
|
|
+ />
|
|
|
</div>
|
|
|
<van-field
|
|
|
+ v-if="showModule.company"
|
|
|
v-model.trim="infoMap.company"
|
|
|
label="公司名称"
|
|
|
maxlength="50"
|
|
|
- @focus="infoCheckMap.company = ''"
|
|
|
- @input="entOnChange('input')"
|
|
|
- @blur="entOnChange('blur')"
|
|
|
- :errorMessage="infoCheckMap.company"
|
|
|
+ :error-message="infoCheckMap.company"
|
|
|
:required="requireds.company"
|
|
|
placeholder="请输入准确的公司名称"
|
|
|
- v-if="showModule.company"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.company = ''"
|
|
|
+ @input="entOnChange('input')"
|
|
|
+ @blur="entOnChange('blur')"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.dutyparagraph"
|
|
|
v-model.trim="infoMap.dutyparagraph"
|
|
|
label="单位税号"
|
|
|
- @focus="infoCheckMap.dutyparagraph = ''"
|
|
|
- @blur="getCheckMap('dutyparagraph')"
|
|
|
- :errorMessage="infoCheckMap.dutyparagraph"
|
|
|
+ :error-message="infoCheckMap.dutyparagraph"
|
|
|
:required="requireds.dutyparagraph"
|
|
|
placeholder="请输入纳税人识别号"
|
|
|
- v-if="showModule.dutyparagraph"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.dutyparagraph = ''"
|
|
|
+ @blur="getCheckMap('dutyparagraph')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.unitAddress"
|
|
|
v-model.trim="infoMap.unitAddress"
|
|
|
label="单位地址"
|
|
|
- @focus="infoCheckMap.unitAddress = ''"
|
|
|
- @blur="getCheckMap('unitAddress')"
|
|
|
- :errorMessage="infoCheckMap.unitAddress"
|
|
|
+ :error-message="infoCheckMap.unitAddress"
|
|
|
:required="requireds.unitAddress"
|
|
|
placeholder="请输入单位地址"
|
|
|
- v-if="showModule.unitAddress"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
maxlength="200"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.unitAddress = ''"
|
|
|
+ @blur="getCheckMap('unitAddress')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.tel"
|
|
|
v-model.trim="infoMap.tel"
|
|
|
label="电话号码"
|
|
|
- @focus="infoCheckMap.tel = ''"
|
|
|
- @blur="getCheckMap('tel')"
|
|
|
- :errorMessage="infoCheckMap.tel"
|
|
|
+ :error-message="infoCheckMap.tel"
|
|
|
:required="requireds.tel"
|
|
|
placeholder="请输入电话号码"
|
|
|
- v-if="showModule.tel"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.tel = ''"
|
|
|
+ @blur="getCheckMap('tel')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.bank"
|
|
|
v-model.trim="infoMap.bank"
|
|
|
label="开户银行"
|
|
|
- @focus="infoCheckMap.bank = ''"
|
|
|
- @blur="getCheckMap('bank')"
|
|
|
- :errorMessage="infoCheckMap.bank"
|
|
|
+ :error-message="infoCheckMap.bank"
|
|
|
:required="requireds.bank"
|
|
|
placeholder="请输入开户银行"
|
|
|
- v-if="showModule.bank"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
maxlength="200"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.bank = ''"
|
|
|
+ @blur="getCheckMap('bank')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.bankCode"
|
|
|
v-model.trim="infoMap.bankCode"
|
|
|
label="银行账号"
|
|
|
- @focus="infoCheckMap.bankCode = ''"
|
|
|
- @blur="getCheckMap('bankCode')"
|
|
|
- :errorMessage="infoCheckMap.bankCode"
|
|
|
+ :error-message="infoCheckMap.bankCode"
|
|
|
:required="requireds.bankCode"
|
|
|
placeholder="请输入银行账号"
|
|
|
- v-if="showModule.bankCode"
|
|
|
type="textarea"
|
|
|
maxlength="50"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.bankCode = ''"
|
|
|
+ @blur="getCheckMap('bankCode')"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="j-content-nocolor"
|
|
|
v-show="!showDesc"
|
|
|
+ class="j-content-nocolor"
|
|
|
@click="showDesc = !showDesc"
|
|
|
>
|
|
|
<div class="showMore">
|
|
|
- <div class="line" style="margin-right: 12px"></div>
|
|
|
+ <div class="line" style="margin-right: 12px" />
|
|
|
<span class="showMore-text">开票备注</span>
|
|
|
- <div class="ic-drop"></div>
|
|
|
- <div class="line" style="margin-left: 8px"></div>
|
|
|
+ <div class="ic-drop" />
|
|
|
+ <div class="line" style="margin-left: 8px" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="j-content" v-show="showDesc">
|
|
|
+ <div v-show="showDesc" class="j-content">
|
|
|
<van-field
|
|
|
+ v-if="showModule.desc"
|
|
|
v-model.trim="infoMap.desc"
|
|
|
label="开票备注"
|
|
|
- @focus="infoCheckMap.desc = ''"
|
|
|
:required="requireds.desc"
|
|
|
- :errorMessage="infoCheckMap.desc"
|
|
|
+ :error-message="infoCheckMap.desc"
|
|
|
placeholder="此部分内容会展示在发票“备注”上,请按照贵司财务要求进行填写"
|
|
|
- v-if="showModule.desc"
|
|
|
maxlength="200"
|
|
|
type="textarea"
|
|
|
rows="3"
|
|
|
autosize
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.desc = ''"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="j-content">
|
|
|
<van-field
|
|
|
+ v-if="showModule.name"
|
|
|
v-model.trim="infoMap.name"
|
|
|
label="收件人"
|
|
|
- @focus="infoCheckMap.name = ''"
|
|
|
- @blur="getCheckMap('name')"
|
|
|
- :errorMessage="infoCheckMap.name"
|
|
|
+ :error-message="infoCheckMap.name"
|
|
|
:required="requireds.name"
|
|
|
placeholder="请输入收件人"
|
|
|
- v-if="showModule.name"
|
|
|
maxlength="200"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.name = ''"
|
|
|
+ @blur="getCheckMap('name')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
v-model.trim="infoMap.phone"
|
|
|
label="联系电话"
|
|
|
- @focus="infoCheckMap.phone = ''"
|
|
|
- @blur="getCheckMap('phone')"
|
|
|
- :errorMessage="infoCheckMap.phone"
|
|
|
+ :error-message="infoCheckMap.phone"
|
|
|
:required="requireds.phone"
|
|
|
placeholder="请输入联系电话"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.phone = ''"
|
|
|
+ @blur="getCheckMap('phone')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.deliveryAddress"
|
|
|
v-model.trim="infoMap.deliveryAddress"
|
|
|
label="收件地址"
|
|
|
- @focus="infoCheckMap.deliveryAddress = ''"
|
|
|
- @blur="getCheckMap('deliveryAddress')"
|
|
|
- :errorMessage="infoCheckMap.deliveryAddress"
|
|
|
+ :error-message="infoCheckMap.deliveryAddress"
|
|
|
:required="requireds.deliveryAddress"
|
|
|
placeholder="请输入收件地址"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
- v-if="showModule.deliveryAddress"
|
|
|
maxlength="200"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.deliveryAddress = ''"
|
|
|
+ @blur="getCheckMap('deliveryAddress')"
|
|
|
+ />
|
|
|
|
|
|
<van-field
|
|
|
+ v-if="showModule.email"
|
|
|
v-model.trim="infoMap.email"
|
|
|
label="电子邮箱"
|
|
|
- @focus="infoCheckMap.email = ''"
|
|
|
- @blur="getCheckMap('email')"
|
|
|
- :errorMessage="infoCheckMap.email"
|
|
|
+ :error-message="infoCheckMap.email"
|
|
|
:required="requireds.email"
|
|
|
placeholder="请输入电子邮箱"
|
|
|
type="textarea"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
- v-if="showModule.email"
|
|
|
maxlength="50"
|
|
|
- ></van-field>
|
|
|
+ @focus="infoCheckMap.email = ''"
|
|
|
+ @blur="getCheckMap('email')"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="j-bottom">
|
|
|
- <p class="b-desc">{{ desc }}</p>
|
|
|
+ <p class="b-desc">
|
|
|
+ {{ desc }}
|
|
|
+ </p>
|
|
|
<div class="j-button-group">
|
|
|
<button
|
|
|
class="j-button-confirm"
|
|
@@ -234,45 +238,45 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <popupTip
|
|
|
+ <PopupTip
|
|
|
v-model="tipShow"
|
|
|
text="开票规则:<br>1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>3.电子发票共有3种格式:PDF、OFD、XML,手机端查看发票默认为PDF格式,如需OFD、XML格式,您可前往邮箱或剑鱼标讯电脑端查看发票并下载;4.如有问题可联系客服,客服电话:400-108-6670。"
|
|
|
- >
|
|
|
- </popupTip>
|
|
|
+ />
|
|
|
<PopupSelect
|
|
|
- :selectList="selectList"
|
|
|
ref="PopupSelect"
|
|
|
- popTitle="发票内容"
|
|
|
+ :select-list="selectList"
|
|
|
+ pop-title="发票内容"
|
|
|
@changeHandle="changeHandle"
|
|
|
@confirmHandle="confirmHandle"
|
|
|
- ></PopupSelect>
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<script>
|
|
|
+import { Button, Field, Icon } from 'vant'
|
|
|
import EventBus from '@/utils/eventBus'
|
|
|
import {
|
|
|
ajaxGetCompanyAssociation,
|
|
|
- ajaxInvoiceSubmit,
|
|
|
- ajaxInvoiceQuery,
|
|
|
- ajaxInvoiceNewshow,
|
|
|
- ajaxInvoiceSwitch,
|
|
|
ajaxInvoiceAavailable,
|
|
|
- ajaxInvoiceNewReplace
|
|
|
+ ajaxInvoiceNewReplace,
|
|
|
+ ajaxInvoiceNewshow,
|
|
|
+ ajaxInvoiceQuery,
|
|
|
+ ajaxInvoiceSubmit,
|
|
|
+ ajaxInvoiceSwitch
|
|
|
} from '@/api/modules'
|
|
|
import { replaceKeyword } from '@/utils/utils'
|
|
|
-import { Field, Icon, Button } from 'vant'
|
|
|
import popupTip from '@/components/invoice/popupTip'
|
|
|
import radioGroup from '@/components/invoice/radioGroup'
|
|
|
import PopupSelect from '@/components/invoice/PopupSelect'
|
|
|
+
|
|
|
export default {
|
|
|
- // eslint-disable-next-line vue/multi-word-component-names
|
|
|
name: 'Invoicing',
|
|
|
components: {
|
|
|
[Field.name]: Field,
|
|
|
[Icon.name]: Icon,
|
|
|
[Button.name]: Button,
|
|
|
- popupTip,
|
|
|
- radioGroup,
|
|
|
+ PopupTip: popupTip,
|
|
|
+ RadioGroup: radioGroup,
|
|
|
PopupSelect
|
|
|
},
|
|
|
data() {
|
|
@@ -399,11 +403,11 @@ export default {
|
|
|
if (this.infoMap.name && this.infoMap.name.length > 10) {
|
|
|
return false
|
|
|
}
|
|
|
- var namereg = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/ //中英文或加.的少数民族名字
|
|
|
+ const namereg = /^[\u4E00-\u9FA5A-Z\s]+(·[\u4E00-\u9FA5A-Z]+)*$/i // 中英文或加.的少数民族名字
|
|
|
return namereg.test(this.infoMap.name)
|
|
|
},
|
|
|
checkEmail() {
|
|
|
- let emailRegExp = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/
|
|
|
+ const emailRegExp = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/
|
|
|
if (this.infoMap.email.length > 50) {
|
|
|
return false
|
|
|
}
|
|
@@ -429,7 +433,7 @@ export default {
|
|
|
return false
|
|
|
},
|
|
|
checkBankcode() {
|
|
|
- let RegExp = /^\d+$/
|
|
|
+ const RegExp = /^\d+$/
|
|
|
if (!this.infoMap.bankCode) {
|
|
|
return false
|
|
|
}
|
|
@@ -465,7 +469,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
- let {
|
|
|
+ const {
|
|
|
onlyIdentifying,
|
|
|
invoiceMoney,
|
|
|
operator,
|
|
@@ -473,12 +477,12 @@ export default {
|
|
|
type,
|
|
|
invoiceId
|
|
|
} = this.$route.query
|
|
|
- this.onlyIdentifying = onlyIdentifying ? onlyIdentifying : ''
|
|
|
- this.invoiceMoney = invoiceMoney ? invoiceMoney : ''
|
|
|
- this.operator = operator ? operator : ''
|
|
|
- this.order_code = order_code ? order_code : ''
|
|
|
- this.type = type ? type : ''
|
|
|
- this.invoiceId = invoiceId ? invoiceId : ''
|
|
|
+ this.onlyIdentifying = onlyIdentifying || ''
|
|
|
+ this.invoiceMoney = invoiceMoney || ''
|
|
|
+ this.operator = operator || ''
|
|
|
+ this.order_code = order_code || ''
|
|
|
+ this.type = type || ''
|
|
|
+ this.invoiceId = invoiceId || ''
|
|
|
if (this.enterSource === 'qrcode') {
|
|
|
this.urlparms = {
|
|
|
onlyIdentifying: this.onlyIdentifying,
|
|
@@ -502,7 +506,7 @@ export default {
|
|
|
if (res.data) {
|
|
|
this.infoMap.code = res.data.orderCodes ? res.data.orderCodes : ''
|
|
|
this.infoMap.price = res.data.money ? res.data.money / 100 : 0
|
|
|
- this.initEnt(res.data.company_name)
|
|
|
+ // this.initEnt(res.data.company_name) // 不再根据公司名称初始化税号
|
|
|
if (
|
|
|
res.data.invoice &&
|
|
|
this.type !== 'again' &&
|
|
@@ -517,14 +521,22 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (
|
|
|
- res.data.invoice &&
|
|
|
- (this.type === 'again' || this.type === 'Replace')
|
|
|
+ (res.data.invoice &&
|
|
|
+ (this.type === 'again' || this.type === 'Replace')) ||
|
|
|
+ res.data.showData
|
|
|
) {
|
|
|
- // 换开或重开信息回显
|
|
|
- this.infoMap.type = this.DigitstoChinese_type(
|
|
|
- res.data.invoice.invoice_variety
|
|
|
- )
|
|
|
- this.infoMap.content = res.data.invoice.invoice_content || ''
|
|
|
+ // 换开或重开信息回显或者有上次发票信息回显
|
|
|
+ let data = {}
|
|
|
+ if (res.data.showData) {
|
|
|
+ // 有上次发票信息回显
|
|
|
+ data = res.data.showData
|
|
|
+ }
|
|
|
+ if (this.type === 'again' || this.type === 'Replace') {
|
|
|
+ // 换开或重开信息回显
|
|
|
+ data = res.data.invoice
|
|
|
+ }
|
|
|
+ this.infoMap.type = this.DigitstoChinese_type(data.invoice_variety)
|
|
|
+ this.infoMap.content = data.invoice_content || ''
|
|
|
this.selectList.forEach((item) => {
|
|
|
if (this.infoMap.content.includes(item.title)) {
|
|
|
item.checked = true
|
|
@@ -533,21 +545,19 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
|
|
|
- res.data.invoice.invoice_type
|
|
|
+ data.invoice_type
|
|
|
)
|
|
|
- this.infoMap.company = res.data.invoice.company_name || ''
|
|
|
- this.infoMap.dutyparagraph =
|
|
|
- res.data.invoice.taxpayer_identnum || ''
|
|
|
- this.infoMap.unitAddress = res.data.invoice.company_address || ''
|
|
|
- this.infoMap.tel = res.data.invoice.company_phone || ''
|
|
|
- this.infoMap.bank = res.data.invoice.bank_name || ''
|
|
|
- this.infoMap.bankCode = res.data.invoice.bank_account || ''
|
|
|
- this.infoMap.desc = res.data.invoice.remark || ''
|
|
|
- this.infoMap.name = res.data.invoice.recipient || ''
|
|
|
- this.infoMap.phone = res.data.invoice.phone || ''
|
|
|
- this.infoMap.email = res.data.invoice.mail || ''
|
|
|
- this.infoMap.deliveryAddress =
|
|
|
- res.data.invoice.delivery_address || ''
|
|
|
+ this.infoMap.company = data.company_name || ''
|
|
|
+ this.infoMap.dutyparagraph = data.taxpayer_identnum || ''
|
|
|
+ this.infoMap.unitAddress = data.company_address || ''
|
|
|
+ this.infoMap.tel = data.company_phone || ''
|
|
|
+ this.infoMap.bank = data.bank_name || ''
|
|
|
+ this.infoMap.bankCode = data.bank_account || ''
|
|
|
+ this.infoMap.desc = data.remark || ''
|
|
|
+ this.infoMap.name = data.recipient || ''
|
|
|
+ this.infoMap.phone = data.phone || ''
|
|
|
+ this.infoMap.email = data.mail || ''
|
|
|
+ this.infoMap.deliveryAddress = data.delivery_address || ''
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -573,9 +583,10 @@ export default {
|
|
|
duration: 0,
|
|
|
message: 'loading...'
|
|
|
})
|
|
|
- const { status } = await ajaxInvoiceAavailable({
|
|
|
- order_code: this.order_code
|
|
|
- })
|
|
|
+ // 移动端开发票手机号校验支持400开头手机号 不在限制
|
|
|
+ // const { status } = await ajaxInvoiceAavailable({
|
|
|
+ // order_code: this.order_code
|
|
|
+ // })
|
|
|
// if (status === 0) {
|
|
|
// // 不支持开票
|
|
|
// if (this.$envs.inWX) {
|
|
@@ -589,14 +600,23 @@ export default {
|
|
|
stype: 1,
|
|
|
code: this.order_code
|
|
|
})
|
|
|
- let data = res.data
|
|
|
- this.infoMap.price = data.pay_money ? data.pay_money / 100 : 0
|
|
|
- if (this.type === 'again' || this.type === 'Replace') {
|
|
|
+ this.infoMap.price = res.data.pay_money ? res.data.pay_money / 100 : 0
|
|
|
+ if (
|
|
|
+ this.type === 'again' ||
|
|
|
+ this.type === 'Replace' ||
|
|
|
+ res.data.showData
|
|
|
+ ) {
|
|
|
const resdata = await ajaxInvoiceNewshow({
|
|
|
stype: 2,
|
|
|
code: this.invoiceId
|
|
|
})
|
|
|
- let data = resdata.data.invoice
|
|
|
+ let data = {}
|
|
|
+ if (res.data.showData) {
|
|
|
+ data = res.data.showData
|
|
|
+ }
|
|
|
+ if (this.type === 'again' || this.type === 'Replace') {
|
|
|
+ data = resdata.data.invoice
|
|
|
+ }
|
|
|
if (this.type === 'Replace') {
|
|
|
this.infoMap.price = data.invoice_money
|
|
|
? data.invoice_money / 100
|
|
@@ -656,14 +676,14 @@ export default {
|
|
|
ele.checked = false
|
|
|
}
|
|
|
})
|
|
|
- this.infoMap.content = '信息技术服务-' + item.title
|
|
|
+ this.infoMap.content = `信息技术服务-${item.title}`
|
|
|
},
|
|
|
confirmHandle() {
|
|
|
this.$refs.PopupSelect.visibleHandle(false)
|
|
|
},
|
|
|
confirm_ok() {
|
|
|
const loading = this.$toast.loading({ duration: 0, message: '提交中...' })
|
|
|
- let parms = {
|
|
|
+ const parms = {
|
|
|
company_name: this.showModule.company ? this.infoMap.company : '',
|
|
|
phone: this.showModule.phone ? this.infoMap.phone : '',
|
|
|
mail: this.showModule.email ? this.infoMap.email : '',
|
|
@@ -1090,10 +1110,11 @@ export default {
|
|
|
this.infoCheckMap.tel = ''
|
|
|
}
|
|
|
} else {
|
|
|
- this.requireds.bankCode = true
|
|
|
- this.requireds.bank = true
|
|
|
- this.requireds.unitAddress = true
|
|
|
- this.requireds.tel = true
|
|
|
+ // 专票不在限制以下几个为必填
|
|
|
+ this.requireds.bankCode = false
|
|
|
+ this.requireds.bank = false
|
|
|
+ this.requireds.unitAddress = false
|
|
|
+ this.requireds.tel = false
|
|
|
}
|
|
|
},
|
|
|
invoiceHeaderFilter(val) {
|
|
@@ -1133,13 +1154,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
checkPhone(val) {
|
|
|
- return /^(1[3|4|5|6|7|8|9])\d{9}$|^0\d{2,3}-?\d{7,8}$|^400[016789]\d{6}$|^400-[016789]\d{2}-\d{4}$/.test(val)
|
|
|
+ return /^(1[3-9|])\d{9}$|^0\d{2,3}-?\d{7,8}$|^400[016-9]\d{6}$|^400-[016-9]\d{2}-\d{4}$/.test(
|
|
|
+ val
|
|
|
+ )
|
|
|
},
|
|
|
highlightText(value, keyStr) {
|
|
|
return replaceKeyword(
|
|
|
value,
|
|
|
keyStr,
|
|
|
- '<span class="highlight-text">' + keyStr + '</span>'
|
|
|
+ `<span class="highlight-text">${keyStr}</span>`
|
|
|
)
|
|
|
}
|
|
|
}
|