需求修改
This commit is contained in:
parent
ed526ece95
commit
b617b8bd00
|
|
@ -179,7 +179,6 @@
|
|||
flex: 1;
|
||||
.item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.label{
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
|
|
@ -187,6 +186,8 @@
|
|||
}
|
||||
.value{
|
||||
color: black;
|
||||
flex: 1;
|
||||
font-family: 'fangsong';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
{
|
||||
path: 'orderManagement',
|
||||
name: 'orderManagement',
|
||||
component: () => import('views/user/orderManagement/index.vue'),
|
||||
component: () => import('@/views/user/orderManagement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(求租)',
|
||||
keepAlive: true,
|
||||
|
|
@ -265,7 +265,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
{
|
||||
path: 'orderDetails',
|
||||
name: 'orderDetails',
|
||||
component: () => import('views/user/orderManagement/orderCom/orderDetails.vue'),
|
||||
component: () => import('@/views/user/orderManagement/orderCom/orderDetails.vue'),
|
||||
meta: {
|
||||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
import moment from 'moment'
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
/*
|
||||
/*
|
||||
参考博客
|
||||
https://blog.csdn.net/qq_36228377/article/details/125196997
|
||||
|
||||
*/
|
||||
|
||||
export function formatTime(curTime: string, formatVal: string) {
|
||||
/*
|
||||
/*
|
||||
格式化时间
|
||||
curTIme:要格式化的时间
|
||||
formatVal:格式化时间的格式
|
||||
formatVal:格式化时间的格式
|
||||
*/
|
||||
// 例如 curTime 2021-02-03 12-21-22 formatVal YYYY年MM月DD日 HH时mm分ss秒
|
||||
return moment(curTime).format(formatVal)
|
||||
|
|
@ -44,8 +44,8 @@ ss 有前导零的描述 01到59
|
|||
X Unix时间戳 1411572969 */
|
||||
|
||||
export function getDiffTime(start: string, end: string, unit: any) {
|
||||
/*
|
||||
|
||||
/*
|
||||
|
||||
start 开始时间
|
||||
end 结束时间
|
||||
unit 时间单位
|
||||
|
|
@ -120,12 +120,12 @@ export function formatDate(timestamp: any) {
|
|||
|
||||
|
||||
|
||||
export const getNewDay = (dateTemp: any, days: any) => {
|
||||
export const getNewDay = (dateTemp: any, days: any,separator:any = '.') => {
|
||||
console.log("dateTemp",dateTemp,days)
|
||||
if(!dateTemp ){
|
||||
return ""
|
||||
}
|
||||
dateTemp = dateTemp.split(".");
|
||||
dateTemp = dateTemp.split(separator);
|
||||
//转换为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;
|
||||
|
|
@ -136,5 +136,5 @@ export const getNewDay = (dateTemp: any, days: any) => {
|
|||
let date = rDate.getDate();
|
||||
if (date < 10) date = "0" + date;
|
||||
return year + "." + month + "." + date;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
<div class="title">
|
||||
<div class="name">{{ pageData.modelName }}{{ pageData.deviceName }}</div>
|
||||
<div class="tag">
|
||||
<div class="item">{{ pageData.maStatusStr }}</div>
|
||||
<div class="item otherItem">已审核</div>
|
||||
<div class="item otherItem">{{ pageData.maStatusStr }}</div>
|
||||
<div class="item ">已审核</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewNnum">浏览{{ pageData.searchNum }}</div>
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
:brand="pageData.brand"
|
||||
:code="pageData.code"
|
||||
:group="pageData.groupName"
|
||||
:position="pageData.location"
|
||||
:position="`${pageData.provinceStr}${pageData.cityStr || ''}${pageData.areaStr || ''}`"
|
||||
:specifications="pageData.specification"
|
||||
:type="pageData.typeName"
|
||||
:unit="ruleForm.durationUnit == '1' ? '月' : '天'"
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">
|
||||
<el-button type="primary" @click="submit(ruleFormRef)">
|
||||
提交
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
@ -264,9 +264,14 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|||
import equipDetailTable from '@/components/equipDetailTable.vue'
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
import {mainStore} from '@/store/main'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const ruleFormRef = ref()
|
||||
|
||||
const store = mainStore()
|
||||
|
||||
const pageParams = route.params
|
||||
//设备简略基本信息
|
||||
|
|
@ -439,7 +444,7 @@ const rules = reactive({
|
|||
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
||||
],
|
||||
invoiceType: [
|
||||
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
||||
|
||||
],
|
||||
projectDescription: [
|
||||
{required: true, message: '请输入项目说明', trigger: 'blur'}
|
||||
|
|
@ -494,7 +499,7 @@ const priceChange = computed(() => {
|
|||
|
||||
count = unitPrice * duration + jsPrice * duration
|
||||
|
||||
return Math.round(count * 100) / 100
|
||||
return Math.round(count * 100) / 100 || 0
|
||||
})
|
||||
|
||||
//打开商家电话弹窗
|
||||
|
|
@ -517,7 +522,7 @@ const that = {
|
|||
const addressCascader = {
|
||||
lazy: true,
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
value: 'code',
|
||||
lazyLoad: async (node, resolve) => {
|
||||
const {level, data} = node
|
||||
let nodes = []
|
||||
|
|
@ -601,30 +606,44 @@ const goDetail = (val) => {
|
|||
}
|
||||
|
||||
//提交申请
|
||||
const submit = async () => {
|
||||
const params = {
|
||||
addressId: ruleForm.value.address[2],
|
||||
address: ruleForm.value.detailAddress,
|
||||
realStartTime: ruleForm.value.entryTime,
|
||||
duration: ruleForm.value.duration,
|
||||
isMachinist: ruleForm.value.machinist,
|
||||
invoiceType: ruleForm.value.invoiceType,
|
||||
description: ruleForm.value.projectDescription,
|
||||
durationType: ruleForm.value.durationUnit,
|
||||
cost: priceChange.value,
|
||||
maId: pageData.value.maId
|
||||
const submit = async (Ref) => {
|
||||
if(!Ref){
|
||||
return
|
||||
}
|
||||
await Ref.validate( async(valid, fields) => {
|
||||
if(valid){
|
||||
const params = {
|
||||
provinceId: ruleForm.value.address[0],
|
||||
cityId: ruleForm.value.address[1],
|
||||
areaId: ruleForm.value.address[2],
|
||||
address: ruleForm.value.detailAddress,
|
||||
realStartTime: ruleForm.value.entryTime,
|
||||
duration: ruleForm.value.duration,
|
||||
isMachinist: ruleForm.value.machinist,
|
||||
invoiceType: ruleForm.value.invoiceType,
|
||||
description: ruleForm.value.projectDescription,
|
||||
durationType: ruleForm.value.durationUnit,
|
||||
cost: priceChange.value,
|
||||
maId: pageData.value.maId,
|
||||
orderCompany:store.userInfo.companyId
|
||||
}
|
||||
|
||||
const res = await apiSubmitLease(params)
|
||||
|
||||
if (res.code == '200') {
|
||||
ElMessage({
|
||||
message: '提交租赁申请成功',
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
dialoglease.value = false
|
||||
}else {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
const res = await apiSubmitLease(params)
|
||||
|
||||
if (res.code == '200') {
|
||||
ElMessage({
|
||||
message: '提交租赁申请成功',
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
dialoglease.value = false
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
:key="i"
|
||||
:url="v.picUrl"
|
||||
:company="v.companyName"
|
||||
:tags="[v.maStatusStr,v.city || '合肥市']"
|
||||
:tags="[v.maStatusStr,v.cityStr || '合肥市']"
|
||||
:name="`${v.modelName}${v.deviceName}`"
|
||||
:price="v.monthLeasePrice"
|
||||
:id="v.maId"
|
||||
|
|
@ -414,9 +414,9 @@ const getData = async (text = '') => {
|
|||
pageNum: pageData.pageNum,
|
||||
updateTimeOrderBy: '',
|
||||
monthLeasePriceOrderBy: '',
|
||||
provinceId:address[0]?.id || '',
|
||||
cityId:address[1]?.id || '',
|
||||
areaId:address[2]?.id || '',
|
||||
provinceId:address[0]?.code || '',
|
||||
cityId:address[1]?.code || '',
|
||||
areaId:address[2]?.code || '',
|
||||
typeId: type ? type.typeId : '',
|
||||
monthLeasePriceMin: '',
|
||||
monthLeasePriceMax: '',
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
<el-table-column align="center" prop="code" label="订单编号" />
|
||||
<el-table-column align="center" prop="supplierCompany" label="供应商" />
|
||||
<el-table-column align="center" prop="time" label="订单创建日期" />
|
||||
<el-table-column align="center" prop="payType" label="装备类型" />
|
||||
<el-table-column align="center" prop="typeName" label="装备类型" />
|
||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||
<el-table-column align="center" label="订单状态">
|
||||
<template #default="{ row }">
|
||||
|
|
|
|||
|
|
@ -13,13 +13,15 @@
|
|||
<el-form-item label="联系电话" class="table_item">
|
||||
{{ detailsInfo.phone }}
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁时长" class="table_item">
|
||||
<el-form-item label="租赁起止时间:" class="table_item">
|
||||
<div style="white-space: nowrap;">
|
||||
{{ detailsInfo.planStartTime }}- {{ getTimeByPoint(detailsInfo.planStartTime,detailsInfo.duration) }}
|
||||
{{ detailsInfo.realStartTime }} / {{ getTimeByPoint(detailsInfo.realStartTime,detailsInfo.duration) }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备进场地址:" class="table_item">
|
||||
{{ detailsInfo.addressId }}
|
||||
{{ detailsInfo.provinceStr || '' }}
|
||||
{{ detailsInfo.cityStr || '' }}
|
||||
{{ detailsInfo.areaStr || '' }}
|
||||
</el-form-item>
|
||||
<el-form-item label="进场时间:" class="table_item">
|
||||
{{ detailsInfo.realStartTime }}
|
||||
|
|
@ -32,10 +34,10 @@
|
|||
{{ detailsInfo.address }}
|
||||
</el-form-item>
|
||||
<el-form-item label="工期时长:" class="table_item">
|
||||
{{ detailsInfo.duration }}
|
||||
{{ detailsInfo.duration }}{{ detailsInfo.durationType == '0' ? '天' :'月' }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发票类型:" class="table_item">
|
||||
{{ detailsInfo.invoiceType }}
|
||||
{{ detailsInfo.invoiceType == "" ? '不需要' : ( detailsInfo.invoiceType == "1" ? '增值税普票' : '增值税专票' ) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="项目说明:" style="width: 800px">
|
||||
{{ detailsInfo.description }}
|
||||
|
|
@ -48,18 +50,17 @@
|
|||
<orderTable :tableInfo="tableInfo">
|
||||
<template v-slot:rentMoney>
|
||||
<div>
|
||||
<span>
|
||||
装备
|
||||
</span>
|
||||
|
||||
<span style="color: #f00">¥
|
||||
{{ tableInfo.devicePrice }}
|
||||
</span> /月
|
||||
</span> / {{ detailsInfo.durationType == '0' ? '天' :'月' }}
|
||||
</div>
|
||||
<div v-if="detailsInfo.isMachinist != 0">
|
||||
<!-- detailsInfo.isMachinist != 0-->
|
||||
<div v-if="false">
|
||||
<span>
|
||||
机手
|
||||
</span>
|
||||
<span style="color: #f00">¥
|
||||
<span style="color: #f00">¥
|
||||
{{ tableInfo.machinistPrice }}
|
||||
</span> /月
|
||||
</div>
|
||||
|
|
@ -101,7 +102,7 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive } from '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 {getNewDay} from "utils/time"
|
||||
const router = useRouter()
|
||||
|
|
@ -126,7 +127,7 @@ const stepListOrder: any = reactive({
|
|||
})
|
||||
const detailsInfo: any = reactive({})
|
||||
const initApiOrderDetails = async () => {
|
||||
let id = route.query.id || '1'
|
||||
let id = route.query.orderId || '1'
|
||||
const res: any = await apiOrderInfoDetails(id)
|
||||
// const res:any = dataJson
|
||||
console.log('res-apiOrderDetails', res)
|
||||
|
|
@ -138,8 +139,8 @@ const initApiOrderDetails = async () => {
|
|||
tableInfo.v_equipment_group_type = deviceInfo.groupName
|
||||
tableInfo.v_equipment_brand = deviceInfo.deviceBrand
|
||||
tableInfo.v_equipment_size = deviceInfo.deviceSpecification
|
||||
tableInfo.v_equipment_address = deviceInfo.deviceLocation
|
||||
tableInfo.devicePrice = deviceInfo.deviceMonthLeasePrice
|
||||
tableInfo.v_equipment_address = `${deviceInfo.provinceStr}${deviceInfo.cityStr}${deviceInfo.areaStr}`
|
||||
tableInfo.devicePrice = detailsInfo.durationType == '0' ? deviceInfo.deviceDayLeasePrice : deviceInfo.deviceMonthLeasePrice
|
||||
tableInfo.machinistPrice = deviceInfo.machinistPrice
|
||||
tableInfo.imgUrl = deviceInfo.devicePicUrl
|
||||
|
||||
|
|
@ -209,8 +210,8 @@ const initPage = () => {
|
|||
|
||||
}
|
||||
|
||||
const getTimeByPoint =(start:any,duration:any)=>{
|
||||
return getNewDay(start,duration)
|
||||
const getTimeByPoint =(start:any,duration:any,)=>{
|
||||
return getNewDay(start,duration,'-')
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { ref } from 'vue'
|
||||
const queryParams = ref({})
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { getOrderListApi } from 'http/api/usercenter/seekorder'
|
||||
import { getOrderListApi } from '@/http/api/usercenter/seekorder'
|
||||
// import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
|
||||
const router = useRouter()
|
||||
|
|
@ -10,12 +10,13 @@
|
|||
const pageSize: any = ref(20)
|
||||
const pageNumber: any = ref(1)
|
||||
const total: any = ref(0)
|
||||
const tableData: any = ref([])
|
||||
|
||||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
const res: any = await getOrderListApi()
|
||||
const res = await getOrderListApi()
|
||||
console.log('获取数据列表***', res)
|
||||
tableData.value = res.rows
|
||||
tableData.value = res.rows || []
|
||||
total.value = res.total
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +48,6 @@
|
|||
})
|
||||
}
|
||||
|
||||
const tableData: any = ref([])
|
||||
|
||||
const time = ref([])
|
||||
</script>
|
||||
|
|
@ -122,12 +122,12 @@
|
|||
v-if="row.orderStatus != 31">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="small" type="danger" v-if="(row.orderStatus = 39)">删除</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)">
|
||||
v-if="(row.orderStatus == 34)">
|
||||
结算
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue