From 932e8edf7c08d7439db87e040c84082a78f63659 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 28 Nov 2024 17:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9=E8=A3=85?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 18 ++++++++- src/views/order/index.vue | 21 ++++++++-- src/views/user/goodsManagement/index.vue | 49 +++++++++++++----------- 3 files changed, 61 insertions(+), 27 deletions(-) diff --git a/components.d.ts b/components.d.ts index c6aee57..ab3dded 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,20 +8,34 @@ export {} declare module 'vue' { export interface GlobalComponents { Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] + 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'] + ElCascader: typeof import('element-plus/es')['ElCascader'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] - ElCountdown: typeof import('element-plus/es')['ElCountdown'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] - ElEmpty: typeof import('element-plus/es')['ElEmpty'] + ElDialog: typeof import('element-plus/es')['ElDialog'] 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'] + 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'] + 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'] EquipCardNew: typeof import('./src/components/equipCardNew/index.vue')['default'] diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 5973d99..b99be84 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -198,6 +198,7 @@ const getOrderListData = async () => { orderList.value.forEach((e: any) => { e.isChecked = false; e.goods_num = 1; + e.lease_day = 1; // e.devInfoVoList.forEach((j: any) => { // j.isChecked = false // }) @@ -208,13 +209,16 @@ const getOrderListData = async () => { } onMounted(() => { - getOrderListData() + setTimeout(()=>{ + getOrderListData() + },500) + }) // 日期change事件 const onLeaseDateChange = (e: any, item: any) => { item.lease_date_string = `${e[0]}至${e[1]}` - item.lease_day = moment(e[1]).diff(e[0], 'day') + item.lease_day = moment(e[1]).diff(e[0], 'day') } // 删除按钮 @@ -300,6 +304,15 @@ const onCartSubmit = async () => { }) return } + console.log(amountDeviceList.value[0].lease_date==undefined) + if (amountDeviceList.value[0].lease_date==undefined) { + ElMessage({ + showClose: false, + message: '请选择租期', + type: 'error', + }) + return + } if (!protocolChecked.value) { ElMessage({ showClose: false, @@ -308,6 +321,8 @@ const onCartSubmit = async () => { }) return } + + console.log('提交订单') // 组装参数 const detailsList = amountDeviceList.value.map((e: any) => { @@ -328,7 +343,7 @@ const onCartSubmit = async () => { cost: orderAmountPice.value, detailsList, } - + console.log('submitParams',submitParams) const res: any = await submitBookCarApi(submitParams) if (res.code === 200) { ElMessage({ diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 5346403..05e37b1 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -775,12 +775,12 @@ + width="65%" align-center :close-on-click-modal="false" :before-close="handleClose"> 关 闭 - + 草 稿 @@ -1026,13 +1026,13 @@
- + - + - +

{{ item.fileName }}

@@ -1064,13 +1064,13 @@
- + - + - +

{{ item.fileName }}

@@ -1106,13 +1106,13 @@
- + - + - +

{{ item.fileName }}

@@ -1141,13 +1141,13 @@
- + - + - +

{{ item.fileName }}

@@ -1167,7 +1167,7 @@ - + description @@ -1205,36 +1205,41 @@ margin-bottom: 20px; } .imgsBox{ - width: auto; + width: 100%; height: auto; display: flex; + flex-wrap: wrap; align-items: center; margin-bottom: 30px; margin-left: 20px; .imgItem{ - width: 160px; - height: 160px; - margin-right: 40px; + width: 150px; + height: 150px; + margin-right: 20px; + margin-bottom: 30px; border: 1px dashed #bbb; position: relative; .picture-card{ - width: 160px; - height: 160px; + width: 150px; + height: 150px; } .icon-list{ width: 60px;height: 20px; position: absolute; top: 70px; - left: 40px; + left: 30px; display: flex; align-items: center; } .imgItem__icon{ margin: 0 5px; + cursor: pointer; } .file-name{ font-size: 10px; + width: 100%; + word-break: break-all; } }