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