状态修正,订单卡片调整
This commit is contained in:
parent
e7546bbf39
commit
d19e1f5964
|
|
@ -18,6 +18,7 @@ export function getOrderListInfoApi(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 订单确认--同意
|
||||||
export function orderConfirm(orderId) {
|
export function orderConfirm(orderId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material-mall/comprehensive/orderConfirm/' + orderId,
|
url: '/material-mall/comprehensive/orderConfirm/' + orderId,
|
||||||
|
|
@ -25,6 +26,14 @@ export function orderConfirm(orderId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 订单确认--驳回
|
||||||
|
export function orderReject(orderId) {
|
||||||
|
return request({
|
||||||
|
url: '/material-mall/comprehensive/orderReject/' + orderId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function getOverhaulApi(orderId) {
|
export function getOverhaulApi(orderId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material-mall/lease-repair/getById',
|
url: '/material-mall/lease-repair/getById',
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,10 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3"> 租金 :</el-col>
|
<!-- <el-col :span="3"> 租金 :</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
{{ goods.dayLeasePrice }}{{ ' ' + '元 / 天' }}
|
{{ goods.dayLeasePrice }}{{ ' ' + '元 / 天' }}
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="3"> 数量 :</el-col>
|
<el-col :span="3"> 数量 :</el-col>
|
||||||
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
|
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
>
|
>
|
||||||
<div>租期</div>
|
<div>租期</div>
|
||||||
<div style="font-weight: bold; margin-top: 10px" :style="isOrderComplete">
|
<div style="font-weight: bold; margin-top: 10px" :style="isOrderComplete">
|
||||||
{{ goods.rentBeginTime }}至{{ goods.rentEndTime }}
|
{{ formatDate(goods.rentBeginTime) }}至{{ formatDate(goods.rentEndTime) }}
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: bold; margin-top: 10px" v-if="orderStatus == 20">
|
<div style="font-weight: bold; margin-top: 10px" v-if="orderStatus == 20">
|
||||||
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}至
|
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}至
|
||||||
|
|
@ -150,22 +150,22 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="5" class="order-items-info" style="border: none; font-size: 13px">
|
<!-- <el-col :span="5" class="order-items-info" style="border: none; font-size: 13px">
|
||||||
<div>总费用</div>
|
<div>总费用</div>
|
||||||
<div class="red-font">{{ orderDetails.cost }} 元</div>
|
<div class="red-font">{{ orderDetails.cost }} 元</div>
|
||||||
<div class="red-font" v-if="orderStatus == 20">
|
<div class="red-font" v-if="orderStatus == 20">
|
||||||
{{ overhaulDetails.totalCost }} 元
|
{{ overhaulDetails.totalCost }} 元
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 退租检测/费用结算信息 -->
|
<!-- 退租检测/费用结算信息 -->
|
||||||
<TitleTip :titleText="`退租检测/费用结算信息`" v-if="orderStatus == 20" />
|
<TitleTip :titleText="`退租检测/费用结算信息`" v-if="orderStatus == 20" />
|
||||||
|
|
||||||
<div style="padding: 0 15px" v-if="orderStatus == 20">
|
<div style="padding: 0 15px" v-if="orderStatus == 20">
|
||||||
<div style="padding: 6px 0 0 0; font-size: 18px; color: #eb190a; font-weight: bold">
|
<!-- <div style="padding: 6px 0 0 0; font-size: 18px; color: #eb190a; font-weight: bold">
|
||||||
总费用(元): <span>{{ overhaulDetails.totalCost }}</span>
|
总费用(元): <span>{{ overhaulDetails.totalCost }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 共享费用明细 -->
|
<!-- 共享费用明细 -->
|
||||||
<TitleTip :titleText="`共享费用明细`" />
|
<TitleTip :titleText="`共享费用明细`" />
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
<el-table-column prop="days" align="center" label="共享天数" />
|
<el-table-column prop="days" align="center" label="共享天数" />
|
||||||
<el-table-column align="center" label="租期">
|
<el-table-column align="center" label="租期">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ `${row.preOutboundTime}至${row.rentOverTime || ''} ` }}
|
{{ formatDate(row.preOutboundTime) + '至' + formatDate(row.rentOverTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="costs" align="center" label="共享费用(元)" width="160" />
|
<el-table-column prop="costs" align="center" label="共享费用(元)" width="160" />
|
||||||
|
|
@ -397,6 +397,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 仅保留日期(YYYY-MM-DD)
|
||||||
|
formatDate(dateStr) {
|
||||||
|
if (!dateStr) return ''
|
||||||
|
const s = String(dateStr)
|
||||||
|
return s.length >= 10 ? s.slice(0, 10) : s
|
||||||
|
},
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
init() {
|
init() {
|
||||||
this.updateStepList();
|
this.updateStepList();
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@
|
||||||
{{ goods.deviceName }}
|
{{ goods.deviceName }}
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4"> 租期 {{ goods.days }}{{ ' ' + '天' }}</el-col>
|
<el-col :span="4"> 租期 : {{ goods.days }}{{ ' ' + '天' }}</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<span
|
<span
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
|
|
@ -211,8 +211,8 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}
|
{{ goods.dayLeasePrice }}{{ ' ' + '元/天' }}
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
<el-col :span="6"> 数量</el-col>
|
<el-col :span="6"> 数量 : {{ goods.num }}{{ ' ' + '台' }}</el-col>
|
||||||
<el-col :span="10"> {{ goods.num }}{{ ' ' + '台' }}</el-col>
|
<el-col :span="10"> </el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -272,30 +272,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="3" class="order-items-info">
|
|
||||||
<div
|
|
||||||
v-for="(goods, j) in item.detailsList"
|
|
||||||
:key="j"
|
|
||||||
class="order-info"
|
|
||||||
:style="
|
|
||||||
j != item.detailsList.length - 1
|
|
||||||
? 'border-bottom:1px solid #eee'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
style="min-height: 80px; width: 95%"
|
|
||||||
>
|
|
||||||
<el-tag effect="light">{{ item.orderStatus == '1' ? '待确认' : '已确认'}}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
|
||||||
</el-col>-->
|
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div class="handle-btn">
|
<div class="handle-btn">
|
||||||
<el-button @click="handleViewOrder(item)" type="primary" size="small">
|
<!-- <el-button @click="handleViewOrder(item)" type="primary" size="small">
|
||||||
订单详情
|
订单详情
|
||||||
|
</el-button> -->
|
||||||
|
<el-button v-show="item.orderStatus =='1'" @click="handleConfirm(item)" type="success" plain size="small">
|
||||||
|
同意
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-show="item.orderStatus =='1'" @click="handleConfirm(item)" type="success" size="small">
|
<el-button v-show="item.orderStatus =='1'" @click="handelReject(item)" type="warning" plain size="small">
|
||||||
确认
|
不同意
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button v-show="item.orderStatus =='2'" @click="(item)" type="primary" plain size="small">
|
||||||
|
共享出库
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -355,13 +346,13 @@
|
||||||
<el-table-column prop="deviceName" align="center" label="装备名称"/>
|
<el-table-column prop="deviceName" align="center" label="装备名称"/>
|
||||||
<el-table-column prop="typeName" align="center" label="型号"/>
|
<el-table-column prop="typeName" align="center" label="型号"/>
|
||||||
<el-table-column prop="num" align="center" label="数量"/>
|
<el-table-column prop="num" align="center" label="数量"/>
|
||||||
<el-table-column align="center" label="共享单价(元/天)">
|
<!-- <el-table-column align="center" label="共享单价(元/天)">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span style="color: #eb190a">
|
<span style="color: #eb190a">
|
||||||
{{ row.dayLeasePrice }}
|
{{ row.dayLeasePrice }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column prop="days" align="center" label="共享天数"/>
|
<el-table-column prop="days" align="center" label="共享天数"/>
|
||||||
<el-table-column prop="days" align="center" label="租期">
|
<el-table-column prop="days" align="center" label="租期">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -608,7 +599,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleTip from '@/components/TitleTip'
|
import TitleTip from '@/components/TitleTip'
|
||||||
import { getOrderListApi, getOrderListInfoApi, getOverhaulApi, orderConfirm } from '@/api/search/order'
|
import { getOrderListApi, getOrderListInfoApi, getOverhaulApi, orderConfirm, orderReject } from '@/api/search/order'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import OrderDetailDialog from '@/views/EquipmentSharedOrder/order/detail.vue'
|
import OrderDetailDialog from '@/views/EquipmentSharedOrder/order/detail.vue'
|
||||||
import typeConfigRepair from '@/views/material/ma/typeConfigRepair/index.vue'
|
import typeConfigRepair from '@/views/material/ma/typeConfigRepair/index.vue'
|
||||||
|
|
@ -633,7 +624,8 @@ export default {
|
||||||
statusList:
|
statusList:
|
||||||
[
|
[
|
||||||
{ id: '1', name: '待确认' },
|
{ id: '1', name: '待确认' },
|
||||||
{ id: '2', name: '已确认' }
|
{ id: '2', name: '已确认' },
|
||||||
|
{ id: '3', name: '已驳回' },
|
||||||
],
|
],
|
||||||
ids: [],
|
ids: [],
|
||||||
// 总条数
|
// 总条数
|
||||||
|
|
@ -729,6 +721,7 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
handleConfirm(item) {
|
handleConfirm(item) {
|
||||||
|
// 订单通过
|
||||||
orderConfirm(item.orderId).then(res => {
|
orderConfirm(item.orderId).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
item.orderStatus = '2'
|
item.orderStatus = '2'
|
||||||
|
|
@ -738,15 +731,24 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handelReject(item) {
|
||||||
|
// 订单驳回
|
||||||
|
orderReject(item.orderId).then(res => {
|
||||||
|
if (res.code == '200') {
|
||||||
|
item.orderStatus = '3'
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
//订单详情
|
//订单详情
|
||||||
handleViewOrder(row) {
|
handleViewOrder(row) {
|
||||||
this.showOrderDetail = true
|
this.showOrderDetail = true
|
||||||
this.orderStatus = row.orderStatus
|
this.orderStatus = row.orderStatus
|
||||||
this.orderId = row.orderId
|
this.orderId = row.orderId
|
||||||
/* this.$router.push({
|
|
||||||
path: '/EquipmentSharedOrder/order/detail',
|
|
||||||
query: { orderStatus: row.orderStatus, orderId: row.orderId }
|
|
||||||
}) */
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//检修详情
|
//检修详情
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,10 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3"> 租金 :</el-col>
|
<!-- <el-col :span="3"> 租金 :</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
{{ goods.dayLeasePrice }}{{ ' ' + '元 / 天' }}
|
{{ goods.dayLeasePrice }}{{ ' ' + '元 / 天' }}
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="3"> 数量 :</el-col>
|
<el-col :span="3"> 数量 :</el-col>
|
||||||
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
|
<el-col :span="8"> {{ goods.num }}{{ ' ' + '台' }} </el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
>
|
>
|
||||||
<div>租期</div>
|
<div>租期</div>
|
||||||
<div style="font-weight: bold; margin-top: 10px" :style="isOrderComplete">
|
<div style="font-weight: bold; margin-top: 10px" :style="isOrderComplete">
|
||||||
{{ goods.rentBeginTime }}至{{ goods.rentEndTime }}
|
{{ formatDate(goods.rentBeginTime) }}至{{ formatDate(goods.rentEndTime) }}
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: bold; margin-top: 10px" v-if="orderStatus == 20">
|
<div style="font-weight: bold; margin-top: 10px" v-if="orderStatus == 20">
|
||||||
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}至
|
{{ goods.takeOverTime ? goods.takeOverTime.slice(0, 10) : '' }}至
|
||||||
|
|
@ -150,22 +150,22 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="5" class="order-items-info" style="border: none; font-size: 13px">
|
<!-- <el-col :span="5" class="order-items-info" style="border: none; font-size: 13px">
|
||||||
<div>总费用</div>
|
<div>总费用</div>
|
||||||
<div class="red-font">{{ orderDetails.cost }} 元</div>
|
<div class="red-font">{{ orderDetails.cost }} 元</div>
|
||||||
<div class="red-font" v-if="orderStatus == 20">
|
<div class="red-font" v-if="orderStatus == 20">
|
||||||
{{ overhaulDetails.totalCost }} 元
|
{{ overhaulDetails.totalCost }} 元
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 退租检测/费用结算信息 -->
|
<!-- 退租检测/费用结算信息 -->
|
||||||
<TitleTip :titleText="`退租检测/费用结算信息`" v-if="orderStatus == 20" />
|
<TitleTip :titleText="`退租检测/费用结算信息`" v-if="orderStatus == 20" />
|
||||||
|
|
||||||
<div style="padding: 0 15px" v-if="orderStatus == 20">
|
<div style="padding: 0 15px" v-if="orderStatus == 20">
|
||||||
<div style="padding: 6px 0 0 0; font-size: 18px; color: #eb190a; font-weight: bold">
|
<!-- <div style="padding: 6px 0 0 0; font-size: 18px; color: #eb190a; font-weight: bold">
|
||||||
总费用(元): <span>{{ overhaulDetails.totalCost }}</span>
|
总费用(元): <span>{{ overhaulDetails.totalCost }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 共享费用明细 -->
|
<!-- 共享费用明细 -->
|
||||||
<TitleTip :titleText="`共享费用明细`" />
|
<TitleTip :titleText="`共享费用明细`" />
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
<el-table-column prop="days" align="center" label="共享天数" />
|
<el-table-column prop="days" align="center" label="共享天数" />
|
||||||
<el-table-column align="center" label="租期">
|
<el-table-column align="center" label="租期">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ `${row.preOutboundTime}至${row.rentOverTime || ''} ` }}
|
{{ formatDate(row.preOutboundTime) + '至' + formatDate(row.rentOverTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="costs" align="center" label="共享费用(元)" width="160" />
|
<el-table-column prop="costs" align="center" label="共享费用(元)" width="160" />
|
||||||
|
|
@ -397,6 +397,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 仅保留日期(YYYY-MM-DD)
|
||||||
|
formatDate(dateStr) {
|
||||||
|
if (!dateStr) return ''
|
||||||
|
const s = String(dateStr)
|
||||||
|
return s.length >= 10 ? s.slice(0, 10) : s
|
||||||
|
},
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
init() {
|
init() {
|
||||||
this.updateStepList();
|
this.updateStepList();
|
||||||
|
|
|
||||||
|
|
@ -208,9 +208,9 @@
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div>
|
<div>
|
||||||
<el-button @click="handleViewOrder(item)" type="primary" size="small">
|
<!-- <el-button @click="handleViewOrder(item)" type="primary" size="small">
|
||||||
订单详情
|
订单详情
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == 20"
|
v-if="item.orderStatus == 20"
|
||||||
@click="handleViewRepair(item)"
|
@click="handleViewRepair(item)"
|
||||||
|
|
@ -473,7 +473,8 @@ export default {
|
||||||
orderId: '',
|
orderId: '',
|
||||||
statusList: [
|
statusList: [
|
||||||
{ id: '1', name: '待确认' },
|
{ id: '1', name: '待确认' },
|
||||||
{ id: '2', name: '已确认' }
|
{ id: '2', name: '已确认' },
|
||||||
|
{ id: '3', name: '已驳回' },
|
||||||
],
|
],
|
||||||
|
|
||||||
// 分页和查询
|
// 分页和查询
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue