合并代码
This commit is contained in:
commit
c00958a1f8
|
|
@ -117,3 +117,24 @@ export function formatDate(timestamp: any) {
|
||||||
}
|
}
|
||||||
return '刚刚'
|
return '刚刚'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const getNewDay = (dateTemp: any, days: any) => {
|
||||||
|
console.log("dateTemp",dateTemp,days)
|
||||||
|
if(!dateTemp ){
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
dateTemp = dateTemp.split(".");
|
||||||
|
//转换为MM-DD-YYYY格式
|
||||||
|
let nDate: any = new Date(dateTemp[1] + "-" + dateTemp[2] + "-" + dateTemp[0]);
|
||||||
|
let millSeconds: any = Math.abs(nDate) + days * 24 * 60 * 60 * 1000;
|
||||||
|
let rDate: any = new Date(millSeconds);
|
||||||
|
let year: any = rDate.getFullYear();
|
||||||
|
let month: any = rDate.getMonth() + 1;
|
||||||
|
if (month < 10) month = "0" + month;
|
||||||
|
let date = rDate.getDate();
|
||||||
|
if (date < 10) date = "0" + date;
|
||||||
|
return year + "." + month + "." + date;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -451,8 +451,8 @@
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table> -->
|
||||||
</div> -->
|
</div>
|
||||||
<el-row style="padding-top: 15px">
|
<el-row style="padding-top: 15px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="success" @click="handlerSubmitBtn">提 交</el-button>
|
<el-button type="success" @click="handlerSubmitBtn">提 交</el-button>
|
||||||
|
|
|
||||||
|
|
@ -110,20 +110,20 @@
|
||||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||||
<el-table-column align="center" prop="orderStatus" label="订单状态">
|
<el-table-column align="center" prop="orderStatus" label="订单状态">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.orderStatus === 31">待确认</el-tag>
|
<el-tag v-if="row.orderStatus == 31">待确认</el-tag>
|
||||||
<el-tag v-if="row.orderStatus === 32">待合同上传</el-tag>
|
<el-tag v-if="row.orderStatus == 32">待合同上传</el-tag>
|
||||||
<el-tag v-if="row.orderStatus === 35">待收货</el-tag>
|
<el-tag v-if="row.orderStatus == 35">待收货</el-tag>
|
||||||
<el-tag v-if="row.orderStatus === 36">进行中</el-tag>
|
<el-tag v-if="row.orderStatus == 36">进行中</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="操作" width="320px">
|
<el-table-column align="center" prop="name" label="操作" width="320px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" type="primary" @click="clickPreviewDetails(scope.row)">查看</el-button>
|
<el-button size="small" type="primary" @click="clickPreviewDetails">查看</el-button>
|
||||||
<el-button size="small" type="danger" @click="clickRentingTermination">
|
<el-button size="small" type="danger" @click="clickRentingTermination(scope.row)" v-if="scope.row.orderStatus == 36">
|
||||||
退租
|
退租
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" type="warning" @click="clickRenewalOfLease">续租</el-button>
|
<el-button size="small" type="warning" @click="clickRenewalOfLease" v-if="scope.row.orderStatus == 36">续租</el-button>
|
||||||
<el-button size="small" type="success" @click="clickConfirmReceipt(scope.row)" >
|
<el-button size="small" type="success" @click="clickConfirmReceipt" v-if="scope.row.orderStatus == 35">
|
||||||
确认收货
|
确认收货
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-page-header @back="goBack" @click="$router.go(-1)">
|
<el-page-header @click="$router.go(-1)">
|
||||||
<template #content>
|
<template #content>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -17,9 +17,10 @@
|
||||||
detailsInfo.phone
|
detailsInfo.phone
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="租赁时长" class="table_item">
|
<el-form-item label="租赁时长" class="table_item">
|
||||||
|
<div style="white-space: nowrap;">
|
||||||
{{ detailsInfo.duration}}
|
{{ detailsInfo.planStartTime }}- {{ getTimeByPoint(detailsInfo.planStartTime, detailsInfo.duration) }}
|
||||||
<!-- 暂无 --></el-form-item>
|
</div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="设备进场地址:" class="table_item">{{
|
<el-form-item label="设备进场地址:" class="table_item">{{
|
||||||
detailsInfo.addressId
|
detailsInfo.addressId
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
|
|
@ -72,10 +73,10 @@
|
||||||
</span>
|
</span>
|
||||||
<span style="color: #f00">¥
|
<span style="color: #f00">¥
|
||||||
</span>
|
</span>
|
||||||
<el-input v-model.trim="equipMoneyInfo.equipMoney" placeholder="请输入企业类型" clearable maxlength="30" />
|
<el-input v-model.trim="equipMoneyInfo.equipMoney" placeholder="请输入企业类型" clearable maxlength="30" />
|
||||||
/月
|
/月
|
||||||
</div>
|
</div>
|
||||||
<div v-if="detailsInfo.isMachinist != 0" class="equipMoneyClass">
|
<div v-if="detailsInfo.isMachinist != 0" class="equipMoneyClass">
|
||||||
<span>
|
<span>
|
||||||
机手
|
机手
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -171,6 +172,8 @@ import uploadComponent from 'components/uploadComponent/index.vue'
|
||||||
import { ElMessageBoxOpert } from 'utils/elementCom'
|
import { ElMessageBoxOpert } from 'utils/elementCom'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { apiOrderInfoDetails, apiUpdateOrderInfo, apiOrderReject } from 'http/api/usercenter/order'
|
import { apiOrderInfoDetails, apiUpdateOrderInfo, apiOrderReject } from 'http/api/usercenter/order'
|
||||||
|
import { getNewDay } from "utils/time"
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
|
|
@ -250,16 +253,16 @@ const formConfirmRules = reactive<FormRules<any>>({
|
||||||
|
|
||||||
let fileItem: any = null
|
let fileItem: any = null
|
||||||
const demandConfirmFn = () => {
|
const demandConfirmFn = () => {
|
||||||
if(!equipMoneyInfo.equipMoney){
|
if (!equipMoneyInfo.equipMoney) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
type:'warning',
|
type: 'warning',
|
||||||
message:'请输入装备租金'
|
message: '请输入装备租金'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(!equipMoneyInfo.phoneMoney){
|
if (!equipMoneyInfo.phoneMoney) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
type:'warning',
|
type: 'warning',
|
||||||
message:'请输入机手租金'
|
message: '请输入机手租金'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
stepVal.value = '1'
|
stepVal.value = '1'
|
||||||
|
|
@ -268,18 +271,18 @@ const demandConfirmFn = () => {
|
||||||
const rejectCallBack = async (row: any, value: any) => {
|
const rejectCallBack = async (row: any, value: any) => {
|
||||||
console.log('editCallBack', row, value)
|
console.log('editCallBack', row, value)
|
||||||
let params = {
|
let params = {
|
||||||
rejectReason:value.value,
|
rejectReason: value.value,
|
||||||
orderId: detailsInfo.orderId
|
orderId: detailsInfo.orderId
|
||||||
}
|
}
|
||||||
const res = await apiOrderReject(params)
|
const res: any = await apiOrderReject(params)
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type:'success',
|
type: 'success',
|
||||||
message:'驳回成功'
|
message: '驳回成功'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const demandRejectFn = (row="") => {
|
const demandRejectFn = (row = "") => {
|
||||||
|
|
||||||
ElMessageBoxOpert(
|
ElMessageBoxOpert(
|
||||||
'驳回原因',
|
'驳回原因',
|
||||||
|
|
@ -342,8 +345,8 @@ const confirmSendFn = () => {
|
||||||
machinistName: submitInfo.driver,//机手姓名
|
machinistName: submitInfo.driver,//机手姓名
|
||||||
logisticsPhone: submitInfo.deliverPhone,//物流电话
|
logisticsPhone: submitInfo.deliverPhone,//物流电话
|
||||||
phone: submitInfo.driverPhone,//机首电话
|
phone: submitInfo.driverPhone,//机首电话
|
||||||
leasePrice:equipMoneyInfo.equipMoney,
|
leasePrice: equipMoneyInfo.equipMoney,
|
||||||
machinistPrice:equipMoneyInfo.phoneMoney
|
machinistPrice: equipMoneyInfo.phoneMoney
|
||||||
}
|
}
|
||||||
const res = await apiUpdateOrderInfo(params)
|
const res = await apiUpdateOrderInfo(params)
|
||||||
console.log("resapiUpdateOrderInfo", res)
|
console.log("resapiUpdateOrderInfo", res)
|
||||||
|
|
@ -372,6 +375,9 @@ const scuccesCallback = (ev: any) => {
|
||||||
errorTipFlag.value = 1
|
errorTipFlag.value = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTimeByPoint = (start: any, duration: any) => {
|
||||||
|
return getNewDay(start, duration)
|
||||||
|
}
|
||||||
|
|
||||||
const totalMoneyFn = () => {
|
const totalMoneyFn = () => {
|
||||||
return Number(equipMoneyInfo.equipMoney) + Number(equipMoneyInfo.phoneMoney) + '元'
|
return Number(equipMoneyInfo.equipMoney) + Number(equipMoneyInfo.phoneMoney) + '元'
|
||||||
|
|
@ -423,11 +429,13 @@ onBeforeMount(() => {
|
||||||
.error_tip_c {
|
.error_tip_c {
|
||||||
color: #ff0000;
|
color: #ff0000;
|
||||||
}
|
}
|
||||||
:deep(.equipMoneyClass){
|
|
||||||
|
:deep(.equipMoneyClass) {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
.el-input{
|
|
||||||
|
.el-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 160px;
|
width: 160px;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
|
|
@ -440,5 +448,4 @@ onBeforeMount(() => {
|
||||||
background-color: #F56C6C !important;
|
background-color: #F56C6C !important;
|
||||||
border: #F56C6C;
|
border: #F56C6C;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
{{ detailsInfo.phone }}
|
{{ detailsInfo.phone }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租赁时长" class="table_item">
|
<el-form-item label="租赁时长" class="table_item">
|
||||||
{{ detailsInfo.duration}}
|
<div style="white-space: nowrap;">
|
||||||
<!-- 暂无 -->
|
{{ detailsInfo.planStartTime }}- {{ getTimeByPoint(detailsInfo.planStartTime,detailsInfo.duration) }}
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备进场地址:" class="table_item">
|
<el-form-item label="设备进场地址:" class="table_item">
|
||||||
{{ detailsInfo.addressId }}
|
{{ detailsInfo.addressId }}
|
||||||
|
|
@ -102,6 +103,7 @@ import { reactive } from 'vue'
|
||||||
import orderTable from './orderTable.vue'
|
import orderTable from './orderTable.vue'
|
||||||
import { apiOrderInfoDetails, apiOrderInfoList, apiUpdateOrderInfo } from 'http/api/usercenter/order'
|
import { apiOrderInfoDetails, apiOrderInfoList, apiUpdateOrderInfo } from 'http/api/usercenter/order'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import {getNewDay} from "utils/time"
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const tableInfo = reactive({
|
const tableInfo = reactive({
|
||||||
|
|
@ -206,6 +208,11 @@ const initPage = () => {
|
||||||
confimFlag.value = route.query.confirm
|
confimFlag.value = route.query.confirm
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTimeByPoint =(start:any,duration:any)=>{
|
||||||
|
return getNewDay(start,duration)
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
initPage()
|
initPage()
|
||||||
initApiOrderDetails()
|
initApiOrderDetails()
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,12 @@
|
||||||
<el-table-column align="center" prop="orderStatus" label="订单状态" />
|
<el-table-column align="center" prop="orderStatus" label="订单状态" />
|
||||||
<el-table-column align="center" prop="name" label="操作" width="260px">
|
<el-table-column align="center" prop="name" label="操作" width="260px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button size="small" type="primary" @click="confirmBtn(row)">确认</el-button>
|
<el-button size="small" type="primary" @click="confirmBtn(row)" v-if="row.orderStatus==31">确认</el-button>
|
||||||
<el-button size="small" type="warning" @click="clickPreviewDetails(row)">
|
<el-button size="small" type="warning" @click="clickPreviewDetails(row)" v-if="row.orderStatus!=31">
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" type="danger">删除</el-button>
|
<el-button size="small" type="danger" v-if="row.orderStatus=39">删除</el-button>
|
||||||
<el-button size="small" type="success" @click="settlementBtn">结算</el-button>
|
<el-button size="small" type="success" @click="settlementBtn" v-if="row.orderStatus=34">结算</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue