Merge branch 'dev-sy'
This commit is contained in:
commit
c9316f53b0
|
|
@ -21,7 +21,7 @@
|
|||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
:disabled="isType == 1"
|
||||
:disabled="isType == 1 || companyIdNew == companyId"
|
||||
@click.stop="onHandelLessee"
|
||||
>立即承租</el-button
|
||||
>
|
||||
|
|
@ -30,12 +30,16 @@
|
|||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { addBookCarApi } from '@/http/api/equip'
|
||||
import { addBookCarApi } from 'http/api/equip'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainStore } from 'store/main'
|
||||
const store: any = mainStore()
|
||||
const companyIdNew = store.userInfo.companyId
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const isType = localStorage.getItem('rolesType')
|
||||
const isType: any = localStorage.getItem('rolesType')
|
||||
|
||||
const props: any = defineProps({
|
||||
url: {
|
||||
type: String,
|
||||
|
|
@ -46,6 +50,14 @@ const props: any = defineProps({
|
|||
type: String,
|
||||
default: '测试装备',
|
||||
},
|
||||
publishUser: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
publishCompany: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
tags: {
|
||||
type: Array,
|
||||
default: ['待租', '合肥市'],
|
||||
|
|
|
|||
|
|
@ -9,15 +9,20 @@ export const getOrderListApi = (data: any) => {
|
|||
|
||||
//获取订单列表详情
|
||||
export const getOrderListInfoApi = (data: any) => {
|
||||
return get('/material-mall/order/getOrderDetailsById',data)
|
||||
return get('/material-mall/order/getOrderDetailsById', data)
|
||||
}
|
||||
|
||||
//出库
|
||||
export const passApi = (data: any) => {
|
||||
return post('/material-mall/order/updateOrderStatus',data)
|
||||
return post('/material-mall/order/updateOrderStatus', data)
|
||||
}
|
||||
|
||||
//驳回
|
||||
export const failApi = (data: any) => {
|
||||
return post('/material-mall/order/updateOrderStatus',data)
|
||||
}
|
||||
return post('/material-mall/order/updateOrderStatus', data)
|
||||
}
|
||||
//驳回
|
||||
export const confirmPriceApi = (data: any) => {
|
||||
return post('/material-mall/lease-repair/confirmPrice', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,11 @@
|
|||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
:disabled="pageData.isBookCar == 0 || isType == 1"
|
||||
:disabled="
|
||||
pageData.isBookCar == 0 ||
|
||||
isType == 1 ||
|
||||
companyIdNew == pageData.companyId
|
||||
"
|
||||
@click="onAddCart"
|
||||
>加入预约车</el-button
|
||||
>
|
||||
|
|
@ -101,7 +105,11 @@
|
|||
<el-button
|
||||
class="item_btn applyFor primary-lease"
|
||||
type="primary"
|
||||
:disabled="pageData.isBookCar == 0 || isType == 1"
|
||||
:disabled="
|
||||
pageData.isBookCar == 0 ||
|
||||
isType == 1 ||
|
||||
companyIdNew == pageData.companyId
|
||||
"
|
||||
@click="onHandelLessee"
|
||||
>
|
||||
立即承租
|
||||
|
|
@ -409,7 +417,8 @@ const store = mainStore()
|
|||
const ruleFormRef = ref()
|
||||
const pageParams = route.params
|
||||
const cart = cartStore()
|
||||
const isType = localStorage.getItem('rolesType')
|
||||
const isType: any = localStorage.getItem('rolesType')
|
||||
const companyIdNew = store.userInfo.companyId
|
||||
|
||||
console.log(pageParams, 'pageParams')
|
||||
const backPath = ref<any>('')
|
||||
|
|
|
|||
|
|
@ -707,6 +707,13 @@ const picturePreview = (file: any) => {
|
|||
const handleRemove = (list: any, index: Number) => {
|
||||
list.splice(index, 1)
|
||||
}
|
||||
|
||||
const onTempDownLoad = ()=>{
|
||||
console.log('上传')
|
||||
}
|
||||
const onBatchUpload = ()=>{
|
||||
console.log('下载')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -808,6 +815,19 @@ const handleRemove = (list: any, index: Number) => {
|
|||
@click="handleUpdateUpDown(null, 1)"
|
||||
>批量下架</el-button
|
||||
>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
@click="onTempDownLoad()"
|
||||
>模板下载</el-button
|
||||
>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
@click="onBatchUpload()"
|
||||
>批量上传</el-button
|
||||
>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ div
|
|||
</div>
|
||||
</el-row>
|
||||
|
||||
<h1>维修费用</h1>
|
||||
<TitleTip :titleText="`维修费用`" />
|
||||
<el-form
|
||||
v-for="(item, index) in repairFormList"
|
||||
:key="item.newId"
|
||||
|
|
@ -238,6 +238,13 @@ div
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传4张
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
|
|
@ -251,7 +258,7 @@ div
|
|||
:currentIndex="index"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
:fileListN="item.fileInfoList"
|
||||
:minLimit="0"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
@onFileChange="onRepairFileChange"
|
||||
>
|
||||
|
|
@ -276,7 +283,12 @@ div
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="primary-lease" @click="onAddRepair">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
icon="Plus"
|
||||
@click="onAddRepair"
|
||||
>
|
||||
增加维修设备
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
|
@ -284,7 +296,7 @@ div
|
|||
</el-row>
|
||||
<div class="line"></div>
|
||||
|
||||
<h1>报废费用</h1>
|
||||
<TitleTip :titleText="`报废费用`" />
|
||||
<el-form
|
||||
:model="item"
|
||||
:key="item.newId"
|
||||
|
|
@ -348,6 +360,13 @@ div
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传4张
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
|
|
@ -361,7 +380,7 @@ div
|
|||
:currentIndex="index"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
:fileListN="item.fileInfoList"
|
||||
:minLimit="0"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
@onFileChange="onScrapFileChange"
|
||||
>
|
||||
|
|
@ -376,7 +395,7 @@ div
|
|||
type="danger"
|
||||
size="small"
|
||||
class="primary-lease"
|
||||
@click="onDeleteScrap"
|
||||
@click="onDeleteScrap(index)"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
|
|
@ -386,14 +405,19 @@ div
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="primary-lease" @click="onAddScrap">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
:icon="Plus"
|
||||
@click="onAddScrap"
|
||||
>
|
||||
增加报废设备
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="line"></div>
|
||||
<h1>丢失费用</h1>
|
||||
<TitleTip :titleText="`丢失费用`" />
|
||||
<el-form
|
||||
v-for="(item, index) in lossFormList"
|
||||
:key="item.newId"
|
||||
|
|
@ -452,7 +476,13 @@ div
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传4张
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
|
|
@ -464,7 +494,7 @@ div
|
|||
height="100px"
|
||||
:autoUpload="true"
|
||||
:multiple="true"
|
||||
:fileListN="item.fileInfoList"
|
||||
:minLimit="0"
|
||||
listType="picture-card"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
:actionUrl="uploadUrl"
|
||||
|
|
@ -481,7 +511,7 @@ div
|
|||
type="danger"
|
||||
size="small"
|
||||
class="primary-lease"
|
||||
@click="onDeleteLoss"
|
||||
@click="onDeleteLoss(index)"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
|
|
@ -491,7 +521,12 @@ div
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="primary-lease" @click="onAddLoss">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
icon="Plus"
|
||||
@click="onAddLoss"
|
||||
>
|
||||
增加丢失设备
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
|
@ -564,7 +599,13 @@ div
|
|||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="repairNum" align="center" label="维修数量" />
|
||||
<el-table-column prop="repairPrice" align="center" label="维修费用(元)" />
|
||||
<el-table-column prop="" align="center" label="附件" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<TitleTip :titleText="`报废费用明细`" />
|
||||
<el-table
|
||||
|
|
@ -581,7 +622,13 @@ div
|
|||
<el-table-column prop="scrapNum" align="center" label="报废数量" />
|
||||
<el-table-column prop="scrapReason" align="center" label="报废原因" />
|
||||
<el-table-column prop="scrapPrice" align="center" label="报废费用(元)" />
|
||||
<el-table-column prop="" align="center" label="附件" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<TitleTip :titleText="`丢失费用明细`" />
|
||||
<el-table
|
||||
|
|
@ -597,9 +644,45 @@ div
|
|||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="lossNum" align="center" label="丢失数量" />
|
||||
<el-table-column prop="lossPrice" align="center" label="丢失费用(元)" />
|
||||
<el-table-column align="center" label="附件" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<el-dialog v-model="innerVisible" width="500" title="附件详情" append-to-body>
|
||||
<el-table
|
||||
:data="viewFileInfoList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="fileName" align="center" label="文件名称" />
|
||||
<el-table-column align="center" label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
style="width: 60px; height: 60px"
|
||||
:src="row.fileUrl"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="[row.fileUrl]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
z-index="9999999999"
|
||||
:preview-teleported="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
|
@ -615,6 +698,7 @@ import {
|
|||
} from 'http/api/rent-termination/index'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
const addOrEditDialogVisible = ref(false)
|
||||
const leaseList = ref<any>([])
|
||||
|
|
@ -633,7 +717,10 @@ const scrapSelect = ref<any>([])
|
|||
const repairRecordList = ref([])
|
||||
const scrapRecordList = ref([])
|
||||
const lossRecordList = ref([])
|
||||
const viewFileInfoList = ref<any>([])
|
||||
const fileListAll = ref<any>([])
|
||||
const overhaulDetails = ref<any>({})
|
||||
const innerVisible = ref(false)
|
||||
const props2 = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
|
|
@ -787,53 +874,107 @@ const onAddScrap = () => {
|
|||
|
||||
// 维修模块设备选择时change事件
|
||||
const onChangeRepair = (maId: any, index: number) => {
|
||||
repairSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId) {
|
||||
repairFormList.value[index].deviceName = e.deviceName
|
||||
repairFormList.value[index].num = e.num
|
||||
repairFormList.value[index].typeId = e.typeId
|
||||
}
|
||||
})
|
||||
ElMessage.closeAll()
|
||||
try {
|
||||
repairSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
repairFormList.value[index].deviceName = e.deviceName
|
||||
repairFormList.value[index].num = e.num
|
||||
repairFormList.value[index].typeId = e.typeId
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
if (e.maId == maId && e.isCheck === 1) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '当前装备已选择,不可重复选择!',
|
||||
})
|
||||
repairFormList.value[index].maId = ''
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
}
|
||||
const onChangeLoss = (maId: any, index: number) => {
|
||||
lossSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId) {
|
||||
lossFormList.value[index].deviceName = e.deviceName
|
||||
lossFormList.value[index].num = e.num
|
||||
lossFormList.value[index].typeId = e.typeId
|
||||
}
|
||||
})
|
||||
ElMessage.closeAll()
|
||||
try {
|
||||
lossSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
lossFormList.value[index].deviceName = e.deviceName
|
||||
lossFormList.value[index].num = e.num
|
||||
lossFormList.value[index].typeId = e.typeId
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
if (e.maId == maId && e.isCheck === 1) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '当前装备已选择,不可重复选择!',
|
||||
})
|
||||
lossFormList.value[index].maId = ''
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
const onChangeScrap = (maId: any, index: number) => {
|
||||
scrapSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId) {
|
||||
scrapFormList.value[index].deviceName = e.deviceName
|
||||
scrapFormList.value[index].num = e.num
|
||||
scrapFormList.value[index].typeId = e.typeId
|
||||
}
|
||||
})
|
||||
ElMessage.closeAll()
|
||||
try {
|
||||
scrapSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
scrapFormList.value[index].deviceName = e.deviceName
|
||||
scrapFormList.value[index].num = e.num
|
||||
scrapFormList.value[index].typeId = e.typeId
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
if (e.maId == maId && e.isCheck === 1) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '当前装备已选择,不可重复选择!',
|
||||
})
|
||||
scrapFormList.value[index].maId = ''
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
}
|
||||
const onDeleteRepair = (index: number) => {
|
||||
try {
|
||||
repairSelect.value.forEach((e: any) => {
|
||||
if (e.maId == repairFormList.value[index].maId) {
|
||||
e.isCheck = 0
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
repairFormList.value.splice(index, 1)
|
||||
repairFormRefList.value.splice(index, 1)
|
||||
repairFormRefList.value.forEach((e: any) => {
|
||||
if (e) e.clearValidate()
|
||||
})
|
||||
}
|
||||
const onDeleteLoss = (index: number) => {
|
||||
try {
|
||||
lossSelect.value.forEach((e: any) => {
|
||||
if (e.maId == lossFormList.value[index].maId) {
|
||||
e.isCheck = 0
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
lossFormList.value.splice(index, 1)
|
||||
lossFormList.value.splice(index, 1)
|
||||
lossFormList.value.forEach((e: any) => {
|
||||
if (e) e.clearValidate()
|
||||
})
|
||||
lossFormRefList.value.splice(index, 1)
|
||||
}
|
||||
const onDeleteScrap = (index: number) => {
|
||||
try {
|
||||
scrapSelect.value.forEach((e: any) => {
|
||||
if (e.maId == scrapFormList.value[index].maId) {
|
||||
e.isCheck = 0
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
scrapFormList.value.splice(index, 1)
|
||||
scrapFormList.value.splice(index, 1)
|
||||
scrapFormList.value.forEach((e: any) => {
|
||||
if (e) e.clearValidate()
|
||||
})
|
||||
scrapFormRefList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
// 重置
|
||||
|
|
@ -855,18 +996,18 @@ const onRepublish = async (type: any, orderId: any) => {
|
|||
type == 1 ? (dialogTitle.value = '退租检测') : (dialogTitle.value = '检修明细')
|
||||
|
||||
if (type === 1) {
|
||||
const { data: res }: any = await getOrderDetailsByIdApi(getOverhaulApi)
|
||||
const { data: res }: any = await getOrderDetailsByIdApi(orderId)
|
||||
orderDetails.value = res
|
||||
repairSelect.value = res.detailsList
|
||||
lossSelect.value = res.detailsList
|
||||
scrapSelect.value = res.detailsList
|
||||
repairSelect.value = JSON.parse(JSON.stringify(res.detailsList))
|
||||
lossSelect.value = JSON.parse(JSON.stringify(res.detailsList))
|
||||
scrapSelect.value = JSON.parse(JSON.stringify(res.detailsList))
|
||||
orderDetails.value.orderId = orderId
|
||||
} else {
|
||||
const { data: res }: any = await getOverhaulApi(orderId)
|
||||
|
||||
repairRecordList.value = res.repairRecordList
|
||||
scrapRecordList.value = res.scrapRecordList
|
||||
lossRecordList.value = res.lossRecordList
|
||||
fileListAll.value = res.fileInfoList
|
||||
overhaulDetails.value = res
|
||||
}
|
||||
|
||||
|
|
@ -995,6 +1136,12 @@ const onClose = () => {
|
|||
scrapFormList.value = []
|
||||
}
|
||||
|
||||
const onViewFileImg = (row: any, index: number) => {
|
||||
viewFileInfoList.value = []
|
||||
viewFileInfoList.value = fileListAll.value.filter((e: any) => e.fileType == index)
|
||||
innerVisible.value = true
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getLeaseListData()
|
||||
})
|
||||
|
|
@ -1067,4 +1214,7 @@ h1 {
|
|||
background-color: #ccc;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
:deep.upload-tip .el-form-item__label {
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
import { ref } from 'vue'
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getOrderListApi, passApi, failApi } from 'http/api/usercenter/seekorder'
|
||||
import { getOrderListApi, passApi, failApi, confirmPriceApi } from 'http/api/usercenter/seekorder'
|
||||
import TitleTip from 'components/TitleTip/index.vue'
|
||||
import { getOverhaulApi } from 'http/api/rent-termination/index'
|
||||
import uploadComponent from 'components/uploadComponent/index.vue'
|
||||
import previewImg from './previewImg/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
|
@ -11,6 +13,15 @@ import type { FormInstance } from 'element-plus'
|
|||
const store = useStore()
|
||||
import { mainStore } from 'store/main'
|
||||
const store2 = mainStore()
|
||||
|
||||
const overhaulDetails = ref<any>({})
|
||||
const repairRecordList = ref([])
|
||||
const scrapRecordList = ref([])
|
||||
const lossRecordList = ref([])
|
||||
const orderDetailDtoList = ref([])
|
||||
const viewFileInfoList = ref<any>([])
|
||||
const fileListAll = ref<any>([])
|
||||
const innerVisible = ref(false)
|
||||
/* 查询参数 */
|
||||
const queryParams: any = ref({
|
||||
deviceName: '',
|
||||
|
|
@ -266,19 +277,6 @@ const tableData4: any = ref([
|
|||
jy1: '1400',
|
||||
},
|
||||
])
|
||||
//费用清单
|
||||
const handleViewList = () => {
|
||||
settleListTitle.value = '费用清单'
|
||||
moneyParams1.value = {
|
||||
/* 设备状态 */
|
||||
maStatus: 15,
|
||||
detectionList: [],
|
||||
insureList: [],
|
||||
picList: [],
|
||||
}
|
||||
// 打开费用清单弹框
|
||||
dialogFormVisibleSettleList.value = true
|
||||
}
|
||||
|
||||
const settleWordTitle = ref('')
|
||||
const dialogFormVisibleSettleWord: any = ref(false)
|
||||
|
|
@ -319,6 +317,58 @@ const confirmFail = async (index: number) => {
|
|||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const onViewOverhaulDetails = () => {}
|
||||
|
||||
//费用清单
|
||||
const handleViewList = async (orderId: any) => {
|
||||
settleListTitle.value = '费用清单'
|
||||
getOverhaulDetails(orderId)
|
||||
}
|
||||
const getOverhaulDetails = (orderId: any) => {
|
||||
getOverhaulApi(orderId).then((res: any) => {
|
||||
const { data } = res
|
||||
orderDetailDtoList.value = data.orderDetailDtoList
|
||||
repairRecordList.value = data.repairRecordList
|
||||
scrapRecordList.value = data.scrapRecordList
|
||||
lossRecordList.value = data.lossRecordList
|
||||
fileListAll.value = data.fileInfoList
|
||||
overhaulDetails.value = data
|
||||
dialogFormVisibleSettleList.value = true
|
||||
})
|
||||
}
|
||||
const onCostConfirm = (orderId: any) => {
|
||||
settleListTitle.value = '费用确认'
|
||||
getOverhaulDetails(orderId)
|
||||
}
|
||||
const onViewFileImg = (row: any, index: number) => {
|
||||
viewFileInfoList.value = []
|
||||
viewFileInfoList.value = fileListAll.value.filter((e: any) => e.fileType == index)
|
||||
innerVisible.value = true
|
||||
}
|
||||
|
||||
const costSubmit = () => {
|
||||
ElMessageBox.confirm(`是否确认本次订单费用无误,并提交?`, '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'success',
|
||||
})
|
||||
.then(async () => {
|
||||
const res: any = await confirmPriceApi({
|
||||
orderId: overhaulDetails.value.orderId,
|
||||
})
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '确认成功',
|
||||
})
|
||||
dialogFormVisibleSettleList.value = false
|
||||
// 刷新列表
|
||||
getList()
|
||||
}
|
||||
})
|
||||
.catch(async () => {})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -631,12 +681,28 @@ const confirmFail = async (index: number) => {
|
|||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == '6'"
|
||||
@click="handleViewList(j)"
|
||||
@click="handleViewList(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用清单
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 5 && item.isLeaseContent == 1"
|
||||
@click="onViewOverhaulDetails()"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
检修详情
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 5 && item.isLeaseContent == 1"
|
||||
@click="onCostConfirm(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
|
@ -969,150 +1035,190 @@ const confirmFail = async (index: number) => {
|
|||
:title="settleListTitle"
|
||||
width="65%"
|
||||
align-center
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="height: 80px">
|
||||
<div
|
||||
class="info"
|
||||
style="margin-top: 5px; margin-bottom: 8px; display: flex; flex-wrap: wrap"
|
||||
<el-row
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
letter-spacing: 1px;
|
||||
padding: 0 10px 20px;
|
||||
"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
<span>订单编号:</span>
|
||||
<span>{{ overhaulDetails.code }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<span>装备套数:</span>
|
||||
<span>{{ overhaulDetails.maNumber }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<span>退租时间:</span>
|
||||
<span>{{ overhaulDetails.rentEndTime }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row
|
||||
style="
|
||||
display: flex;
|
||||
letter-spacing: 1px;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px 20px;
|
||||
"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
<span>结算单位:</span>
|
||||
<span>{{ overhaulDetails.leaseCompany }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<span>租赁天数:</span>
|
||||
<span>{{ overhaulDetails.rentDay }}</span>
|
||||
</div>
|
||||
<div style="flex: 1; color: transparent">
|
||||
<span>租赁天数:</span>
|
||||
<span>999</span>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<div style="padding: 6px 0 0 0; font-size: 18px; font-weight: bold; color: #eb190a">
|
||||
总费用(元): <span>{{ overhaulDetails.totalCost }}</span>
|
||||
</div>
|
||||
<TitleTip :titleText="`租赁费用明细`" />
|
||||
<el-table
|
||||
:data="orderDetailDtoList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="deviceName" align="center" label="装备名称" />
|
||||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="num" align="center" label="数量" />
|
||||
<el-table-column align="center" label="租赁单价(元/天)">
|
||||
<template #default="{ row }">
|
||||
<span style="color: #eb190a">
|
||||
{{ row.dayLeasePrice }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="days" align="center" label="租赁天数" />
|
||||
<el-table-column prop="days" align="center" label="租期">
|
||||
<template #default="{ row }">
|
||||
{{ `${row.rentBeginTime}至${row.rentEndTime} ` }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costs" align="center" label="租赁费用(元)" width="160" />
|
||||
</el-table>
|
||||
<TitleTip :titleText="`维修费用明细`" />
|
||||
<el-table
|
||||
:data="repairRecordList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="deviceName" align="center" label="装备名称" />
|
||||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="repairNum" align="center" label="维修数量" />
|
||||
<el-table-column prop="repairPrice" align="center" label="维修费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<TitleTip :titleText="`报废费用明细`" />
|
||||
<el-table
|
||||
:data="scrapRecordList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="deviceName" align="center" label="装备名称" />
|
||||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="scrapNum" align="center" label="报废数量" />
|
||||
<el-table-column prop="scrapReason" align="center" label="报废原因" />
|
||||
<el-table-column prop="scrapPrice" align="center" label="报废费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<TitleTip :titleText="`丢失费用明细`" />
|
||||
<el-table
|
||||
:data="lossRecordList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="deviceName" align="center" label="装备名称" />
|
||||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="lossNum" align="center" label="丢失数量" />
|
||||
<el-table-column prop="lossPrice" align="center" label="丢失费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog v-model="innerVisible" width="500" title="附件详情" append-to-body>
|
||||
<el-table
|
||||
:data="viewFileInfoList"
|
||||
border
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 16px;
|
||||
margin-left: 40px;
|
||||
"
|
||||
>
|
||||
<span>订单编号:10000212135656</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="width: 30%; flex-shrink: 0; margin-bottom: 5px; font-size: 16px"
|
||||
>
|
||||
<span>装备套数:2套</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="width: 30%; flex-shrink: 0; margin-bottom: 5px; font-size: 16px"
|
||||
>
|
||||
<span>退租时间:2024-10-10 10:00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info" style="margin-top: 5px; display: flex; flex-wrap: wrap">
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 16px;
|
||||
margin-left: 40px;
|
||||
"
|
||||
>
|
||||
<span>结算单位:安徽送变电公司</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="width: 30%; flex-shrink: 0; margin-bottom: 5px; font-size: 16px"
|
||||
>
|
||||
<span>租赁天数:30{{ '/天' }}</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="width: 30%; flex-shrink: 0; margin-bottom: 5px; font-size: 16px"
|
||||
>
|
||||
<span>租赁费用(元):1800</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<span class="title-sign"></span>
|
||||
<span class="title-text">租赁费用明细</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
class="table"
|
||||
style="margin-left: 50px; width: 1100px"
|
||||
row-key="id"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{ background: 'white', color: 'black' }"
|
||||
>
|
||||
<el-table-column align="center" prop="name1" label="装备名称" />
|
||||
<el-table-column align="center" prop="name2" label="型号" />
|
||||
<el-table-column align="center" prop="name3" label="数量" />
|
||||
<el-table-column label="租赁单价(元/日)" align="center" prop="jy1" />
|
||||
<el-table-column label="租赁天数" align="center" prop="jy2" />
|
||||
<el-table-column label="租期" align="center" prop="jy3" />
|
||||
<el-table-column label="租期费用" align="center" prop="jy4" />
|
||||
</el-table>
|
||||
<div class="title">
|
||||
<span class="title-sign"></span>
|
||||
<span class="title-text">维修费用明细</span>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
class="table"
|
||||
style="margin-left: 50px; width: 1100px"
|
||||
row-key="id"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{ background: 'white', color: 'black' }"
|
||||
>
|
||||
<el-table-column align="center" prop="name1" label="装备名称" />
|
||||
<el-table-column align="center" prop="name2" label="型号" />
|
||||
<el-table-column align="center" prop="name3" label="维修数量" />
|
||||
<el-table-column label="维修类型" align="center" prop="jy1" />
|
||||
<el-table-column label="维修状态" align="center" prop="jy2" />
|
||||
<el-table-column label="维修费用(元)" align="center" prop="jy3" />
|
||||
</el-table>
|
||||
<div class="title">
|
||||
<span class="title-sign"></span>
|
||||
<span class="title-text">报废费用明细</span>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
:data="tableData3"
|
||||
class="table"
|
||||
style="margin-left: 50px; width: 1100px"
|
||||
row-key="id"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{ background: 'white', color: 'black' }"
|
||||
>
|
||||
<el-table-column align="center" prop="name1" label="装备名称" />
|
||||
<el-table-column align="center" prop="name2" label="型号" />
|
||||
<el-table-column align="center" prop="name3" label="报废数量" />
|
||||
<el-table-column label="报废原因" align="center" prop="jy1" />
|
||||
<el-table-column label="报废费用(元)" align="center" prop="jy2" />
|
||||
</el-table>
|
||||
<div class="title">
|
||||
<span class="title-sign"></span>
|
||||
<span class="title-text">丢失费用明细</span>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
:data="tableData4"
|
||||
class="table"
|
||||
style="margin-left: 50px; width: 1100px"
|
||||
row-key="id"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{ background: 'white', color: 'black' }"
|
||||
>
|
||||
<el-table-column align="center" prop="name1" label="装备名称" />
|
||||
<el-table-column align="center" prop="name2" label="型号" />
|
||||
<el-table-column align="center" prop="name3" label="丢失数量" />
|
||||
<el-table-column label="报废费用(元)" align="center" prop="jy1" />
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<el-table-column prop="fileName" align="center" label="文件名称" />
|
||||
<el-table-column align="center" label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
style="width: 60px; height: 60px"
|
||||
:src="row.fileUrl"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="[row.fileUrl]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
:z-index="9999999999"
|
||||
:preview-teleported="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<template #footer v-if="settleListTitle === '费用确认'">
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="closeDialogBtn">关 闭</el-button>
|
||||
<el-button @click="submitBtn" type="success"> 保存 </el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
() => {
|
||||
dialogFormVisibleSettleList = false
|
||||
}
|
||||
"
|
||||
>关 闭</el-button
|
||||
>
|
||||
<el-button @click="costSubmit" type="primary"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
@ -1399,12 +1505,13 @@ const confirmFail = async (index: number) => {
|
|||
}
|
||||
|
||||
.handle-btn {
|
||||
padding: 0 6px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
.el-button {
|
||||
flex: 1;
|
||||
width: calc((100% - 50px) / 4);
|
||||
margin: 0;
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue