承租订单详情
This commit is contained in:
parent
8c47679c4a
commit
c3f06d18ee
|
|
@ -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')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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']
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ import { ref } from 'vue'
|
|||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getOrderListApi } from 'http/api/usercenter/seekorder'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const cardList = ref<any>([])
|
||||
const Id = 1
|
||||
const orderStatusTemp = ref<Number>(0)
|
||||
const titleStaus = ref<any>('')
|
||||
// 获取数据列表
|
||||
// const getList = async () => {
|
||||
// const res: any = await getOrderListApi()
|
||||
|
|
@ -14,21 +15,39 @@ const Id = 1
|
|||
// tableData.value = res.rows
|
||||
// total.value = res.total
|
||||
// }
|
||||
|
||||
//订单详情
|
||||
const handleViewOrder=(row:any)=>{
|
||||
router.push({
|
||||
path: '/user/orderManagement/detail',
|
||||
query: { Id:Number(5),isView:"true" }
|
||||
})
|
||||
}
|
||||
|
||||
// onMounted(() => {
|
||||
// getList()
|
||||
// })
|
||||
|
||||
// 根据步骤的 Id 返回对应的标题
|
||||
const getStepTitle = (stepId:number)=> {
|
||||
if (orderStatusTemp.value === 1) {
|
||||
titleStaus.value= '待出库' ;
|
||||
return stepId === 1 ? '待出库' : '';
|
||||
} else if (orderStatusTemp.value === 2) {
|
||||
titleStaus.value= '待收货' ;
|
||||
return stepId === 1 ? '已出库' : stepId === 2 ? '待收货' : '';
|
||||
} else if (orderStatusTemp.value === 3) {
|
||||
titleStaus.value= '租赁中' ;
|
||||
return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁中' : '';
|
||||
} else if (orderStatusTemp.value === 4) {
|
||||
titleStaus.value= '发起费用结算' ;
|
||||
return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁结束' : stepId === 4 ? '发起费用结算' : '';
|
||||
} else if (orderStatusTemp.value === 5) {
|
||||
titleStaus.value= '已完成' ;
|
||||
return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁结束' : stepId === 4 ? '已退租' : stepId === 5 ? '已完成' : '';
|
||||
}
|
||||
titleStaus.value=''
|
||||
return ''; // 默认返回空字符串
|
||||
}
|
||||
|
||||
const getId = ()=>{
|
||||
orderStatusTemp.value = Number(route.query.orderStatusTemp)
|
||||
}
|
||||
|
||||
onBeforeMount(()=>{
|
||||
getId()
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
@ -49,30 +68,30 @@ const time = ref([])
|
|||
<el-col :span="3">
|
||||
<span>订单流程</span>
|
||||
</el-col>
|
||||
<el-col :span="1" style="text-align:right;margin-right:300px;font-size: 20px;">
|
||||
<div style="color:green;border: 1px solid #ccc;">{{titleStaus}}</div>
|
||||
<el-col :span="2" style="text-align:right;margin-right:20px;font-size: 20px;">
|
||||
<div style="color:green;">{{titleStaus}}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-header>
|
||||
|
||||
<el-steps class="step" :space="400" :active="Id" finish-status="success">
|
||||
<el-step :title="getStepTitle(1)" :description="getDescription(1)" ></el-step>
|
||||
<el-step :title="getStepTitle(2)" :description="getDescription(2)" ></el-step>
|
||||
<el-step :title="getStepTitle(3)" :description="getDescription(3)" ></el-step>
|
||||
<el-step :title="getStepTitle(4)" :description="getDescription(4)" ></el-step>
|
||||
<el-step :title="getStepTitle(5)" :description="getDescription(5)" ></el-step>
|
||||
<el-steps class="step" :space="400" :active="orderStatusTemp.value" finish-status="success">
|
||||
<el-step :title="getStepTitle(1)" ></el-step>
|
||||
<el-step :title="getStepTitle(2)" ></el-step>
|
||||
<el-step :title="getStepTitle(3)" ></el-step>
|
||||
<el-step :title="getStepTitle(4)" ></el-step>
|
||||
<el-step :title="getStepTitle(5)" :finish-status="orderStatusTemp.value >= 5 ? 'success' : ''"></el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 20px;
|
||||
.step{
|
||||
.step{
|
||||
margin-left:80px;;
|
||||
}
|
||||
}
|
||||
.section {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.container {
|
||||
width: 800px;
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ const getList = async () => {
|
|||
}
|
||||
|
||||
//订单详情
|
||||
const handleViewOrder=(row:any)=>{
|
||||
const handleViewOrder=(index:Number,row:any)=>{
|
||||
router.push({
|
||||
name: 'orderManagementInfo' ,
|
||||
query: { Id:Number(5),isView:"true" }
|
||||
query: { orderStatusTemp:Number(row.orderStatus) }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ const clickConfirmReceipt = (row: any) => {
|
|||
<el-col :span="3">
|
||||
<div>
|
||||
<el-button
|
||||
@click="handleViewOrder(j)"
|
||||
@click="handleViewOrder(j,item.detailsList[j])"
|
||||
type="text"
|
||||
size="mini"
|
||||
style="color: #blue; font-weight: bold"
|
||||
|
|
|
|||
Loading…
Reference in New Issue