fix:报废明细图片添加无数据展示

This commit is contained in:
hhui 2024-05-06 17:56:22 +08:00
parent 2051c7c8d2
commit b86f8fd839
1 changed files with 596 additions and 958 deletions

View File

@ -1,53 +1,23 @@
<template>
<div class="app-container" id="brokenExamine">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="120px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="120px">
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.keyword" placeholder="请输入关键字" clearable maxlength="50"
style="width: 240px" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="单位名称" prop="backUnit">
<el-select
v-model="queryParams.backUnit"
placeholder="请选择单位名称"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in unitInfoSelectList"
:key="dict.unitId"
:label="dict.unitName"
:value="dict.unitId"
/>
<el-select v-model="queryParams.backUnit" placeholder="请选择单位名称" clearable filterable
style="width: 240px">
<el-option v-for="dict in unitInfoSelectList" :key="dict.unitId" :label="dict.unitName"
:value="dict.unitId" />
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="backPro">
<el-select
v-model="queryParams.backPro"
placeholder="请选择工程名称"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in projectSelectList"
:key="dict.projectId"
:label="dict.projectName"
:value="dict.projectId"
/>
<el-select v-model="queryParams.backPro" placeholder="请选择工程名称" clearable filterable
style="width: 240px">
<el-option v-for="dict in projectSelectList" :key="dict.projectId" :label="dict.projectName"
:value="dict.projectId" />
</el-select>
</el-form-item>
<el-form-item label="工机具类型" prop="type">
@ -66,235 +36,79 @@
<!-- :placeholder="'请选择'"-->
<!-- @handleNodeClick="selectDrop"-->
<!-- ></selectTree>-->
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
<Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
</el-form-item>
<el-form-item label="报废单号" prop="backCode">
<el-input
v-model="queryParams.backCode"
placeholder="请选择报废单号"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.backCode" placeholder="请选择报废单号" clearable maxlength="50"
style="width: 240px" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="报废状态" prop="repairStatus">
<el-select
v-model="queryParams.repairStatus"
placeholder="请选择报废状态"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in dicSelectList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
<el-select v-model="queryParams.repairStatus" placeholder="请选择报废状态" clearable filterable
style="width: 240px">
<el-option v-for="dict in dicSelectList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="任务创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" style="margin-left: 3%">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="multiple"
@click="checkClick"
>批量审核</el-button
>
<el-button type="primary" plain icon="el-icon-plus" size="mini" :disabled="multiple"
@click="checkClick">批量审核</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="typeList"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="报废审核单号"
align="center"
sortable
prop="scrapNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位名称"
align="center"
prop="unitName"
sortable
:show-overflow-tooltip="true"
/>
<el-table-column
label="工程名称"
sortable
align="center"
prop="projectName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="机具类型"
align="center"
prop="itemType"
sortable
:show-overflow-tooltip="true"
/>
<el-table-column
label="任务创建人"
sortable
align="center"
prop="createBy"
:show-overflow-tooltip="true"
/>
<el-table-column
label="任务创建时间"
sortable
align="center"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修单号"
align="center"
sortable
prop="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="报废审核单号" align="center" sortable prop="scrapNum" :show-overflow-tooltip="true" />
<el-table-column label="单位名称" align="center" prop="unitName" sortable :show-overflow-tooltip="true" />
<el-table-column label="工程名称" sortable align="center" prop="projectName" :show-overflow-tooltip="true" />
<el-table-column label="机具类型" align="center" prop="itemType" sortable :show-overflow-tooltip="true" />
<el-table-column label="任务创建人" sortable align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="任务创建时间" sortable align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="维修单号" align="center" sortable prop="repairNum" :show-overflow-tooltip="true" />
<el-table-column
label="审核状态"
align="center"
sortable
prop="taskStatusName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="不通过原因"
align="center"
sortable
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200px"
>
<el-table-column label="审核状态" align="center" sortable prop="taskStatusName" :show-overflow-tooltip="true" />
<el-table-column label="不通过原因" align="center" sortable prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
>查看</el-button
>
<el-button size="mini" type="primary" icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')">查看</el-button>
<!-- -->
<el-button
size="mini"
type="warning"
icon="el-icon-circle-check"
<el-button size="mini" type="warning" icon="el-icon-circle-check"
:disabled="scope.row.taskStatus !== 58"
@click="handleUpdate(scope.row, 'update')"
>审核</el-button
>
@click="handleUpdate(scope.row, 'update')">审核</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title="dialogTitle"
:visible.sync="open"
width="1300px"
append-to-body
:before-close="onClose"
>
<el-form
:model="dialogQueryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-dialog :title="dialogTitle" :visible.sync="open" width="1300px" append-to-body :before-close="onClose">
<el-form :model="dialogQueryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="100px">
<el-row>
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="dialogQueryParams.keyword"
placeholder="请输入关键字"
:clearable="false"
maxlength="50"
style="width: 240px"
/>
<el-input v-model="dialogQueryParams.keyword" placeholder="请输入关键字" :clearable="false"
maxlength="50" style="width: 240px" />
</el-form-item>
<el-form-item label="类型名称" prop="typeName">
<!-- <treeselect
@ -304,93 +118,38 @@
:normalizer="normalizer"
placeholder="请选择类型名称"
/> -->
<selectTree
ref="mychildDialog"
style="width: 240px"
:treeList="deptList"
:treeProps="{
<selectTree ref="mychildDialog" style="width: 240px" :treeList="deptList" :treeProps="{
children: 'children',
label: 'label',
}"
nodeKey="id"
:defaultSelect="true"
:defaultData="defaultData"
:clearable="false"
:placeholder="'请选择'"
@handleNodeClick="selectDropDialog"
></selectTree>
}" nodeKey="id" :defaultSelect="true" :defaultData="defaultData" :clearable="false"
:placeholder="'请选择'" @handleNodeClick="selectDropDialog"></selectTree>
</el-form-item>
<el-form-item label="规格型号" prop="type">
<selectTree
ref="mychildDialogTwo"
style="width: 240px"
:treeList="deptTypeList"
:treeProps="{
<selectTree ref="mychildDialogTwo" style="width: 240px" :treeList="deptTypeList" :treeProps="{
children: 'children',
label: 'label',
}"
nodeKey="id"
:defaultSelect="true"
:defaultData="defaultData"
:clearable="false"
:placeholder="'请选择'"
@handleNodeClick="selectDropDialogTwo"
></selectTree>
}" nodeKey="id" :defaultSelect="true" :defaultData="defaultData" :clearable="false"
:placeholder="'请选择'" @handleNodeClick="selectDropDialogTwo"></selectTree>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="getdialogList"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQueryDialog"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini"
@click="getdialogList">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryDialog">重置</el-button>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="dialogList"
height="500px"
@selection-change="handleDialogSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectableDialog"
/>
<el-table v-loading="loading" :data="dialogList" height="500px"
@selection-change="handleDialogSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectableDialog" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (dialogQueryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="类型名称"
align="center"
prop="machineTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
:show-overflow-tooltip="true"
/>
<el-table-column
label="编码"
align="center"
prop="maCode"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column label="类型名称" align="center" prop="machineTypeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
<el-table-column label="编码" align="center" prop="maCode" width="200" :show-overflow-tooltip="true" />
<!-- <el-table-column
label="维修总量"
align="center"
@ -403,158 +162,72 @@
prop="repairedNum"
:show-overflow-tooltip="true"
/> -->
<el-table-column
label="报废数量"
align="center"
prop="scrapNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<el-table-column label="报废数量" align="center" prop="scrapNum" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status == '0'">未审核</span>
<span v-if="scope.row.status == '1'">通过</span>
<span v-if="scope.row.status == '2'">驳回</span>
</template>
</el-table-column>
<el-table-column
label="上级"
align="center"
prop="scrapSource"
:show-overflow-tooltip="true"
>
<el-table-column label="上级" align="center" prop="scrapSource" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.scrapSource == '1'">退料</span>
<span v-if="scope.row.scrapSource == '2'"
>维修审核</span
>
<span v-if="scope.row.scrapSource == '2'">维修审核</span>
<span v-if="scope.row.scrapSource == '3'">盘点</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200px"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-zoom-in"
v-if="scope.row.scrapSource == '2'"
@click="scrapRecord(scope.row)"
>报废明细</el-button
>
<el-button size="mini" type="primary" icon="el-icon-zoom-in" v-if="scope.row.scrapSource == '2'"
@click="scrapRecord(scope.row)">报废明细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="dialogQueryParams.pageNum"
:limit.sync="dialogQueryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="dialogTotal > 0" :total="dialogTotal" :page.sync="dialogQueryParams.pageNum"
:limit.sync="dialogQueryParams.pageSize" @pagination="getList" />
<div
slot="footer"
class="dialog-footer-btn"
style="text-align: center"
v-if="type == 'update' && dialogList.length !== 0"
>
<el-button
type="primary"
@click="submitForm(1)"
:disabled="dialogMultiple"
>通过</el-button
>
<el-button @click="returnSubmit(1)" :disabled="dialogMultiple"
>不通过</el-button
>
<div slot="footer" class="dialog-footer-btn" style="text-align: center"
v-if="type == 'update' && dialogList.length !== 0">
<el-button type="primary" @click="submitForm(1)" :disabled="dialogMultiple">通过</el-button>
<el-button @click="returnSubmit(1)" :disabled="dialogMultiple">不通过</el-button>
</div>
</el-dialog>
<!-- 报废明细 -->
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
:title="title"
:visible.sync="openScrapRecord"
append-to-body
width="1200px"
>
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openScrapRecord"
append-to-body width="1200px">
<el-table :data="scrapRecordList" height="450px">
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (scrapRecordParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="报废原因"
align="center"
prop="scrapReason"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报废数量"
align="center"
prop="scrapNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报废类型"
align="center"
prop="scrapType"
:show-overflow-tooltip="true"
>
<el-table-column label="报废原因" align="center" prop="scrapReason" :show-overflow-tooltip="true" />
<el-table-column label="报废数量" align="center" prop="scrapNum" :show-overflow-tooltip="true" />
<el-table-column label="报废类型" align="center" prop="scrapType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.scrapType == '0'">自然报废</span>
<span v-if="scope.row.scrapType == '1'">人为报废</span>
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="checkImages(scope.row)"
>
<el-button type="primary" size="mini" @click="checkImages(scope.row)">
查看图片
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="scrapRecordTotal > 0"
:total="scrapRecordTotal"
:page.sync="scrapRecordParams.pageNum"
:limit.sync="scrapRecordParams.pageSize"
@pagination="getScrapRecordList"
/>
<pagination v-show="scrapRecordTotal > 0" :total="scrapRecordTotal" :page.sync="scrapRecordParams.pageNum"
:limit.sync="scrapRecordParams.pageSize" @pagination="getScrapRecordList" />
</el-dialog>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
:title="title"
:visible.sync="openOne"
append-to-body
width="400px"
>
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openOne" append-to-body
width="400px">
<div class="submit_box">
<div>
<i
class="el-icon-circle-check"
style="color: #ff9900; font-size: 30px"
></i>
<i class="el-icon-circle-check" style="color: #ff9900; font-size: 30px"></i>
</div>
<div class="submit_box_title">
<div>{{ openTextOne }}</div>
@ -563,52 +236,26 @@
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="submitOpenOneFeturn">返回</el-button>
<el-button type="primary" @click="submitOpenOneForm()"
>确定</el-button
>
<el-button type="primary" @click="submitOpenOneForm()">确定</el-button>
</div>
</el-dialog>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
:title="title"
:visible.sync="openTwo"
append-to-body
width="400px"
:before-close="openTextThreeClose"
>
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openTwo" append-to-body
width="400px" :before-close="openTextThreeClose">
<div class="submit_box_two">
<div>
<i
class="el-icon-circle-check"
style="color: #00c196; font-size: 30px"
></i>
<i class="el-icon-circle-check" style="color: #00c196; font-size: 30px"></i>
</div>
<div class="submit_box_title">{{ openTextThree }}</div>
</div>
<div slot="footer" class="dialog-footer"></div>
</el-dialog>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
:title="title"
:visible.sync="openThree"
append-to-body
width="800px"
>
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openThree" append-to-body
width="800px">
<div class="submit_box">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="140px"
>
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form-item label="请输入驳回原因:" prop="remark">
<el-input
style="width: 600px"
type="textarea"
v-model="form.remark"
maxlength="100"
show-word-limit
></el-input>
<el-input style="width: 600px" type="textarea" v-model="form.remark" maxlength="100"
show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
@ -617,34 +264,22 @@
<el-button type="primary" @click="formSubmit">保存</el-button>
</div>
</el-dialog>
<el-dialog
v-loading.fullscreen.lock="fullscreenLoading"
:title="title"
:visible.sync="openFour"
append-to-body
width="400px"
>
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openFour" append-to-body
width="400px">
<div class="submit_box_openFour">
你选择了{{ selectionList.length }}条数据,请进行审批
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="submitForm(2)" type="primary"
>通过</el-button
>
<el-button @click="submitForm(2)" type="primary">通过</el-button>
<el-button @click="returnSubmit(2)">不通过</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<div style="width: 100%; height: 500px">
<img
v-for="(item, index) in imagesList"
:key="index"
width="50%"
height="200px"
:src="uploadUrl + item"
alt=""
/>
<el-dialog :visible.sync="dialogVisible" title="图片">
<div style="width: 100%; height: 500px" v-if="imagesList.length > 0">
<img v-for="(item, index) in imagesList" :key="index" width="50%" height="200px" :src="uploadUrl + item"
alt="" />
</div>
<el-empty style="width: 100%; height: 500px" v-else description="暂无数据"></el-empty>
</el-dialog>
</div>
</template>
@ -1135,15 +770,18 @@
font-weight: 600;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 70px !important;
margin-bottom: 6px;
}
.dialog-footer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
}
.submit_box_openFour {
display: flex;
justify-content: center;