h合并
This commit is contained in:
@ -328,13 +328,14 @@ onUnmounted(() => {
|
||||
padding: 15px 5px 5px 5px;
|
||||
.progress_text_title {
|
||||
width: 100%;
|
||||
// height: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
& > div:first-child {
|
||||
// 第一个子元素的样式
|
||||
width: 50%;
|
||||
// width: 50%;
|
||||
height: 100%;
|
||||
font-size: 24px;
|
||||
// font-weight: bold;
|
||||
font-family: 'AlimamaShuHeiTi', sans-serif;
|
||||
@ -343,10 +344,14 @@ onUnmounted(() => {
|
||||
|
||||
& > div:last-child {
|
||||
// 最后一个子元素的样式
|
||||
width: 50%;
|
||||
// width: 50%;
|
||||
height: 100%;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.content_text {
|
||||
|
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<!-- 机械台账详情抽屉 -->
|
||||
|
||||
<el-drawer v-model="isShowDialog" size="40%" direction="ltr">
|
||||
<template #header>
|
||||
<span>机械台账详情</span>
|
||||
</template>
|
||||
<el-form ref="formRef" :model="formData" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称">{{ formData.devicename }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备类型">{{ formData.deviceType }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编号">{{ formData.deviceNumber }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组名称">{{ formData.teamName }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入场日期">{{ parseTime(formData.entryTime, '{y}-{m}-{d}') }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格型号">{{ formData.specification }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产能力">{{ formData.production }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车牌号码">{{ formData.plateNumber }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备管理员">{{ formData.deviceKeeper }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆行驶证">{{ formData.drivingLicence }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="新旧程度">{{ formData.degree }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆容量">{{ formData.vehicleCapacity }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="车辆净重">{{ formData.suttle }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="铭牌">
|
||||
<el-image :src="formData.nameplate" fit="contain" style="width: 150px; height: 150px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合格证书">
|
||||
<el-image :src="formData.equipmentPhoto" fit="contain" style="width: 150px; height: 150px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备照片">
|
||||
<el-image :src="formData.qualification" fit="contain" style="width: 150px; height: 150px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="检验报告">
|
||||
<el-image :src="formData.verificationReport" fit="contain" style="width: 150px; height: 150px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="上传时间">{{ formData.createdAt }}</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">{{ formData.remark }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getMechanicalrewriting } from '@/api/mechanical/mechanicalrewriting';
|
||||
const formData: any = ref({
|
||||
devicename: '',
|
||||
deviceType: '',
|
||||
deviceNumber: '',
|
||||
teamName: '',
|
||||
entryTime: '',
|
||||
specification: '',
|
||||
production: '',
|
||||
plateNumber: '',
|
||||
deviceKeeper: '',
|
||||
drivingLicence: '',
|
||||
degree: '',
|
||||
vehicleCapacity: '',
|
||||
suttle: '',
|
||||
nameplate: '',
|
||||
qualification: '',
|
||||
equipmentPhoto: '',
|
||||
verificationReport: '',
|
||||
createdAt: '',
|
||||
remark: ''
|
||||
});
|
||||
const isShowDialog = ref(false);
|
||||
const open = async (id?: any) => {
|
||||
console.log(id);
|
||||
isShowDialog.value = true;
|
||||
if (id) {
|
||||
const res = await getMechanicalrewriting(id);
|
||||
console.log(res);
|
||||
formData.value = res.data;
|
||||
// form.value.equipmentType = res.data.deviceNumber + '_' + res.data.deviceType;
|
||||
// Object.assign(form.value, res.data);
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
});
|
||||
</script>
|
||||
|
@ -23,11 +23,11 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['mechanical:mechanicalrewriting:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['mechanical:mechanicalrewriting:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -58,7 +58,7 @@
|
||||
<el-table-column label="操作" align="center" fixed="right" min-width="200" fixed-width>
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleUpdate(scope.row)" v-hasPermi="['mechanical:mechanicalrewriting:edit']"
|
||||
<el-button link type="primary" icon="View" @click="handleDetails(scope.row)" v-hasPermi="['mechanical:mechanicalrewriting:edit']"
|
||||
>详情</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
@ -80,6 +80,7 @@
|
||||
</el-card>
|
||||
|
||||
<addComponent ref="addComponentRef" @success="getList" />
|
||||
<detailsComponent ref="detailsComponentRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -93,6 +94,7 @@ import {
|
||||
} from '@/api/mechanical/mechanicalrewriting';
|
||||
import { MechanicalrewritingVO, MechanicalrewritingQuery, MechanicalrewritingForm } from '@/api/mechanical/mechanicalrewriting/types';
|
||||
import addComponent from './components/add.vue';
|
||||
import detailsComponent from './components/details.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -216,13 +218,14 @@ const handleAdd = () => {
|
||||
const handleUpdate = async (row?: MechanicalrewritingVO) => {
|
||||
// reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
// const res = await getMechanicalrewriting(_id);
|
||||
// Object.assign(form.value, res.data);
|
||||
// dialog.visible = true;
|
||||
// dialog.title = '修改机械台账';
|
||||
addComponentRef.value?.open(_id);
|
||||
};
|
||||
|
||||
const detailsComponentRef = ref();
|
||||
//详情
|
||||
const handleDetails = (row) => {
|
||||
const _id = row?.id || ids.value[0];
|
||||
detailsComponentRef.value?.open(_id);
|
||||
};
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
mechanicalrewritingFormRef.value?.validate(async (valid: boolean) => {
|
||||
|
@ -1,14 +1,12 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="请选择项目:" prop="pid" label-width="100">
|
||||
<el-select v-model="queryParams.projectId" placeholder="请选择" @change="handleChange" clearable>
|
||||
<el-option v-for="item in matrixOptions" :key="item.projectId" :label="item.name"
|
||||
:value="item.projectId" />
|
||||
<el-option v-for="item in matrixOptions" :key="item.projectId" :label="item.name" :value="item.projectId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="请选择方阵:" prop="pid" label-width="100" v-if="relevancyStructure == '2'">
|
||||
@ -29,8 +27,13 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<file-upload upload-url="/progress/progressCategory/import" v-model="file" :limit="1"
|
||||
:file-type="['xls', 'xlsx']" :on-upload-success="handleSuccess">
|
||||
<file-upload
|
||||
upload-url="/progress/progressCategory/import"
|
||||
v-model="file"
|
||||
:limit="1"
|
||||
:file-type="['xls', 'xlsx']"
|
||||
:on-upload-success="handleSuccess"
|
||||
>
|
||||
<el-button type="primary" plain icon="upload">导入</el-button>
|
||||
</file-upload>
|
||||
</el-col>
|
||||
@ -67,12 +70,17 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
<el-table ref="progressCategoryTableRef" v-loading="loading" :data="progressCategoryList" row-key="id"
|
||||
:default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
max-height="550">
|
||||
<el-table
|
||||
ref="progressCategoryTableRef"
|
||||
v-loading="loading"
|
||||
:data="progressCategoryList"
|
||||
row-key="id"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
max-height="550"
|
||||
>
|
||||
<!-- <el-table-column label="父类别id" prop="parentId" /> -->
|
||||
<el-table-column label="类别名称" prop="name" width="230" />
|
||||
<el-table-column label="计量方式" align="center" prop="unitType">
|
||||
@ -121,12 +129,10 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<div>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['progress:progressCategory:edit']">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['progress:progressCategory:edit']">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['progress:progressCategory:remove']">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['progress:progressCategory:remove']">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
@ -140,9 +146,14 @@
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="progressCategoryFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="父类别" prop="parentId" v-if="!form.id">
|
||||
<el-tree-select v-model="form.parentId" :data="progressCategoryOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }" value-key="id" placeholder="请选择父类别"
|
||||
check-strictly />
|
||||
<el-tree-select
|
||||
v-model="form.parentId"
|
||||
:data="progressCategoryOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择父类别"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计量方式" prop="unitType" v-if="!form.workType && form.unitType != '0'">
|
||||
<el-select v-model="form.unitType" placeholder="请选择关联数据">
|
||||
@ -165,7 +176,7 @@
|
||||
<el-input v-model="form.total" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联数据" prop="workType" v-if="!form.id && form.unitType != '0'">
|
||||
<el-select v-model="form.workType" placeholder="请选择关联数据">
|
||||
<el-select v-model="form.workType" placeholder="请选择关联数据" clearable>
|
||||
<el-option v-for="dict in progress_work_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -242,7 +253,7 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
const tempData = ref([])
|
||||
const tempData = ref([]);
|
||||
const initFormData: ProgressCategoryForm = {
|
||||
id: undefined,
|
||||
parentId: undefined,
|
||||
@ -310,16 +321,16 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const matrixIdList = ref([]);
|
||||
const ownerOutputSum = computed(() => {
|
||||
let sum = 0;
|
||||
tempData.value.forEach(item => {
|
||||
tempData.value.forEach((item) => {
|
||||
sum += Number(item.ownerOutputValue);
|
||||
})
|
||||
});
|
||||
return proxy.formatPrice(sum);
|
||||
});
|
||||
const constructionOutputSum = computed(() => {
|
||||
let sum = 0;
|
||||
tempData.value.forEach(item => {
|
||||
tempData.value.forEach((item) => {
|
||||
sum += Number(item.constructionOutputValue);
|
||||
})
|
||||
});
|
||||
return proxy.formatPrice(sum);
|
||||
});
|
||||
/** 查询分项工程单价列表 */
|
||||
|
Reference in New Issue
Block a user