冲突合并

This commit is contained in:
BianLzhaoMin 2024-12-02 15:55:35 +08:00
commit bcde57e771
4 changed files with 571 additions and 453 deletions

26
components.d.ts vendored
View File

@ -13,8 +13,34 @@ declare module 'vue' {
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElCountdown: typeof import('element-plus/es')['ElCountdown']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
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']
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps']
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

@ -308,29 +308,29 @@ const routes: Array<RouteRecordRaw> = [
// },
// },
// /* 订单管理(订单详情承租) */
// {
// path: 'orderManagementInfo',
// name: 'orderManagementInfo',
// component: () => import('@/views/user/orderManagement/detail.vue'),
// meta: {
// title: '订单详情',
// keepAlive: true,
// AuthFlag: false,
// isLogin: false
// },
// },
{
path: 'orderManagementInfo',
name: 'orderManagementInfo',
component: () => import('@/views/user/orderManagement/detail.vue'),
meta: {
title: '订单详情',
keepAlive: true,
AuthFlag: false,
isLogin: false
},
},
// /* 订单管理(退租) */
// {
// path: 'rentinTermination',
// name: 'rentinTermination',
// component: () => import('views/user/orderManagement/orderCom/rentinTermination.vue'),
// meta: {
// title: '订单管理(退租)',
// keepAlive: true,
// AuthFlag: false,
// isLogin: true
// },
// },
{
path: 'rentinTermination',
name: 'rentinTermination',
component: () => import('views/user/orderManagement/orderCom/rentinTermination.vue'),
meta: {
title: '订单管理(退租)',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
// /* 订单管理(续租) */
// {
// path: 'renewalOfLease',

View File

@ -47,6 +47,8 @@ import imgSrc from '@/assets/img/logo.png'
const handleSelect = (name: any, path: any) => {
// store.editcurrentMenuItem(name)
store.editcurrentMenuItem(name)
router.push({
name,
})

View File

@ -45,8 +45,8 @@ const statusList = [
/** 查询列表 */
const getList = async () => {
if (time.value.length > 0) {
const dateStart = new Date(time.value[0]);
const dateEnd = new Date(time.value[1]);
const dateStart = new Date(time.value[0])
const dateEnd = new Date(time.value[1])
queryParams.value.startTime = dateStart.toLocaleDateString('en-CA')
queryParams.value.endTime = dateEnd.toLocaleDateString('en-CA')
} else {
@ -87,80 +87,116 @@ const resetTableList = (formEl: FormInstance | undefined) => {
//
const onChangeCompany = (e: boolean, index: number, item: any) => {
cardList.value[index].detailsList.forEach((item: any) => {
if(item.orderStatus=="2"){
item.isChecked = e;
if (item.orderStatus == '2') {
item.isChecked = e
}
})
}
//
const onChangeGoods = (index: number) => {
let flag = true;
let flag = true
for (let item of cardList.value[index].detailsList) {
if (item.orderStatus == "2" && item.isChecked != true) {
flag = false;
break;
if (item.orderStatus == '2' && item.isChecked != true) {
flag = false
break
}
}
cardList.value[index].isChecked = flag;
cardList.value[index].isChecked = flag
}
//
const confirmPass = async (index: number) => {
let ids: number[] = []
cardList.value[index].detailsList.forEach((item: any) => {
if (item.orderStatus == '2' && item.isChecked == true) {
console.log(2222222222)
ids.push(item.id)
}
})
console.log('ids', ids)
if (ids.length == 0) {
ElMessage({
showClose: false,
message: '请选择装备',
type: 'error',
})
return
} else {
ElMessageBox.confirm('是否确定出库?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
return passApi({'orderId':cardList.value[index].orderId,'orderStatus':3})
})
.then(() => {
return passApi({ ids: ids, orderStatus: 3 })
// return removeDeviceApi([row.maId])
}).then((res) => {
})
.then((res) => {
if (res.code === 200) {
ElMessage({
type: 'success',
message: '出库成功'
message: '出库成功',
})
numberTemp.value = numberTemp.value+1;
numberTemp.value = numberTemp.value + 1
getList()
}
}).catch(() => {})
})
.catch(() => {})
}
}
//
const confirmFail = async (index: number) => {
ElMessageBox.confirm('是否确定取消?', {
let ids: number[] = []
cardList.value[index].detailsList.forEach((item: any) => {
if (item.orderStatus == '2' && item.isChecked == true) {
ids.push(item.id)
}
})
console.log('ids', ids)
if (ids.length == 0) {
ElMessage({
showClose: false,
message: '请选择装备',
type: 'error',
})
return
} else {
ElMessageBox.confirm('是否确定驳回?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
return failApi({'orderId':cardList.value[index].orderId,'orderStatus':7})
})
.then(() => {
return failApi({ ids: ids, orderStatus: 7 })
// return removeDeviceApi([row.maId])
}).then((res) => {
})
.then((res) => {
if (res.code === 200) {
ElMessage({
type: 'success',
message: '取消成功'
message: '驳回成功',
})
numberTemp.value = numberTemp.value+1;
numberTemp.value = numberTemp.value + 1
getList()
}
}).catch(() => {})
})
.catch(() => {})
}
}
//
const isExpired = (goods: any) => {
//
const today = new Date();
today.setHours(0, 0, 0, 0);
const today = new Date()
today.setHours(0, 0, 0, 0)
// endtimeDate
const endTime = new Date(goods.endTime.replace(/-/g, "/"));
const endTime = new Date(goods.rentEndTime.replace(/-/g, '/'))
// endtime
return endTime < today;
return endTime < today
}
/* 退租按钮 */
@ -330,7 +366,7 @@ const handleFileSuccess2 = (response: any) => {
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
// 退
dialogFormVisibleSettlein.value = true
@ -386,7 +422,7 @@ const tableData: any = ref([
jy7: '',
jy8: '',
remark: '备注2',
}
},
])
const partItems1: any = ref([{}])
@ -402,21 +438,21 @@ const dialogFormVisibleSettlemoney: any = ref(false)
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
moneyParams2.value = {
/* 设备状态 */
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
moneyParams3.value = {
/* 设备状态 */
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
// 退
dialogFormVisibleSettlemoney.value = true
@ -424,31 +460,31 @@ const dialogFormVisibleSettlemoney: any = ref(false)
//
const addPartItem1 = () => {
partItems1.value.push({ partType: "", num: "", isCharge: "" });
partItems1.value.push({ partType: '', num: '', isCharge: '' })
}
const removePartItem1 = (index: number) => {
if (partItems1.value.length > 1) {
partItems1.value.splice(index, 1);
partItems1.value.splice(index, 1)
}
}
//
const addPartItem2 = () => {
partItems2.value.push({ partType: "", num: "", isCharge: "" });
partItems2.value.push({ partType: '', num: '', isCharge: '' })
}
const removePartItem2 = (index: number) => {
if (partItems2.value.length > 1) {
partItems2.value.splice(index, 1);
partItems2.value.splice(index, 1)
}
}
//
const addPartItem3 = () => {
partItems3.value.push({ partType: "", num: "", isCharge: "" });
partItems3.value.push({ partType: '', num: '', isCharge: '' })
}
const removePartItem3 = (index: number) => {
if (partItems3.value.length > 1) {
partItems3.value.splice(index, 1);
partItems3.value.splice(index, 1)
}
}
@ -473,7 +509,7 @@ const tableData1: any = ref([
jy2: '31',
jy3: '2024-11-25 至2024-12-25',
jy4: '1600',
}
},
])
const tableData2: any = ref([
{
@ -491,7 +527,7 @@ const tableData2: any = ref([
jy1: '类型2',
jy2: '维修中',
jy3: '1500',
}
},
])
const tableData3: any = ref([
{
@ -507,7 +543,7 @@ const tableData3: any = ref([
name3: '3台',
jy1: '轻度维修',
jy2: '1400',
}
},
])
const tableData4: any = ref([
{
@ -521,7 +557,7 @@ const tableData4: any = ref([
name2: '测试4-2',
name3: '3台',
jy1: '1400',
}
},
])
//
const handleViewList = () => {
@ -531,7 +567,7 @@ const tableData4: any = ref([
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
//
dialogFormVisibleSettleList.value = true
@ -565,7 +601,7 @@ const tableData5: any = ref([
jy7: '',
jy8: '',
remark: '备注2',
}
},
])
const settleRepairTitle = ref('')
//
@ -578,38 +614,23 @@ const dialogFormVisibleSettleRepair: any = ref(false)
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
picList: [],
}
//
dialogFormVisibleSettleRepair.value = true
}
const settleWordTitle = ref('')
const dialogFormVisibleSettleWord: any = ref(false)
//
const handleViewWord = () => {
settleWordTitle.value = '租赁协议'
console.log(12313131)
moneyParams1.value = {
/* 设备状态 */
maStatus: 15,
detectionList: [],
insureList: [],
picList: []
}
//
dialogFormVisibleSettleWord.value = true
}
</script>
<template>
<!-- 订单管理 -->
<div class="container">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" size="default" label-width="0">
<el-form
:model="queryParams"
ref="queryFormRef"
:inline="true"
size="default"
label-width="0"
>
<el-row>
<el-col :span="6">
<el-form-item prop="deviceName">
@ -719,7 +740,12 @@ const dialogFormVisibleSettleWord: any = ref(false)
<el-col :span="6">
<div
class="item"
style="flex-shrink: 0; margin-bottom: 5px; font-size: 15px; margin-top: 5px;"
style="
flex-shrink: 0;
margin-bottom: 5px;
font-size: 15px;
margin-top: 5px;
"
>
<span>订单编号:</span>
{{ item.code }}
@ -728,7 +754,12 @@ const dialogFormVisibleSettleWord: any = ref(false)
<el-col :span="6">
<div
class="item"
style="flex-shrink: 0; margin-bottom: 5px; font-size: 15px; margin-top: 5px;"
style="
flex-shrink: 0;
margin-bottom: 5px;
font-size: 15px;
margin-top: 5px;
"
>
<span>下单时间:</span>
{{ item.orderTime }}
@ -737,14 +768,28 @@ const dialogFormVisibleSettleWord: any = ref(false)
<el-col :span="7">
<div
class="item"
style="flex-shrink: 0; margin-bottom: 5px; font-size: 15px; margin-top: 5px;"
style="
flex-shrink: 0;
margin-bottom: 5px;
font-size: 15px;
margin-top: 5px;
"
>
<span>装备所属公司:</span>
{{ item.czcompanyName }}
</div>
</el-col>
<el-col :span="5">
<div style="flex-shrink: 0; margin-bottom: 1px; font-size: 7px; display: flex;justify-content: center; margin-top: 5px;">
<div
style="
flex-shrink: 0;
margin-bottom: 1px;
font-size: 7px;
display: flex;
justify-content: center;
margin-top: 5px;
"
>
<el-button
v-if="item.orderStatus == '2'"
class="item"
@ -797,12 +842,18 @@ const dialogFormVisibleSettleWord: any = ref(false)
</el-col>
</el-row>
<el-row class="cart-listAll" :style="{background: item.orderStatus=='6' ? '#EBEEF5':'white'}">
<el-row class="cart-list" v-for="(goods, j) in item.detailsList" :key="j">
<el-col :span="1">
<!-- <div style="text-align: center">
<el-checkbox :key="numberTemp" v-model="goods.isChecked" @change="onChangeGoods(index)" :disabled="goods.orderStatus!='2'">
<div style="text-align: center">
<el-checkbox
:key="numberTemp"
v-model="goods.isChecked"
@change="onChangeGoods(index)"
:disabled="goods.orderStatus != '2'"
>
</el-checkbox>
</div> -->
</div>
-->
</el-col>
<el-col :span="7">
@ -812,11 +863,23 @@ const dialogFormVisibleSettleWord: any = ref(false)
<img :src="goods.url" alt="" />
</el-col>
<div class="goods-code">
<div style="font-size: 10px; font-weight: bold">{{ goods.deviceName }}</div>
<div style="font-size: 10px; font-weight: bold">
{{ goods.deviceName }}
</div>
<div>租期{{ goods.days }}{{ ' ' + '天' }}</div>
<div style="display:flex;justify-content:space-between;width:100%;">
<div style="flex:1;text-align:left;width:220px">租金{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}</div>
<div style="flex:1;text-align:left;">数量{{ goods.num }}{{ ' ' + '台' }}</div>
<div
style="
display: flex;
justify-content: space-between;
width: 100%;
"
>
<div style="flex: 1; text-align: left; width: 220px">
租金{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}
</div>
<div style="flex: 1; text-align: left">
数量{{ goods.num }}{{ ' ' + '台' }}
</div>
</div>
</div>
</el-col>
@ -844,39 +907,69 @@ const dialogFormVisibleSettleWord: any = ref(false)
{{ '待出库' }}
</div>
<div
v-if="item.orderStatus == '3'"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #C76F60"
v-if="goods.orderStatus == '3'"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #c76f60;
"
>
{{ '待收货' }}
</div>
<div
v-if="item.orderStatus == '4' && isExpired(item)"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #008D06"
v-if="goods.orderStatus == '4' && isExpired(goods)"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #008d06;
"
>
{{ '租赁中' }}
<span style="color: red">(已过期)</span>
</div>
<div
v-if="item.orderStatus == '4' && !isExpired(item)"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #008D06"
v-if="goods.orderStatus == '4' && !isExpired(goods)"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #008d06;
"
>
{{ '租赁中' }}
</div>
<div
v-if="item.orderStatus == '5'"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #5B33CC"
v-if="goods.orderStatus == '5'"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #5b33cc;
"
>
{{ '已退租' }}
</div>
<div
v-if="item.orderStatus == '6'"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #C00017"
v-if="goods.orderStatus == '6'"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #c00017;
"
>
{{ '已完成' }}
</div>
<div
v-if="item.orderStatus == '7'"
style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #797979"
v-if="goods.orderStatus == '7'"
style="
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #797979;
"
>
{{ '已驳回' }}
</div>
@ -900,7 +993,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
租赁协议
</el-button>
<el-button
v-if="item.orderStatus=='5'"
v-if="goods.orderStatus == '5'"
@click="handleViewBack(j)"
type="primary"
size="small"
@ -909,7 +1002,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
退租检修
</el-button>
<el-button
v-if="item.orderStatus=='5'"
v-if="goods.orderStatus == '5'"
@click="handleViewMoney(j)"
type="primary"
size="small"
@ -918,7 +1011,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
费用结算
</el-button>
<el-button
v-if="item.orderStatus=='6'"
v-if="goods.orderStatus == '6'"
@click="handleViewRepair(j)"
type="primary"
size="small"
@ -927,7 +1020,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
检修详情
</el-button>
<el-button
v-if="item.orderStatus=='6'"
v-if="goods.orderStatus == '6'"
@click="handleViewList(j)"
type="primary"
size="small"
@ -945,7 +1038,6 @@ const dialogFormVisibleSettleWord: any = ref(false)
v-model:currentPage="queryParams.pageNumber"
:total="total"
/>
</div>
<!-- 退租检修弹框 -->
<el-dialog
@ -1103,10 +1195,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
<span class="imgItem__icon hide" @click="picturePreview(item)">
<i class="el-icon-zoom-in" />
</span>
<span
class="imgItem__icon hide"
@click="handleRemove(mainFileList, index)"
>
<span class="imgItem__icon hide" @click="handleRemove(mainFileList, index)">
<i class="el-icon-delete" />
</span>
</div>
@ -1536,7 +1625,8 @@ const dialogFormVisibleSettleWord: any = ref(false)
:title="settleListTitle"
width="65%"
align-center
:close-on-click-modal="false">
:close-on-click-modal="false"
>
<div style="height: 80px">
<div
class="info"
@ -1687,8 +1777,9 @@ const dialogFormVisibleSettleWord: any = ref(false)
<el-dialog
v-model="dialogFormVisibleSettleRepair"
:title="settleRepairTitle"
width="65%"
:close-on-click-modal="false">
width="60%"
:close-on-click-modal="false"
>
<div style="height: 80px">
<div
class="info"
@ -1707,7 +1798,6 @@ const dialogFormVisibleSettleWord: any = ref(false)
<span>订单编号10000212135656</span>
</div>
<div
class="item"
style="width: 48%; flex-shrink: 0; margin-bottom: 1px; font-size: 16px"
@ -1761,13 +1851,13 @@ const dialogFormVisibleSettleWord: any = ref(false)
v-model="dialogFormVisibleSettleWord"
:title="settleWordTitle"
width="50%"
:close-on-click-modal="false">
:close-on-click-modal="false"
>
<div>
<img src="@/assets/img/zuLin.png" style="
width: 600px;
height: 600px;
margin-left: 160px;
margin-right: 10px; "/>
<img
src="@/assets/img/zuLin.png"
style="width: 600px; height: 600px; margin-left: 160px; margin-right: 10px"
/>
</div>
<template #footer>
<span class="dialog-footer">