diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 00e05c3..a606bd4 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -82,6 +82,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/components.d.ts b/components.d.ts index 0787e9a..5b8d549 100644 --- a/components.d.ts +++ b/components.d.ts @@ -11,15 +11,13 @@ declare module 'vue' { ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCarousel: typeof import('element-plus/es')['ElCarousel'] - ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] - ElDialog: typeof import('element-plus/es')['ElDialog'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] @@ -27,13 +25,10 @@ declare module 'vue' { ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElProgress: typeof import('element-plus/es')['ElProgress'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElTable: typeof import('element-plus/es')['ElTable'] - ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTag: typeof import('element-plus/es')['ElTag'] - ElUpload: typeof import('element-plus/es')['ElUpload'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] EquipCardNew: typeof import('./src/components/equipCardNew/index.vue')['default'] diff --git a/src/http/api/usercenter/seekorder.ts b/src/http/api/usercenter/seekorder.ts index d78deee..8133c04 100644 --- a/src/http/api/usercenter/seekorder.ts +++ b/src/http/api/usercenter/seekorder.ts @@ -3,6 +3,6 @@ import { get, post } from '../../index' // 获取订单列表 -export const getOrderListApi = () => { - return get('/zlpt-order/info/list', {}) +export const getOrderListApi = (data: any) => { + return get('/material-mall/order/getOrderDetails', data) } \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 99eca13..0f3526a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -225,6 +225,18 @@ const routes: Array = [ isLogin: true }, }, + /* 订单管理(订单详情) */ + { + path: 'orderManagementInfo', + name: 'orderManagementInfo', + component: () => import('@/views/user/orderManagement/detail.vue'), + meta: { + title: '订单详情', + keepAlive: true, + AuthFlag: false, + isLogin: false + }, + }, /* 订单管理(退租) */ { path: 'rentinTermination', diff --git a/src/views/user/orderManagement/detail.vue b/src/views/user/orderManagement/detail.vue new file mode 100644 index 0000000..782b36c --- /dev/null +++ b/src/views/user/orderManagement/detail.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/src/views/user/orderManagement/index.vue b/src/views/user/orderManagement/index.vue index 4bb9314..c6e1920 100644 --- a/src/views/user/orderManagement/index.vue +++ b/src/views/user/orderManagement/index.vue @@ -3,13 +3,27 @@ import { ref } from 'vue' import PagingComponent from 'components/PagingComponent/index.vue' import { useRouter } from 'vue-router' import { getOrderListApi } from 'http/api/usercenter/seekorder' -const queryParams = ref({}) +/* 查询参数 */ +const queryParams: any = ref({ + deviceName: '', + orderStatus: '', + czcompanyName: '', + companyName: '', + lowerBound:'', + upperBound:'', + pageSize: 10, + pageNum: 1, + startTime:'', + endTime:'', +}) +const time = ref([]) const router = useRouter() const pageSize = 10 const pageNumber = 1 const total: any = ref(0) const cardList = ref([]) const status = 0 +const statusList = [{id:'0',name:'未下单'},{id:'1',name:'已下单'},{id:'2',name:'待出库'},{id:'3',name:'已出库'},{id:'4',name:'租赁中'},{id:'5',name:'已退租'},{id:'5',name:'已完成'}] // 获取数据列表 // const getList = async () => { // const res: any = await getOrderListApi() @@ -19,125 +33,25 @@ const status = 0 // } /** 查询列表 */ const getList = async () => { - // if(this.dateRange.length>0){ - // this.queryParams.startTime=this.dateRange[0] - // this.queryParams.endTime=this.dateRange[1] - // }else{ - // this.queryParams.startTime=undefined - // this.queryParams.endTime=undefined - // } - cardList.value = [ - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 1, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, - ] - total.value = cardList.value.length - console.log(total.value) + if(time.value.length>0){ + console.log('time',time) + queryParams.value.startTime=time.value[0] + queryParams.value.endTime=time.value[1] + }else{ + queryParams.value.startTime=undefined + queryParams.value.endTime=undefined + } + const res: any = await getOrderListApi(queryParams.value) + cardList.value = res.rows + total.value = res.total +} + +//订单详情 +const handleViewOrder=(index:Number,row:any)=>{ + router.push({ + name: 'orderManagementInfo' , + query: { orderStatusTemp:Number(row.orderStatus) } + }) } onMounted(() => { @@ -149,7 +63,6 @@ const queryTableList = () => { getList() } -const tableData = ref([]) /* 退租按钮 */ const clickRentingTermination = () => { @@ -191,17 +104,16 @@ const clickConfirmReceipt = (row: any) => { }) } -const time = ref([]) @@ -442,13 +397,13 @@ const time = ref([]) align-items: center; font-size: 13px; - .user-name, - .user-phone { + .code, + .orderTime { padding: 3px 18px; border: 1px solid #ccc; } - .user-name { + .czcompanyName { margin-left: 20px; border-right: none; }