diff --git a/src/components/equipCardHall/index.vue b/src/components/equipCardHall/index.vue index 27cbaad..c6abd52 100644 --- a/src/components/equipCardHall/index.vue +++ b/src/components/equipCardHall/index.vue @@ -5,7 +5,7 @@
  • {{ name }} ({{ typeName }}) - {{ statusText }} + {{ manageMode == '0' ? statusText : `在库数量: ${deviceCount}` }}
  • {{ company }}
  • @@ -63,6 +63,14 @@ const props: any = defineProps({ type: [String, Number], default: '', }, + manageMode: { + type: [String, Number], + default: '', + }, + deviceCount: { + type: [String, Number], + default: '', + }, }) const emit = defineEmits(['onClick']) diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index 5df6193..81291f4 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -22,6 +22,9 @@ export const getCompanyCountApi = (data: any) => { export const getDetail = (id = '', isHome: any) => { return get(`/material-mall/dev/getInfo/${id}?isHome=${isHome}`) } +export const getCodeNumDetailApi = (data: any) => { + return get(`/material-mall/dev/getInfo`, data) +} //加入预约车 export const addBookCarApi = (data: object) => { return post(`/material-mall/bookCar/addBookCar`, data) diff --git a/src/router/index.ts b/src/router/index.ts index 8380af4..d1fb1f0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -118,6 +118,16 @@ const routes: Array = [ AuthFlag: false, }, }, + { + path: '/numEquipDetail', + name: 'NumEquipDetail', + component: () => import('views/equip/numDetail.vue'), + meta: { + title: '装备详情', + keepAlive: false, + AuthFlag: false, + }, + }, // 资讯详情 { path: '/consultationDetails/:id', diff --git a/src/views/cart/index.vue b/src/views/cart/index.vue index be4acb7..52d02b8 100644 --- a/src/views/cart/index.vue +++ b/src/views/cart/index.vue @@ -120,7 +120,7 @@ { name: 'order-confirm', query: { id: route.query.id, + devType: route.query.devType, }, }) }) @@ -991,7 +992,7 @@ const handelDetailListClick = (fnName, arg) => { //获取页面数据 const getData = async () => { - const res = await getDetail(route.query.id, true) + const res: any = await getCodeNumDetailApi({ id:route.query.id, devType: route.query.devType }) res.data.isOperatorCn = res.data.isOperator ? '是' : '否' res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无' res.data.isExaminationPdf = res.data.examinationPdf ? '点击查看' : '暂无' @@ -1113,6 +1114,7 @@ const onAddCart = async () => { const addParams = { maId: pageData.value.maId, orderCompany: pageData.value.companyId, + devType: route.query.devType, } ElMessageBox.confirm('是否确定加入预约车?', '温馨提示', { confirmButtonText: '确定', diff --git a/src/views/equip/list.vue b/src/views/equip/list.vue index c47baea..c419ae2 100644 --- a/src/views/equip/list.vue +++ b/src/views/equip/list.vue @@ -116,7 +116,9 @@ :personPhone="v.personPhone" :typeName="v.typeName" :ma_status="v.maStatus || v.ma_status" - @click="onHandleDetails(v.maId)" + :manageMode="v.manageMode" + :deviceCount="v.deviceCount" + @click="onHandleDetails(v)" />
    @@ -655,11 +657,13 @@ onUnmounted(() => { }) // 点击跳转装备详情 -const onHandleDetails = (id: number | string) => { +const onHandleDetails = (row: any) => { + console.log('🚀 ~ onHandleDetails ~ row:', row) router.push({ - name: 'equipDetail', + name: row.manageMode == '0' ? 'equipDetail' : 'NumEquipDetail', query: { - id, + id: row.maId, + devType: row.devType, }, }) } diff --git a/src/views/equip/numDetail.vue b/src/views/equip/numDetail.vue new file mode 100644 index 0000000..a97d6e9 --- /dev/null +++ b/src/views/equip/numDetail.vue @@ -0,0 +1,1536 @@ + + + diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 44a5809..9580d88 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -123,8 +123,8 @@
    @@ -259,7 +259,7 @@ import { getBookCarDetailByMaId, submitBookCarApi } from '../../http/api/order/i import { getBookCarAgreementApi } from 'http/api/cart/index' import CustomDatePickerButton from '../cart/components/date-picker-button.vue' import { getAddressListApi } from 'http/api/address-manage/index' -import { getDetail } from 'http/api/equip' +import { getCodeNumDetailApi } from 'http/api/equip' import moment from 'moment' import { useRoute, useRouter } from 'vue-router' import { useStore } from '../../store/user' @@ -281,7 +281,7 @@ const getOrderListData = async () => { const addParams = { maId: Number(pageParams.maId), } - const res: any = await getDetail(route.query.id, false) + const res: any = await getCodeNumDetailApi({ id: route.query.id, devType: route.query.devType}) console.log(res, '装备详情') orderList.value = [] // orderList.value = res.data