This commit is contained in:
BianLzhaoMin 2025-12-12 17:29:02 +08:00
parent f1b97845d9
commit 65ab44d2b0
3 changed files with 2122 additions and 2233 deletions

View File

@ -1,6 +1,13 @@
<template>
<div class="app-container app-container-content">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="auto">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-card class="search-box">
<el-row>
<el-col :span="24" style="display: flex; justify-content: space-between">
@ -29,7 +36,6 @@
</el-form-item>
</el-col>
<el-col span="5">
<el-form-item prop="dateRange" label="出库日期">
<el-date-picker
@ -68,21 +74,20 @@
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right;">
<el-col :span="24" style="text-align: right">
<el-form-item style="margin-top: 10px; padding-right: 20px">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item prop="lowerBound">
<el-input
v-model.trim="queryParams.lowerBound"
@ -130,12 +135,9 @@
</span>
</el-col>
<div class="order-type-box">
<el-tag
:type="orderType(item.orderStatus)"
effect="light"
<el-tag :type="orderType(item.orderStatus)" effect="light"
>{{ orderText(item.orderStatus) }}
</el-tag
>
</el-tag>
</div>
</el-row>
<el-row class="order-title-info">
@ -158,10 +160,7 @@
</span>
</el-col>
</el-row>
<el-row
style="border-bottom: 1px solid #ccc; margin-bottom: 10px"
class="order-title-info"
>
<el-row style="border-bottom: 1px solid #ccc; margin-bottom: 10px" class="order-title-info">
<el-col :span="8">
<span> 出租方姓名 </span>
<span> {{ item.sellerName }} </span>
@ -184,11 +183,7 @@
v-for="(goods, j) in item.detailsList"
:key="j"
class="order-items order-info"
:style="
j != item.detailsList.length - 1
? 'border-bottom:1px solid #f0f0f0'
: ''
"
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #f0f0f0' : ''"
style="min-height: 80px"
>
<img :src="goods.url" style="width: 110px; height: 70px" alt="" />
@ -207,31 +202,30 @@
{{ goods.deviceName }}
</el-row>
<el-row>
<el-col :span="4"> 租期 : {{ goods.days }}{{ ' ' + '天' }}</el-col>
<el-col :span="4"> 租期 : </el-col>
<el-col :span="8">
<span
<!-- <span
style="margin-right: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
item.orderStatus == 20 ? 'text-decoration: line-through' : ''
"
>
</span>
<span v-if="item.orderStatus == 20">
{{
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day'
'day',
) == 0
? 1
: momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day'
'day',
)
}}{{ ' ' + '天' }}
</span>
</span> -->
{{ goods.days }}{{ ' ' + '天' }}
<!-- {{ goods.days }}{{ ' ' + '天' }} -->
</el-col>
@ -239,12 +233,14 @@
<el-col :span="8"> {{ goods.code }}</el-col>
</el-row>
<el-row>
<!-- <el-col :span="4"> 租金</el-col>
<el-col :span="8">
<el-col :span="4"> 数量 : </el-col>
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
</el-row>
<el-row>
<el-col :span="4"> 日租金</el-col>
<el-col :span="8" style="color: #eb190a">
{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}
</el-col>-->
<el-col :span="6"> 数量 : {{ goods.num }}{{ ' ' + '台' }}</el-col>
<el-col :span="10"></el-col>
</el-col>
</el-row>
</div>
</div>
@ -267,11 +263,7 @@
v-for="(goods, j) in item.detailsList"
:key="j"
class="order-info"
:style="
j != item.detailsList.length - 1
? 'border-bottom:1px solid #f0f0f0'
: ''
"
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #f0f0f0' : ''"
style="min-height: 80px"
>
<div
@ -285,19 +277,12 @@
<div>租期</div>
<div
style="font-weight: bold; margin-top: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ formatDate(goods.rentBeginTime) }}{{ formatDate(goods.rentEndTime) }}
</div>
<div
style="font-weight: bold; margin-top: 10px"
v-if="item.orderStatus == 20"
>
<div style="font-weight: bold; margin-top: 10px" v-if="item.orderStatus == 20">
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}
{{ goods.rentOverTime ? goods.rentOverTime.slice(0, 10) : '' }}
</div>
@ -310,12 +295,20 @@
<!-- <el-button @click="handleViewOrder(item)" type="primary" size="small">
订单详情
</el-button> -->
<el-button v-show="item.orderStatus =='1'" @click="handleConfirm(item)" type="success" plain
<el-button
v-show="item.orderStatus == '1'"
@click="handleConfirm(item)"
type="success"
plain
size="small"
>
同意
</el-button>
<el-button v-show="item.orderStatus =='1'" @click="handelReject(item)" type="warning" plain
<el-button
v-show="item.orderStatus == '1'"
@click="handelReject(item)"
type="warning"
plain
size="small"
>
不同意
@ -323,10 +316,13 @@
<el-button type="primary" plain size="small" @click="handleApprove(item)"
>查看
</el-button
>
<el-button v-show="item.orderStatus =='2' && item.taskStatus != '3'" @click="handleOut(item)"
type="primary" plain size="small"
</el-button>
<el-button
v-show="item.orderStatus == '2' && item.taskStatus != '3'"
@click="handleOut(item)"
type="primary"
plain
size="small"
>
共享出库
</el-button>
@ -338,7 +334,6 @@
</div>
<div class="pagination-wrapper">
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -346,20 +341,8 @@
/>
</div>
</el-card>
<el-dialog
:title="dialogTitle"
width="65%"
destroy-on-close
:visible.sync="addOrEditDialogCostVisible"
>
<el-row
style="
display: flex;
letter-spacing: 1px;
padding: 0 10px 20px;
justify-content: space-between;
"
>
<el-dialog :title="dialogTitle" width="65%" destroy-on-close :visible.sync="addOrEditDialogCostVisible">
<el-row style="display: flex; letter-spacing: 1px; padding: 0 10px 20px; justify-content: space-between">
<div style="flex: 1">
<span>订单编号</span>
<span>{{ overhaulDetails.code }}</span>
@ -476,18 +459,10 @@
<el-table-column prop="repairChangePrice" 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
>
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)">查看 </el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
@ -537,18 +512,10 @@
<el-table-column prop="scrapChangePrice" 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
>
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)">查看 </el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
@ -597,13 +564,10 @@
<!-- <el-table-column prop="lossChangePrice" 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>
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"> 查看 </el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 附件详情 -->
@ -644,12 +608,12 @@
title="订单详情"
/>
</div>
</template>
<script>
import TitleTip from '@/components/TitleTip'
import { getOrderListApi, getOrderListInfoApi, getOverhaulApi, orderConfirm, orderReject } from '@/api/search/order'
import { getPriceShowConfigApi } from '@/api/common'
import moment from 'moment'
import OrderDetailDialog from '@/views/EquipmentSharedOrder/order/detail.vue'
import typeConfigRepair from '@/views/material/ma/typeConfigRepair/index.vue'
@ -671,11 +635,10 @@ export default {
showOrderDetail: false,
orderStatus: '',
orderId: '',
statusList:
[
statusList: [
{ id: '1', name: '待确认' },
{ id: '2', name: '已确认' },
{ id: '3', name: '已驳回' }
{ id: '3', name: '已驳回' },
],
ids: [],
//
@ -695,7 +658,7 @@ export default {
keyWord: undefined,
status: undefined,
lowerBound: undefined,
upperBound: undefined
upperBound: undefined,
},
//
cardList: [],
@ -711,11 +674,13 @@ export default {
overhaulDetails: {},
fileListAll: [],
innerVisible: false,
viewFileInfoList: []
viewFileInfoList: [],
isShowDayLeasePrice: false,
}
},
created() {
this.getList()
this.getPriceShowConfig()
},
methods: {
// YYYY-MM-DD
@ -725,7 +690,7 @@ export default {
return s.length >= 10 ? s.slice(0, 10) : s
},
orderText(status) {
const foundStatus = this.statusList.find(e => e.id === status)
const foundStatus = this.statusList.find((e) => e.id === status)
return foundStatus ? foundStatus.name : '未知状态'
// const filteredStatus = this.statusList.filter((e) => e.id == status)[0].name
// return filteredStatus ? filteredStatus.name : '';
@ -758,21 +723,18 @@ export default {
//
onChangeCompany(e, index, item) {
this.cardList[index].good_list.forEach(item => {
this.cardList[index].good_list.forEach((item) => {
item.isChecked = e
})
},
// list
onChangeGoods(index) {
this.cardList[index].isChecked = this.cardList[index].good_list.every(
(e) => e.isChecked === true
)
this.cardList[index].isChecked = this.cardList[index].good_list.every((e) => e.isChecked === true)
},
handleConfirm(item) {
//
orderConfirm(item.orderId).then(res => {
orderConfirm(item.orderId).then((res) => {
if (res.code == '200') {
item.orderStatus = '2'
this.$message.success(res.msg)
@ -784,7 +746,7 @@ export default {
handelReject(item) {
//
orderReject(item.orderId).then(res => {
orderReject(item.orderId).then((res) => {
if (res.code == '200') {
item.orderStatus = '3'
this.$message.success(res.msg)
@ -795,7 +757,10 @@ export default {
},
handleOut(item) {
console.log('🚀 ~ item:', item)
this.$router.push({ path: '/equipmentShared/order/sharedOutList', query: { id: item.orderId, isView: true } })
this.$router.push({
path: '/equipmentShared/order/sharedOutList',
query: { id: item.orderId, isView: true },
})
},
handleApprove(item) {
@ -828,7 +793,6 @@ export default {
}
})
this.addOrEditDialogCostVisible = true
},
//
@ -859,12 +823,17 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId)
this.ids = selection.map((item) => item.taskId)
this.single = selection.length != 1
this.multiple = !selection.length
}
}
},
//
getPriceShowConfig() {
getPriceShowConfigApi().then((res) => {
this.isShowDayLeasePrice = res?.rows[0].status == 0 ? true : false
})
},
},
}
</script>
<style lang="scss" scoped>
@ -911,14 +880,12 @@ export default {
margin-bottom: 14px;
border-radius: 10px;
border: 1px solid #169bd5;
box-shadow: 0 0 0 1px rgba(22, 155, 213, 0.2),
0 0 8px rgba(22, 155, 213, 0.3);
box-shadow: 0 0 0 1px rgba(22, 155, 213, 0.2), 0 0 8px rgba(22, 155, 213, 0.3);
transition: all 0.3s ease;
&:hover {
border-color: #0d7aa8;
box-shadow: 0 0 0 2px rgba(22, 155, 213, 0.3),
0 0 12px rgba(22, 155, 213, 0.4);
box-shadow: 0 0 0 2px rgba(22, 155, 213, 0.3), 0 0 12px rgba(22, 155, 213, 0.4);
}
.cart-user-info {
@ -1009,7 +976,6 @@ export default {
width: 95%;
}
.order-title-info {
position: relative;
padding: 8px 0;
@ -1061,7 +1027,6 @@ export default {
margin-top: 10px;
}
.handle-btn-4 {
width: 100%;
display: flex;

View File

@ -70,16 +70,17 @@
clearable
@keyup.enter.native="handleQuery"
maxlength="20"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right;">
<el-col :span="24" style="text-align: right">
<el-form-item style="margin-top: 10px; padding-right: 20px">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
@ -137,7 +138,7 @@
<span>{{ item.buyerName }}</span>
</el-col>
<el-col :span="8">
<span> 承租方所属单位 </span>
<span> 承租方所属单位--- </span>
<span>{{ item.companyName }}</span>
</el-col>
</el-row>
@ -153,7 +154,17 @@
style="min-height: 80px"
>
<img :src="goods.url" style="width: 110px; height: 70px" alt="设备图片" />
<div style="min-height: 80px; flex: 1; display: flex; justify-content: space-around; flex-direction: column; padding-left: 12px; font-size: 13px">
<div
style="
min-height: 80px;
flex: 1;
display: flex;
justify-content: space-around;
flex-direction: column;
padding-left: 12px;
font-size: 13px;
"
>
<el-row style="color: #169bd5; font-weight: bold">
{{ goods.deviceName }}
</el-row>
@ -162,16 +173,25 @@
<el-col :span="8">
<span
style="margin-right: 10px"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
:style="
item.orderStatus == 20 ? 'text-decoration: line-through' : ''
"
>
{{ goods.days }}
</span>
<span v-if="item.orderStatus == 20">
{{
momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') === 0
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) === 0
? 1
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day')
}}
: momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
}}
</span>
</el-col>
<el-col :span="4"> 编号</el-col>
@ -181,6 +201,12 @@
<el-col :span="4"> 数量</el-col>
<el-col :span="8"> {{ goods.num }} </el-col>
</el-row>
<el-row v-if="isShowDayLeasePrice">
<el-col :span="4"> 日租金</el-col>
<el-col :span="8" style="color: #eb190a">
{{ goods.dayLeasePrice }} / </el-col
>
</el-row>
</div>
</div>
</el-col>
@ -194,7 +220,14 @@
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #f0f0f0' : ''"
style="min-height: 80px"
>
<div style="display: flex; justify-content: center; align-items: center; flex-direction: column">
<div
style="
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
"
>
<div>租期</div>
<div
style="font-weight: bold; margin-top: 10px"
@ -250,7 +283,6 @@
<div class="pagination-wrapper">
<!-- 分页 -->
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -259,13 +291,8 @@
</div>
</el-card>
<!-- 检修详情弹窗 -->
<el-dialog
:title="dialogTitle"
width="65%"
destroy-on-close
:visible.sync="addOrEditDialogCostVisible"
>
<el-row style="display: flex; letter-spacing: 1px; padding: 0 10px 20px; justify-content: space-between;">
<el-dialog :title="dialogTitle" width="65%" destroy-on-close :visible.sync="addOrEditDialogCostVisible">
<el-row style="display: flex; letter-spacing: 1px; padding: 0 10px 20px; justify-content: space-between">
<div style="flex: 1">
<span>订单编号</span>
<span>{{ overhaulDetails.code }}</span>
@ -335,18 +362,9 @@
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)">查看</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
size="small"
@click="row.isCheck = row.isCheck === 0 ? 1 : 0"
>
<el-button type="primary" size="small" @click="row.isCheck = row.isCheck === 0 ? 1 : 0">
{{ row.isCheck === 0 ? '改价' : '取消改价' }}
</el-button>
</template>
@ -388,18 +406,9 @@
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)">查看</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
size="small"
@click="row.isCheck = row.isCheck === 0 ? 1 : 0"
>
<el-button type="primary" size="small" @click="row.isCheck = row.isCheck === 0 ? 1 : 0">
{{ row.isCheck === 0 ? '改价' : '取消改价' }}
</el-button>
</template>
@ -484,6 +493,7 @@
<script>
import TitleTip from '@/components/TitleTip'
import { getOrderListApi, getOrderListInfoApi, getOverhaulApi } from '@/api/search/order'
import { getPriceShowConfigApi } from '@/api/common'
import moment from 'moment'
import OrderDetailDialog from '@/views/EquipmentSharedOrder/order/detail.vue'
@ -515,7 +525,7 @@ export default {
keyWord: undefined,
status: undefined,
startTime: undefined,
endTime: undefined
endTime: undefined,
},
//
@ -535,11 +545,13 @@ export default {
viewFileInfoList: [],
//
momentInit: moment
momentInit: moment,
isShowDayLeasePrice: false,
}
},
created() {
this.getList()
this.getPriceShowConfig()
},
methods: {
// YYYY-MM-DD
@ -551,7 +563,7 @@ export default {
},
//
orderText(status) {
const foundStatus = this.statusList.find(e => e.id === status)
const foundStatus = this.statusList.find((e) => e.id === status)
return foundStatus ? foundStatus.name : '未知状态'
},
@ -577,11 +589,13 @@ export default {
this.queryParams.endTime = undefined
}
getOrderListApi(this.queryParams).then((res) => {
getOrderListApi(this.queryParams)
.then((res) => {
this.cardList = res.data.rows
this.total = res.data.total
this.loading = false
}).catch(() => {
})
.catch(() => {
this.loading = false
})
},
@ -615,9 +629,7 @@ export default {
//
onViewFileImg(row, index) {
this.viewFileInfoList = this.fileListAll
? this.fileListAll.filter(e => e.fileType === index)
: []
this.viewFileInfoList = this.fileListAll ? this.fileListAll.filter((e) => e.fileType === index) : []
this.innerVisible = true
},
@ -633,8 +645,15 @@ export default {
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
}
}
},
//
getPriceShowConfig() {
getPriceShowConfigApi().then((res) => {
this.isShowDayLeasePrice = res?.rows[0].status == 0 ? true : false
})
},
},
}
</script>
@ -645,19 +664,14 @@ export default {
margin-bottom: 14px;
border-radius: 10px;
border: 1px solid #169bd5;
box-shadow:
0 0 0 1px rgba(22, 155, 213, 0.2),
0 0 8px rgba(22, 155, 213, 0.3);
box-shadow: 0 0 0 1px rgba(22, 155, 213, 0.2), 0 0 8px rgba(22, 155, 213, 0.3);
// 0 4px 12px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.cart-tbody:hover {
border-color: #0d7aa8;
box-shadow:
0 0 0 2px rgba(22, 155, 213, 0.3),
0 0 12px rgba(22, 155, 213, 0.4),
0 6px 16px rgba(0, 0, 0, 0.12);
box-shadow: 0 0 0 2px rgba(22, 155, 213, 0.3), 0 0 12px rgba(22, 155, 213, 0.4), 0 6px 16px rgba(0, 0, 0, 0.12);
}
:deep .el-form--inline .el-form-item {

View File

@ -1,6 +1,13 @@
<template>
<div class="app-container app-container-content">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-row>
<el-form-item prop="deviceName">
<el-input
@ -13,12 +20,7 @@
</el-form-item>
<el-form-item prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable>
<el-option
v-for="item in statusList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item prop="dateRange">
@ -99,11 +101,9 @@
</span>
</el-col>
<div class="order-type-box">
<el-tag
:type="orderType(item.orderStatus)"
effect="light"
>{{ orderText(item.orderStatus) }}</el-tag
>
<el-tag :type="orderType(item.orderStatus)" effect="light">{{
orderText(item.orderStatus)
}}</el-tag>
</div>
</el-row>
<el-row class="order-title-info">
@ -126,10 +126,7 @@
</span>
</el-col>
</el-row>
<el-row
style="border-bottom: 1px solid #ccc; margin-bottom: 10px"
class="order-title-info"
>
<el-row style="border-bottom: 1px solid #ccc; margin-bottom: 10px" class="order-title-info">
<el-col :span="8">
<span> 出租方姓名 </span>
<span> {{ item.sellerName }} </span>
@ -152,11 +149,7 @@
v-for="(goods, j) in item.detailsList"
:key="j"
class="order-items order-info"
:style="
j != item.detailsList.length - 1
? 'border-bottom:1px solid #eee'
: ''
"
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #eee' : ''"
style="min-height: 80px"
>
<img :src="goods.url" style="width: 110px; height: 70px" alt="" />
@ -179,25 +172,15 @@
<el-col :span="8">
<span
style="margin-right: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ goods.days }}{{ ' ' + '天' }}
</span>
<span v-if="item.orderStatus == 20">
{{
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) == 0
momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') == 0
? 1
: momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day')
}}{{ ' ' + '天' }}
</span>
@ -208,9 +191,7 @@
</el-row>
<el-row>
<el-col :span="4"> 租金 </el-col>
<el-col :span="8">
{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}
</el-col>
<el-col :span="8"> {{ goods.dayLeasePrice }}{{ ' ' + '元/天' }} </el-col>
<el-col :span="4"> 数量 </el-col>
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
</el-row>
@ -220,15 +201,10 @@
<el-col :span="3" class="order-items-info">
<div>总费用</div>
<div
class="red-font"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
<div class="red-font" :style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''">
{{ item.cost }}
</div>
<div class="red-font" v-if="item.orderStatus == 20">
{{ item.totalRealPrice }}
</div>
<div class="red-font" v-if="item.orderStatus == 20"> {{ item.totalRealPrice }} </div>
</el-col>
<el-col :span="4" class="order-items-info">
@ -236,11 +212,7 @@
v-for="(goods, j) in item.detailsList"
:key="j"
class="order-info"
:style="
j != item.detailsList.length - 1
? 'border-bottom:1px solid #eee'
: ''
"
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #eee' : ''"
style="min-height: 80px"
>
<div
@ -254,19 +226,12 @@
<div>租期</div>
<div
style="font-weight: bold; margin-top: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ goods.rentBeginTime }}{{ goods.rentEndTime }}
</div>
<div
style="font-weight: bold; margin-top: 10px"
v-if="item.orderStatus == 20"
>
<div style="font-weight: bold; margin-top: 10px" v-if="item.orderStatus == 20">
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}
{{ goods.rentOverTime ? goods.rentOverTime.slice(0, 10) : '' }}
</div>
@ -278,11 +243,7 @@
v-for="(goods, j) in item.detailsList"
:key="j"
class="order-info"
:style="
j != item.detailsList.length - 1
? 'border-bottom:1px solid #eee'
: ''
"
:style="j != item.detailsList.length - 1 ? 'border-bottom:1px solid #eee' : ''"
style="min-height: 80px; width: 95%"
>
<el-tag :type="orderType(goods.orderStatus)" effect="light">{{
@ -291,12 +252,9 @@
</div>
</el-col>
<el-col :span="6" style="display: flex; align-items: center;">
<el-col :span="6" style="display: flex; align-items: center">
<div class="handle-btn">
<el-button @click="handleViewOrder(item)" type="primary" size="small">
订单详情
</el-button>
<el-button @click="handleViewOrder(item)" type="primary" size="small"> 订单详情 </el-button>
<el-button
v-if="item.orderStatus == 20"
@click="handleViewRepair(item)"
@ -311,27 +269,14 @@
</div>
</template>
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog
:title="dialogTitle"
width="65%"
destroy-on-close
:visible.sync="addOrEditDialogCostVisible"
>
<el-row
style="
display: flex;
letter-spacing: 1px;
padding: 0 10px 20px;
justify-content: space-between;
"
>
<el-dialog :title="dialogTitle" width="65%" destroy-on-close :visible.sync="addOrEditDialogCostVisible">
<el-row style="display: flex; letter-spacing: 1px; padding: 0 10px 20px; justify-content: space-between">
<div style="flex: 1">
<span>订单编号</span>
<span>{{ overhaulDetails.code }}</span>
@ -383,22 +328,12 @@
{{ row.costs }}
</template>
<template v-else>
<el-input
v-model="row.costs"
style="width: 100%"
placeholder="请输入改价费用"
clearable
/>
<el-input v-model="row.costs" style="width: 100%" placeholder="请输入改价费用" clearable />
</template>
</template>
</el-table-column>
<el-table-column prop="changeCost" align="center" label="改价后费用(元)" />
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
@ -448,17 +383,10 @@
<el-table-column prop="repairChangePrice" 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
>
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)">查看</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
@ -508,17 +436,10 @@
<el-table-column prop="scrapChangePrice" 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
>
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)">查看</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="160"
v-if="dialogTitle === '费用结算'"
>
<el-table-column align="center" label="操作" width="160" v-if="dialogTitle === '费用结算'">
<template #default="{ row }">
<el-button
type="primary"
@ -567,13 +488,10 @@
<el-table-column prop="lossChangePrice" 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>
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"> 查看 </el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 附件详情 -->
@ -608,16 +526,15 @@
</el-table>
</el-dialog>
</div>
</template>
<script>
import TitleTip from '@/components/TitleTip'
import { getOrderListApi,getOrderListInfoApi,getOverhaulApi } from "@/api/search/order";
import { getOrderListApi, getOrderListInfoApi, getOverhaulApi } from '@/api/search/order'
import moment from 'moment'
export default {
components: { TitleTip },
name: "order",
name: 'order',
// dicts: ['purchase_task_status'],
data() {
return {
@ -629,8 +546,7 @@
multiple: true,
//
showSearch: true,
statusList:
[
statusList: [
{ id: '1', name: '待接单' },
{ id: '2', name: '待出库' },
{ id: '3', name: '待收货' },
@ -650,7 +566,7 @@
//
tableList: [],
//
title: "",
title: '',
//
open: false,
//
@ -679,15 +595,15 @@
fileListAll: [],
innerVisible: false,
viewFileInfoList: [],
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
orderText(status) {
const foundStatus = this.statusList.find(e => e.id === status);
return foundStatus ? foundStatus.name : '未知状态';
const foundStatus = this.statusList.find((e) => e.id === status)
return foundStatus ? foundStatus.name : '未知状态'
// const filteredStatus = this.statusList.filter((e) => e.id == status)[0].name
// return filteredStatus ? filteredStatus.name : '';
},
@ -700,7 +616,7 @@
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
if (this.time.length > 0) {
const dateStart = new Date(this.time[0])
const dateEnd = new Date(this.time[1])
@ -711,32 +627,29 @@
this.queryParams.endTime = undefined
}
getOrderListApi(this.queryParams).then((res) => {
this.cardList = res.data.rows;
this.total = res.data.total;
this.loading = false;
});
this.cardList = res.data.rows
this.total = res.data.total
this.loading = false
})
},
//
onChangeCompany(e, index, item) {
this.cardList[index].good_list.forEach(item=>{
item.isChecked = e;
this.cardList[index].good_list.forEach((item) => {
item.isChecked = e
})
},
// list
onChangeGoods(index) {
this.cardList[index].isChecked = this.cardList[index].good_list.every(
(e) => e.isChecked === true,
)
this.cardList[index].isChecked = this.cardList[index].good_list.every((e) => e.isChecked === true)
},
//
handleViewOrder(row) {
this.$router.push({
path: '/search/order/orderDetail',
query: { orderStatus:row.orderStatus,orderId:row.orderId }
query: { orderStatus: row.orderStatus, orderId: row.orderId },
})
},
@ -746,57 +659,55 @@
this.viewOrderDetailsOrderId = item.orderId
this.dialogTitle = '检修详情'
getOrderListInfoApi({ orderId: this.viewOrderDetailsOrderId }).then(async (res) => {
this.orderDetails = res.data;
this.orderDetails = res.data
if (item.orderStatus == 20) {
await getOverhaulApi(this.viewOrderDetailsOrderId).then((resTwo) => {
this.orderDetailDtoList = resTwo.data.orderDetailDtoList;
this.repairRecordList = resTwo.data.repairRecordList;
this.scrapRecordList = resTwo.data.scrapRecordList;
this.lossRecordList = resTwo.data.lossRecordList;
this.fileListAll = resTwo.data.fileInfoList;
this.overhaulDetails = resTwo.data;
})}
});
this.orderDetailDtoList = resTwo.data.orderDetailDtoList
this.repairRecordList = resTwo.data.repairRecordList
this.scrapRecordList = resTwo.data.scrapRecordList
this.lossRecordList = resTwo.data.lossRecordList
this.fileListAll = resTwo.data.fileInfoList
this.overhaulDetails = resTwo.data
})
}
})
this.addOrEditDialogCostVisible = true
},
//
onViewFileImg(row, index) {
this.viewFileInfoList = [];
this.viewFileInfoList = []
if (this.fileListAll) {
this.fileListAll.forEach((e) => {
if (e.fileType == index) {
this.viewFileInfoList.push(e);
this.viewFileInfoList.push(e)
}
});
})
}
this.innerVisible = true;
this.innerVisible = true
},
/** 重置按钮操作 */
async resetQuery() {
await this.resetForm("queryForm");
await this.resetForm('queryForm')
this.dateRange = []
this.queryParams.keyWord = null;
this.queryParams.keyWord = null
this.time = []
await this.handleQuery();
await this.handleQuery()
},
/** 搜索按钮操作 */
async handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId)
this.ids = selection.map((item) => item.taskId)
this.single = selection.length != 1
this.multiple = !selection.length
},
},
}
};
</script>
<style lang="scss" scoped>
/* .uploadImg {
@ -914,7 +825,6 @@
width: 95%;
}
.order-title-info {
position: relative;
padding: 6px 4px;