szh-new
lijingjia 2 months ago
commit c8f7a40f76

@ -3,23 +3,15 @@
<div class="top"> <div class="top">
<BasicTable height="600px" @row-click="handleClick" class="examine-table" @register="registerTable"> <BasicTable height="600px" @row-click="handleClick" class="examine-table" @register="registerTable">
<template #tableTitle> <template #tableTitle>
<a-button type="link" @click="applySuccess"><i <a-popconfirm title="确定审核通过吗?" @confirm="applySuccess" ok-text="" cancel-text="">
class="icon-yiwancheng2-copy iconfont"></i>审核通过</a-button> <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 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> <a-button @click="refuse" type="link"><i class="icon-bohui-01 iconfont"></i>驳回提交</a-button>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <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> </template>
</BasicTable> </BasicTable>
</div> </div>
@ -170,12 +162,6 @@ const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSourc
}, },
canResize: true, canResize: true,
immediate: true, immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
}) })
const [registerTable2, { getSelectRows: getSelectRows2, clearSelectedRowKeys: clearSelectedRowKeys2, setTableData }] = useTable({ const [registerTable2, { getSelectRows: getSelectRows2, clearSelectedRowKeys: clearSelectedRowKeys2, setTableData }] = useTable({

@ -182,4 +182,12 @@ export function GetCurrencies(parameter) {
method: 'post', method: 'post',
data: 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[] = [ export const detailColumnsRight: BasicColumn[] = [
{ {
title: '申请单号', title: '申请单号',
dataIndex: 'name', dataIndex: 'applicationNO',
width: 80, width: 80,
align: 'left', align: 'left',
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'specification', dataIndex: 'statusText',
width: 70, width: 70,
align: 'left', align: 'left',
}, },
{ {
title: '币别', title: '币别',
dataIndex: 'unit', dataIndex: 'currency',
width: 50, width: 50,
align: 'left', align: 'left',
}, },
{ {
title: '申请金额', title: '申请金额',
dataIndex: 'quantity', dataIndex: 'applyAmount',
width: 80, width: 80,
align: 'left', align: 'left',
}, },
{ {
title: '开票要求', title: '开票要求',
dataIndex: 'taxUnitPrice', dataIndex: 'invoiceRemark',
width: 80, width: 80,
align: 'left', align: 'left',
}, },
{ {
title: '申请人', title: '申请人',
dataIndex: 'unitPrice', dataIndex: 'createByName',
width: 80, width: 80,
align: 'left', align: 'left',
}, },

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

@ -78,7 +78,7 @@
<div class="left"> <div class="left">
<div class="left-top"> <div class="left-top">
<div class="left-top-item" style="padding-right: 100px"> <div class="left-top-item" style="padding-right: 100px">
<editCompent ref="editCompentRef" label="发票币别:"> <editCompent :showEdit="false" ref="editCompentRef" label="发票币别:">
<template #text> <template #text>
<span> {{ form.currency }}</span> <span> {{ form.currency }}</span>
</template> </template>
@ -222,16 +222,60 @@
{{ taxUnitPriceTotal }}</span> {{ taxUnitPriceTotal }}</span>
</div> </div>
<div style="padding:5px 20px;display: flex;height: 140px"> <div style="padding:5px 20px;display: flex;height: 140px">
<div style="width: 80%;"> <div style="width: 80%;display: flex;">
<editCompent ref="editCompentRef" label="备注:"> <div class="label" style="margin-right: 15px">备注</div>
<template #text> <div style="flex:1">
<span> {{ form.note }}</span> <div style="font-size: 12px">
</template> <editCompent :textLabel="true" label="购买方地址电话:" ref="editCompentRef">
<template #content> <template #text>
<a-textarea :auto-size="{ minRows: 6, maxRows: 8 }" v-model:value="form.note" <span> {{ form.customerAddressTel }}</span>
size="small"></a-textarea> </template>
</template> <template #content>
</editCompent> <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: 3, maxRows: 3 }"
v-model:value="form.note" size="small"></a-textarea>
</template>
</editCompent>
</div>
</div> </div>
<div> <div>
<a-button type="link"> <a-button type="link">
@ -288,7 +332,18 @@
</div> </div>
<div class="right"> <div class="right">
<BasicForm @register="registerForm"> <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> </BasicForm>
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
@ -296,7 +351,8 @@
</div> </div>
</div> </div>
</a-spin> </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"> <a-modal width="1400px" @cancel="feeFlag = false" :visible="feeFlag" title="费用明细" :footer="null">
<BasicTable @register="registerTableFee"> <BasicTable @register="registerTableFee">
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
@ -324,7 +380,7 @@ import { DownOutlined } from '@ant-design/icons-vue'
import { import {
GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail, GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,
GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave,
GeneralInvoiceGetList, GeneralInvoiceInitiate GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList
} from '../api' } from '../api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
@ -375,28 +431,10 @@ const detailForm = [
}, },
{ {
label: '系统客户', label: '系统客户',
field: 'autualCustomerName1', field: 'customerName',
component: 'ApiSelect', component: 'Input',
dynamicDisabled: false, dynamicDisabled: true,
colProps: { span: 12 }, 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: '代开客户', label: '代开客户',
@ -463,16 +501,30 @@ const detailForm = [
span: 24, span: 24,
}, },
}, },
{
field: 'cellPhoneNOFlag',
component: 'Input',
show: false,
colProps: { span: 24 },
},
{
field: 'emailFlag',
show: false,
component: 'Input',
colProps: { span: 24 },
},
{ {
field: 'email', field: 'email',
label: '邮箱', label: '邮箱',
component: 'InputNumber', component: 'Input',
slot: 'email',
colProps: { span: 24 }, colProps: { span: 24 },
}, },
{ {
field: 'cellPhoneNO', field: 'cellPhoneNO',
label: '手机', label: '手机',
component: 'InputNumber', component: 'Input',
slot: 'cellPhoneNO',
colProps: { span: 24 }, colProps: { span: 24 },
}, },
{ {
@ -583,6 +635,22 @@ const applyInvoiceRef = ref(null) as any
function open() { function open() {
applyInvoiceRef.value.init() 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() { function handleIssue() {
const data = { const data = {
ids: [route.query.id] ids: [route.query.id]
@ -611,9 +679,7 @@ const form = ref({
const currencyList = ref([]) as any const currencyList = ref([]) as any
const customerList = ref([]) as any const customerList = ref([]) as any
onMounted(() => { onMounted(() => {
GetFeeCurrencySelectList().then(res => {
currencyList.value = res.data
})
GetClientListByCode().then(res => { GetClientListByCode().then(res => {
customerList.value = res.data customerList.value = res.data
}) })
@ -639,16 +705,37 @@ function handleSave() {
}, },
invoiceDetails: list.value, 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 loading.value = true
GeneralInvoiceSave(data).then(res => { if (route.query.type == 'apply') {
if (res.succeeded) { GeneralInvoiceSave(data).then(res => {
getDetail() if (res.succeeded) {
createMessage.success('保存成功') getDetail()
} createMessage.success('保存成功')
loading.value = false }
}).catch(() => { loading.value = false
loading.value = false }).catch(() => {
}) 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() { function getDetail() {
loading.value = true loading.value = true
@ -662,6 +749,22 @@ function getDetail() {
} else { } else {
res.data.isSettledName = '否' 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) setTableData(res.data.applications)
setFieldsValue(res.data) setFieldsValue(res.data)
} }
@ -676,7 +779,7 @@ function openFile() {
} }
const router = useRouter() const router = useRouter()
const go = useGo() const go = useGo()
function updateListFreeLeft(val){ function updateListFreeLeft(val) {
const data = { const data = {
invoice: { invoice: {
...form.value, ...form.value,
@ -699,7 +802,7 @@ function updateListFreeLeft(val){
} }
} }
loading.value = false loading.value = false
}).catch(()=>{ }).catch(() => {
loading.value = false loading.value = false
}) })
} }
@ -727,7 +830,7 @@ function handleUpdate(val) {
} }
} }
loading.value = false loading.value = false
}).catch(()=>{ }).catch(() => {
loading.value = false loading.value = false
}) })
} }
@ -760,7 +863,7 @@ function updateListFree(val) {
} }
} }
loading.value = false loading.value = false
}).catch(()=>{ }).catch(() => {
loading.value = false loading.value = false
}) })
} }
@ -899,6 +1002,38 @@ function handleSearchUser(val) {
UserList.value = res.data 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 }) { function onClick({ key }) {
form.value.categoryCode = key form.value.categoryCode = key
CategoryData.forEach((item) => { CategoryData.forEach((item) => {
@ -937,7 +1072,6 @@ const allCheck = ref(false)
// //
const someCheck = ref(false) const someCheck = ref(false)
import { feeUnitDict } from '/@/hooks/dict/index' import { feeUnitDict } from '/@/hooks/dict/index'
import { t } from 'vxe-table'
const unitDict = ref([]) as any const unitDict = ref([]) as any
// //
const columns = [ 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 { .SvgImg {
width: 16px; width: 16px;
cursor: pointer; cursor: pointer;

Loading…
Cancel
Save