Merge branch 'main' into dev-sjf-2023-12-5
This commit is contained in:
commit
561fa32a42
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Vite App</title>
|
<title>机具租赁商城</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
<template>
|
||||||
|
<el-table :data="[props]"
|
||||||
|
border
|
||||||
|
:header-cell-class-name="headerClassName"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column label="装备" min-width="200" >
|
||||||
|
<template #default="scope">
|
||||||
|
<div class="equipData">
|
||||||
|
<div class="name">
|
||||||
|
{{ scope.row.name }}
|
||||||
|
</div>
|
||||||
|
<div class="desc">
|
||||||
|
<div class="Img">
|
||||||
|
<img :src="scope.row.url">
|
||||||
|
</div>
|
||||||
|
<div class="state">
|
||||||
|
<div class="item" v-for="(v,i) in stateList" :key="i">
|
||||||
|
<div class="label">
|
||||||
|
{{ v.label }}:
|
||||||
|
</div>
|
||||||
|
<div class="value">
|
||||||
|
{{ scope.row[v.key] || '' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="租金" min-width="120" >
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.price }}/{{ scope.row.unit }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="company" label="供应商" min-width="180" />
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
name:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
url:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
code:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
group:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
brand:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
specifications:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
position:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
price:{
|
||||||
|
type: [String, Number],
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
unit: {
|
||||||
|
type: String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
company: {
|
||||||
|
type: String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const stateList = ref([
|
||||||
|
{
|
||||||
|
label:'装备编号',
|
||||||
|
key:'code'
|
||||||
|
},{
|
||||||
|
label:'装备类别',
|
||||||
|
key:'type'
|
||||||
|
},{
|
||||||
|
label:'装备组别',
|
||||||
|
key:'group'
|
||||||
|
},{
|
||||||
|
label:'品牌',
|
||||||
|
key:'brand'
|
||||||
|
},{
|
||||||
|
label:'设备规格',
|
||||||
|
key:'specifications'
|
||||||
|
},{
|
||||||
|
label:'设备位置',
|
||||||
|
key:'position'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
const headerClassName = () => {
|
||||||
|
return 'headerColor'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep() .headerColor{
|
||||||
|
background: #3E98FF !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
.equipData{
|
||||||
|
.name{
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.desc{
|
||||||
|
display: flex;
|
||||||
|
margin-top: 10px;
|
||||||
|
.Img{
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
border-radius: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #e5e5e5;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-right: 10px;
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.state{
|
||||||
|
flex: 1;
|
||||||
|
.item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.label{
|
||||||
|
width: 80px;
|
||||||
|
text-align: right;
|
||||||
|
color: #858585;
|
||||||
|
}
|
||||||
|
.value{
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="item otherItem" v-if="pageData.isAudit == 1">已审核</div>
|
<div class="item otherItem" v-if="pageData.isAudit == 1">已审核</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewNnum">浏览{{pageData.searchNum}}</div>
|
<div class="viewNnum">浏览{{ pageData.searchNum }}</div>
|
||||||
<div class="infoBox">
|
<div class="infoBox">
|
||||||
<div class="item" v-for="(v, i) in equipBaseInfoList" :key="i">
|
<div class="item" v-for="(v, i) in equipBaseInfoList" :key="i">
|
||||||
<div class="label">{{ v.label }}:</div>
|
<div class="label">{{ v.label }}:</div>
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<div class="item contact">联系商家</div>
|
<div class="item contact" @click="openPhone">联系商家</div>
|
||||||
<div class="item applyFor" @click="openLease">我要租</div>
|
<div class="item applyFor" @click="openLease">我要租</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
<el-radio-button :label="1" :disabled="!pageData.isOperator">
|
<el-radio-button :label="1" :disabled="!pageData.isOperator">
|
||||||
是
|
是
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button :label="0" >
|
<el-radio-button :label="0">
|
||||||
否
|
否
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
@ -167,13 +167,13 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="发票类型" prop="invoiceType">
|
<el-form-item label="发票类型" prop="invoiceType">
|
||||||
<el-radio-group v-model="ruleForm.invoiceType">
|
<el-radio-group v-model="ruleForm.invoiceType">
|
||||||
<el-radio-button :label="0" >
|
<el-radio-button :label="0">
|
||||||
不需要
|
不需要
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button :label="1" >
|
<el-radio-button :label="1">
|
||||||
增值税普票
|
增值税普票
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button :label="2" >
|
<el-radio-button :label="2">
|
||||||
增值税专票
|
增值税专票
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
@ -183,20 +183,26 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-form-item label="项目说明" prop="projectDescription">
|
<el-form-item label="项目说明" prop="projectDescription">
|
||||||
<el-input placeholder="请填写项目说明" type="textarea" v-model="ruleForm.projectDescription"></el-input>
|
<el-input placeholder="请填写项目说明" type="textarea"
|
||||||
|
v-model="ruleForm.projectDescription"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table :data="[pageData]" border style="width: 100%">
|
|
||||||
<el-table-column prop="date" label="装备" width="180" >
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="name" label="租金" width="180" />
|
|
||||||
<el-table-column prop="address" label="供应商" />
|
|
||||||
</el-table>
|
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
|
<equipDetailTable
|
||||||
|
:price="pageData.monthLeasePrice"
|
||||||
|
:name="`${pageData.modelName}${pageData.deviceName}`"
|
||||||
|
:company="pageData.companyName"
|
||||||
|
:url="pageData.picUrl"
|
||||||
|
:brand="pageData.brand"
|
||||||
|
:code="pageData.code"
|
||||||
|
:group="pageData.groupName"
|
||||||
|
:position="pageData.location"
|
||||||
|
:specifications="pageData.specification"
|
||||||
|
:type="pageData.typeName"
|
||||||
|
unit="月"
|
||||||
|
></equipDetailTable>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="dialoglease = false">
|
<el-button type="primary" @click="dialoglease = false">
|
||||||
|
|
@ -205,6 +211,23 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogPhone"
|
||||||
|
title="服务电话"
|
||||||
|
width="30%"
|
||||||
|
>
|
||||||
|
<div style="font-size: 16px;font-weight: 600;">
|
||||||
|
{{ pageData.authPhone }}
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="openPhone">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
@ -215,6 +238,7 @@ import {getDetail} from "@/http/api/equip"
|
||||||
import {useRoute} from "vue-router";
|
import {useRoute} from "vue-router";
|
||||||
import Navmenu from '@/components/Navmenu/index.vue'
|
import Navmenu from '@/components/Navmenu/index.vue'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
import equipDetailTable from '@/components/equipDetailTable.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
|
@ -333,12 +357,13 @@ const equipDetailKeyList = reactive([
|
||||||
])
|
])
|
||||||
|
|
||||||
//
|
//
|
||||||
|
const dialogPhone = ref(false)
|
||||||
|
|
||||||
|
|
||||||
//装备详情数据
|
//装备详情数据
|
||||||
const pageData = ref({})
|
const pageData = ref({})
|
||||||
|
|
||||||
//
|
//我要租 弹窗
|
||||||
const dialoglease = ref(false)
|
const dialoglease = ref(false)
|
||||||
|
|
||||||
//装备收藏状态
|
//装备收藏状态
|
||||||
|
|
@ -346,46 +371,52 @@ const isCollect = ref(false)
|
||||||
|
|
||||||
//我要租 表单数据
|
//我要租 表单数据
|
||||||
const ruleForm = ref({
|
const ruleForm = ref({
|
||||||
address:'',//进场地址
|
address: '',//进场地址
|
||||||
detailAddress:'',//详细地址
|
detailAddress: '',//详细地址
|
||||||
entryTime:'',//进场时间
|
entryTime: '',//进场时间
|
||||||
duration:'',//工期时长
|
duration: '',//工期时长
|
||||||
machinist:0,//是否需要机手
|
machinist: 0,//是否需要机手
|
||||||
invoiceType:0,//发票类型
|
invoiceType: 0,//发票类型
|
||||||
projectDescription:''//项目说明
|
projectDescription: ''//项目说明
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
address:[
|
address: [
|
||||||
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
detailAddress:[
|
detailAddress: [
|
||||||
{required: true, message: '请输入详细地址', trigger: 'blur'}
|
{required: true, message: '请输入详细地址', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
entryTime:[
|
entryTime: [
|
||||||
{required: true, message: '请选择进场时间', trigger: 'blur'}
|
{required: true, message: '请选择进场时间', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
duration:[
|
duration: [
|
||||||
{required: true, message: '请输入工期时长', trigger: 'blur'}
|
{required: true, message: '请输入工期时长', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
machinist:[
|
machinist: [
|
||||||
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
invoiceType:[
|
invoiceType: [
|
||||||
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
{required: true, message: '请输入进场地址', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
projectDescription:[
|
projectDescription: [
|
||||||
{required: true, message: '请输入项目说明', trigger: 'blur'}
|
{required: true, message: '请输入项目说明', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
//打开我要租表单
|
//打开我要租表单
|
||||||
const openLease = () => {
|
const openLease = () => {
|
||||||
|
|
||||||
dialoglease.value = true
|
dialoglease.value = true
|
||||||
}
|
}
|
||||||
//切换收藏状态
|
//切换收藏状态
|
||||||
const collectChange = () => {
|
const collectChange = () => {
|
||||||
isCollect.value = !isCollect.value
|
isCollect.value = !isCollect.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//打开商家电话弹窗
|
||||||
|
const openPhone = () => {
|
||||||
|
dialogPhone.value = !dialogPhone.value
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开新标签页查看pdf
|
||||||
const openPdf = (name) => {
|
const openPdf = (name) => {
|
||||||
window.open(name)
|
window.open(name)
|
||||||
}
|
}
|
||||||
|
|
@ -393,8 +424,8 @@ const that = {
|
||||||
openPdf
|
openPdf
|
||||||
}
|
}
|
||||||
|
|
||||||
const handelDetailListClick = (fnName,arg) => {
|
const handelDetailListClick = (fnName, arg) => {
|
||||||
if(fnName){
|
if (fnName) {
|
||||||
that[fnName](arg)
|
that[fnName](arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -414,10 +445,11 @@ const init = () => {
|
||||||
init()
|
init()
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep() .el-form-item{
|
:deep() .el-form-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.el-form-item__content{
|
|
||||||
|
.el-form-item__content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -425,6 +457,7 @@ init()
|
||||||
.equipDetail {
|
.equipDetail {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue