提交 d6a07118 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 支付管理列表项目和班级可以联动选择

上级 ce1209a6
...@@ -125,6 +125,30 @@ export default { ...@@ -125,6 +125,30 @@ export default {
confirm_status: [], // 确认状态 confirm_status: [], // 确认状态
taxpayer_type: [], // 纳税人类型 taxpayer_type: [], // 纳税人类型
invoice_color_type: [], // 发票开票状态 invoice_color_type: [], // 发票开票状态
classes: [], // 班级名称
project_classes_map: {}, // 项目对应班级名称
},
selectedProjectId: '',
tableParams: {
project_id: '',
channel_id: '',
invoice_status: '',
sales_rep_user_id: '',
invoice_type: '',
can_add_invoice: '',
agent_group_id: '',
id: '',
name: '',
payment_status: '',
type: '',
first_payment_time_from: '',
first_payment_time_to: '',
final_payment_time_from: '',
final_payment_time_to: '',
sort: '',
related_id: '',
class_name: '',
product_name: '',
}, },
disabledTicketVisible: false, // 发票状态弹框 disabledTicketVisible: false, // 发票状态弹框
ticketVisible: false, // 开具发票 ticketVisible: false, // 开具发票
...@@ -139,27 +163,7 @@ export default { ...@@ -139,27 +163,7 @@ export default {
return { return {
remote: { remote: {
httpRequest: getPayList, // 获取订单列表 httpRequest: getPayList, // 获取订单列表
params: { params: this.tableParams,
project_id: '',
channel_id: '',
invoice_status: '',
sales_rep_user_id: '',
invoice_type: '',
can_add_invoice: '',
agent_group_id: '',
id: '',
name: '',
payment_status: '',
type: '',
first_payment_time_from: '',
first_payment_time_to: '',
final_payment_time_from: '',
final_payment_time_to: '',
sort: '',
related_id: '',
class_name: '',
product_name: '',
},
beforeRequest: this.beforeRequest, beforeRequest: this.beforeRequest,
}, },
filters: [ filters: [
...@@ -238,7 +242,7 @@ export default { ...@@ -238,7 +242,7 @@ export default {
}, },
{ {
type: 'select', type: 'select',
options: this.conditionList.classes, options: this.classOptions,
prop: 'class_name', prop: 'class_name',
placeholder: '班级名称', placeholder: '班级名称',
}, },
...@@ -464,6 +468,14 @@ export default { ...@@ -464,6 +468,14 @@ export default {
], ],
} }
}, },
// 班级筛选列表
classOptions() {
if (!this.selectedProjectId) {
return this.conditionList.classes || []
}
const projectClassesMap = this.conditionList.project_classes_map || {}
return projectClassesMap[this.selectedProjectId] || []
},
}, },
created() { created() {
window.localStorage.getItem('customColumns') window.localStorage.getItem('customColumns')
...@@ -471,6 +483,11 @@ export default { ...@@ -471,6 +483,11 @@ export default {
}, },
methods: { methods: {
beforeRequest(params) { beforeRequest(params) {
const projectId = params.project_id || ''
if (projectId !== this.selectedProjectId) {
this.selectedProjectId = projectId
params.class_name = ''
}
if (params.first_payment_time) { if (params.first_payment_time) {
const [firstTimeFrom, firstTimeTo] = params.first_payment_time const [firstTimeFrom, firstTimeTo] = params.first_payment_time
params.first_payment_time_from = firstTimeFrom params.first_payment_time_from = firstTimeFrom
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论