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..f610d54 --- /dev/null +++ b/src/views/user/orderManagement/detail.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/user/orderManagement/index.vue b/src/views/user/orderManagement/index.vue index 4bb9314..e55a27b 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=(row:any)=>{ + router.push({ + name: 'orderManagementInfo' , + query: { Id:Number(5),isView:"true" } + }) } 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; }