接口调试

This commit is contained in:
13218645326 2023-12-06 13:40:33 +08:00
parent 956a84f7b1
commit b2f1010624
7 changed files with 103 additions and 21 deletions

7
components.d.ts vendored
View File

@ -8,13 +8,13 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
@ -22,7 +22,6 @@ declare module 'vue' {
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
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']

17
env/.env.serve1 vendored Normal file
View File

@ -0,0 +1,17 @@
VITE_ENV = 'development'
VITE_BUILD_MODE = 'serve1'
VITE_API_URL = '/proxyApi'
# 开发环境接口地址
VITE_proxyTarget = 'http://10.40.92.66:9205' # 盛旭
VITE_token = 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImMyN2M5N2Y5LWQwOGItNDJlNy05N2MzLTYwMDVmODVmNmVhZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.KNJdSL3g7tjju4OxkUQyBWHBTiuBo5bZFtDWkbZVmm7iR9hA06OS5FSI1_9kb4jPNjE6vc7MGkH4GhQJsIwHnA'

View File

@ -4,6 +4,7 @@
"private": true,
"scripts": {
"dev": "vite --mode dev",
"serve1": "vite --mode serve1",
"build": "npm run build:pro",
"build:sit": "vue-tsc && vite build --mode sit",
"build:uat": "vue-tsc && vite build --mode uat",

View File

@ -0,0 +1,10 @@
// 订单详情
import { get, post } from '../../index'
// 申请企业信息认证接口
export const apiOrderDetails = (id: any) => {
let urlStr = `/details/${id}`
return get(urlStr, {})
}

View File

@ -9,7 +9,9 @@ const store = useStore()
// const CancelToken = axios.CancelToken
// const source = CancelToken.source()
const baseUrl = import.meta.env.VITE_API_URL
// const mode = import.meta.env.VITE_BUILD_MODE
const VITE_token = import.meta.env.VITE_token
const VITE_ENV = import.meta.env.VITE_ENV
const service = axios.create({
baseURL: baseUrl,
@ -18,7 +20,7 @@ const service = axios.create({
service.interceptors.request.use(
(config) => {
config.headers['Authorization'] = store.token
config.headers['Authorization'] =VITE_ENV=='development'?VITE_token: store.token
return config
},
(error) => {

View File

@ -0,0 +1,36 @@
{
"createBy": null,
"createTime": null,
"updateBy": null,
"updateTime": null,
"remark": null,
"id": 1,
"orderId": 1,
"needCompany": "夏普公司",
"planStartTime": "2023.12.2",
"isMachinist": "1",
"addressId": 156,
"address": "详细地址",
"duration": "工期时长20天",
"invoiceType": "发票类型",
"description": "项目说明",
"maId": 1,
"leaseType": 1,
"leasePrice": "租赁单价",
"machinistPrice": null,
"orderContract": "https://hzgyp-prod-1259451974.cos.ap-guangzhou.myqcloud.com/enterprise/serviceAgreement.pdf",
"machinistName": "机手姓名张三",
"phone": "13866169999",
"logisticsPhone": "物流司机电话139",
"realStartTime": "设备实际进场时间",
"renterName": null,
"tenantName": null,
"entryAttachment": null,
"typeName": null,
"groupName": null,
"deviceName": "null挖掘机械",
"code": "订单编号202311001",
"orderTime": "2023-12-1",
"orderStatus": "订单状态",
"contractUrl": null
}

View File

@ -6,7 +6,7 @@
</el-page-header>
<el-form label-width="130px" inline="true" style="padding: 0 20px 0px 20px;width: 865px;" size="small">
<el-form-item label="订单编号" style="width: 600px;">
xxxxx
{xxxxx}
</el-form-item>
<el-form-item label="需求单位" class="table_item">
xxxxx
@ -43,15 +43,15 @@
</el-form-item>
<!-- 表格 -->
<orderTable :tableInfo="tableInfo">
<template v-slot:rentMoney>
<div>
<span style="color:#f00;"> {{tableInfo.money }}</span>/{{tableInfo.unit }}
<span style="color:#f00;"> {{ tableInfo.money }}</span>/{{ tableInfo.unit }}
</div>
</template>
</orderTable>
<el-form-item label="订单合同:" style="width: 800px;margin-top:12px;">
xxxxxxxxxxxx.pdf
@ -65,7 +65,7 @@
<el-form-item label="物流司机电话:" style="width: 800px;">
xxxxx
</el-form-item>
<el-timeline style="margin-left:20px;width:560px;">
<el-timeline-item v-for="(item, index) in activities" :key="index" :icon="item.icon" :type="item.type"
:color="item.color" :size="item.size" :hollow="item.hollow" :timestamp="item.timestamp">
@ -73,7 +73,7 @@
<div class="title">
{{ item.content }}
</div>
<div class="btn_c" >
<div class="btn_c">
<el-button type="primary" v-if="item.last">确认到货</el-button>
</div>
</div>
@ -84,9 +84,11 @@
<script setup lang="ts">
import {reactive} from "vue"
import { reactive } from "vue"
import orderTable from "./orderTable.vue"
import { MoreFilled } from '@element-plus/icons-vue'
import { apiOrderDetails } from "http/api/usercenter/order"
const tableInfo = reactive({
v_equipment_title: "220E履带挖掘机",
v_equipment_code: "88888",
@ -122,14 +124,28 @@ const activities = [
timestamp: '租赁进行中。',
type: 'primary',
hollow: true,
last:true
last: true
},
{
content: 'Default node',
timestamp: '2018-04-03 20:46',
},
]
const detailsInfo =reactive({
})
const initApiOrderDetails = async () => {
let id = '1'
const res:any = await apiOrderDetails(id)
console.log("res-apiOrderDetails", res)
Object.assign(detailsInfo,res.data)
}
onBeforeMount(()=>{
initApiOrderDetails()
})
</script>
@ -143,10 +159,11 @@ const activities = [
width: 250px;
height: 20px;
}
.time_line_item{
display:flex;
justify-content:space-between;
.btn_c{
}
.time_line_item {
display: flex;
justify-content: space-between;
.btn_c {}
}
</style>