Compare commits
10 Commits
d6af74672d
...
8d3fac9a3a
| Author | SHA1 | Date |
|---|---|---|
|
|
8d3fac9a3a | |
|
|
0848782d52 | |
|
|
212fabf998 | |
|
|
76dd1d4095 | |
|
|
61eba7b1c7 | |
|
|
b2f1010624 | |
|
|
956a84f7b1 | |
|
|
e44e03fb39 | |
|
|
7b06004501 | |
|
|
e398689720 |
|
|
@ -5,12 +5,11 @@ VITE_BUILD_MODE = 'dev'
|
|||
VITE_API_URL = '/proxyApi'
|
||||
|
||||
# 开发环境接口地址
|
||||
# VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9200' # 赵福海 (登录)
|
||||
|
||||
VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
# VITE_proxyTarget = 'http://10.40.92.253:8080' # 牛 (个人中心 基础信息企业申请认证)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
VITE_LocalFlag = true
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,458 @@
|
|||
{
|
||||
"province": [
|
||||
{
|
||||
"id": 12,
|
||||
"platformId": 20,
|
||||
"code": "34",
|
||||
"parentCode": "0",
|
||||
"name": "安徽省",
|
||||
"latitude": 31.859253,
|
||||
"longitude": 117.216,
|
||||
"level": 1,
|
||||
"region": 2,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
}
|
||||
],
|
||||
"city":[
|
||||
{
|
||||
"id": 129,
|
||||
"platformId": 20,
|
||||
"code": "3401",
|
||||
"parentCode": "34",
|
||||
"name": "合肥市",
|
||||
"latitude": 31.866941,
|
||||
"longitude": 117.2827,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 130,
|
||||
"platformId": 20,
|
||||
"code": "3402",
|
||||
"parentCode": "34",
|
||||
"name": "芜湖市",
|
||||
"latitude": 31.36602,
|
||||
"longitude": 118.38411,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 131,
|
||||
"platformId": 20,
|
||||
"code": "3403",
|
||||
"parentCode": "34",
|
||||
"name": "蚌埠市",
|
||||
"latitude": 32.9295,
|
||||
"longitude": 117.35708,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 132,
|
||||
"platformId": 20,
|
||||
"code": "3404",
|
||||
"parentCode": "34",
|
||||
"name": "淮南市",
|
||||
"latitude": 32.64281,
|
||||
"longitude": 117.01864,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 133,
|
||||
"platformId": 20,
|
||||
"code": "3405",
|
||||
"parentCode": "34",
|
||||
"name": "马鞍山市",
|
||||
"latitude": 31.688528,
|
||||
"longitude": 118.515884,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 134,
|
||||
"platformId": 20,
|
||||
"code": "3406",
|
||||
"parentCode": "34",
|
||||
"name": "淮北市",
|
||||
"latitude": 33.960022,
|
||||
"longitude": 116.79145,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 135,
|
||||
"platformId": 20,
|
||||
"code": "3407",
|
||||
"parentCode": "34",
|
||||
"name": "铜陵市",
|
||||
"latitude": 30.94093,
|
||||
"longitude": 117.81943,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 136,
|
||||
"platformId": 20,
|
||||
"code": "3408",
|
||||
"parentCode": "34",
|
||||
"name": "安庆市",
|
||||
"latitude": 30.537897,
|
||||
"longitude": 117.05874,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 137,
|
||||
"platformId": 20,
|
||||
"code": "3410",
|
||||
"parentCode": "34",
|
||||
"name": "黄山市",
|
||||
"latitude": 29.734434,
|
||||
"longitude": 118.29357,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 138,
|
||||
"platformId": 20,
|
||||
"code": "3411",
|
||||
"parentCode": "34",
|
||||
"name": "滁州市",
|
||||
"latitude": 32.317352,
|
||||
"longitude": 118.32457,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 139,
|
||||
"platformId": 20,
|
||||
"code": "3412",
|
||||
"parentCode": "34",
|
||||
"name": "阜阳市",
|
||||
"latitude": 32.90121,
|
||||
"longitude": 115.82093,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 140,
|
||||
"platformId": 20,
|
||||
"code": "3413",
|
||||
"parentCode": "34",
|
||||
"name": "宿州市",
|
||||
"latitude": 33.636772,
|
||||
"longitude": 116.98869,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 141,
|
||||
"platformId": 20,
|
||||
"code": "3415",
|
||||
"parentCode": "34",
|
||||
"name": "六安市",
|
||||
"latitude": 31.755558,
|
||||
"longitude": 116.50525,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 142,
|
||||
"platformId": 20,
|
||||
"code": "3416",
|
||||
"parentCode": "34",
|
||||
"name": "亳州市",
|
||||
"latitude": 33.871212,
|
||||
"longitude": 115.787926,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 143,
|
||||
"platformId": 20,
|
||||
"code": "3417",
|
||||
"parentCode": "34",
|
||||
"name": "池州市",
|
||||
"latitude": 30.660019,
|
||||
"longitude": 117.49448,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 144,
|
||||
"platformId": 20,
|
||||
"code": "3418",
|
||||
"parentCode": "34",
|
||||
"name": "宣城市",
|
||||
"latitude": 30.951643,
|
||||
"longitude": 118.7521,
|
||||
"level": 2,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
}
|
||||
],
|
||||
"county": [
|
||||
{
|
||||
"id": 1434,
|
||||
"platformId": 20,
|
||||
"code": "340101",
|
||||
"parentCode": "3401",
|
||||
"name": "市辖区",
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1435,
|
||||
"platformId": 20,
|
||||
"code": "340102",
|
||||
"parentCode": "3401",
|
||||
"name": "瑶海区",
|
||||
"latitude": 31.905375,
|
||||
"longitude": 117.33122,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1436,
|
||||
"platformId": 20,
|
||||
"code": "340103",
|
||||
"parentCode": "3401",
|
||||
"name": "庐阳区",
|
||||
"latitude": 31.9129,
|
||||
"longitude": 117.24783,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1437,
|
||||
"platformId": 20,
|
||||
"code": "340104",
|
||||
"parentCode": "3401",
|
||||
"name": "蜀山区",
|
||||
"latitude": 31.838184,
|
||||
"longitude": 117.23128,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1438,
|
||||
"platformId": 20,
|
||||
"code": "340111",
|
||||
"parentCode": "3401",
|
||||
"name": "包河区",
|
||||
"latitude": 31.790724,
|
||||
"longitude": 117.35391,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1439,
|
||||
"platformId": 20,
|
||||
"code": "340121",
|
||||
"parentCode": "3401",
|
||||
"name": "长丰县",
|
||||
"latitude": 32.28611,
|
||||
"longitude": 117.17444,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1440,
|
||||
"platformId": 20,
|
||||
"code": "340122",
|
||||
"parentCode": "3401",
|
||||
"name": "肥东县",
|
||||
"latitude": 32.00319,
|
||||
"longitude": 117.57586,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1441,
|
||||
"platformId": 20,
|
||||
"code": "340123",
|
||||
"parentCode": "3401",
|
||||
"name": "肥西县",
|
||||
"latitude": 31.732637,
|
||||
"longitude": 117.03626,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1442,
|
||||
"platformId": 20,
|
||||
"code": "340124",
|
||||
"parentCode": "3401",
|
||||
"name": "庐江县",
|
||||
"latitude": 31.2556651,
|
||||
"longitude": 117.287345,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1443,
|
||||
"platformId": 20,
|
||||
"code": "340171",
|
||||
"parentCode": "3401",
|
||||
"name": "合肥高新技术产业开发区",
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1444,
|
||||
"platformId": 20,
|
||||
"code": "340172",
|
||||
"parentCode": "3401",
|
||||
"name": "合肥经济技术开发区",
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1445,
|
||||
"platformId": 20,
|
||||
"code": "340173",
|
||||
"parentCode": "3401",
|
||||
"name": "合肥新站高新技术产业开发区",
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
},
|
||||
{
|
||||
"id": 1446,
|
||||
"platformId": 20,
|
||||
"code": "340181",
|
||||
"parentCode": "3401",
|
||||
"name": "巢湖市",
|
||||
"latitude": null,
|
||||
"longitude": null,
|
||||
"level": 3,
|
||||
"region": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"modified": null,
|
||||
"yn": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2,22 +2,22 @@
|
|||
<div class="upload_ss_c">
|
||||
<!--action="/api/abk/web/v1/resource/file" -->
|
||||
<el-upload
|
||||
:action="actionUrl"
|
||||
:auto-upload="autoUpload"
|
||||
:action="props.actionUrl"
|
||||
:auto-upload="props.autoUpload"
|
||||
style="width: 100%"
|
||||
:on-success="(response, file) => successUpload(response, file)"
|
||||
:on-error="errorUpload"
|
||||
:accept="acceptTypeList.join(',')"
|
||||
:accept="props.acceptTypeList.join(',')"
|
||||
:before-upload="beforeUpload"
|
||||
:multiple="multiple"
|
||||
:limit="maxLimit"
|
||||
:multiple="props.multiple"
|
||||
:limit="props.maxLimit"
|
||||
:on-exceed="handleExceed"
|
||||
:file-list="fileList"
|
||||
:disabled="disabledFlag"
|
||||
:file-list="props.fileList"
|
||||
:disabled="props.disabledFlag"
|
||||
:on-remove="(file, fileList) => removeFile(file, fileList)"
|
||||
:on-preview="(file) => preview(file)"
|
||||
:on-progress="(event, file, fileList) => onProgressFn(event, file, fileList)"
|
||||
list-type="picture-card">
|
||||
:list-type="props.listType">
|
||||
<!-- 上传的按钮 或者 icon 通过具名插槽的方式 -->
|
||||
<slot name="default"></slot>
|
||||
</el-upload>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
import { post,get } from '../index'
|
||||
import { post,get,put } from '../index'
|
||||
|
||||
// 获取装备列表
|
||||
export const getList = (params = {}) => {
|
||||
return post('/dev/list',params)
|
||||
}
|
||||
|
||||
//获取装备详情
|
||||
export const getDetail = (id = '') => {
|
||||
return get(`/dev/${id}`)
|
||||
}
|
||||
|
||||
//获取 推荐装备列表
|
||||
export const getHotList = (params) => {
|
||||
return get('/dev/hotList',params)
|
||||
}
|
||||
|
||||
export const equipCollect = (params = {}) => {
|
||||
return put('/collect',params)
|
||||
}
|
||||
|
||||
export const apiSubmitLease = (params = {}) => {
|
||||
return post('/details',params)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,10 @@ export const equipmentDeploymentApi = (data: any) => {
|
|||
// 获取商品入驻列表
|
||||
export const getEquipmentListApi = (data: any) => {
|
||||
return post('/dev/list', data)
|
||||
}
|
||||
}
|
||||
|
||||
// 商品删除接口
|
||||
export const deleteGoodstApi = (data: any) => {
|
||||
return post('/dev/remove', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@ export const goodsUpApi = (data: any) => {
|
|||
|
||||
// 装备下架接口
|
||||
export const goodsDownApi = (data: any) => {
|
||||
return post('/off', data)
|
||||
return post('/off/upOffList ', data)
|
||||
}
|
||||
|
||||
// 装备删除接口
|
||||
export const goodsDeleteApi = (data: any) => {
|
||||
return post('/off/remove', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
// 订单详情
|
||||
|
||||
import { get, post } from '../../index'
|
||||
|
||||
// 申请企业信息认证接口
|
||||
export const apiOrderDetails = (id: any) => {
|
||||
let urlStr = `/details/${id}`
|
||||
return get(urlStr, {})
|
||||
}
|
||||
|
||||
|
|
@ -3,13 +3,16 @@
|
|||
import axios from 'axios'
|
||||
import NProgress from 'nprogress'
|
||||
import { useStore } from 'store/main'
|
||||
import {ElMessage} from "element-plus";
|
||||
import { ElMessage } from "element-plus";
|
||||
import router from "@/router"
|
||||
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_LocalFlag = import.meta.env.VITE_LocalFlag
|
||||
|
||||
const VITE_ENV = import.meta.env.VITE_ENV
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: baseUrl,
|
||||
|
|
@ -18,7 +21,7 @@ const service = axios.create({
|
|||
|
||||
service.interceptors.request.use(
|
||||
(config) => {
|
||||
config.headers['Authorization'] = store.token
|
||||
config.headers['Authorization'] = VITE_ENV == 'development' && VITE_LocalFlag ? VITE_token : store.token
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
|
|
@ -29,12 +32,12 @@ service.interceptors.request.use(
|
|||
service.interceptors.response.use(
|
||||
(res) => {
|
||||
const { data } = res
|
||||
if(data.code == '200'){
|
||||
if (data.code == '200') {
|
||||
return data
|
||||
}else if(data.code == '403'){
|
||||
} else if (data.code == '403') {
|
||||
ElMessage.error('请重新登录')
|
||||
router.push('/login')
|
||||
}else{
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
},
|
||||
|
|
@ -72,7 +75,6 @@ export function post(url: string, params: any) {
|
|||
})
|
||||
.then((res: any) => {
|
||||
NProgress.done()
|
||||
console.log('---------------------------', res)
|
||||
if (res.code == '200') {
|
||||
resolve(res)
|
||||
} else {
|
||||
|
|
@ -131,3 +133,45 @@ export function download(url: string, params: any) {
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function put(url: string, params: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
NProgress.start()
|
||||
service
|
||||
.put(url, params, {
|
||||
headers: { 'Content-Type': 'application/json; charset=utf-8' }
|
||||
})
|
||||
.then((res: any) => {
|
||||
NProgress.done()
|
||||
if (res.code == '200') {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
NProgress.done()
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function detele(url: string, params: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
NProgress.start()
|
||||
service
|
||||
.delete(url, { params })
|
||||
.then((res: any) => {
|
||||
NProgress.done()
|
||||
if (res.code == '200') {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
NProgress.done()
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export const useStore = defineStore('main', {
|
|||
state: () => {
|
||||
return {
|
||||
loadingFlag: false, //loading控制,
|
||||
token: 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6Ijc5MjRkNDc1LTRjMmUtNGViYy05ZDU0LTA2NzNmNWU0MDhiMyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.M3H9jHnfFAKJ3szdiDb79hIHfiS8AWvaI51mP65l01Q2G0jcLSTvjlub8FykYV3A27If7V6GBRo83u8spRDquw'
|
||||
token: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImMyN2M5N2Y5LWQwOGItNDJlNy05N2MzLTYwMDVmODVmNmVhZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.KNJdSL3g7tjju4OxkUQyBWHBTiuBo5bZFtDWkbZVmm7iR9hA06OS5FSI1_9kb4jPNjE6vc7MGkH4GhQJsIwHnA'
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
|
||||
export const ElConfirmBeforeOpert = (title = '操作确认', text = "是否确定删除数据?", callBack: any, confirmText = '确定', cancelText = '取消', row: any) => {
|
||||
ElMessageBox.confirm(
|
||||
text,
|
||||
title,
|
||||
{
|
||||
confirmButtonText: confirmText,
|
||||
cancelButtonText: cancelText,
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
callBack(row)
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const ElMessageBoxOpert = (title = '', text = "", onfirmText = "", cancelText = "", inputValidator:any, inputErrorMessage = "",callBack: any,row:any,inputType="text") => {
|
||||
ElMessageBox.prompt(text, title, {
|
||||
draggable:true,
|
||||
confirmButtonText: onfirmText,
|
||||
cancelButtonText: cancelText,
|
||||
inputValidator: (val)=>{
|
||||
return inputValidator(val)
|
||||
},
|
||||
inputType: inputType,
|
||||
inputErrorMessage: inputErrorMessage,
|
||||
})
|
||||
.then(({ value }) => {
|
||||
callBack(row,value)
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Input canceled',
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -96,10 +96,20 @@
|
|||
<div class="publicTitle">
|
||||
<div>为您推荐</div>
|
||||
|
||||
<div class="change">换一批</div>
|
||||
<div class="change" @click="gethotList">换一批</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<equip-card class="item" v-for="(v, i) in 3" :key="i" :id="i"></equip-card>
|
||||
<equip-card class="item"
|
||||
@on-click="goDetail"
|
||||
v-for="(v, i) in hotList"
|
||||
:key="i"
|
||||
:url="v.picUrl"
|
||||
:name="`${v.modelName}${v.deviceName}`"
|
||||
:tags="[v.maStatus,v.location]"
|
||||
:company="v.companyName"
|
||||
:price="v.monthLeasePrice"
|
||||
timeUnit="月"
|
||||
:id="v.maId"></equip-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -107,6 +117,7 @@
|
|||
v-model="dialoglease"
|
||||
title="填写租赁信息"
|
||||
lock-scroll
|
||||
class="dialoglease"
|
||||
width="60%"
|
||||
>
|
||||
<el-config-provider :locale="zhCn">
|
||||
|
|
@ -122,7 +133,7 @@
|
|||
<el-row>
|
||||
<el-col :span="15">
|
||||
<el-form-item label="设备进场地址" prop="address">
|
||||
<el-input placeholder="请输入地址" v-model="ruleForm.address"></el-input>
|
||||
<el-cascader :props="addressCascader" v-model="ruleForm.address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -147,7 +158,9 @@
|
|||
<el-row>
|
||||
<el-col :span="15">
|
||||
<el-form-item label="工期时长" prop="duration">
|
||||
<el-input placeholder="请输入地址" v-model="ruleForm.duration"></el-input>
|
||||
<el-input v-model="ruleForm.duration" placeholder="请输入工期时长">
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -183,7 +196,7 @@
|
|||
<el-row>
|
||||
<el-col :span="15">
|
||||
<el-form-item label="项目说明" prop="projectDescription">
|
||||
<el-input placeholder="请填写项目说明" type="textarea"
|
||||
<el-input placeholder="请填写项目说明" rows="5" type="textarea"
|
||||
v-model="ruleForm.projectDescription"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -205,7 +218,7 @@
|
|||
></equipDetailTable>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="dialoglease = false">
|
||||
<el-button type="primary" @click="submit">
|
||||
提交
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
@ -234,14 +247,19 @@
|
|||
import ShowImg from './comoonents/showImg.vue'
|
||||
import {reactive, ref} from 'vue'
|
||||
import EquipCard from 'components/equipCard.vue'
|
||||
import {getDetail} from "@/http/api/equip"
|
||||
import {useRoute} from "vue-router";
|
||||
import {getDetail,getHotList,equipCollect,apiSubmitLease} from "@/http/api/equip"
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import Navmenu from '@/components/Navmenu/index.vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import equipDetailTable from '@/components/equipDetailTable.vue'
|
||||
import {ElMessage} from "element-plus";
|
||||
import address from "@/assets/temporaryAddress.json"
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const addressData = reactive(address)
|
||||
|
||||
const pageParams = route.params
|
||||
//设备简略基本信息
|
||||
const equipBaseInfoList = reactive([
|
||||
|
|
@ -344,13 +362,13 @@ const equipDetailKeyList = reactive([
|
|||
},
|
||||
{
|
||||
label: '检验信息',
|
||||
key: 'look',
|
||||
key: 'isExaminationPdf',
|
||||
fn: 'openPdf',
|
||||
arg: 'examinationPdf'
|
||||
},
|
||||
{
|
||||
label: '保险信息',
|
||||
key: 'look',
|
||||
key: 'isInsurancePdf',
|
||||
fn: 'openPdf',
|
||||
arg: 'insurancePdf'
|
||||
}
|
||||
|
|
@ -369,6 +387,10 @@ const dialoglease = ref(false)
|
|||
//装备收藏状态
|
||||
const isCollect = ref(false)
|
||||
|
||||
//推荐列表
|
||||
const hotList = ref([])
|
||||
|
||||
|
||||
//我要租 表单数据
|
||||
const ruleForm = ref({
|
||||
address: '',//进场地址
|
||||
|
|
@ -407,23 +429,62 @@ const openLease = () => {
|
|||
dialoglease.value = true
|
||||
}
|
||||
//切换收藏状态
|
||||
const collectChange = () => {
|
||||
const collectChange = async () => {
|
||||
isCollect.value = !isCollect.value
|
||||
const params = {
|
||||
maId:pageData.value.maId,
|
||||
isCollect:isCollect.value
|
||||
}
|
||||
const res = await equipCollect(params)
|
||||
if(res.code == '200'){
|
||||
ElMessage({
|
||||
type:'success',
|
||||
duration:1000,
|
||||
message:`装备${isCollect.value ? '收藏' : '取消收藏'}成功`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//打开商家电话弹窗
|
||||
const openPhone = () => {
|
||||
dialogPhone.value = !dialogPhone.value
|
||||
|
||||
}
|
||||
|
||||
// 打开新标签页查看pdf
|
||||
const openPdf = (name) => {
|
||||
window.open(name)
|
||||
if(name){
|
||||
window.open(name)
|
||||
}
|
||||
}
|
||||
const that = {
|
||||
openPdf
|
||||
}
|
||||
|
||||
const addressCascader = {
|
||||
lazy:true,
|
||||
label:'name',
|
||||
value:'id',
|
||||
lazyLoad(node,resolve){
|
||||
const { level } = node
|
||||
setTimeout(() => {
|
||||
let nodes = []
|
||||
if(level == 0){
|
||||
nodes = addressData.province
|
||||
}else if(level == 1){
|
||||
nodes = addressData.city
|
||||
}else if(level == 2){
|
||||
nodes = addressData.county.map((item) => ({
|
||||
...item,
|
||||
leaf:true
|
||||
}))
|
||||
}
|
||||
|
||||
resolve(nodes)
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
const handelDetailListClick = (fnName, arg) => {
|
||||
if (fnName) {
|
||||
that[fnName](arg)
|
||||
|
|
@ -434,18 +495,60 @@ const handelDetailListClick = (fnName, arg) => {
|
|||
const getData = async () => {
|
||||
const res = await getDetail(pageParams.id)
|
||||
res.data.isOperatorCn = res.data.isOperator ? '是' : '否'
|
||||
res.data.look = '点击查看'
|
||||
res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无'
|
||||
res.data.isExaminationPdf = res.data.examinationPdf ? '点击查看' : '暂无'
|
||||
|
||||
isCollect.value = res.data.collectId ? true : false
|
||||
pageData.value = res.data
|
||||
console.log(pageData.value)
|
||||
}
|
||||
const init = () => {
|
||||
getData()
|
||||
|
||||
//获取推荐列表
|
||||
const gethotList = async () => {
|
||||
const params = {
|
||||
pageNum:1,
|
||||
pageSize:3
|
||||
}
|
||||
const res = await getHotList(params)
|
||||
hotList.value = res.rows
|
||||
}
|
||||
|
||||
//获取详情数据
|
||||
const goDetail = (val) => {
|
||||
router.push({
|
||||
path:`/equipDetail/${val.id}`
|
||||
})
|
||||
}
|
||||
|
||||
//提交申请
|
||||
const submit = async() => {
|
||||
console.log(ruleForm.value)
|
||||
return
|
||||
const params = {
|
||||
addressId: ruleForm.value,
|
||||
address: "address",
|
||||
realStartTime: "2022-10-10 08:08:08",
|
||||
duration: "20",
|
||||
isMachinist: 1,
|
||||
invoiceType: "发票类型",
|
||||
description: "项目说明"
|
||||
}
|
||||
|
||||
const res = await apiSubmitLease(params)
|
||||
console.log('submit =============',res)
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
await gethotList()
|
||||
await getData()
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep() .el-form-item {
|
||||
:deep(.dialoglease){
|
||||
margin: 10px auto 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-form-item){
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,12 @@ import {useRoute, useRouter} from "vue-router";
|
|||
import { getList } from "@/http/api/equip"
|
||||
import $bus from "@/utils/bus"
|
||||
import NavMenu from "@/components/Navmenu/index.vue"
|
||||
import address from "@/assets/temporaryAddress.json"
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const addressData = reactive(address)
|
||||
|
||||
//筛选条件列表数据
|
||||
const screenChooseList = reactive([
|
||||
{
|
||||
|
|
@ -430,15 +433,23 @@ const getParams = () => {
|
|||
})
|
||||
return params
|
||||
}
|
||||
|
||||
const handelInitScreen = () => {
|
||||
const index = screenChooseList.findIndex(key => key.name == 'address')
|
||||
|
||||
screenChooseList[index].list[0].select = addressData.province
|
||||
screenChooseList[index].list[1].select = addressData.city
|
||||
|
||||
console.log(screenChooseList)
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
const params = getParams()
|
||||
console.log(params)
|
||||
|
||||
if(params && params.keyWord){
|
||||
$bus.emit('callBackText',params.keyWord)
|
||||
$bus.off('callBackText')
|
||||
}
|
||||
|
||||
handelInitScreen()
|
||||
getData()
|
||||
}
|
||||
init()
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@
|
|||
|
||||
.goods-count {
|
||||
display: flex;
|
||||
background-clip: #f5f5f5;
|
||||
padding-top: 30px;
|
||||
|
||||
li {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@
|
|||
import { useStore } from 'store/user'
|
||||
const store = useStore()
|
||||
|
||||
import { equipmentDeploymentApi, getEquipmentListApi } from 'http/api/usercenter/goodsmang'
|
||||
import {
|
||||
equipmentDeploymentApi,
|
||||
getEquipmentListApi,
|
||||
deleteGoodstApi
|
||||
} from 'http/api/usercenter/goodsmang'
|
||||
|
||||
// 注册地址拼装
|
||||
const AssemblyRegisterAddress: any = reactive([])
|
||||
|
|
@ -154,8 +158,6 @@
|
|||
maStatus: 15
|
||||
})
|
||||
|
||||
const initData = ref(JSON.parse(JSON.stringify(equipmentDeploymentParams)))
|
||||
|
||||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
const total: any = ref(0)
|
||||
|
|
@ -167,7 +169,6 @@
|
|||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
const res: any = await getEquipmentListApi({})
|
||||
console.log('获取数据列表***', res)
|
||||
total.value = res.total
|
||||
tableData.list = res.rows
|
||||
}
|
||||
|
|
@ -186,13 +187,83 @@
|
|||
dialogFormVisibleSettlein.value = true
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据')
|
||||
const deleteRowInfo = async (row: any) => {
|
||||
const res: any = await deleteGoodstApi([row.maId])
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
}
|
||||
|
||||
// 装备入驻按钮
|
||||
const equipmentDeployment = () => {
|
||||
equipmentDeploymentParams.value = initData
|
||||
equipmentDeploymentParams.value = {
|
||||
/* 租赁范围 */
|
||||
leaseScope: '',
|
||||
/* 设备所在地 */
|
||||
location: '',
|
||||
/* 设备所在地 省 */
|
||||
addressEconomize: '',
|
||||
/* 设备所在地 市 */
|
||||
addressProvince: '',
|
||||
/* 设备所在地 区 */
|
||||
addressArea: '',
|
||||
/* 设备类型 */
|
||||
typeId: '',
|
||||
/* 设备类型大类 */
|
||||
deviceType: '',
|
||||
/* 设备类型子类 */
|
||||
deviceTypeSon: '',
|
||||
/* 设备类型小类*/
|
||||
deviceTypeSun: '',
|
||||
/* 设备品牌 */
|
||||
brand: '',
|
||||
/* 设备型号 */
|
||||
modelName: '',
|
||||
/* 出场日期 */
|
||||
productionDate: '',
|
||||
/* 工作小时数 */
|
||||
workingHours: '',
|
||||
/* 整机序列号 */
|
||||
serialNumber: '',
|
||||
/* 月租金 */
|
||||
monthLeasePrice: '',
|
||||
/* 日租金 */
|
||||
dayLeasePrice: '',
|
||||
/* 是否提供机手 */
|
||||
isOperator: '',
|
||||
/* 机手月费用 */
|
||||
jsMonthPrice: '',
|
||||
/* 机手日费用 */
|
||||
jsDayPrice: '',
|
||||
/* 详细说明 */
|
||||
description: '',
|
||||
/* 设备图片 */
|
||||
picUrl: '',
|
||||
/* 检测信息 ,保险信息*/
|
||||
fileList: [
|
||||
/* 检测信息 */
|
||||
{
|
||||
id: '28',
|
||||
url: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
},
|
||||
/* 保险信息 */
|
||||
{
|
||||
id: '29',
|
||||
utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
},
|
||||
/* 设备图片 */
|
||||
{
|
||||
id: '20',
|
||||
utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
}
|
||||
],
|
||||
/* 设备状态 */
|
||||
maStatus: 15
|
||||
}
|
||||
// 打开入驻弹框
|
||||
dialogFormVisibleSettlein.value = true
|
||||
}
|
||||
|
|
@ -202,9 +273,9 @@
|
|||
// 入驻框保存提交
|
||||
const submitBtn = async () => {
|
||||
console.log(AssemblyRegisterAddress, '地址***---***')
|
||||
equipmentDeploymentParams.value.location = AssemblyRegisterAddress.join(',')
|
||||
// equipmentDeploymentParams.value.location = AssemblyRegisterAddress.join(',')
|
||||
// equipmentDeploymentParams.typeId = deviceType.join(',')
|
||||
const res: any = await equipmentDeploymentApi(equipmentDeploymentParams)
|
||||
const res: any = await equipmentDeploymentApi(equipmentDeploymentParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import FormComponent from 'components/FormComponent/index.vue'
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { getEquipmentListApi } from 'http/api/usercenter/goodsmang'
|
||||
import { goodsUpApi } from 'http/api/usercenter/goodsupdown'
|
||||
import { goodsUpApi, goodsDownApi, goodsDeleteApi } from 'http/api/usercenter/goodsupdown'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
// 选择复选框时获取的数据源
|
||||
const getRowId = (val: any) => {
|
||||
console.log(val, '需要删除的数据源**')
|
||||
val.forEach((item: any, index: any) => {
|
||||
groundingParams.value[index] = {
|
||||
/* 设备id */
|
||||
|
|
@ -57,16 +56,34 @@
|
|||
}
|
||||
|
||||
// 批量下架按钮
|
||||
const handleOffshelf = () => {
|
||||
console.log('下架设备')
|
||||
const handleOffshelf = async () => {
|
||||
groundingParams.value.forEach((item: any) => {
|
||||
item.type = 2
|
||||
})
|
||||
const res: any = await goodsDownApi(groundingParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '批量下架申请成功'
|
||||
})
|
||||
getList()
|
||||
groundingParams.value = []
|
||||
}
|
||||
}
|
||||
// 编辑按钮
|
||||
const editRowInfo = (row: any) => {
|
||||
console.log(row, '编辑当前数据')
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据')
|
||||
const deleteRowInfo = async (row: any) => {
|
||||
const res: any = await goodsDeleteApi([row.upId])
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
}
|
||||
// 上架按钮
|
||||
const groundingBtn = async (row: any) => {
|
||||
|
|
@ -94,7 +111,30 @@
|
|||
}
|
||||
|
||||
// 下架按钮
|
||||
const offShelfBtn = () => {}
|
||||
const offShelfBtn = async (row: any) => {
|
||||
groundingParams.value[0] = {
|
||||
/* 设备id */
|
||||
maId: row.maId,
|
||||
/* 申请时间 */
|
||||
applyTime: '',
|
||||
/* 申请人 */
|
||||
applyUser: '',
|
||||
/* 申请企业*/
|
||||
applyCompany: '',
|
||||
/* 1为上架 2为下架 */
|
||||
type: 2
|
||||
}
|
||||
console.log('下架设备')
|
||||
const res: any = await goodsDownApi(groundingParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '下架申请成功'
|
||||
})
|
||||
getList()
|
||||
groundingParams.value = []
|
||||
}
|
||||
}
|
||||
|
||||
const tableProps: any = ref([
|
||||
{ v_label: '编码', v_props: 'code', v_slot: '', width: '' },
|
||||
|
|
@ -103,7 +143,7 @@
|
|||
{ v_label: '装备名称', v_props: 'v_equipment_name', v_slot: '', width: '' },
|
||||
{ v_label: '租金', v_props: 'monthLeasePrice', v_slot: '', width: '' },
|
||||
{ v_label: '状态', v_props: 'maStatus', v_slot: 'v_type', width: '' },
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '200px' }
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '260px' }
|
||||
])
|
||||
|
||||
const tableData: any = ref([])
|
||||
|
|
@ -138,8 +178,8 @@
|
|||
<el-tag v-if="row.maStatus === '18'" size="small" type="danger">下架</el-tag>
|
||||
</template>
|
||||
<template v-slot:operate="{ row }">
|
||||
<el-button size="small" type="primary" @click="groundingBtn(row)">上架</el-button>
|
||||
<el-button size="small" type="primary" @click="offShelfBtn(row)">下架</el-button>
|
||||
<el-button size="small" type="success" @click="groundingBtn(row)">上架</el-button>
|
||||
<el-button size="small" type="warning" @click="offShelfBtn(row)">下架</el-button>
|
||||
<el-button size="small" type="primary" @click="editRowInfo(row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" @click="deleteRowInfo(row)">删除</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@
|
|||
color: '#fff'
|
||||
}">
|
||||
<el-table-column align="center" prop="code" label="订单编号" />
|
||||
<el-table-column align="center" prop="name" label="供应商" />
|
||||
<el-table-column align="center" prop="supplierCompany" label="供应商" />
|
||||
<el-table-column align="center" prop="createTime" label="订单创建日期" />
|
||||
<el-table-column align="center" prop="payType" label="装备类型" />
|
||||
<el-table-column align="center" prop="orderUser" label="装备名称" />
|
||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||
<el-table-column align="center" prop="orderStatus" label="订单状态" />
|
||||
<el-table-column align="center" prop="name" label="操作" width="260px">
|
||||
<template #default="scope">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -4,11 +4,11 @@
|
|||
<span>详情 </span>
|
||||
</template>
|
||||
</el-page-header>
|
||||
<timeLineHorizontal></timeLineHorizontal>
|
||||
<timeLineHorizontal themeColor="#2282fe" :timeLineList="timeLineList.list"></timeLineHorizontal>
|
||||
<el-form label-width="130px" inline="true" style="padding: 0 20px 0px 20px;width: 865px;" size="small">
|
||||
<el-form-item label="订单编号" style="width: 600px;">
|
||||
<!-- <el-form-item label="订单编号" style="width: 600px;">
|
||||
xxxxx
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="需求单位" class="table_item">
|
||||
xxxxx
|
||||
</el-form-item>
|
||||
|
|
@ -39,12 +39,31 @@
|
|||
<el-form-item label="项目说明:" style="width: 800px;">
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
</el-form-item>
|
||||
<el-form-item label="订单起止时间:" style="width: 800px;">
|
||||
<!-- <el-form-item label="订单起止时间:" style="width: 800px;">
|
||||
xxxx-xx-xx ~ xxxx-xx-xx
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- 表格 -->
|
||||
<orderTable :tableInfo="tableInfo"></orderTable>
|
||||
<el-form-item label="订单合同:" style="width: 800px;margin-top:12px;">
|
||||
<orderTable :tableInfo="tableInfo" style="width: 760px">
|
||||
<!-- <template v-slot:rentMoney>
|
||||
<h1>6666</h1>
|
||||
</template> -->
|
||||
<template v-slot:rentMoney>
|
||||
<div style="margin-left:80px;">
|
||||
<div>
|
||||
<span>装备</span> <span style="color:#f00;"> ¥{{ tableInfo.money }}</span>/{{ tableInfo.unit }}
|
||||
</div>
|
||||
<div>
|
||||
<span>手</span> <span style="color:#f00;"> ¥{{ tableInfo.money }}</span>/{{ tableInfo.unit }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</orderTable>
|
||||
<div class="total_money">
|
||||
合计:234234元
|
||||
</div>
|
||||
<!-- <el-form-item label="订单合同:" style="width: 800px;margin-top:12px;">
|
||||
xxxxxxxxxxxx.pdf
|
||||
</el-form-item>
|
||||
<el-form-item label="机手姓名:" class="table_item_sub">
|
||||
|
|
@ -55,18 +74,66 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="物流司机电话:" style="width: 800px;">
|
||||
xxxxx
|
||||
</el-form-item> -->
|
||||
<el-form-item label="订单合同:" style="width: 800px;" v-if="stepVal == '1'">
|
||||
<uploadComponent :maxLimit="1" listType="text" :acceptTypeList="['.pdf']" width="72px" height="24px">
|
||||
<template v-slot:default>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</uploadComponent>
|
||||
|
||||
</el-form-item>
|
||||
<div v-else-if="stepVal == '2'">
|
||||
<el-form-item label="机手姓名:" style="width: 300px;">
|
||||
<el-select v-model="submitInfo.driver" placeholder="请选择机手姓名" clearable filterable style="width: 100%;">
|
||||
<el-option v-for="item in driverInfo.list" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话:" style="width: 300px;">
|
||||
<el-input v-model.trim="submitInfo.driverPhone" placeholder="请输入模版编号" clearable maxlength="30" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流司机电话:" style="width: 300px;">
|
||||
<el-input v-model.trim="submitInfo.deliverPhone" placeholder="请输入模版编号" clearable maxlength="30" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-else-if="stepVal == '3'">
|
||||
<el-form-item label="机手姓名:" style="width: 300px;">
|
||||
{{ submitInfo.driver }}
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话:" style="width: 300px;">
|
||||
{{ submitInfo.driverPhone }}
|
||||
</el-form-item>
|
||||
<el-form-item label="物流司机电话:" style="width: 300px;">
|
||||
{{ submitInfo.deliverPhone }}
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<div class="btn_opert">
|
||||
<el-button type="primary" @click="demandConfirmFn" v-if="stepVal == '1'">
|
||||
需求确认
|
||||
</el-button>
|
||||
<el-button type="primary" @click="demandRejectFn" v-if="stepVal == '1'">
|
||||
需求驳回
|
||||
</el-button>
|
||||
<el-button type="primary" @click="nextFn" v-else-if="stepVal == '2'">
|
||||
下一步
|
||||
</el-button>
|
||||
<el-button type="primary" @click="confirmSendFn" v-else-if="stepVal == '3'">
|
||||
确认发
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import orderTable from "./orderTable.vue"
|
||||
import {reactive} from "vue"
|
||||
import { reactive } from "vue"
|
||||
import { MoreFilled } from '@element-plus/icons-vue'
|
||||
import timeLineHorizontal from "./timeLineHorizontal.vue"
|
||||
import uploadComponent from 'components/uploadComponent/index.vue'
|
||||
import {ElMessageBoxOpert} from "utils/elementCom"
|
||||
const tableInfo = reactive({
|
||||
v_equipment_title: "220E履带挖掘机",
|
||||
v_equipment_code: "88888",
|
||||
|
|
@ -79,38 +146,83 @@ const tableInfo = reactive({
|
|||
unit: '月',
|
||||
imgUrl: ""
|
||||
})
|
||||
const timeLineStep = reactive({
|
||||
list:[
|
||||
{
|
||||
content: '订单状态',
|
||||
timestamp: '需求已提交,等待供应商审核。',
|
||||
size: 'large',
|
||||
type: 'primary',
|
||||
icon: MoreFilled,
|
||||
|
||||
const stepVal = ref('1')
|
||||
|
||||
const timeLineList = reactive({
|
||||
list: [
|
||||
{
|
||||
title: '订单需求审核',
|
||||
content: '开工阶段',
|
||||
done: true,
|
||||
},
|
||||
{
|
||||
title: '合同上传',
|
||||
content: '请填写公司详细信息',
|
||||
done: true,
|
||||
},
|
||||
{
|
||||
title: '装备发货',
|
||||
content: '请填写公司财务信息',
|
||||
done: true,
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const driverInfo = reactive({
|
||||
list: [{
|
||||
|
||||
value: 'Option1',
|
||||
label: 'Option1',
|
||||
},
|
||||
{
|
||||
content: '订单状态',
|
||||
timestamp: '订单已确认,供应商会与您联系,签订合同。',
|
||||
color: '#0bbd87',
|
||||
value: 'Option2',
|
||||
label: 'Option2',
|
||||
|
||||
}]
|
||||
})
|
||||
const submitInfo = reactive({
|
||||
driver: '',
|
||||
driverPhone: '',
|
||||
deliverPhone: ''
|
||||
})
|
||||
|
||||
const demandConfirmFn = () => {
|
||||
stepVal.value = '2'
|
||||
}
|
||||
const editCallBack = (row: any, value: any) => {
|
||||
console.log("editCallBack", row, value)
|
||||
}
|
||||
const demandRejectFn = (row:any) => {
|
||||
ElMessageBoxOpert(
|
||||
'驳回原因',
|
||||
'填写驳回原因',
|
||||
'确定',
|
||||
'取消',
|
||||
(val: any) => {
|
||||
if (!val) {
|
||||
return "请填写类型模板"
|
||||
}
|
||||
},
|
||||
{
|
||||
content: '订单状态',
|
||||
timestamp: '装备已发出,到货后请及时确认。',
|
||||
size: 'large',
|
||||
},
|
||||
{
|
||||
content: '订单状态',
|
||||
timestamp: '租赁进行中。',
|
||||
type: 'primary',
|
||||
hollow: true,
|
||||
last:true
|
||||
},
|
||||
{
|
||||
content: 'Default node',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
|
||||
},
|
||||
]})
|
||||
"请填写类型模板",
|
||||
editCallBack,
|
||||
row,
|
||||
'textarea'
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
const nextFn = () => {
|
||||
|
||||
|
||||
stepVal.value = '3'
|
||||
}
|
||||
|
||||
const confirmSendFn = () => {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -126,10 +238,25 @@ const timeLineStep = reactive({
|
|||
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 {}
|
||||
}
|
||||
|
||||
.total_money {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
width: 760px;
|
||||
}
|
||||
|
||||
.btn_opert {
|
||||
width: 760px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -42,7 +42,17 @@
|
|||
xxxx-xx-xx ~ xxxx-xx-xx
|
||||
</el-form-item>
|
||||
<!-- 表格 -->
|
||||
<orderTable :tableInfo="tableInfo"></orderTable>
|
||||
<orderTable :tableInfo="tableInfo">
|
||||
|
||||
<template v-slot:rentMoney>
|
||||
<div>
|
||||
<span style="color:#f00;"> {{ tableInfo.money }}</span>/{{ tableInfo.unit }}
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
</orderTable>
|
||||
<el-form-item label="订单合同:" style="width: 800px;margin-top:12px;">
|
||||
xxxxxxxxxxxx.pdf
|
||||
</el-form-item>
|
||||
|
|
@ -55,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">
|
||||
|
|
@ -63,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>
|
||||
|
|
@ -74,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",
|
||||
|
|
@ -112,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>
|
||||
|
||||
|
||||
|
|
@ -133,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>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<div class="Img">
|
||||
<img :src="props.tableInfo.imgUrl">
|
||||
</div>
|
||||
<div class="state">
|
||||
<div class="state">
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
装备编号:
|
||||
|
|
@ -83,9 +83,10 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="租金" min-width="120">
|
||||
<template #default="scope">
|
||||
<!-- <template #rentMoney="scope">
|
||||
<span style="color:#f00;"> {{ props.tableInfo.money }}</span>/{{ props.tableInfo.unit }}
|
||||
</template>
|
||||
</template> -->
|
||||
<slot name="rentMoney"></slot>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
|
@ -115,6 +116,11 @@ const headerClassName = () => {
|
|||
|
||||
.equipData {
|
||||
height: 220px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.name {
|
||||
font-size: 16px;
|
||||
|
|
@ -176,6 +182,7 @@ const headerClassName = () => {
|
|||
text-align: right;
|
||||
color: #858585;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: black;
|
||||
}
|
||||
|
|
@ -184,7 +191,8 @@ const headerClassName = () => {
|
|||
}
|
||||
}
|
||||
|
||||
.money_c{
|
||||
color:#f00;
|
||||
.money_c {
|
||||
color: #f00;
|
||||
}
|
||||
}</style>
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,107 +1,100 @@
|
|||
<template>
|
||||
<div class="processBox">
|
||||
<div class="title">工程进度</div>
|
||||
<el-divider />
|
||||
<div class="timelineProcessBox">
|
||||
<el-timeline class="timeline">
|
||||
<el-timeline-item
|
||||
class="lineitem"
|
||||
:class="item.done ? 'active' : 'inactive'"
|
||||
v-for="(item, index) in activities"
|
||||
:key="index"
|
||||
:timestamp="item.time"
|
||||
>
|
||||
<div>
|
||||
{{ item.content }}
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
<div class="title">工程进度</div>
|
||||
<el-divider />
|
||||
<div class="timelineProcessBox">
|
||||
<el-timeline class="timeline" :color="props.themeColor" >
|
||||
<el-timeline-item class="lineitem" :class="item.done ? 'active' : 'inactive'"
|
||||
v-for="(item, index) in props.timeLineList" :key="index" :timestamp="item.content">
|
||||
<div>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
const activities = [
|
||||
{
|
||||
content: '开工阶段',
|
||||
time: '2018-04-12 20:46',
|
||||
people: '五六七',
|
||||
done: true,
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
const props = defineProps({
|
||||
themeColor:{
|
||||
type:String,
|
||||
default:'#2282fe'
|
||||
},
|
||||
{
|
||||
content: '实施阶段',
|
||||
people: '吉吉国王',
|
||||
done: true,
|
||||
time: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: '竣工阶段',
|
||||
done: false,
|
||||
people: '熊大',
|
||||
time: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: '结算阶段',
|
||||
people: '',
|
||||
done: false,
|
||||
time: '',
|
||||
},
|
||||
]
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
timeLineList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
.processBox {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.processBox {
|
||||
background-color: #fff;
|
||||
height: 210px;
|
||||
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
padding-left: 32px;
|
||||
padding-top: 16px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
padding-left: 32px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.timelineProcessBox {
|
||||
.timeline {
|
||||
display: flex;
|
||||
width: 95%;
|
||||
margin: 40px auto;
|
||||
.lineitem {
|
||||
transform: translateX(50%);
|
||||
width: 25%;
|
||||
.timeline {
|
||||
display: flex;
|
||||
width: 95%;
|
||||
margin: 40px auto;
|
||||
|
||||
.lineitem {
|
||||
transform: translateX(50%);
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-timeline-item__tail) {
|
||||
}
|
||||
|
||||
:deep(.el-timeline-item__tail) {
|
||||
border-left: none;
|
||||
border-top: 2px solid #e4e7ed;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
}
|
||||
:deep(.el-timeline-item__wrapper) {
|
||||
}
|
||||
|
||||
:deep(.el-timeline-item__wrapper) {
|
||||
padding-left: 0;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
transform: translateX(-50%);
|
||||
text-align: center;
|
||||
}
|
||||
:deep(.el-timeline-item__timestamp) {
|
||||
}
|
||||
|
||||
:deep(.el-timeline-item__timestamp) {
|
||||
font-size: 14px;
|
||||
}
|
||||
.active {
|
||||
border: none!important;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.active {
|
||||
border: none !important;
|
||||
|
||||
:deep(.el-timeline-item__node) {
|
||||
background-color: $main-color;
|
||||
// background-color: $main-color;
|
||||
background-color: v-bind('props.themeColor');
|
||||
}
|
||||
|
||||
:deep(.el-timeline-item__tail) {
|
||||
border-color: $main-color;
|
||||
// border-color: $main-color;
|
||||
// background-color: v-bind('props.themeColor');
|
||||
}
|
||||
}
|
||||
// 有active样式的下一个li
|
||||
.active + li {
|
||||
}
|
||||
|
||||
// 有active样式的下一个li
|
||||
.active+li {
|
||||
:deep(.el-timeline-item__node) {
|
||||
background-color: $main-color;
|
||||
background-color: v-bind('props.themeColor');
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue