修改bug

This commit is contained in:
Teo
2025-08-21 18:32:37 +08:00
parent 5c1aca212e
commit e4f2548199
9 changed files with 67 additions and 47 deletions

View File

@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 开发环境 # 开发环境
VITE_APP_BASE_API = 'http://192.168.110.180:8899' VITE_APP_BASE_API = 'http://192.168.110.213:8899'
# 无人机接口地址 # 无人机接口地址

View File

@ -7,8 +7,7 @@
<el-form :model="state.queryForm" :inline="true"> <el-form :model="state.queryForm" :inline="true">
<el-form-item label="版本号" prop="versions"> <el-form-item label="版本号" prop="versions">
<el-select v-model="state.queryForm.versions" placeholder="选择版本号"> <el-select v-model="state.queryForm.versions" placeholder="选择版本号">
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" <el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
:value="item.versions" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="表名" prop="sheet"> <el-form-item label="表名" prop="sheet">
@ -25,13 +24,23 @@
<el-form-item> <el-form-item>
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false"> <el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false">
<template #trigger> <template #trigger>
<el-button v-if="Object.keys(state.versionsData).length === 0 || state.versionsData.status == 'cancel' ||state.versionsData.status == 'back'" type="primary">导入excel</el-button> <el-button
v-if="
Object.keys(state.versionsData).length === 0 || state.versionsData.status == 'cancel' || state.versionsData.status == 'back'
"
type="primary"
>导入excel</el-button
>
</template> </template>
</el-upload> </el-upload>
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" <el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
@click="clickApprovalSheet()">审核</el-button> <el-button
<el-button v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'" v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button> icon="view"
@click="lookApprovalFlow()"
type="warning"
>查看流程</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -39,36 +48,47 @@
<el-form :model="state.queryForm" :inline="true"> <el-form :model="state.queryForm" :inline="true">
<el-form-item label="版本号" prop="versions"> <el-form-item label="版本号" prop="versions">
<el-select v-model="state.queryForm.versions" placeholder="选择版本号" @change="handleChangeVersion"> <el-select v-model="state.queryForm.versions" placeholder="选择版本号" @change="handleChangeVersion">
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" <el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
:value="item.versions" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px;"> <el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px">
<template #trigger> <template #trigger>
<el-button type="primary">导入excel</el-button> <el-button type="primary">导入excel</el-button>
</template> </template>
</el-upload> </el-upload>
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" <el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
@click="clickApprovalSheet()">审核</el-button> <el-button
<el-button v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'" v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button> icon="view"
@click="lookApprovalFlow()"
type="warning"
>查看流程</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-table v-if="index < 3" :ref="(el) => (tableRef[index] = el)" :data="state.tableData" <el-table
v-loading="state.loading.list" stripe :row-class-name="state.tableData.length === 0 ? 'table-null' : ''" v-if="index < 3"
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" lazy border :ref="(el) => (tableRef[index] = el)"
:default-expand-all="true"> :data="state.tableData"
v-loading="state.loading.list"
stripe
:row-class-name="state.tableData.length === 0 ? 'table-null' : ''"
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)"
row-key="id"
lazy
border
:default-expand-all="true"
>
<el-table-column prop="num" label="编号" /> <el-table-column prop="num" label="编号" />
<el-table-column prop="name" label="工程或费用名称" /> <el-table-column prop="name" label="工程或费用名称" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="specification" label="规格" /> <el-table-column prop="specification" label="规格" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" /> <el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
</el-table> </el-table>
<el-table v-if="index == 3" :data="state.tableData" <el-table v-if="index == 3" :data="state.tableData" style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" border>
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" border>
<el-table-column prop="num" label="编号" /> <el-table-column prop="num" label="编号" />
<el-table-column prop="name" label="名称" /> <el-table-column prop="name" label="名称" />
<el-table-column prop="specification" label="规格" /> <el-table-column prop="specification" label="规格" />
@ -126,7 +146,7 @@ const state = reactive({
}); });
// tab切换 // tab切换
const handleTabChange = (tab) => { const handleTabChange = (tab) => {
console.log('tab',tab); console.log('tab', tab);
state.tableData = []; state.tableData = [];
state.options = []; state.options = [];
state.sheets = []; state.sheets = [];
@ -164,7 +184,7 @@ async function getVersionNums(isSheet = true) {
// if (state.work_order_type == 3) { // if (state.work_order_type == 3) {
state.versionsData = state.options[0] || []; state.versionsData = state.options[0] || [];
console.log('state.versionsData', state.versionsData); console.log('state.versionsData', state.versionsData);
// console.log('state.versionsData', state.versionsData); // console.log('state.versionsData', state.versionsData);
// } // }
// 等待表名加载完成 // 等待表名加载完成
console.log(isSheet, state.sheets.length); console.log(isSheet, state.sheets.length);
@ -308,7 +328,7 @@ function handleArr(arr, flag, table) {
function clickApprovalSheet(row) { function clickApprovalSheet(row) {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/approval/billofQuantities/indexEdit`+state.work_order_type, path: `/approval/billofQuantities/indexEdit` + state.work_order_type,
query: { query: {
id: state.queryForm.versions, id: state.queryForm.versions,
type: 'update' type: 'update'
@ -318,7 +338,7 @@ function clickApprovalSheet(row) {
// 审核流程 // 审核流程
function lookApprovalFlow(row) { function lookApprovalFlow(row) {
proxy.$router.push({ proxy.$router.push({
path: `/approval/billofQuantities/indexEdit`+state.work_order_type, path: `/approval/billofQuantities/indexEdit` + state.work_order_type,
query: { query: {
id: state.queryForm.versions, id: state.queryForm.versions,
type: 'view' type: 'view'

View File

@ -31,9 +31,9 @@
placeholder="请选择实际完成时间" placeholder="请选择实际完成时间"
/> />
</el-form-item> </el-form-item>
<el-form-item label="手续材料" prop="formalitiesUrl"> <!-- <el-form-item label="手续材料" prop="formalitiesUrl">
<el-input v-model="queryParams.formalitiesUrl" placeholder="请输入手续材料" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.formalitiesUrl" placeholder="请输入手续材料" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button>

View File

@ -25,7 +25,7 @@
<table style="width: 100%" border="1" cellspacing="1"> <table style="width: 100%" border="1" cellspacing="1">
<thead> <thead>
<tr> <tr>
<th colspan="2">设备材料名称</th> <th colspan="2">设备材料名称</th>
<td class="th-bg" colspan="2">{{ formData.materialName }}</td> <td class="th-bg" colspan="2">{{ formData.materialName }}</td>
<th colspan="2">规格及数量</th> <th colspan="2">规格及数量</th>
<td class="th-bg" colspan="2">见下表</td> <td class="th-bg" colspan="2">见下表</td>
@ -79,7 +79,7 @@
<tbody> <tbody>
<tr> <tr>
<td colspan="7"> <td colspan="7">
<div style="margin-bottom: 10px;">缺陷情况:</div> <div style="margin-bottom: 10px">缺陷情况:</div>
{{ formData.defectDescription }} {{ formData.defectDescription }}
</td> </td>
</tr> </tr>
@ -90,10 +90,10 @@
<td colspan="8"> <td colspan="8">
<span>是否附带以下随机资料</span> <span>是否附带以下随机资料</span>
<div class="file_detail"> <div class="file_detail">
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} </span> <span>(1) 合格证 {{ formData.certCount ? formData.certCount : 0 }} </span>
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} </span> <span>(2) 出厂报告 {{ formData.reportCount ? formData.reportCount : 0 }} </span>
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} </span> <span>(3) 技术资料文件 {{ formData.techDocCount ? formData.techDocCount : 0 }} </span>
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} </span> <span>(4) 厂家资质文件 {{ formData.licenseCount ? formData.licenseCount : 0 }} </span>
</div> </div>
</td> </td>
</tr> </tr>
@ -248,11 +248,10 @@ defineExpose({
} }
} }
} }
.file_detail{ .file_detail {
> span {
>span{ width: 40%;
width: 40%; display: inline-block;
display: inline-block;
} }
} }
table { table {

View File

@ -81,10 +81,10 @@
<td colspan="8"> <td colspan="8">
<span>是否附带以下随机资料</span> <span>是否附带以下随机资料</span>
<div class="file_detail"> <div class="file_detail">
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} </span> <span>(1) 合格证 {{ formData.certCount ? formData.certCount : 0 }} </span>
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFile.length : 0 }} </span> <span>(2) 出厂报告 {{ formData.reportCount ? formData.reportCount : 0 }} </span>
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFile.length : 0 }} </span> <span>(3) 技术资料文件 {{ formData.techDocCount ? formData.techDocCount : 0 }} </span>
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFile.length : 0 }} </span> <span>(4) 厂家资质文件 {{ formData.licenseCount ? formData.licenseCount : 0 }} </span>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -56,6 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column label="出库登记" align="center"> <el-table-column label="出库登记" align="center">
<el-table-column label="交接单位" align="center" prop="recipient" /> <el-table-column label="交接单位" align="center" prop="recipient" />
<el-table-column label="使用部位" align="center" prop="usePart" />
<el-table-column label="数量" align="center" prop="number"> <el-table-column label="数量" align="center" prop="number">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.outPut === '1'">{{ scope.row.number }}</span> <span v-if="scope.row.outPut === '1'">{{ scope.row.number }}</span>

View File

@ -88,7 +88,7 @@
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="flex items-center justify-between p-4 border-t"> <div class="flex items-center justify-between p-4 border-t" v-if="total > 0">
<div class="text-gray-500 text-sm"> <div class="text-gray-500 text-sm">
{{ total }} 条记录当前显示第 {{ (currentPage - 1) * pageSize + 1 }} {{ Math.min(currentPage * pageSize, total) }} {{ total }} 条记录当前显示第 {{ (currentPage - 1) * pageSize + 1 }} {{ Math.min(currentPage * pageSize, total) }}
</div> </div>

View File

@ -166,7 +166,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="flex flex-wrap items-center justify-between p-4 border-t gap-4"> <div class="flex flex-wrap items-center justify-between p-4 border-t gap-4" v-if="total > 0">
<div class="text-gray-500 text-sm"> <div class="text-gray-500 text-sm">
{{ total }} 条记录当前显示第 {{ (currentPage - 1) * pageSize + 1 }} {{ Math.min(currentPage * pageSize, total) }} {{ total }} 条记录当前显示第 {{ (currentPage - 1) * pageSize + 1 }} {{ Math.min(currentPage * pageSize, total) }}
</div> </div>

View File

@ -18,9 +18,9 @@
<el-option v-for="item in matrixOptions" :key="item.id" :label="item.matrixName" :value="item.id" /> <el-option v-for="item in matrixOptions" :key="item.id" :label="item.matrixName" :value="item.id" />
</el-select> --> </el-select> -->
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button type="primary" icon="Download" @click="handleQuery">导出周报</el-button> <el-button type="primary" icon="Download" @click="handleQuery">导出周报</el-button>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</el-card> </el-card>
</div> </div>