zth
sunzehua 2 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 indexQuery = 0
let list = [] let list = []
PaymentSettlementGetList(data).then(res => { PaymentSettlementGetList(data).then(res => {
list = res.data.list list = res.data
res.data.list.forEach((item, index) => { res.data.forEach((item, index) => {
if (item.id == route.query.id) { if (item.id == route.query.id) {
indexQuery = index indexQuery = index
} }

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

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

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

@ -36,34 +36,13 @@
</span> </span>
</a-tooltip> </a-tooltip>
</div> </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> <div>
<a-popconfirm title="确定申请开票吗?" ok-text="" cancel-text="" @confirm="handleIssue"> <a-popconfirm title="确定申请开票吗?" ok-text="" cancel-text="" @confirm="handleIssue">
<a-button v-repeat type="link" v-if="route.query.id && form.status != '已开票'"> <a-button v-repeat type="link" v-if="route.query.id && form.status != '已开票'">
<span class="iconfont icon-touzijilu"></span>开票 <span class="iconfont icon-touzijilu"></span>开票
</a-button> </a-button>
</a-popconfirm> </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>冲红 <span class="iconfont icon-dengjizongshu"></span>冲红
</a-button> </a-button>
<!-- <a-button v-repeat type="link" v-if="route.query.id"> <!-- <a-button v-repeat type="link" v-if="route.query.id">
@ -94,7 +73,12 @@
</editCompent> </editCompent>
<editCompent :showEdit="false" ref="editCompentRef" label="开票类型:"> <editCompent :showEdit="false" ref="editCompentRef" label="开票类型:">
<template #text> <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> </template>
</editCompent> </editCompent>
<editCompent ref="editCompentRef" label="开票日期:"> <editCompent ref="editCompentRef" label="开票日期:">
@ -138,7 +122,10 @@
</editCompent> </editCompent>
<editCompent :showEdit="false" ref="editCompentRef" label="开票状态:"> <editCompent :showEdit="false" ref="editCompentRef" label="开票状态:">
<template #text> <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> </template>
</editCompent> </editCompent>
</div> </div>
@ -229,8 +216,8 @@
<span style="color: rgba(158, 83, 9, 1)"> 小写:</span> <span style="color: rgba(158, 83, 9, 1)"> 小写:</span>
{{ taxUnitPriceTotal }}</span> {{ taxUnitPriceTotal }}</span>
</div> </div>
<div style="padding:5px 20px;display: flex;height: 140px"> <div style="padding:5px 20px;display: flex;height: 140px;width: 100%;">
<div style="width: 80%;display: flex;"> <div style="width: 100%;display: flex;">
<div class="label" style="margin-right: 15px">备注</div> <div class="label" style="margin-right: 15px">备注</div>
<div style="flex:1"> <div style="flex:1">
<div style="font-size: 12px"> <div style="font-size: 12px">
@ -239,12 +226,7 @@
<span> {{ form.customerAddressTel }}</span> <span> {{ form.customerAddressTel }}</span>
</template> </template>
<template #content> <template #content>
<a-select size="small" v-model:value="form.customerAddressTel" <a-input v-model:value="form.customerAddressTel"></a-input>
style="width: 90%">
<a-select-option :key="index"
v-for="(item, index) in invoiceHeadersList"
:value="item.addressTel">{{ item.addressTel }}</a-select-option>
</a-select>
</template> </template>
</editCompent> </editCompent>
</div> </div>
@ -261,16 +243,12 @@
</a-select> </a-select>
</template> </template>
</editCompent> </editCompent>
<editCompent :showLabel="false" ref="editCompentRef"> <editCompent :showEdit="false" :showLabel="false" ref="editCompentRef">
<template #text> <template #text>
<span> {{ form.customerAccount }}</span> <span> {{ form.customerAccount }}</span>
</template> </template>
<template #content> <template #content>
<a-select size="small" @change="handleSelectAccount1" {{ form.customerAccount }}
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>
</template> </template>
</editCompent> </editCompent>
</div> </div>
@ -379,7 +357,6 @@
<a-form :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }"> <a-form :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
<a-form-item label="冲红原因"> <a-form-item label="冲红原因">
<a-select ref="select" v-model:value="redForm.chyyDm" style="width: 100%"> <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="01">开票有误</a-select-option>
<a-select-option value="02">销货退回</a-select-option> <a-select-option value="02">销货退回</a-select-option>
<a-select-option value="03">服务中止</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-option value="1">购方</a-select-option>
</a-select> </a-select>
</a-form-item> </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-textarea v-model:value="redForm.reason" :auto-size="{ minRows: 3, maxRows: 6 }" />
</a-form-item> </a-form-item> -->
</a-form> </a-form>
</a-spin> </a-spin>
</a-modal> </a-modal>
@ -436,7 +413,8 @@ defineComponent({
}) })
registerAllModules() registerAllModules()
const redForm = ref({ const redForm = ref({
lrfsf: '0' lrfsf: '0',
chyyDm: '01'
}) as any }) as any
const detailForm = [ const detailForm = [
{ {
@ -588,13 +566,13 @@ const detailForm = [
dynamicDisabled: true, dynamicDisabled: true,
colProps: { span: 12 }, colProps: { span: 12 },
}, },
{ // {
field: 'redCode', // field: 'redCode',
label: '被冲红发票代码', // label: '',
component: 'Input', // component: 'Input',
dynamicDisabled: true, // dynamicDisabled: true,
colProps: { span: 12 }, // colProps: { span: 12 },
}, // },
{ {
field: 'divider-selects5', field: 'divider-selects5',
component: 'Divider', component: 'Divider',
@ -674,7 +652,8 @@ function openRed() {
function handleSelectAccount(val) { function handleSelectAccount(val) {
accountList.value.forEach(item => { accountList.value.forEach(item => {
if (item.bankName == val) { if (item.bankName == val) {
form.value.customerAddressTel = '' form.value.customerAccount = item.bankAccountNo
// form.value.customerAddressTel = item.invoiceAddress + ' ' + item.invoiceTel
invoiceHeadersList.value = item.invoiceHeaders invoiceHeadersList.value = item.invoiceHeaders
} }
}) })
@ -777,11 +756,13 @@ function getDetail() {
loading.value = true loading.value = true
GeneralInvoiceGet({ id: route.query.id }).then(res => { GeneralInvoiceGet({ id: route.query.id }).then(res => {
if (res.succeeded) { if (res.succeeded) {
res.data.invoiceDetails.forEach(item => { if (res.data.invoiceDetails) {
item.unit = '票' 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 : []) list.value = res.data.invoiceDetails ? res.data.invoiceDetails : []
hotTb.value.hotInstance.loadData(res.data.invoiceDetails ? res.data.invoiceDetails : [])
}
if (res.data.isSettled) { if (res.data.isSettled) {
res.data.isSettledName = '是' res.data.isSettledName = '是'
} else { } else {
@ -792,26 +773,29 @@ function getDetail() {
} else { } else {
res.data.isLockedName = '否' res.data.isLockedName = '否'
} }
if (res.data.isSetRed) {
res.data.isSetRedName = '是'
res.data.invoiceType = '红票'
} else {
res.data.isSetRedName = '否'
res.data.invoiceType = '正票'
}
if (res.data.invoiceNO) { if (res.data.invoiceNO) {
res.data.status = '已开票' res.data.status = '已开票'
} else { } else {
res.data.status = '未开票' 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.emailFlag = false
res.data.cellPhoneNOFlag = false res.data.cellPhoneNOFlag = false
res.data.applyAmount = numberThousandFormat(res.data.applyAmount, 2, false) res.data.applyAmount = numberThousandFormat(res.data.applyAmount ? res.data.applyAmount : 0, 2, false)
res.data.otherInvoiceAmount = numberThousandFormat(res.data.otherInvoiceAmount, 2, false) res.data.otherInvoiceAmount = numberThousandFormat(res.data.otherInvoiceAmount ? res.data.otherInvoiceAmount : 0, 2, false)
res.data.invoiceAmount = numberThousandFormat(res.data.invoiceAmount, 2, false) res.data.invoiceAmount = numberThousandFormat(res.data.invoiceAmount ? res.data.invoiceAmount : 0, 2, false)
res.data.applications.forEach(item => { if (res.data.applications) {
item.applyAmount = numberThousandFormat(item.applyAmount, 2, false) res.data.applications.forEach(item => {
}) item.applyAmount = numberThousandFormat(item.applyAmount ? res.data.applyAmount : 0, 2, false)
})
}
form.value = res.data form.value = res.data
getCustomerInfo(res.data.customerId) getCustomerInfo(res.data.customerId)
setTableData(res.data.applications) setTableData(res.data.applications)
@ -829,7 +813,7 @@ function openHand() {
function lookInvoice() { function lookInvoice() {
loading.value = true loading.value = true
let id = 0 let id = 0
if(form.value.isSetRed){ if (form.value.isSetRed) {
id = form.value.redId id = form.value.redId
} else { } else {
id = route.query.id id = route.query.id
@ -1289,7 +1273,7 @@ const columns = [
] ]
function numberToChineseUpper(num) { function numberToChineseUpper(num: number): string {
// //
const chineseNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"]; const chineseNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];
// //
@ -1297,6 +1281,10 @@ function numberToChineseUpper(num) {
// //
const decimalUnits = ["角", "分"]; const decimalUnits = ["角", "分"];
//
let isNegative = num < 0;
num = Math.abs(num);
// //
let parts = num.toString().split('.'); let parts = num.toString().split('.');
let integerPart = parts[0]; let integerPart = parts[0];
@ -1314,7 +1302,7 @@ function numberToChineseUpper(num) {
for (let i = integerPart.length - 1; i >= 0; i--) { for (let i = integerPart.length - 1; i >= 0; i--) {
let digit = integerPart[i]; let digit = integerPart[i];
let digitStr = chineseNums[digit]; let digitStr = chineseNums[parseInt(digit)];
if (digitStr === "零") { if (digitStr === "零") {
if (hasZero) continue; // if (hasZero) continue; //
@ -1339,13 +1327,18 @@ function numberToChineseUpper(num) {
if (decimalPart.length > 0) { if (decimalPart.length > 0) {
for (let i = 0; i < decimalPart.length; i++) { for (let i = 0; i < decimalPart.length; i++) {
let digit = decimalPart[i]; let digit = decimalPart[i];
result += chineseNums[digit] + decimalUnits[i]; result += chineseNums[parseInt(digit)] + decimalUnits[i];
} }
} else { } else {
// //
result += '整'; result += '整';
} }
//
if (isNegative) {
result = '负' + result;
}
return result; return result;
} }
@ -1570,6 +1563,12 @@ watchEffect(() => {
border-bottom: 1px solid rgba(158, 83, 9, 1); border-bottom: 1px solid rgba(158, 83, 9, 1);
padding: 5px 0; padding: 5px 0;
} }
.img-in {
height: 33px;
transform: rotate(2deg);
width: 90px;
}
</style> </style>
<style lang="less"> <style lang="less">
.invoiceIssue-table { .invoiceIssue-table {

@ -1,6 +1,7 @@
<template> <template>
<div class="main"> <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> <template #tableTitle>
<div class="tableTitleBox"> <div class="tableTitleBox">
<a-tooltip placement="top" :mouseEnterDelay="0.5"> <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) invoiceAmount.value = numberThousandFormat(res.data.invoiceAmount, 2, true)
applyAmount.value = numberThousandFormat(res.data.applyAmount, 2, true) applyAmount.value = numberThousandFormat(res.data.applyAmount, 2, true)
return new Promise((resolve) => { return new Promise((resolve) => {
res.data.list.forEach(item=>{ res.data.list.forEach(item => {
item.applyAmount = numberThousandFormat(item.applyAmount, 2, true) item.applyAmount = numberThousandFormat(item.applyAmount, 2, true)
item.invoiceAmount = numberThousandFormat(item.invoiceAmount, 2, true) item.invoiceAmount = numberThousandFormat(item.invoiceAmount, 2, true)
}) })
resolve({ data: [...res.data.list], total: res.count }) resolve({ data: [...res.data.list], total: res.count })
}) })
@ -197,6 +198,14 @@ function FnDel() {
setLoading(false) 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 invoiceAmount = ref(0)
const applyAmount = ref(0) const applyAmount = ref(0)
function goDetail(type) { function goDetail(type) {
@ -278,4 +287,21 @@ function GoDetailed(row) {
padding: 0 5px; 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> </style>

Loading…
Cancel
Save