feature-JimuReport-1106-yjl
sunzehua 3 weeks ago
parent 54a1bff8ea
commit bdab3e79a7

@ -1,7 +1,7 @@
<template> <template>
<div class="main"> <div class="main">
<div class="top"> <div class="top">
<BasicTable height="600px" @row-click="handleClick" class="examine-table" @register="registerTable"> <BasicTable :rowClassName="rowClassName" height="600px" @row-click="handleClick" class="examine-table" @register="registerTable">
<template #tableTitle> <template #tableTitle>
<div class="ds-h-aciton-btns-fee"> <div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
@ -359,7 +359,15 @@ function radioChange(val) {
} }
const dsFile = ref('') const dsFile = ref('')
function addFile() { function addFile() {
if (!bookid.value) { let ids = [] as any
ids = getSelectRows().map((item) => {
return item.bookingId
})
if (ids.length==0) {
createMessage.warning('请选择一条数据')
return false
}
if (ids.length>1) {
createMessage.warning('请选择一条数据') createMessage.warning('请选择一条数据')
return false return false
} }
@ -387,6 +395,7 @@ function download(item) {
} }
const bookid = ref('') const bookid = ref('')
const checkInfo = ref({}) as any const checkInfo = ref({}) as any
const activeRow = ref({})
function handleClick(row) { function handleClick(row) {
loading.value = true loading.value = true
GetLogs({ id: row.id }).then(res => { GetLogs({ id: row.id }).then(res => {
@ -408,8 +417,14 @@ function handleClick(row) {
loading.value = false loading.value = false
}) })
bookid.value = row.bookingId bookid.value = row.bookingId
activeRow.value = row
getfileList() getfileList()
} }
function rowClassName(record, index){
if(record.id==activeRow.value.id){
return 'active-row'
}
}
const getfileList = () => { const getfileList = () => {
GetOpFileList({ id: bookid.value }).then(res => { GetOpFileList({ id: bookid.value }).then(res => {
res.data.forEach(item => { res.data.forEach(item => {
@ -734,5 +749,11 @@ function cancelCheckIn(type) {
font-size: 12px; font-size: 12px;
margin-bottom: 10px; margin-bottom: 10px;
} }
:deep(.active-row){
.ant-table-cell{
background: #dfe8f6;
}
}
</style> </style>
<style lang="less"></style>

@ -388,34 +388,35 @@ export const detailColumns: BasicColumn[] = [
export const detailSearchFormSchema: FormSchema[] = [ export const detailSearchFormSchema: FormSchema[] = [
{ {
label: '结费单位', label: '',
field: 'customerId', field: 'customerId',
component: 'Input',
show: false,
},
{
label: '结费单位',
labelSlot: 'customerName',
field: 'customerName',
component: 'ApiSelect', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: true, api: GetControllerClientList,
showSearch: true, labelField: 'pinYinCode',
api: () => { valueField: 'shortName',
return new Promise((resolve) => { showName: 'description',
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
showName: 'shortName',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) {
}, formModel.customerId = obj.id
}
if (!e && !obj) {
formModel.customerId = ''
}
}
} }
}, }
}, },
{ {
field: 'businessType', field: 'businessType',

@ -3,7 +3,7 @@
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null"> <a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
<div style="padding-bottom:5px ;"> <div style="padding-bottom:5px ;">
<div> <div>
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable" @row-dbClick="(e) => { <BasicTable class="ds-table" :rowClassName="rowClassName" @row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
GoDetailed(true, e) GoDetailed(true, e)
} }
"> ">
@ -192,6 +192,9 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
api: async (p) => { api: async (p) => {
const res: API.DataResult = await GetBizList(p) const res: API.DataResult = await GetBizList(p)
return new Promise((resolve) => { return new Promise((resolve) => {
res.data.forEach((item, index) => {
item.cindex = index
})
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...res.data], total: res.count })
}) })
}, },
@ -209,8 +212,11 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
useSearchForm: true, useSearchForm: true,
showIndexColumn: false, showIndexColumn: false,
maxHeight: '600', maxHeight: '600',
rowKey:'cindex',
id:'11',
pagination: true, pagination: true,
striped: true, striped: true,
showTableSetting: true,
bordered: true, bordered: true,
indexColumnProps: { indexColumnProps: {
width: 60, width: 60,
@ -228,9 +234,11 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
striped: true, striped: true,
rowKey: 'recordId', rowKey: 'recordId',
bordered: true, bordered: true,
showTableSetting: true,
indexColumnProps: { indexColumnProps: {
width: 60, width: 60,
}, },
id:'22',
canResize: true, canResize: true,
immediate: false, immediate: false,
}) })
@ -359,8 +367,10 @@ function handleSureExhange() {
setLoading(false) setLoading(false)
} }
} }
const activeRow = ref(null)
function handleClick(record, index) { function handleClick(record, index) {
setSelectedRowKeys([record.id]) setSelectedRowKeys([index])
activeRow.value = index
const data = { const data = {
id: record.id, id: record.id,
businessType: record.businessType, businessType: record.businessType,
@ -379,6 +389,11 @@ function handleClick(record, index) {
loading.value = false loading.value = false
}) })
} }
function rowClassName(record, index){
if(index==activeRow.value){
return 'active-row'
}
}
function init(data) { function init(data) {
open.value = true open.value = true
setTimeout(() => { setTimeout(() => {
@ -668,4 +683,12 @@ defineExpose({ init, changeCustIn })
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span { /deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
color: #257afa; color: #257afa;
} }
:deep(.active-row){
.ant-table-cell{
background: #dfe8f6;
}
}
:deep(.flex){
align-items: flex-end !important;
}
</style> </style>

@ -63,7 +63,11 @@
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>
<div class="status"> <div class="status orange" v-if="form.status==0" >
<i class="icon-jian iconfont" style="font-size: 14px"></i>
{{ form.statusText }}
</div>
<div class="status" v-if="form.status==1" >
<i class="icon-chenggong iconfont" style="font-size: 14px"></i> <i class="icon-chenggong iconfont" style="font-size: 14px"></i>
{{ form.statusText }} {{ form.statusText }}
</div> </div>
@ -215,6 +219,7 @@ const form = ref({
invoiceNO: '', invoiceNO: '',
category: 0, category: 0,
statusText: '未提交', statusText: '未提交',
status:0,
applicationNO: '', applicationNO: '',
isRMB: false, isRMB: false,
isYB: false isYB: false
@ -828,6 +833,7 @@ function handleApply() {
if (res.succeeded) { if (res.succeeded) {
createMessage.success('操作成功') createMessage.success('操作成功')
getDetail() getDetail()
loading.value = false
} else { } else {
loading.value = false loading.value = false
} }
@ -876,6 +882,7 @@ function handleWithdraw() {
if (res.succeeded) { if (res.succeeded) {
createMessage.success('操作成功') createMessage.success('操作成功')
getDetail() getDetail()
loading.value = false
} else { } else {
loading.value = false loading.value = false
} }
@ -901,6 +908,7 @@ function getDetail() {
form.value.invoiceNO = res.data.invoiceNO form.value.invoiceNO = res.data.invoiceNO
form.value.category = res.data.category form.value.category = res.data.category
form.value.statusText = res.data.statusText form.value.statusText = res.data.statusText
form.value.status = res.data.status
form.value.applicationNO = res.data.applicationNO form.value.applicationNO = res.data.applicationNO
details.value = res.data.details details.value = res.data.details
feeTableRef.value.changeCust(res.data.customerId) feeTableRef.value.changeCust(res.data.customerId)
@ -1015,7 +1023,7 @@ function changeCust(id, name) {
customerBankId: res.data[0].id, customerBankId: res.data[0].id,
customerBankName: res.data[0].name, customerBankName: res.data[0].name,
}) })
if (res.data[0].invoiceHeaders.length > 0) { if (res.data[0].invoiceHeaders && res.data[0].invoiceHeaders.length > 0) {
setFieldsValue({ setFieldsValue({
invoiceHeader: res.data[0].invoiceHeaders[0].header, invoiceHeader: res.data[0].invoiceHeaders[0].header,
customerAddTel: res.data[0].invoiceHeaders[0].addressTel customerAddTel: res.data[0].invoiceHeaders[0].addressTel
@ -1317,4 +1325,7 @@ function handleSelect(value) {
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span { /deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
color: #257afa; color: #257afa;
} }
.orange{
color: #ffa500;
}
</style> </style>

Loading…
Cancel
Save