szh-new
lijingjia 2 months ago
commit c8f7a40f76

@ -3,23 +3,15 @@
<div class="top">
<BasicTable height="600px" @row-click="handleClick" class="examine-table" @register="registerTable">
<template #tableTitle>
<a-button type="link" @click="applySuccess"><i
class="icon-yiwancheng2-copy iconfont"></i>审核通过</a-button>
<a-popconfirm title="确定审核通过吗?" @confirm="applySuccess" ok-text="" cancel-text="">
<span class="ds-action-svg-btn">
<a-button type="link"><i class="icon-yiwancheng2-copy iconfont"></i>审核通过</a-button>
</span>
</a-popconfirm>
<a-button type="link"><i class="icon-piliangshenhe iconfont"></i>全部审核通过</a-button>
<a-button @click="refuse" type="link"><i class="icon-bohui-01 iconfont"></i>驳回提交</a-button>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
},
},
]" />
</template>
</template>
</BasicTable>
</div>
@ -170,12 +162,6 @@ const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSourc
},
canResize: true,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
const [registerTable2, { getSelectRows: getSelectRows2, clearSelectedRowKeys: clearSelectedRowKeys2, setTableData }] = useTable({

@ -183,3 +183,11 @@ export function GetCurrencies(parameter) {
data: parameter,
})
}
export function GetClientBankList(parameter) {
return request({
url: '/mainApi/ClientBank/GetClientBankList',
method: 'post',
data: parameter,
})
}

@ -412,37 +412,37 @@ export const feeColumnsSum: BasicColumn[] = [
export const detailColumnsRight: BasicColumn[] = [
{
title: '申请单号',
dataIndex: 'name',
dataIndex: 'applicationNO',
width: 80,
align: 'left',
},
{
title: '状态',
dataIndex: 'specification',
dataIndex: 'statusText',
width: 70,
align: 'left',
},
{
title: '币别',
dataIndex: 'unit',
dataIndex: 'currency',
width: 50,
align: 'left',
},
{
title: '申请金额',
dataIndex: 'quantity',
dataIndex: 'applyAmount',
width: 80,
align: 'left',
},
{
title: '开票要求',
dataIndex: 'taxUnitPrice',
dataIndex: 'invoiceRemark',
width: 80,
align: 'left',
},
{
title: '申请人',
dataIndex: 'unitPrice',
dataIndex: 'createByName',
width: 80,
align: 'left',
},

@ -1,6 +1,6 @@
<template>
<div @mouseover="showTooltip = true" @mouseleave="showTooltip = false" class="invoiceNo">
<span class="label" >{{ label }}</span>
<span v-if="showLabel" class="label" :class="{textLabel:textLabel}" >{{ label }}</span>
<span v-show="invoiceEditFlag">
<slot name="text"></slot>
</span>
@ -29,6 +29,14 @@ const props = defineProps({
type: Boolean,
default: true,
},
textLabel: {
type: Boolean,
default: false,
},
showLabel: {
type: Boolean,
default: true,
},
})
</script>
<style lang="less" scoped >
@ -38,6 +46,7 @@ const props = defineProps({
width: 100%;
align-items: center;
margin-bottom: 10px;
min-height: 1px;
}
.label{
margin-right: 5px;
@ -47,4 +56,7 @@ const props = defineProps({
display: inline-block;
min-width: 27px;
}
.textLabel{
color: black !important;
}
</style>

@ -78,7 +78,7 @@
<div class="left">
<div class="left-top">
<div class="left-top-item" style="padding-right: 100px">
<editCompent ref="editCompentRef" label="发票币别:">
<editCompent :showEdit="false" ref="editCompentRef" label="发票币别:">
<template #text>
<span> {{ form.currency }}</span>
</template>
@ -222,17 +222,61 @@
{{ taxUnitPriceTotal }}</span>
</div>
<div style="padding:5px 20px;display: flex;height: 140px">
<div style="width: 80%;">
<editCompent ref="editCompentRef" label="备注:">
<div style="width: 80%;display: flex;">
<div class="label" style="margin-right: 15px">备注</div>
<div style="flex:1">
<div style="font-size: 12px">
<editCompent :textLabel="true" label="购买方地址电话:" ref="editCompentRef">
<template #text>
<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>
</template>
</editCompent>
</div>
<div style="font-size: 12px;display: flex">
<editCompent :textLabel="true" label="购买方开户行/账号:" ref="editCompentRef">
<template #text>
<span> {{ form.customerBankName }}</span>
</template>
<template #content>
<a-select size="small" @change="handleSelectAccount"
v-model:value="form.customerBankName" style="width: 90%">
<a-select-option :key="index" v-for="(item, index) in accountList"
:value="item.bankName">{{ item.bankName }}</a-select-option>
</a-select>
</template>
</editCompent>
<editCompent :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>
</template>
</editCompent>
</div>
<editCompent :showLabel="false" ref="editCompentRef">
<template #text>
<span> {{ form.note }}</span>
</template>
<template #content>
<a-textarea :auto-size="{ minRows: 6, maxRows: 8 }" v-model:value="form.note"
size="small"></a-textarea>
<a-textarea :auto-size="{ minRows: 3, maxRows: 3 }"
v-model:value="form.note" size="small"></a-textarea>
</template>
</editCompent>
</div>
</div>
<div>
<a-button type="link">
<i class="icon-a-17Btuichu iconfont"></i> 提取备注</a-button>
@ -288,7 +332,18 @@
</div>
<div class="right">
<BasicForm @register="registerForm">
<template #email="{ model, field }">
<a-input v-model:value="model.email" size="small"
style="width: 50%;margin-right: 20px"></a-input>
<a-switch checked-children="" un-checked-children="" size="small"
v-model:checked="model.emailFlag" />
</template>
<template #cellPhoneNO="{ model, field }">
<a-input v-model:value="model.cellPhoneNO" size="small"
style="width: 50%;margin-right: 20px"></a-input>
<a-switch checked-children="" un-checked-children="" size="small"
v-model:checked="model.cellPhoneNOFlag" />
</template>
</BasicForm>
<BasicTable @register="registerTable">
@ -296,7 +351,8 @@
</div>
</div>
</a-spin>
<applyInvoice @updateListFreeLeft="updateListFreeLeft" @updateList="handleUpdate" @updateListFree="updateListFree" ref="applyInvoiceRef"></applyInvoice>
<applyInvoice @updateListFreeLeft="updateListFreeLeft" @updateList="handleUpdate"
@updateListFree="updateListFree" ref="applyInvoiceRef"></applyInvoice>
<a-modal width="1400px" @cancel="feeFlag = false" :visible="feeFlag" title="费用明细" :footer="null">
<BasicTable @register="registerTableFee">
<template v-slot:bodyCell="{ column, record }">
@ -324,7 +380,7 @@ import { DownOutlined } from '@ant-design/icons-vue'
import {
GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,
GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave,
GeneralInvoiceGetList, GeneralInvoiceInitiate
GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList
} from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRoute, useRouter } from 'vue-router'
@ -375,28 +431,10 @@ const detailForm = [
},
{
label: '系统客户',
field: 'autualCustomerName1',
component: 'ApiSelect',
dynamicDisabled: false,
field: 'customerName',
component: 'Input',
dynamicDisabled: true,
colProps: { span: 12 },
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
GetControllerClientList().then((res) => {
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
label: '代开客户',
@ -463,16 +501,30 @@ const detailForm = [
span: 24,
},
},
{
field: 'cellPhoneNOFlag',
component: 'Input',
show: false,
colProps: { span: 24 },
},
{
field: 'emailFlag',
show: false,
component: 'Input',
colProps: { span: 24 },
},
{
field: 'email',
label: '邮箱',
component: 'InputNumber',
component: 'Input',
slot: 'email',
colProps: { span: 24 },
},
{
field: 'cellPhoneNO',
label: '手机',
component: 'InputNumber',
component: 'Input',
slot: 'cellPhoneNO',
colProps: { span: 24 },
},
{
@ -583,6 +635,22 @@ const applyInvoiceRef = ref(null) as any
function open() {
applyInvoiceRef.value.init()
}
function handleSelectAccount(val) {
accountList.value.forEach(item => {
if (item.bankName == val) {
form.value.customerAddressTel = ''
invoiceHeadersList.value = item.invoiceHeaders
}
})
}
function handleSelectAccount1(val) {
accountList.value.forEach(item => {
if (item.account == val) {
form.value.customerAddressTel = ''
invoiceHeadersList.value = item.invoiceHeaders
}
})
}
function handleIssue() {
const data = {
ids: [route.query.id]
@ -611,9 +679,7 @@ const form = ref({
const currencyList = ref([]) as any
const customerList = ref([]) as any
onMounted(() => {
GetFeeCurrencySelectList().then(res => {
currencyList.value = res.data
})
GetClientListByCode().then(res => {
customerList.value = res.data
})
@ -639,7 +705,15 @@ function handleSave() {
},
invoiceDetails: list.value,
}
data.invoice.pushModeValues = []
if (data.invoice.emailFlag) {
data.invoice.pushModeValues.push(1)
}
if (data.invoice.cellPhoneNOFlag) {
data.invoice.pushModeValues.push(2)
}
loading.value = true
if (route.query.type == 'apply') {
GeneralInvoiceSave(data).then(res => {
if (res.succeeded) {
getDetail()
@ -650,6 +724,19 @@ function handleSave() {
loading.value = false
})
}
if (route.query.type == 'free') {
FreeInvoiceSave(data).then(res => {
if (res.succeeded) {
getDetail()
createMessage.success('保存成功')
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
}
function getDetail() {
loading.value = true
GeneralInvoiceGet({ id: route.query.id }).then(res => {
@ -662,6 +749,22 @@ function getDetail() {
} else {
res.data.isSettledName = '否'
}
if (res.data.invoiceNO) {
res.data.status = '已开票'
} else {
res.data.status = '未开票'
}
res.data.emailFlag = false
res.data.cellPhoneNOFlag = false
res.data.pushModeValues.forEach(item => {
if (item == 1) {
res.data.emailFlag = true
}
if (item == 2) {
res.data.cellPhoneNOFlag = true
}
})
getCustomerInfo(res.data.customerId)
setTableData(res.data.applications)
setFieldsValue(res.data)
}
@ -899,6 +1002,38 @@ function handleSearchUser(val) {
UserList.value = res.data
})
}
const invoiceHeadersList = ref([]) as any
const accountList = ref([]) as any
function getCustomerInfo(id) {
const queryStr = [
{
FieldName: 'ClientId',
FieldValue: id,
ConditionalType: '0',
},
]
const data = {
pageCondition: {
pageIndex: 1,
pageSize: 20,
sortConditions: [],
},
queryCondition: JSON.stringify(queryStr),
}
accountList.value = []
GetClientBankList(data).then((res) => {
if (form.value.customerAccount) {
res.data.forEach((item) => {
if (item.account == form.value.customerAccount) {
invoiceHeadersList.value = item.invoiceHeaders
}
if (item.currency == 'RMB') {
accountList.value.push(item)
}
})
}
})
}
function onClick({ key }) {
form.value.categoryCode = key
CategoryData.forEach((item) => {
@ -937,7 +1072,6 @@ const allCheck = ref(false)
//
const someCheck = ref(false)
import { feeUnitDict } from '/@/hooks/dict/index'
import { t } from 'vxe-table'
const unitDict = ref([]) as any
//
const columns = [
@ -1236,6 +1370,16 @@ watchEffect(() => {
}
}
.label {
margin-right: 5px;
font-weight: 400;
color: rgba(158, 83, 9, 1);
flex-shrink: 1;
display: inline-block;
font-size: 12px;
min-width: 27px;
}
.SvgImg {
width: 16px;
cursor: pointer;

Loading…
Cancel
Save