Commit b6df2a27 by 前端

版本功能代码提交

1 parent f35fff60
import request from "./request" import request from "./request"
import RequestMethods from "./request.methods" import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api.vpt.invoiceIssueQrcode." const path = "dj.smartcarlife.api.vpt.invoiceIssueQrcode."
const path2 = "dj.smartcarlife.api.vpt.invoiceInfo."
// 查询订单开票项目 // 查询订单开票项目
export function getInvoiceIssueItems(data) { export function getInvoiceIssueItems(data) {
...@@ -13,3 +14,51 @@ export function invoiceCreate(data) { ...@@ -13,3 +14,51 @@ export function invoiceCreate(data) {
data.method = path + `create` data.method = path + `create`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 分页查询开票二维码
export function invoicePage(data) {
data.method = path + `page`
return request(data, RequestMethods.POST)
}
// 批量作废开票二维码,返回作废失败的数据列表
export function batchCancelInvoiceQrcode(data) {
data.method = path + `batchCancelInvoiceQrcode`
return request(data, RequestMethods.POST)
}
// 根据开票二维码编号查询开票二维码
export function getByQrcodeNo(data) {
data.method = path + `getByQrcodeNo`
return request(data, RequestMethods.POST)
}
// 发送开票二维码邮件
export function sendEmail(data) {
data.method = path + `sendEmail`
return request(data, RequestMethods.POST)
}
// 分页查询发票信息
export function invoiceInfoPage(data) {
data.method = path2 + `page`
return request(data, RequestMethods.POST)
}
// 根据发票请求流水号查询发票信息
export function getByInvoiceReqSerialNo(data) {
data.method = path2 + `getByInvoiceReqSerialNo`
return request(data, RequestMethods.POST)
}
// 导出发票信息(压缩文件)
export function downloadZip(data) {
data.method = path2 + `downloadZip`
return request(data, RequestMethods.POST)
}
// 下载多个发票合并后的PDF信息
export function mergePdf(data) {
data.method = path2 + `mergePdf`
return request(data, RequestMethods.POST)
}
...@@ -1217,3 +1217,56 @@ export const checkStautsOpt = [ ...@@ -1217,3 +1217,56 @@ export const checkStautsOpt = [
{ confId: 2, confValue: "已入库" }, { confId: 2, confValue: "已入库" },
{ confId: 3, confValue: "已驳回" } { confId: 3, confValue: "已驳回" }
] ]
// 发票管理 使用状态
export const useStatusOpt = [
{ confId: "Y", confValue: "已使用" },
{ confId: "N", confValue: "未使用" }
]
// 发票管理 是否在有效期
export const expireStatusOpt = [
{ confId: "Y", confValue: "是" },
{ confId: "N", confValue: "否" }
]
// 发票管理 二维码来源
export const createdSourceOpt = [
{ confId: 1, confValue: "小程序" },
{ confId: 2, confValue: "WEB端" }
]
// 发票管理 作废状态
export const cancelStatusOpt = [
{ confId: "Y", confValue: "已作废" },
{ confId: "N", confValue: "未作废" }
]
// 发票管理 发票种类
export const invoiceTypeOpt = [
{ confId: "81", confValue: "数电票(增值税专用发票)" },
{ confId: "82", confValue: "数电票(普通发票)" }
]
// 发票管理 冲红标志
export const redFlagOpt = [
{ confId: "NOT_RED", confValue: "未冲红" },
{ confId: "ALREADY_RED", confValue: "已冲红" },
{ confId: "REDING", confValue: "冲红中" },
{ confId: "RED_FAIL", confValue: "冲红失败" },
{ confId: "PART_RED", confValue: "部分冲红" }
]
// 发票管理 作废标志
export const invalidFlagOpt = [
{ confId: "NOT_DESTROY", confValue: "未作废" },
{ confId: "ALREADY_DESTROY", confValue: "已作废" },
{ confId: "DESTROYING", confValue: "作废中" },
{ confId: "DESTROY_FAIL", confValue: "作废失败" }
]
// 发票管理 开票类型
export const InvoicingOpt = [
{ confId: "1", confValue: "蓝票" },
{ confId: "2", confValue: "红票" }
]
...@@ -14,12 +14,90 @@ export const routerName = { ...@@ -14,12 +14,90 @@ export const routerName = {
path: "/invoiceCode", path: "/invoiceCode",
name: "invoiceCode", name: "invoiceCode",
meta: { meta: {
title: "开发二维码", title: "开票二维码",
authId: "91701", authId: "91701",
parentId: "917", parentId: "917",
cache: false cache: false
}, },
auth: [], auth: [
{
authId: "9170101",
parentId: "91701",
label: "作废",
category: "Button",
type: "primary",
handle: "handleCancel"
},
{
authId: "9170102",
parentId: "91701",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170103",
parentId: "91701",
label: "详情",
handle: "handleDetail"
},
{
authId: "9170104",
parentId: "91701",
label: "查看二维码",
handle: "handleQRCode"
}
],
component: _import("invoiceManage/invoiceCode") component: _import("invoiceManage/invoiceCode")
},
91702: {
path: "/invoiceQuery",
name: "invoiceQuery",
meta: {
title: "发票查询",
authId: "91702",
parentId: "917",
cache: false
},
auth: [
{
authId: "9170201",
parentId: "91702",
label: "下载电子发票",
category: "Button",
type: "primary",
handle: "handleDownloadInvoice"
},
{
authId: "9170202",
parentId: "91702",
label: "打印电子发票",
category: "Button",
type: "primary",
handle: "handlePrintInvoice"
},
{
authId: "9170203",
parentId: "91702",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170204",
parentId: "91702",
label: "详情",
handle: "handleDetail"
},
{
authId: "9170205",
parentId: "91702",
label: "查看发票",
handle: "handleLookInvoice"
}
],
component: _import("invoiceManage/invoiceQueryList")
} }
} }
<!-- 嘀加上架 --> <!-- 嘀加上架 -->
<template> <template>
<d2-container class="shelfManage"> <d2-container class="shelfManage">
<div class="header" slot="header"> <div class="header"
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'" slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"> :form-data="showFormData">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId"
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small"
@click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -17,40 +24,56 @@ ...@@ -17,40 +24,56 @@
<span slot="left"> <span slot="left">
<!-- 嘀加上架与销售合同 --> <!-- 嘀加上架与销售合同 -->
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9031301']" /> <auth-button category="Button"
:show-btn-ids="['9031301']" />
</span> </span>
<!-- 嘀加上架修改 --> <!-- 嘀加上架修改 -->
<auth-button style="display: inline-block" category="Button" :show-btn-ids="['9031303']" /> <auth-button style="display: inline-block"
category="Button"
:show-btn-ids="['9031303']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="packageIndexTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi" <d2-table ref="packageIndexTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button"
slot-scope="scope">
<!-- 查看 - 查看合同 --> <!-- 查看 - 查看合同 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9031304']" /> <auth-button :data="scope.scope"
:show-btn-ids="['9031304']" />
</span> </span>
<!-- 确认 - 编辑合同 --> <!-- 确认 - 编辑合同 -->
<span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1"> <span style="margin-right: 10px"
<auth-button :data="scope.scope" :show-btn-ids="['9031306']" /> v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9031306']" />
</span> </span>
<!-- 驳回 --> <!-- 驳回 -->
<span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1"> <span style="margin-right: 10px"
<auth-button :data="scope.scope" :show-btn-ids="['9031308']" /> v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9031308']" />
</span> </span>
<!-- 重新发起 --> <!-- 重新发起 -->
<span style="margin-right: 10px" v-if=" <span style="margin-right: 10px"
v-if="
scope.scope.systemStatus == 4 || scope.scope.systemStatus == 4 ||
scope.scope.approveStatus == 3 || scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 4 scope.scope.approveStatus == 4
"> ">
<auth-button :data="scope.scope" :show-btn-ids="['9031309']" /> <auth-button :data="scope.scope"
:show-btn-ids="['9031309']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 驳回 --> <!-- 驳回 -->
<reject-dialog :reject-visible="rejectVisible" :params-obj="recordInfo" v-if="rejectVisible" <reject-dialog :reject-visible="rejectVisible"
:params-obj="recordInfo"
v-if="rejectVisible"
@dialogClose="rejectDialogClose" /> @dialogClose="rejectDialogClose" />
</d2-container> </d2-container>
</template> </template>
...@@ -78,7 +101,8 @@ export default { ...@@ -78,7 +101,8 @@ export default {
approveType: "", approveType: "",
systemStatus: "", systemStatus: "",
approveStatus: "", approveStatus: "",
merchantName: "" merchantName: "",
shelfType: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
...@@ -132,6 +156,16 @@ export default { ...@@ -132,6 +156,16 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "approveStatusOpt" optionsName: "approveStatusOpt"
},
{
label: "上架类型",
name: "shelfType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "shelfTypeOpt"
} }
], ],
getListApi: getPage, getListApi: getPage,
...@@ -276,7 +310,8 @@ export default { ...@@ -276,7 +310,8 @@ export default {
approveType: "", approveType: "",
systemStatus: "", systemStatus: "",
approveStatus: "", approveStatus: "",
merchantName: "" merchantName: "",
shelfType: ""
} }
this.$refs.packageIndexTable.refreshTable(false, true) this.$refs.packageIndexTable.refreshTable(false, true)
}, },
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form label-width="450px"
:inline="true">
<el-form-item label="销售方名称:">
{{ detailInfo.enterpriseName ? detailInfo.enterpriseName : "-" }}
</el-form-item>
<el-form-item label="企业联系电话:">
{{ "-" }}
</el-form-item>
<el-form-item label="开票金额:">
{{ detailInfo.invoiceAmount ? detailInfo.invoiceAmount : "-" }}
</el-form-item>
<el-form-item label="票通订单号:">
{{ detailInfo.tradeNo ? detailInfo.tradeNo : "-" }}
</el-form-item>
<el-form-item label="生成时间:">
{{ detailInfo.createdDate ? detailInfo.createdDate : "-" }}
</el-form-item>
<el-form-item label="二维码有效期:">
{{ detailInfo.expireDay ? detailInfo.expireDay + '天' : "-" }}
</el-form-item>
</el-form>
<div class="imgCon">
<el-image id="printImage"
:src="detailInfo.invoiceQrCode"
class="imgSize"></el-image>
</div>
<div class="tips">
您可以使用微信或支付宝,扫码开票
</div>
</div>
<div class="footer">
<el-button @click="dialogInnerShow = true"
type="primary">发送邮箱</el-button>
<el-button @click="handlePrint">打印</el-button>
</div>
</div>
<baseDialog :is-show.sync="dialogInnerShow"
:config="dialogInnerConfig.setting"
:dialog-config="dialogInnerConfig.config"
@handleClick="handleSendEmail">
<el-form ref="sendFormRef"
:model="sendForm"
label-width="100px">
<el-form-item prop="email"
label="邮箱"
:rules="[
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
]">
<el-input v-model="sendForm.email"
style="width: 300px;"></el-input>
</el-form-item>
</el-form>
</baseDialog>
</basedialog>
</div>
</template>
<script>
import { getByQrcodeNo, sendEmail } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
export default {
name: "InvoiceCodeDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: true,
btnList: []
},
config: {
title: "查看二维码",
width: "1080px"
}
},
detailInfo: {},
loading: true,
dialogInnerShow: false,
dialogInnerConfig: {
setting: {
showClose: true,
appendToBody: true,
isShowFooter: true,
confirm_name: '发送',
cancel_name: '取消'
},
config: {
title: "发送邮箱",
width: "500px"
}
},
sendForm: {
email: ''
}
}
},
methods: {
getDetail() {
var params = { qrcodeNo: this.paramsObj.qrcodeNo }
getByQrcodeNo(params).then(res => {
this.detailInfo = res
this.loading = false
})
},
handlePrint() {
if (this.detailInfo.invoiceQrCode) {
window.open(this.detailInfo.invoiceQrCode)
}
},
handleSendEmail() {
this.$refs.sendFormRef.validate(valid => {
if (valid) {
var params = deepClone(this.sendForm)
params.qrcodeNo = this.detailInfo.qrcodeNo
sendEmail(params).then(res => {
this.notice.okTips('发送成功')
this.dialogInnerShow = false
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.imgCon {
text-align: center;
.imgSize {
width: 120px;
height: 120px;
}
}
.tips {
text-align: center;
margin-top: 10px;
}
}
.footer {
text-align: center;
margin-top: 50px;
}
}
</style>
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<div class="errorTips"
v-if="tipsShow">最大金额需大于最小金额</div>
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
},
tipsShow: false
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
methods: {
handleStartInput(event) {
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
.errorTips {
color: red;
// text-align: center;
font-size: 12px;
}
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div>
<el-form-item label="可选开票种类:"
class="onLineItem">
{{
detailInfo.invoiceTypeShow ? detailInfo.invoiceTypeShow : "-"
}}
</el-form-item>
</div>
<div>
<el-form-item label="主订单号:"
class="onLineItem">
{{
detailInfo.bizOrderCode ? detailInfo.bizOrderCode : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="开票项目:"
class="halfItem">
{{ detailInfo.itemNames ? detailInfo.itemNames : "-" }}
</el-form-item>
<el-form-item label="待开票金额:"
class="halfItem">
{{ detailInfo.invoiceAmount
? detailInfo.invoiceAmount
: "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="收款人:"
class="halfItem">
{{ detailInfo.casherName ? detailInfo.casherName : "-" }}
</el-form-item>
<el-form-item label="复核人:"
class="halfItem">
{{
detailInfo.reviewerName ? detailInfo.reviewerName : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="可开票张数:"
class="halfItem">
{{ detailInfo.allowInvoiceCount ? detailInfo.allowInvoiceCount : "-" }}
</el-form-item>
<el-form-item label="发票备注:"
class="halfItem">
{{
detailInfo.invoiceRemark ? detailInfo.invoiceRemark : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送短信:"
class="halfItem">
{{ "-" }}
</el-form-item>
<el-form-item label="二维码有效期:"
class="halfItem">
{{
detailInfo.expireDay ? detailInfo.expireDay + '天' : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送邮件:"
class="halfItem">
{{ detailInfo.email ? detailInfo.email : "-" }}
</el-form-item>
</div>
</el-form>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { getByQrcodeNo } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
import { invoiceTypeOpt } from '@/common/constants.js'
export default {
name: "InvoiceCodeDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "开票二维码详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
invoiceTypeOpt: deepClone(invoiceTypeOpt)
}
},
methods: {
getDetail() {
var params = { qrcodeNo: this.paramsObj.qrcodeNo }
getByQrcodeNo(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
if (info.invoiceType) {
let arr = info.invoiceType.split(",")
console.log('arr', arr)
console.log('this.invoiceTypeOpt', this.invoiceTypeOpt)
arr = arr.map((o) => {
return this.invoiceTypeOpt.find(item => item.confId === o)?.confValue
})
info.invoiceTypeShow = arr.join("/")
}
}
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div class="itemDiv">
<el-form-item label="发票种类:"
class="halfItem">
{{ detailInfo.invoiceTypeShow ? detailInfo.invoiceTypeShow : "-" }}
</el-form-item>
<el-form-item label="作废状态:"
class="halfItem">
{{ detailInfo.invalidFlagShow ? detailInfo.invalidFlagShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="购买方名称:"
class="halfItem">
{{ detailInfo.buyerName ? detailInfo.buyerName : "-" }}
</el-form-item>
<el-form-item label="开票人:"
class="halfItem">
{{ detailInfo.drawerName ? detailInfo.drawerName : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="购买方税号:"
class="halfItem">
{{ detailInfo.buyerTaxpayerNum ? detailInfo.buyerTaxpayerNum : "-" }}
</el-form-item>
<el-form-item label="开票类型:"
class="halfItem">
{{ detailInfo.InvoicingShow ? detailInfo.InvoicingShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="数电票号码:"
class="halfItem">
{{ detailInfo.electronicInvoiceNo ? detailInfo.electronicInvoiceNo : "-" }}
</el-form-item>
<el-form-item label="开票来源:"
class="halfItem">
{{ detailInfo.createdSourceShow ? detailInfo.createdSourceShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="开票日期:"
class="halfItem">
{{ detailInfo.invoiceDate ? detailInfo.invoiceDate : "-" }}
</el-form-item>
<el-form-item label="票通订单号:"
class="halfItem">
{{ detailInfo.tradeNo ? detailInfo.tradeNo : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="不含税金额:"
class="halfItem">
{{ detailInfo.noTaxAmount ? detailInfo.noTaxAmount : "-" }}
</el-form-item>
<el-form-item label="主订单号:"
class="halfItem">
{{ detailInfo.bizOrderCode ? detailInfo.bizOrderCode : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="税额:"
class="halfItem">
{{ detailInfo.taxAmount ? detailInfo.taxAmount : "-" }}
</el-form-item>
<el-form-item label="交易参考号:"
class="halfItem">
{{ detailInfo.bizTradeNo ? detailInfo.bizTradeNo : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="价税合计金额:"
class="halfItem">
{{ detailInfo.amountWithTax ? detailInfo.amountWithTax : "-" }}
</el-form-item>
<el-form-item label="收票人手机号:"
class="halfItem">
{{ "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="主要项目名称:"
class="halfItem">
{{ detailInfo.itemNames ? detailInfo.itemNames : "-" }}
</el-form-item>
<el-form-item label="收票人邮箱:"
class="halfItem">
{{ "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="冲红状态:"
class="halfItem">
{{ detailInfo.redFlagShow ? detailInfo.redFlagShow : "-" }}
</el-form-item>
</div>
</el-form>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { getByInvoiceReqSerialNo } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
import { createdSourceOpt, invoiceTypeOpt, redFlagOpt, invalidFlagOpt, InvoicingOpt } from "@/common/constants.js"
export default {
name: "InvoiceQueryDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "发票详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
invoiceTypeOpt: deepClone(invoiceTypeOpt),
createdSourceOpt: deepClone(createdSourceOpt),
redFlagOpt: deepClone(redFlagOpt),
invalidFlagOpt: deepClone(invalidFlagOpt),
InvoicingOpt: deepClone(InvoicingOpt)
}
},
methods: {
getDetail() {
var params = { invoiceReqSerialNo: this.paramsObj.invoiceReqSerialNo }
getByInvoiceReqSerialNo(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
if (info.invoiceKind) {
let arr = info.invoiceKind.split(",")
console.log('arr', arr)
console.log('this.invoiceTypeOpt', this.invoiceTypeOpt)
arr = arr.map((o) => {
return this.invoiceTypeOpt.find(item => item.confId === o)?.confValue
})
info.invoiceTypeShow = arr.join("/")
}
if (info.invalidFlag) {
info.invalidFlagShow = this.invalidFlagOpt.find(item => item.confId === info.invalidFlag)?.confValue
}
if (info.invoiceType) {
info.InvoicingShow = this.InvoicingOpt.find(item => item.confId === info.invoiceType)?.confValue
}
if (info.createdSource) {
info.createdSourceShow = this.createdSourceOpt.find(item => item.confId === info.createdSource)?.confValue
}
if (info.redFlag) {
info.redFlagShow = this.redFlagOpt.find(item => item.confId === info.redFlag)?.confValue
}
if (info.taxAmount) {
info.taxAmount = info.taxAmount + '%'
}
}
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
}
</style>
<template> <template>
<div class="order-list-wrap"> <div class="invoiceCode">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header"
<el-tabs v-model="activeName" @tab-click="handleClick"> slot="header">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index"> <el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index">
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName"></components> <components :is="tabName"></components>
...@@ -49,7 +54,7 @@ export default { ...@@ -49,7 +54,7 @@ export default {
handleClick() { handleClick() {
const arr = { const arr = {
1: "editInvoice", 1: "editInvoice",
2: "invoiceCodeList", 2: "invoiceCodeList"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
} }
...@@ -57,18 +62,13 @@ export default { ...@@ -57,18 +62,13 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.order-list-wrap { .invoiceCode {
padding: 0 20px; padding: 0 20px;
.header { .header {
::v-deep .el-tabs__header { ::v-deep .el-tabs__header {
height: 54px;
line-height: 54px;
margin: 0; margin: 0;
padding: 0 20px; padding: 0 20px;
color: #666666;
font-size: 16px;
background: #ffffff;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!