b39501291c
- 取消 el-tooltip 包裹,改用纯 el-button 实现带图标的展开收起按钮 - 按 avue-crud 规范控制按钮显示,新增 searchIndex (默认 4)和 searchItemCount 控制逻辑 - 搜索项数量未超出 searchIndex 时隐藏展开收起按钮 - 相关组件支付模块多处应用此统一方案(bill-ledger-search、bill-payment-search、invoice-application、invoice-receipt、receipt-claim-record、receipt-flow) - 维护展开状态对应的箭头图标和文案为“收起”与“展开” refactor(business): 优化路线变更内容渲染与样式 - 替换旧的 formatRouteChangeContent 为更详细的 parseRouteChangeContent,支持多分组与字段显示 - 路线变更内容支持多层次分组、字段标签、改变前后值对比及未变更标识展示 - 取消全局列溢出提示以避免多行内容被截断,针对路线变更内容列显式禁用溢出提示并设置白色换行样式 - 在 business-crud-page、waybill-manage-page、loading-manage 相关页面和组件中统一应用该解析与渲染方案 refactor(option): 调整 measurement-unit 配置以提升表格列展示 - 移除 menuWidth 配置,采用 menuFixed 固定右侧模式 - 为创建人和更新人列添加 minWidth 110,时间列添加 width 180,避免内容被截断 - 表格列数组顺序调整,确保搜索与展示保持一致 refactor(payment & receipt-flow): 统一支付及回执模块工具栏和表格行为 - 按照统一规范和用户反馈,调整多处页面的搜索栏操作区和表格列配置 - 引入 TableHeaderTools 组件和相关状态传递,实现搜索显隐与表格尺寸切换统一 - 优化 avue-crud 表格组件的交互一致性和视觉表现 refactor(utils): 重构路线变更内容解析函数 - 新增 parseRouteChangeContent 以支持复杂路线变更文本的解析与分组 - 识别运单号、字段标签、变更前后值,支持多种箭头符号及调整描述 - 用法推广至相关业务页面,支持更加直观的路线变更展示界面
124 lines
3.5 KiB
Vue
124 lines
3.5 KiB
Vue
<template>
|
|
<section class="bill-payment-search">
|
|
<el-form :model="query" label-position="right" label-width="88px" @submit.prevent>
|
|
<div class="bill-payment-search__grid">
|
|
<el-form-item label="单据号">
|
|
<el-input v-model="query.paymentNo" clearable placeholder="请输入" />
|
|
</el-form-item>
|
|
<el-form-item label="使用部门">
|
|
<el-cascader
|
|
v-model="query.deptPath"
|
|
:options="organizationTreeOptions"
|
|
:props="organizationCascaderProps"
|
|
filterable
|
|
clearable
|
|
style="width: 100%"
|
|
placeholder="请选择 所属组织"
|
|
@change="val => { query.deptName = findOrgById(val)?.rawLabel || '' }"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="付款日期">
|
|
<el-date-picker
|
|
v-model="query.paymentDateRange"
|
|
type="daterange"
|
|
unlink-panels
|
|
clearable
|
|
value-format="YYYY-MM-DD"
|
|
range-separator="~"
|
|
start-placeholder="年/月/日"
|
|
end-placeholder="年/月/日"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="单据状态">
|
|
<el-select v-model="query.approvalStatus" clearable placeholder="请选择">
|
|
<el-option
|
|
v-for="item in approvalStatusOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</div>
|
|
<div class="bill-payment-search__actions">
|
|
<el-button type="primary" :loading="loading" @click="$emit('search')">查询</el-button>
|
|
<el-button @click="$emit('reset')">重置</el-button>
|
|
<el-button
|
|
v-if="showSearchToggle"
|
|
text
|
|
:icon="expanded ? ArrowUp : ArrowDown"
|
|
@click="expanded = !expanded"
|
|
>{{ expanded ? '收起' : '展开' }}</el-button
|
|
>
|
|
</div>
|
|
</el-form>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
|
import { approvalStatusOptions } from '@/api/payment/billPayment';
|
|
import organizationSearch from '@/mixins/organization-search';
|
|
|
|
export default {
|
|
name: 'BillPaymentSearch',
|
|
mixins: [organizationSearch],
|
|
props: {
|
|
query: { type: Object, required: true },
|
|
loading: { type: Boolean, default: false },
|
|
},
|
|
emits: ['search', 'reset'],
|
|
data() {
|
|
return {
|
|
ArrowDown,
|
|
ArrowUp,
|
|
expanded: false,
|
|
// 与 avue-crud 一致:搜索项数量超过 searchIndex(默认一行 4 项)时才显示“展开/收起”
|
|
searchIndex: 4,
|
|
searchItemCount: 4,
|
|
approvalStatusOptions,
|
|
};
|
|
},
|
|
computed: {
|
|
showSearchToggle() {
|
|
return this.searchItemCount > this.searchIndex;
|
|
},
|
|
},
|
|
mounted() {
|
|
this.loadOrganizationOptions();
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.bill-payment-search {
|
|
padding: 12px 12px 4px;
|
|
background: #fff;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
}
|
|
.bill-payment-search__grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 8px 24px;
|
|
}
|
|
.bill-payment-search :deep(.el-form-item) {
|
|
margin-bottom: 8px;
|
|
}
|
|
.bill-payment-search :deep(.el-input),
|
|
.bill-payment-search :deep(.el-select),
|
|
.bill-payment-search :deep(.el-date-editor) {
|
|
width: 100%;
|
|
}
|
|
.bill-payment-search__actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
@media (max-width: 1200px) {
|
|
.bill-payment-search__grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
</style>
|