zth
sunzehua 3 weeks ago
parent fd0c8d4533
commit f134457314

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

@ -263,8 +263,8 @@ function ClickLast(type) {
let indexQuery = 0
let list = []
PaymentSettlementGetList(data).then(res => {
list = res.data.list
res.data.list.forEach((item, index) => {
list = res.data
res.data.forEach((item, index) => {
if (item.id == route.query.id) {
indexQuery = index
}

@ -7,10 +7,10 @@
<span class="iconfont icon-jia"></span>
引用发票明细
</a-button>
<a-button type="link" @click="add">
<!-- <a-button type="link" @click="add">
<span class="iconfont icon-jia"></span>
添加发票明细
</a-button>
</a-button> -->
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="deleteRow">
<a-button v-if="resData.status != 2 && resData.status != 4" style="margin: 0 10px;" type="link">
<span class="iconfont icon-shanchu1"></span>
@ -185,11 +185,11 @@ const loading = ref(false)
const row = {
selected: false,
name: '',
taxAmount: '',
taxRate: '',
amount: '',
unitPrice: '',
taxUnitPrice: '',
taxAmount: null,
taxRate: null,
amount: null,
unitPrice: null,
taxUnitPrice: null,
quantity: 1,
unit: '票',
specification: '',

@ -160,7 +160,7 @@
<a-select v-model:value="tempNameId" style="width: 80%">
<a-select-option :value="item.id" v-for="(item, index) in tempList" :key="index">{{
item.name
}}</a-select-option>
}}</a-select-option>
</a-select>
</a-modal>
</a-spin>
@ -328,6 +328,7 @@ const bankForm = [
componentProps: ({ formModel }) => {
return {
options: bankList.value,
showSearch: true,
fieldNames: {
label: 'name',
value: 'name',
@ -352,6 +353,9 @@ const bankForm = [
})
}
},
filterOption: (input: string, option: any) => {
return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
@ -374,6 +378,10 @@ const bankForm = [
label: 'name',
value: 'name',
},
showSearch: true,
filterOption: (input: string, option: any) => {
return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.usdCustomerBankId = obj.id

@ -236,7 +236,7 @@ export const columns: BasicColumn[] = [
},
{
title: '开票类型',
dataIndex: 'invoiceNO1',
dataIndex: 'invoiceNO3',
width: 100,
align: 'left',
},
@ -266,7 +266,7 @@ export const columns: BasicColumn[] = [
},
{
title: '录入人',
dataIndex: 'createByName',
dataIndex: 'createByName1',
width: 100,
align: 'left',
},

@ -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 {

@ -1,6 +1,7 @@
<template>
<div class="main">
<BasicTable @row-dbClick="(e) => { GoDetailed(e) }" class="ds-table" @register="registerTable">
<BasicTable :rowClassName="rowClassName" @row-dbClick="(e) => { GoDetailed(e) }" class="ds-table"
@register="registerTable">
<template #tableTitle>
<div class="tableTitleBox">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
@ -122,9 +123,9 @@ const [registerTable, { reload, setLoading, getSelectRows, getForm }] = useTable
invoiceAmount.value = numberThousandFormat(res.data.invoiceAmount, 2, true)
applyAmount.value = numberThousandFormat(res.data.applyAmount, 2, true)
return new Promise((resolve) => {
res.data.list.forEach(item=>{
item.applyAmount = numberThousandFormat(item.applyAmount, 2, true)
item.invoiceAmount = numberThousandFormat(item.invoiceAmount, 2, true)
res.data.list.forEach(item => {
item.applyAmount = numberThousandFormat(item.applyAmount, 2, true)
item.invoiceAmount = numberThousandFormat(item.invoiceAmount, 2, true)
})
resolve({ data: [...res.data.list], total: res.count })
})
@ -197,6 +198,14 @@ function FnDel() {
setLoading(false)
})
}
function rowClassName(record, index) {
if (record.type == 2) {
return 'red-invoice'
}
if (record.type == 1 && record.isSetRed) {
return 'blue-invoice'
}
}
const invoiceAmount = ref(0)
const applyAmount = ref(0)
function goDetail(type) {
@ -278,4 +287,21 @@ function GoDetailed(row) {
padding: 0 5px;
}
}
:deep(.ant-table-tbody) {
.red-invoice {
color: red !important;
td {
color: red !important;
}
}
}
:deep(.ant-table-tbody) {
.blue-invoice {
color: blue !important;
td {
color: blue !important;
}
}
}
</style>

Loading…
Cancel
Save