|
|
|
@ -36,34 +36,13 @@
|
|
|
|
|
</span>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div style="color: #17a6a3" class="right-b" v-if="route.query.id && form.isLocked">
|
|
|
|
|
<span class="iconfont icon-locksuo"></span>锁定
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: #7a8798" class="right-b" v-if="!route.query.id || !form.isLocked">
|
|
|
|
|
<span class="iconfont icon-a-jiesuo1_jiesuo"></span>未锁定
|
|
|
|
|
</div> -->
|
|
|
|
|
<!-- <div style="color: #3081fa" class="right-b" v-if="route.query.type == 'apply'">
|
|
|
|
|
<span class="iconfont icon-dingdan"></span>申请开票
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: #3081fa" class="right-b" v-if="route.query.type == 'free'">
|
|
|
|
|
<span class="iconfont icon-touzijilu"></span>自由开票
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: rgba(122, 135, 152, 1)" class="right-b">
|
|
|
|
|
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>普票
|
|
|
|
|
</div> -->
|
|
|
|
|
<!-- <div style="color: rgba(37, 122, 250, 1)" class="right-b" v-if="route.query.id">
|
|
|
|
|
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>红票
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: rgba(186, 56, 73, 1)" class="right-b" v-if="route.query.id">
|
|
|
|
|
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>蓝票
|
|
|
|
|
</div> -->
|
|
|
|
|
<div>
|
|
|
|
|
<a-popconfirm title="确定申请开票吗?" ok-text="是" cancel-text="否" @confirm="handleIssue">
|
|
|
|
|
<a-button v-repeat type="link" v-if="route.query.id && form.status != '已开票'">
|
|
|
|
|
<span class="iconfont icon-touzijilu"></span>开票
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-button @click="openRed" v-repeat type="link" v-if="route.query.id">
|
|
|
|
|
<a-button @click="openRed" v-repeat type="link" v-if="route.query.id && form.status == '已开票'">
|
|
|
|
|
<span class="iconfont icon-dengjizongshu"></span>冲红
|
|
|
|
|
</a-button>
|
|
|
|
|
<!-- <a-button v-repeat type="link" v-if="route.query.id">
|
|
|
|
@ -94,7 +73,12 @@
|
|
|
|
|
</editCompent>
|
|
|
|
|
<editCompent :showEdit="false" ref="editCompentRef" label="开票类型:">
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>{{ form.invoiceType }}</span>
|
|
|
|
|
<span v-if="form.invoiceType == '红票'" style="color: red;">{{ form.invoiceType
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-if="form.type == 1 && form.isSetRed" style="color: blue;">{{
|
|
|
|
|
form.invoiceType
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-if="form.type == 1 && !form.isSetRed">{{ form.invoiceType }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</editCompent>
|
|
|
|
|
<editCompent ref="editCompentRef" label="开票日期:">
|
|
|
|
@ -138,7 +122,10 @@
|
|
|
|
|
</editCompent>
|
|
|
|
|
<editCompent :showEdit="false" ref="editCompentRef" label="开票状态:">
|
|
|
|
|
<template #text>
|
|
|
|
|
<span>{{ form.status }}</span>
|
|
|
|
|
<img class="img-in" v-if="form.status == '已开票'"
|
|
|
|
|
src="../../../../assets/images/kaichu.png" alt="">
|
|
|
|
|
<img class="img-in" v-if="form.status == '未开票'"
|
|
|
|
|
src="../../../../assets/images/weikaichu.png" alt="">
|
|
|
|
|
</template>
|
|
|
|
|
</editCompent>
|
|
|
|
|
</div>
|
|
|
|
@ -229,8 +216,8 @@
|
|
|
|
|
<span style="color: rgba(158, 83, 9, 1)"> 小写:</span>
|
|
|
|
|
{{ taxUnitPriceTotal }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding:5px 20px;display: flex;height: 140px">
|
|
|
|
|
<div style="width: 80%;display: flex;">
|
|
|
|
|
<div style="padding:5px 20px;display: flex;height: 140px;width: 100%;">
|
|
|
|
|
<div style="width: 100%;display: flex;">
|
|
|
|
|
<div class="label" style="margin-right: 15px">备注</div>
|
|
|
|
|
<div style="flex:1">
|
|
|
|
|
<div style="font-size: 12px">
|
|
|
|
@ -239,12 +226,7 @@
|
|
|
|
|
<span> {{ form.customerAddressTel }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #content>
|
|
|
|
|
<a-select size="small" v-model:value="form.customerAddressTel"
|
|
|
|
|
style="width: 90%">
|
|
|
|
|
<a-select-option :key="index"
|
|
|
|
|
v-for="(item, index) in invoiceHeadersList"
|
|
|
|
|
:value="item.addressTel">{{ item.addressTel }}</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-input v-model:value="form.customerAddressTel"></a-input>
|
|
|
|
|
</template>
|
|
|
|
|
</editCompent>
|
|
|
|
|
</div>
|
|
|
|
@ -261,16 +243,12 @@
|
|
|
|
|
</a-select>
|
|
|
|
|
</template>
|
|
|
|
|
</editCompent>
|
|
|
|
|
<editCompent :showLabel="false" ref="editCompentRef">
|
|
|
|
|
<editCompent :showEdit="false" :showLabel="false" ref="editCompentRef">
|
|
|
|
|
<template #text>
|
|
|
|
|
<span> {{ form.customerAccount }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #content>
|
|
|
|
|
<a-select size="small" @change="handleSelectAccount1"
|
|
|
|
|
v-model:value="form.customerAccount" style="width: 90%">
|
|
|
|
|
<a-select-option :key="index" v-for="(item, index) in accountList"
|
|
|
|
|
:value="item.account">{{ item.account }}</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
{{ form.customerAccount }}
|
|
|
|
|
</template>
|
|
|
|
|
</editCompent>
|
|
|
|
|
</div>
|
|
|
|
@ -379,7 +357,6 @@
|
|
|
|
|
<a-form :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
|
|
|
<a-form-item label="冲红原因">
|
|
|
|
|
<a-select ref="select" v-model:value="redForm.chyyDm" style="width: 100%">
|
|
|
|
|
<!-- <a-select-option value="00">直接冲红</a-select-option> -->
|
|
|
|
|
<a-select-option value="01">开票有误</a-select-option>
|
|
|
|
|
<a-select-option value="02">销货退回</a-select-option>
|
|
|
|
|
<a-select-option value="03">服务中止</a-select-option>
|
|
|
|
@ -392,9 +369,9 @@
|
|
|
|
|
<a-select-option value="1">购方</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="冲红原因描述">
|
|
|
|
|
<!-- <a-form-item label="冲红原因描述">
|
|
|
|
|
<a-textarea v-model:value="redForm.reason" :auto-size="{ minRows: 3, maxRows: 6 }" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form-item> -->
|
|
|
|
|
</a-form>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-modal>
|
|
|
|
@ -436,7 +413,8 @@ defineComponent({
|
|
|
|
|
})
|
|
|
|
|
registerAllModules()
|
|
|
|
|
const redForm = ref({
|
|
|
|
|
lrfsf: '0'
|
|
|
|
|
lrfsf: '0',
|
|
|
|
|
chyyDm: '01'
|
|
|
|
|
}) as any
|
|
|
|
|
const detailForm = [
|
|
|
|
|
{
|
|
|
|
@ -588,13 +566,13 @@ const detailForm = [
|
|
|
|
|
dynamicDisabled: true,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'redCode',
|
|
|
|
|
label: '被冲红发票代码',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
dynamicDisabled: true,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field: 'redCode',
|
|
|
|
|
// label: '被冲红发票代码',
|
|
|
|
|
// component: 'Input',
|
|
|
|
|
// dynamicDisabled: true,
|
|
|
|
|
// colProps: { span: 12 },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field: 'divider-selects5',
|
|
|
|
|
component: 'Divider',
|
|
|
|
@ -674,7 +652,8 @@ function openRed() {
|
|
|
|
|
function handleSelectAccount(val) {
|
|
|
|
|
accountList.value.forEach(item => {
|
|
|
|
|
if (item.bankName == val) {
|
|
|
|
|
form.value.customerAddressTel = ''
|
|
|
|
|
form.value.customerAccount = item.bankAccountNo
|
|
|
|
|
// form.value.customerAddressTel = item.invoiceAddress + ' ' + item.invoiceTel
|
|
|
|
|
invoiceHeadersList.value = item.invoiceHeaders
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -777,11 +756,13 @@ function getDetail() {
|
|
|
|
|
loading.value = true
|
|
|
|
|
GeneralInvoiceGet({ id: route.query.id }).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
res.data.invoiceDetails.forEach(item => {
|
|
|
|
|
item.unit = '票'
|
|
|
|
|
})
|
|
|
|
|
list.value = res.data.invoiceDetails ? res.data.invoiceDetails : []
|
|
|
|
|
hotTb.value.hotInstance.loadData(res.data.invoiceDetails ? res.data.invoiceDetails : [])
|
|
|
|
|
if (res.data.invoiceDetails) {
|
|
|
|
|
res.data.invoiceDetails.forEach(item => {
|
|
|
|
|
item.unit = '票'
|
|
|
|
|
})
|
|
|
|
|
list.value = res.data.invoiceDetails ? res.data.invoiceDetails : []
|
|
|
|
|
hotTb.value.hotInstance.loadData(res.data.invoiceDetails ? res.data.invoiceDetails : [])
|
|
|
|
|
}
|
|
|
|
|
if (res.data.isSettled) {
|
|
|
|
|
res.data.isSettledName = '是'
|
|
|
|
|
} else {
|
|
|
|
@ -792,26 +773,29 @@ function getDetail() {
|
|
|
|
|
} else {
|
|
|
|
|
res.data.isLockedName = '否'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.isSetRed) {
|
|
|
|
|
res.data.isSetRedName = '是'
|
|
|
|
|
res.data.invoiceType = '红票'
|
|
|
|
|
} else {
|
|
|
|
|
res.data.isSetRedName = '否'
|
|
|
|
|
res.data.invoiceType = '正票'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.invoiceNO) {
|
|
|
|
|
res.data.status = '已开票'
|
|
|
|
|
} else {
|
|
|
|
|
res.data.status = '未开票'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.type == 2) {
|
|
|
|
|
res.data.invoiceType = '红票'
|
|
|
|
|
res.data.isSetRedName = '是'
|
|
|
|
|
}
|
|
|
|
|
if (res.data.type == 1) {
|
|
|
|
|
res.data.invoiceType = '正票'
|
|
|
|
|
res.data.isSetRedName = '否'
|
|
|
|
|
}
|
|
|
|
|
res.data.emailFlag = false
|
|
|
|
|
res.data.cellPhoneNOFlag = false
|
|
|
|
|
res.data.applyAmount = numberThousandFormat(res.data.applyAmount, 2, false)
|
|
|
|
|
res.data.otherInvoiceAmount = numberThousandFormat(res.data.otherInvoiceAmount, 2, false)
|
|
|
|
|
res.data.invoiceAmount = numberThousandFormat(res.data.invoiceAmount, 2, false)
|
|
|
|
|
res.data.applications.forEach(item => {
|
|
|
|
|
item.applyAmount = numberThousandFormat(item.applyAmount, 2, false)
|
|
|
|
|
})
|
|
|
|
|
res.data.applyAmount = numberThousandFormat(res.data.applyAmount ? res.data.applyAmount : 0, 2, false)
|
|
|
|
|
res.data.otherInvoiceAmount = numberThousandFormat(res.data.otherInvoiceAmount ? res.data.otherInvoiceAmount : 0, 2, false)
|
|
|
|
|
res.data.invoiceAmount = numberThousandFormat(res.data.invoiceAmount ? res.data.invoiceAmount : 0, 2, false)
|
|
|
|
|
if (res.data.applications) {
|
|
|
|
|
res.data.applications.forEach(item => {
|
|
|
|
|
item.applyAmount = numberThousandFormat(item.applyAmount ? res.data.applyAmount : 0, 2, false)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
form.value = res.data
|
|
|
|
|
getCustomerInfo(res.data.customerId)
|
|
|
|
|
setTableData(res.data.applications)
|
|
|
|
@ -829,7 +813,7 @@ function openHand() {
|
|
|
|
|
function lookInvoice() {
|
|
|
|
|
loading.value = true
|
|
|
|
|
let id = 0
|
|
|
|
|
if(form.value.isSetRed){
|
|
|
|
|
if (form.value.isSetRed) {
|
|
|
|
|
id = form.value.redId
|
|
|
|
|
} else {
|
|
|
|
|
id = route.query.id
|
|
|
|
@ -1289,7 +1273,7 @@ const columns = [
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
function numberToChineseUpper(num) {
|
|
|
|
|
function numberToChineseUpper(num: number): string {
|
|
|
|
|
// 定义数字对应的中文大写
|
|
|
|
|
const chineseNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];
|
|
|
|
|
// 定义单位
|
|
|
|
@ -1297,6 +1281,10 @@ function numberToChineseUpper(num) {
|
|
|
|
|
// 处理小数点
|
|
|
|
|
const decimalUnits = ["角", "分"];
|
|
|
|
|
|
|
|
|
|
// 检查是否为负数
|
|
|
|
|
let isNegative = num < 0;
|
|
|
|
|
num = Math.abs(num);
|
|
|
|
|
|
|
|
|
|
// 转换为字符串,并分割成整数部分和小数部分
|
|
|
|
|
let parts = num.toString().split('.');
|
|
|
|
|
let integerPart = parts[0];
|
|
|
|
@ -1314,7 +1302,7 @@ function numberToChineseUpper(num) {
|
|
|
|
|
|
|
|
|
|
for (let i = integerPart.length - 1; i >= 0; i--) {
|
|
|
|
|
let digit = integerPart[i];
|
|
|
|
|
let digitStr = chineseNums[digit];
|
|
|
|
|
let digitStr = chineseNums[parseInt(digit)];
|
|
|
|
|
|
|
|
|
|
if (digitStr === "零") {
|
|
|
|
|
if (hasZero) continue; // 已经有一个零了,跳过当前循环
|
|
|
|
@ -1339,13 +1327,18 @@ function numberToChineseUpper(num) {
|
|
|
|
|
if (decimalPart.length > 0) {
|
|
|
|
|
for (let i = 0; i < decimalPart.length; i++) {
|
|
|
|
|
let digit = decimalPart[i];
|
|
|
|
|
result += chineseNums[digit] + decimalUnits[i];
|
|
|
|
|
result += chineseNums[parseInt(digit)] + decimalUnits[i];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 如果没有小数部分,添加整
|
|
|
|
|
result += '整';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 如果是负数,添加“负”字
|
|
|
|
|
if (isNegative) {
|
|
|
|
|
result = '负' + result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1570,6 +1563,12 @@ watchEffect(() => {
|
|
|
|
|
border-bottom: 1px solid rgba(158, 83, 9, 1);
|
|
|
|
|
padding: 5px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img-in {
|
|
|
|
|
height: 33px;
|
|
|
|
|
transform: rotate(2deg);
|
|
|
|
|
width: 90px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.invoiceIssue-table {
|
|
|
|
|