From 689ac525a7760e2ccf124ab1e5cc6967e3604796 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 25 Jul 2024 17:59:47 +0800 Subject: [PATCH] add tid1553 logic --- .../order/components/order_list/filter_modal.vue | 8 ++-- .../timekeeping/modules/order_list/item_temp.vue | 2 +- .../pages/timekeeping/modules/order_list/site.vue | 25 +++++++---- .../order/pages/timekeeping/order_list.vue | 51 ++++++++++++++-------- 4 files changed, 54 insertions(+), 32 deletions(-) diff --git a/src/subpackage/order/components/order_list/filter_modal.vue b/src/subpackage/order/components/order_list/filter_modal.vue index 0f3671e..ec6f28c 100644 --- a/src/subpackage/order/components/order_list/filter_modal.vue +++ b/src/subpackage/order/components/order_list/filter_modal.vue @@ -5,11 +5,11 @@ {{ e.name }} + >{{ e.label }} @@ -22,7 +22,7 @@ export default { visibled: false, title: '', list: [], - curStatus: '', + curValue: '', initOption: { // success, } @@ -38,7 +38,7 @@ export default { init(e){ this.title = e.title; this.list = e.list; - this.curStatus = e.curStatus; + this.curValue = e.curValue; this.initOption = e; this.show(); }, diff --git a/src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue b/src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue index b332c83..cfcff54 100644 --- a/src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue +++ b/src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue @@ -1,7 +1,7 @@ @@ -46,6 +50,7 @@ import filterModal from "../../components/order_list/filter_modal.vue"; import personListItem from "./modules/order_list/person.vue"; import siteListItem from "./modules/order_list/site.vue"; import depositListItem from "./modules/order_list/deposit.vue"; +import endBillingModal from "./modules/order_detail/end_billing_modal.vue"; import { ORDER_API } from '../../js/api'; import server from '../../js/server'; @@ -57,7 +62,8 @@ export default { 'filter-modal': filterModal, 'person-list-item': personListItem, 'site-list-item': siteListItem, - 'deposit-list-item': depositListItem + 'deposit-list-item': depositListItem, + 'end-billing-modal': endBillingModal }, watch: { condition: { @@ -84,6 +90,7 @@ export default { start: '', // 开始时间 end: '', // 结束时间 status: '', // 订单状态 + status_text: '', // 订单状态文本 }, page: 1, orderList: [], @@ -98,12 +105,12 @@ export default { let _bID = options?.brand_id || ''; let _order_type = options?.order_type || ''; let { start, end } = this.initDefaultDate(_order_type); - let { status } = this.initDefaultStatus(); + let { value } = this.initDefaultStatus(); this.getOrderList({ brand_id: _bID, start: start, end: end, - status, + status_text: value, order_type: _order_type }) this.brand_id = _bID; @@ -125,9 +132,10 @@ export default { this.$refs.filterModal.init({ title: '订单状态', list: this.getFilterList(), - curStatus: this.condition.status, + curValue: this.condition.status_text, success: item =>{ - this.condition.status = item.status; + console.log(item); + this.condition.status_text = item.value; } }); }, @@ -135,16 +143,17 @@ export default { initDefaultStatus(){ let _ls = this.getFilterList(); let _defaultItem = _ls?.[0] || {} - this.condition.status = _defaultItem?.status; + this.condition.status_text = _defaultItem?.value; return _defaultItem; }, // 获取筛选列表 getFilterList(){ let _ls = [ - { name: '全部', status: '' }, - { name: '计费中', status: '0' }, - { name: '已完成', status: '1' }, - { name: '已退款', status: '4' }, + { label: '全部', value: '' }, + { label: '计费中', value: '计费中' }, + { label: '待支付', value: '待支付' }, + { label: '已完成', value: '已完成' }, + { label: '已退款', value: '已退款' }, ]; return _ls; }, @@ -185,18 +194,22 @@ export default { * @param {String} start 开始时间 * @param {String} end 结束时间 * @param {String} order_type 订单类型:场时/人时[1/2] + * @param {String} status_text 已关闭/计费中/待支付/待使用/使用中/已失效/已完成/已抵扣/已退款/已取消预约 + * * */ getOrderList({ brand_id = '', stadium_id = '', status = '', start = '', end = '', - order_type = '', page = 1, page_size = 20 + order_type = '', page = 1, page_size = 20, + status_text = '' }){ showLoad(); server.get({ url: ORDER_API.billingOrderList, data: { brand_id, stadium_id, status, - start, end, order_type, page, page_size + start, end, order_type, page, page_size, + status_text }, failMsg: '加载失败!' })