修改客户所提基础问题

This commit is contained in:
lizhenhua 2025-07-09 15:28:10 +08:00
parent 8840f294e8
commit f943ee47ac
4 changed files with 34 additions and 20 deletions

View File

@ -59,7 +59,7 @@ const lessorMenus: MenuItem[] = [
{ title: '接单管理', name: 'accept-orders', permission: ['1'] }, { title: '接单管理', name: 'accept-orders', permission: ['1'] },
{ title: '装备维保', name: 'quality-manage', permission: ['1'] }, { title: '装备维保', name: 'quality-manage', permission: ['1'] },
{ title: '合同管理', name: 'contract-manage', permission: ['1'] }, { title: '合同管理', name: 'contract-manage', permission: ['1'] },
{ title: '自有装备管理', name: 'owned-manage', permission: ['1'] }, /* { title: '自有装备管理', name: 'owned-manage', permission: ['1'] }, */
{ title: '外租装备管理', name: 'rent-manage', permission: ['1'] }, { title: '外租装备管理', name: 'rent-manage', permission: ['1'] },
{ title: '机械化施工装备配置率', name: 'rent-facility', permission: ['1'] }, { title: '机械化施工装备配置率', name: 'rent-facility', permission: ['1'] },
{ title: '后台管理', name: 'admin', permission: ['1'] }, { title: '后台管理', name: 'admin', permission: ['1'] },

View File

@ -57,6 +57,7 @@
<Line <Line
v-show="showSecondPage" v-show="showSecondPage"
:title="secondPageTitle" :title="secondPageTitle"
:secondPageTitleId="secondPageTitleId"
:table-data="detailTableData" :table-data="detailTableData"
@back="handleBack" @back="handleBack"
/> />
@ -75,6 +76,7 @@ const total = ref(0)
const queryParams = ref({ pageNum: 1, pageSize: 5 }) const queryParams = ref({ pageNum: 1, pageSize: 5 })
const showSecondPage = ref(false) const showSecondPage = ref(false)
const secondPageTitle = ref('') const secondPageTitle = ref('')
const secondPageTitleId = ref('')
const detailTableData = ref([]) const detailTableData = ref([])
// //
@ -118,6 +120,7 @@ const handleDrill = async (row, type) => {
if(res.code ==200){ if(res.code ==200){
//secondPageTitle.value = `${row.deptName}`; //secondPageTitle.value = `${row.deptName}`;
secondPageTitle.value = `${row.companyName }详情页面`; secondPageTitle.value = `${row.companyName }详情页面`;
secondPageTitleId.value =row.companyId;
showSecondPage.value = true; showSecondPage.value = true;
detailTableData.value =res.rows detailTableData.value =res.rows
} }

View File

@ -4,7 +4,10 @@
<el-icon class="back-icon" @click="$emit('back')"><ArrowLeft /></el-icon> <el-icon class="back-icon" @click="$emit('back')"><ArrowLeft /></el-icon>
<span class="second-page-title">{{ title }}</span> <span class="second-page-title">{{ title }}</span>
</div> </div>
<!-- <el-button @click="handleExport">
<el-icon><Download /></el-icon>
导出数据
</el-button> -->
<el-table <el-table
:data="tableData" :data="tableData"
border border
@ -56,9 +59,10 @@
<script setup> <script setup>
import { ArrowLeft } from '@element-plus/icons-vue' import { ArrowLeft } from '@element-plus/icons-vue'
import { defineProps } from 'vue' import { defineProps } from 'vue'
import { exportNewBuy} from '@/http/api/rent-facility/line'
const props = defineProps({ const props = defineProps({
title: String, title: String,
secondPageTitleId: String,
tableData: Array tableData: Array
}) })
@ -69,6 +73,13 @@ const headerCellStyle = {
color: '#fff', color: '#fff',
textAlign: 'center' textAlign: 'center'
} }
function handleExport(){
const companyId = props.secondPageTitleId
exportNewBuy({ companyId }).then((response) => {
console.log('导出成功')
})
}
function calculateActual(row) { function calculateActual(row) {
const standard = parseFloat(row.standard); const standard = parseFloat(row.standard);
const own = parseFloat(row.own || 0); const own = parseFloat(row.own || 0);
@ -102,7 +113,7 @@ function calculateActual(row) {
return actual.toFixed(2); return actual.toFixed(2);
} }
</script> </script>
<style scoped> <style scoped>

View File

@ -13,7 +13,7 @@
<el-form-item prop="maName"> <el-form-item prop="maName">
<el-select <el-select
v-model="queryParams.maName" v-model="queryParams.maName"
placeholder="请选择装备名称" placeholder="请选择装备类目"
style="width: 100%" style="width: 100%"
clearable clearable
filterable filterable
@ -33,7 +33,7 @@
v-model.trim="queryParams.maModel" v-model.trim="queryParams.maModel"
style="width: 100%" style="width: 100%"
clearable clearable
placeholder="请输入自有装备规格" placeholder="请输入自有装备名称"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -75,8 +75,8 @@
show-overflow-tooltip show-overflow-tooltip
:header-cell-style="{ background: '#00a288', color: '#fff' }" :header-cell-style="{ background: '#00a288', color: '#fff' }"
> >
<el-table-column align="center" prop="maName" label="装备名称" /> <el-table-column align="center" prop="maName" label="装备类目" />
<el-table-column align="center" prop="maModel" label="装备规格" /> <el-table-column align="center" prop="maModel" label="装备名称" />
<el-table-column align="center" prop="maNum" label="装备数量" /> <el-table-column align="center" prop="maNum" label="装备数量" />
<el-table-column align="center" label="操作" :width="220"> <el-table-column align="center" label="操作" :width="220">
<template #default="{ row }"> <template #default="{ row }">
@ -112,10 +112,10 @@
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="装备名称" prop="maNameId"> <el-form-item label="装备类目" prop="maNameId">
<el-select <el-select
v-model="addAndEditForm.maNameId" v-model="addAndEditForm.maNameId"
placeholder="请选择装备名称" placeholder="请选择装备类目"
style="width: 100%" style="width: 100%"
clearable clearable
filterable filterable
@ -132,11 +132,11 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="装备规格" prop="maModel"> <el-form-item label="装备名称" prop="maModel">
<el-input <el-input
v-model="addAndEditForm.maModel" v-model="addAndEditForm.maModel"
maxlength="50" maxlength="50"
placeholder="请输入装备规格" placeholder="请输入装备名称"
clearable clearable
style="width: 100%" style="width: 100%"
/> />
@ -175,7 +175,7 @@ const store = useStore()
import { mainStore } from 'store/main' import { mainStore } from 'store/main'
const store2 = mainStore() const store2 = mainStore()
import { import {
getEquipmentNameList, // getEquipmentNameList, //
getContractListApi, // getContractListApi, //
addContractApi, // addContractApi, //
editContractApi, // editContractApi, //
@ -227,7 +227,7 @@ const getContractListData = async () => {
console.log('表格数据:', qualityLis.value) // console.log('表格数据:', qualityLis.value) //
} }
// //
const loadEquipmentNameOptions = async () => { const loadEquipmentNameOptions = async () => {
const res: any = await getEquipmentNameList() const res: any = await getEquipmentNameList()
if (res.code === 200) { if (res.code === 200) {
@ -237,7 +237,7 @@ const loadEquipmentNameOptions = async () => {
})) }))
console.log('下拉选项:', equipmentNameOptions.value) // console.log('下拉选项:', equipmentNameOptions.value) //
} else { } else {
ElMessage.error('获取装备名称失败') ElMessage.error('获取装备类目失败')
} }
} }
@ -269,7 +269,7 @@ const onContract = (row: any) => {
addAndEditForm.value.id = row.id addAndEditForm.value.id = row.id
// id // id
const matchedOption = equipmentNameOptions.value.find(option => option.label === row.maName) const matchedOption = equipmentNameOptions.value.find(option => option.label === row.maName)
if (matchedOption) { if (matchedOption) {
addAndEditForm.value.maNameId = matchedOption.value addAndEditForm.value.maNameId = matchedOption.value
@ -291,7 +291,7 @@ const onContract = (row: any) => {
console.log('找到的选项:', foundOption) // console.log('找到的选项:', foundOption) //
if (!foundOption) { if (!foundOption) {
console.warn('警告:找不到对应的装备名称选项maNameId:', addAndEditForm.value.maNameId) console.warn('警告:找不到对应的装备类目选项maNameId:', addAndEditForm.value.maNameId)
} }
} }
@ -305,16 +305,16 @@ const onDialogClose = () => {
} }
const addAndEditFormRules = reactive({ const addAndEditFormRules = reactive({
maNameId: [{ required: true, message: '请选择装备名称', trigger: 'change' }], maNameId: [{ required: true, message: '请选择装备类目', trigger: 'change' }],
maType: [{ required: true, message: '请输入装备分类', trigger: 'blur' }], maType: [{ required: true, message: '请输入装备分类', trigger: 'blur' }],
maModel: [{ required: true, message: '请输入装备规格', trigger: 'blur' }], maModel: [{ required: true, message: '请输入装备名称', trigger: 'blur' }],
maNum: [{ required: true, type: 'number', message: '请输入装备数量', trigger: 'blur' }] maNum: [{ required: true, type: 'number', message: '请输入装备数量', trigger: 'blur' }]
}) })
const onSubmit = () => { const onSubmit = () => {
addAndEditFormRef.value.validate(async (valid: any) => { addAndEditFormRef.value.validate(async (valid: any) => {
if (valid) { if (valid) {
const SEN_API = settleinTitle.value === '自有装备修改' ? editContractApi : addContractApi const SEN_API = settleinTitle.value === '外租装备修改' ? editContractApi : addContractApi
const res: any = await SEN_API(addAndEditForm.value) const res: any = await SEN_API(addAndEditForm.value)
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('提交成功') ElMessage.success('提交成功')