订单修改装备列表修改

This commit is contained in:
zzyuan 2024-11-28 17:35:25 +08:00
parent 39ccd71c22
commit 932e8edf7c
3 changed files with 61 additions and 27 deletions

18
components.d.ts vendored
View File

@ -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']

View File

@ -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({

View File

@ -775,12 +775,12 @@
<!-- 装备弹框 -->
<el-dialog v-model="dialogFormVisibleSettlein" :title="settleinTitle"
width="60%" align-center :close-on-click-modal="false" :before-close="handleClose">
width="65%" align-center :close-on-click-modal="false" :before-close="handleClose">
<el-row :gutter="10" class="mb8" style="display: flex;align-items: center;">
<el-button type="" @click="closeDialogBtn">
</el-button>
<el-button type="warning" @click="saveTemp">
<el-button type="warning" @click="saveTemp" v-if="!disabledForm || isEditDisabled">
稿
</el-button>
<el-button type="primary" @click="submitBtn" v-if="!disabledForm || isEditDisabled" >
@ -1026,13 +1026,13 @@
<img class="picture-card" :src="item.fileUrl" alt="">
<div class="icon-list">
<span class="imgItem__icon hide" @click="handleDownload(item)">
<i class="el-icon-download"/>
<el-icon :size="20"><Download /></el-icon>
</span>
<span class="imgItem__icon hide" @click="picturePreview(item)">
<i class="el-icon-zoom-in"/>
<el-icon :size="20"><ZoomIn /></el-icon>
</span>
<span class="imgItem__icon hide" @click="handleRemove(mainFileList,index)">
<i class="el-icon-delete"/>
<el-icon :size="20"><Delete /></el-icon>
</span>
</div>
<p class="file-name">{{ item.fileName }}</p>
@ -1064,13 +1064,13 @@
<img class="picture-card" :src="item.fileUrl" alt="">
<div class="icon-list">
<span class="imgItem__icon hide" @click="handleDownload(item)">
<i class="el-icon-download"/>
<el-icon :size="20"><Download /></el-icon>
</span>
<span class="imgItem__icon hide" @click="picturePreview(item)">
<i class="el-icon-zoom-in"/>
<el-icon :size="20"><ZoomIn /></el-icon>
</span>
<span class="imgItem__icon hide" @click="handleRemove(detailsFileList,index)">
<i class="el-icon-delete"/>
<el-icon :size="20"><Delete /></el-icon>
</span>
</div>
<p class="file-name">{{ item.fileName }}</p>
@ -1106,13 +1106,13 @@
<img class="picture-card" :src="item.fileUrl" alt="">
<div class="icon-list">
<span class="imgItem__icon hide" @click="handleDownload(item)">
<i class="el-icon-download"/>
<el-icon :size="20"><Download /></el-icon>
</span>
<span class="imgItem__icon hide" @click="picturePreview(item)">
<i class="el-icon-zoom-in"/>
<el-icon :size="20"><ZoomIn /></el-icon>
</span>
<span class="imgItem__icon hide" @click="handleRemove(insurancePdf,index)">
<i class="el-icon-delete"/>
<el-icon :size="20"><Delete /></el-icon>
</span>
</div>
<p class="file-name">{{ item.fileName }}</p>
@ -1141,13 +1141,13 @@
<img class="picture-card" :src="item.fileUrl" alt="">
<div class="icon-list">
<span class="imgItem__icon hide" @click="handleDownload(item)">
<i class="el-icon-download"/>
<el-icon :size="20"><Download /></el-icon>
</span>
<span class="imgItem__icon hide" @click="picturePreview(item)">
<i class="el-icon-zoom-in"/>
<el-icon :size="20"><ZoomIn /></el-icon>
</span>
<span class="imgItem__icon hide" @click="handleRemove(examinationPdf,index)">
<i class="el-icon-delete"/>
<el-icon :size="20"><Delete /></el-icon>
</span>
</div>
<p class="file-name">{{ item.fileName }}</p>
@ -1167,7 +1167,7 @@
<!-- 图片查看弹窗 -->
<el-dialog v-model="dialogVisible" width="500px" height="500px">
<img width="100%" height="500px" :src="dialogImageUrl" />
<img width="500" height="500" :src="dialogImageUrl" alt="description" >
</el-dialog>
</template>
@ -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;
}
}