From 892df1aea0a663f62c59df142f033dc601e15f29 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 28 Nov 2024 10:10:17 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 2 +- components.d.ts | 8 +- src/views/user/orderManagement/index.vue | 1596 ++++++++++++---------- 3 files changed, 909 insertions(+), 697 deletions(-) diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 00e05c3..a606bd4 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -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') } diff --git a/components.d.ts b/components.d.ts index 944bb53..1c25140 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,8 +9,11 @@ declare module 'vue' { export interface GlobalComponents { Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCascader: typeof import('element-plus/es')['ElCascader'] + 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'] @@ -18,17 +21,16 @@ declare module 'vue' { ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] 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'] EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] diff --git a/src/views/user/orderManagement/index.vue b/src/views/user/orderManagement/index.vue index a02e66c..ada8e6c 100644 --- a/src/views/user/orderManagement/index.vue +++ b/src/views/user/orderManagement/index.vue @@ -6,22 +6,22 @@ import { getOrderListApi } from 'http/api/usercenter/seekorder' import uploadComponent from 'components/uploadComponent/index.vue' import previewImg from './previewImg/index.vue' import { ElMessage } from 'element-plus' -import { useStore } from 'store/user' -const store = useStore() -import { mainStore } from 'store/main' +import { useStore } from 'store/user' +const store = useStore() +import { mainStore } from 'store/main' const store2 = mainStore() /* 查询参数 */ const queryParams: any = ref({ deviceName: '', orderStatus: '', - czcompanyName: '', - companyName: '', - lowerBound:'', - upperBound:'', + czcompanyName: '', + companyName: '', + lowerBound: '', + upperBound: '', pageSize: 10, pageNum: 1, - startTime:'', - endTime:'', + startTime: '', + endTime: '', }) const time = ref([]) const router = useRouter() @@ -30,7 +30,15 @@ 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 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() @@ -40,24 +48,24 @@ const statusList = [{id:'0',name:'未下单'},{id:'1',name:'已下单'},{id:'2', // } /** 查询列表 */ const getList = async () => { - 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 + 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 res: any = await getOrderListApi(queryParams.value) + cardList.value = res.rows + total.value = res.total } //订单详情 -const handleViewOrder=(index:Number,row:any)=>{ +const handleViewOrder = (index: Number, row: any) => { router.push({ - name: 'orderManagementInfo' , - query: { orderStatusTemp:Number(row.orderStatus),idTemp:row.id } + name: 'orderManagementInfo', + query: { orderStatusTemp: Number(row.orderStatus), idTemp: row.id }, }) } @@ -70,7 +78,6 @@ const queryTableList = () => { getList() } - /* 退租按钮 */ const clickRentingTermination = () => { router.push({ name: 'rentinTermination' }) @@ -111,20 +118,19 @@ const clickConfirmReceipt = (row: any) => { }) } - const settleinTitle = ref('') /* 编辑 **********/ const isEditDisabled = ref(false) // 退租检修弹框显示隐藏 const dialogFormVisibleSettlein: any = ref(false) const equipmentDeploymentParams: any = ref({ - /* 设备名称 */ + /* 设备名称 */ deviceName: '', - deviceTypeList: [], + deviceTypeList: [], deviceCount: 1, - unitName: '', - code: '', - brand: '', + unitName: '', + code: '', + brand: '', typeId: '', companyId: '', productionDate: '', @@ -132,139 +138,136 @@ const equipmentDeploymentParams: any = ref({ person: '', personPhone: '', deviceWeight: '', -}) +}) - const mainFileList: any = ref([])//检测文件1 - const detailsFileList: any = ref([])//检测文件2 - //图片查看弹窗 - const dialogVisible: any = ref(false) - const dialogImageUrl = ref('') - //上传 - const upload: any = ref({ - // 设置上传的请求头部 - headers: { Authorization: "Bearer " + store2.token }, - // 上传的地址 - url: import.meta.env.VITE_API_URL + "/file/upload", - }) - // 文件上传前处理-上传大小 - const beforeUpload = (file: any) => { - if (file.size / 1024 / 1024 > 2) { - ElMessage({ - type: 'error', - message: '上传文件大小不能超过2M!' - }) - // this.$message.error({ message: `上传文件大小不能超过2M!`,}); - return false; - } - } - // 文件上传失败 - const uploadError = () => { +const mainFileList: any = ref([]) //检测文件1 +const detailsFileList: any = ref([]) //检测文件2 +//图片查看弹窗 +const dialogVisible: any = ref(false) +const dialogImageUrl = ref('') +//上传 +const upload: any = ref({ + // 设置上传的请求头部 + headers: { Authorization: 'Bearer ' + store2.token }, + // 上传的地址 + url: import.meta.env.VITE_API_URL + '/file/upload', +}) +// 文件上传前处理-上传大小 +const beforeUpload = (file: any) => { + if (file.size / 1024 / 1024 > 2) { ElMessage({ type: 'error', - message: '上传文件失败!' + message: '上传文件大小不能超过2M!', }) - // this.$message.error({message: `上传文件失败!`}); + // this.$message.error({ message: `上传文件大小不能超过2M!`,}); + return false } - // 文件上传成功处理 - const handleFileSuccess = (response: any) => { - if (response.code == 200) { - let obj = { - // modelId:this.maId, - fileName: response.data.name.split("/")[4], - fileUrl: response.data.url - }; - console.log(obj); - mainFileList.value.push(obj) - ElMessage({ - type: 'success', - message: '上传成功!' - }) - console.log(mainFileList.value) +} +// 文件上传失败 +const uploadError = () => { + ElMessage({ + type: 'error', + message: '上传文件失败!', + }) + // this.$message.error({message: `上传文件失败!`}); +} +// 文件上传成功处理 +const handleFileSuccess = (response: any) => { + if (response.code == 200) { + let obj = { + // modelId:this.maId, + fileName: response.data.name.split('/')[4], + fileUrl: response.data.url, } - } + console.log(obj) + mainFileList.value.push(obj) + ElMessage({ + type: 'success', + message: '上传成功!', + }) + console.log(mainFileList.value) + } +} - // 文件上传成功处理 - const handleFileSuccess2 = (response: any) => { - if (response.code == 200) { - let obj = { - // modelId:this.maId, - fileName: response.data.name.split("/")[4], - fileUrl: response.data.url - }; - console.log(obj); - detailsFileList.value.push(obj) - ElMessage({ - type: 'success', - message: '上传成功!' - }) - console.log(detailsFileList.value) +// 文件上传成功处理 +const handleFileSuccess2 = (response: any) => { + if (response.code == 200) { + let obj = { + // modelId:this.maId, + fileName: response.data.name.split('/')[4], + fileUrl: response.data.url, } - } + console.log(obj) + detailsFileList.value.push(obj) + ElMessage({ + type: 'success', + message: '上传成功!', + }) + console.log(detailsFileList.value) + } +} //退租检修 - const handleViewBack = () => { - settleinTitle.value = '退租检修' - isEditDisabled.value = true - equipmentDeploymentParams.value = { - /* 企业Id */ - // ownCo: mainStore().userInfo.companyId, - /* 租赁范围 */ - leaseScope: '', - /* 设备所在地 */ - location: '', - /* 省 */ - provinceId: '', - /* 市 */ - cityId: '', - /* 区 */ - areaId: '', - /* 设备所在地 省 */ - addressEconomize: '', - /* 设备所在地 市 */ - addressProvince: '', - /* 设备所在地 区 */ - addressArea: '', - /* 设备类型 */ - typeId: '', - /* 设备类型大类 */ - deviceType: '', - /* 设备类型子类 */ - deviceTypeSon: '', - /* 设备类型小类*/ - deviceTypeSun: '', - /* 设备品牌 */ - brand: '', - /* 设备型号 */ - modelName: '', - /* 出场日期 */ - productionDate: '', - /* 工作小时数 */ - workingHours: '', - /* 整机序列号 */ - serialNumber: '', - /* 月租金 */ - monthLeasePrice: '', - /* 日租金 */ - dayLeasePrice: '', - /* 是否提供机手 */ - isOperator: '', - /* 机手月费用 */ - jsMonthPrice: '', - /* 机手日费用 */ - jsDayPrice: '', - /* 详细说明 */ - description: '', - /* 设备主图片 */ - picUrl: '', - /* 检测信息 ,保险信息*/ - fileList: [], - /* 设备状态 */ - maStatus: 15, - detectionList: [], - insureList: [], - picList: [] - } - // 打开退组检修弹框 - dialogFormVisibleSettlein.value = true +const handleViewBack = () => { + settleinTitle.value = '退租检修' + isEditDisabled.value = true + equipmentDeploymentParams.value = { + /* 企业Id */ + // ownCo: mainStore().userInfo.companyId, + /* 租赁范围 */ + leaseScope: '', + /* 设备所在地 */ + location: '', + /* 省 */ + provinceId: '', + /* 市 */ + cityId: '', + /* 区 */ + areaId: '', + /* 设备所在地 省 */ + addressEconomize: '', + /* 设备所在地 市 */ + addressProvince: '', + /* 设备所在地 区 */ + addressArea: '', + /* 设备类型 */ + typeId: '', + /* 设备类型大类 */ + deviceType: '', + /* 设备类型子类 */ + deviceTypeSon: '', + /* 设备类型小类*/ + deviceTypeSun: '', + /* 设备品牌 */ + brand: '', + /* 设备型号 */ + modelName: '', + /* 出场日期 */ + productionDate: '', + /* 工作小时数 */ + workingHours: '', + /* 整机序列号 */ + serialNumber: '', + /* 月租金 */ + monthLeasePrice: '', + /* 日租金 */ + dayLeasePrice: '', + /* 是否提供机手 */ + isOperator: '', + /* 机手月费用 */ + jsMonthPrice: '', + /* 机手日费用 */ + jsDayPrice: '', + /* 详细说明 */ + description: '', + /* 设备主图片 */ + picUrl: '', + /* 检测信息 ,保险信息*/ + fileList: [], + /* 设备状态 */ + maStatus: 15, + detectionList: [], + insureList: [], + picList: [], } const settlemoneyTitle = ref('') @@ -388,17 +391,107 @@ const dialogFormVisibleSettlemoney: any = ref(false) partItems3.value.splice(index, 1); } } - +} - - From 5a7308067583b32685a469d9bafe0b392a47ab91 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 28 Nov 2024 10:14:15 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/orderManagement/index.vue | 131 +++++++++++------------ 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/src/views/user/orderManagement/index.vue b/src/views/user/orderManagement/index.vue index 98a457b..e088d7e 100644 --- a/src/views/user/orderManagement/index.vue +++ b/src/views/user/orderManagement/index.vue @@ -207,73 +207,71 @@ const handleFileSuccess2 = (response: any) => { } } //退租检修 -const handleViewBack = () => { - settleinTitle.value = '退租检修' - isEditDisabled.value = true - equipmentDeploymentParams.value = { - /* 企业Id */ - // ownCo: mainStore().userInfo.companyId, - /* 租赁范围 */ - leaseScope: '', - /* 设备所在地 */ - location: '', - /* 省 */ - provinceId: '', - /* 市 */ - cityId: '', - /* 区 */ - areaId: '', - /* 设备所在地 省 */ - addressEconomize: '', - /* 设备所在地 市 */ - addressProvince: '', - /* 设备所在地 区 */ - addressArea: '', - /* 设备类型 */ - typeId: '', - /* 设备类型大类 */ - deviceType: '', - /* 设备类型子类 */ - deviceTypeSon: '', - /* 设备类型小类*/ - deviceTypeSun: '', - /* 设备品牌 */ - brand: '', - /* 设备型号 */ - modelName: '', - /* 出场日期 */ - productionDate: '', - /* 工作小时数 */ - workingHours: '', - /* 整机序列号 */ - serialNumber: '', - /* 月租金 */ - monthLeasePrice: '', - /* 日租金 */ - dayLeasePrice: '', - /* 是否提供机手 */ - isOperator: '', - /* 机手月费用 */ - jsMonthPrice: '', - /* 机手日费用 */ - jsDayPrice: '', - /* 详细说明 */ - description: '', - /* 设备主图片 */ - picUrl: '', - /* 检测信息 ,保险信息*/ - fileList: [], - /* 设备状态 */ - maStatus: 15, - detectionList: [], - insureList: [], - picList: [], + const handleViewBack = () => { + settleinTitle.value = '退租检修' + isEditDisabled.value = true + equipmentDeploymentParams.value = { + /* 企业Id */ + // ownCo: mainStore().userInfo.companyId, + /* 租赁范围 */ + leaseScope: '', + /* 设备所在地 */ + location: '', + /* 省 */ + provinceId: '', + /* 市 */ + cityId: '', + /* 区 */ + areaId: '', + /* 设备所在地 省 */ + addressEconomize: '', + /* 设备所在地 市 */ + addressProvince: '', + /* 设备所在地 区 */ + addressArea: '', + /* 设备类型 */ + typeId: '', + /* 设备类型大类 */ + deviceType: '', + /* 设备类型子类 */ + deviceTypeSon: '', + /* 设备类型小类*/ + deviceTypeSun: '', + /* 设备品牌 */ + brand: '', + /* 设备型号 */ + modelName: '', + /* 出场日期 */ + productionDate: '', + /* 工作小时数 */ + workingHours: '', + /* 整机序列号 */ + serialNumber: '', + /* 月租金 */ + monthLeasePrice: '', + /* 日租金 */ + dayLeasePrice: '', + /* 是否提供机手 */ + isOperator: '', + /* 机手月费用 */ + jsMonthPrice: '', + /* 机手日费用 */ + jsDayPrice: '', + /* 详细说明 */ + description: '', + /* 设备主图片 */ + picUrl: '', + /* 检测信息 ,保险信息*/ + fileList: [], + /* 设备状态 */ + maStatus: 15, + detectionList: [], + insureList: [], + picList: [] + } + // 打开退组检修弹框 + dialogFormVisibleSettlein.value = true } -<<<<<<< HEAD - // 打开入驻弹框 - dialogFormVisibleSettlein.value = true -} -======= const settlemoneyTitle = ref('') const moneyParams1: any = ref({ @@ -397,7 +395,6 @@ const dialogFormVisibleSettlemoney: any = ref(false) } } ->>>>>>> hongchao-dev