This commit is contained in:
bb_pan 2025-03-10 18:22:32 +08:00
parent 3dff11627b
commit 6ccdefa930
7 changed files with 506 additions and 687 deletions

View File

@ -381,4 +381,22 @@ export function getPreAuditNum(params) {
method: 'get',
params,
})
}
// 库管员-下拉
export function getMaTypeKeepList(params) {
return request({
url: '/material/base/tm_task/getMaTypeKeepList',
method: 'get',
params,
})
}
// 获取差额量
export function getPreNumInUse(params) {
return request({
url: '/material/base/tm_task/getPreNumInUse',
method: 'get',
params,
})
}

View File

@ -54,14 +54,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item
label="费用承担方"
v-if="queryParams.leaseTypeName == '工程租赁'"
>
<el-input
v-model="queryParams.costBearingParty"
disabled
/>
<el-form-item label="费用承担方" v-if="queryParams.leaseTypeName == '工程租赁'">
<el-input v-model="queryParams.costBearingParty" disabled />
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
@ -87,12 +81,7 @@
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="机具名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<!-- <el-table-column type="expand">
<template slot-scope="scope">
<div class="nested-table-container">
@ -139,55 +128,22 @@
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="计量单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="当前库存"
align="center"
prop="num"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预出库数量"
align="center"
prop="outNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预领数量"
align="center"
prop="preNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="申请人"
align="center"
prop="applyFor"
:show-overflow-tooltip="true"
/>
<el-table-column
label="申请时间"
align="center"
prop="updateTimes"
:show-overflow-tooltip="true"
/>
<el-table-column
label="任务状态"
align="center"
prop="taskName"
:show-overflow-tooltip="true"
/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="当前库存" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="预出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="差缺量" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope" v-if="Number(scope.row.outNum) - Number(scope.row.num) > 0">
<span style="color: red; cursor: pointer" @click="handleDifference(scope.row)">
{{ Number(scope.row.outNum) - Number(scope.row.num) }}
</span>
</template>
</el-table-column>
<el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true" />
<el-table-column label="申请人" align="center" prop="applyFor" :show-overflow-tooltip="true" />
<el-table-column label="申请时间" align="center" prop="updateTimes" :show-overflow-tooltip="true" />
<el-table-column label="任务状态" align="center" prop="taskName" :show-overflow-tooltip="true" />
<!-- <el-table-column label="审批结果 " align="center" prop="dictName" :show-overflow-tooltip="true" />-->
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
@ -211,19 +167,11 @@
<el-col :span="6">
<el-timeline>
<el-timeline-item
color="#0bbd87"
icon="el-icon-check"
placement="top"
>
<el-timeline-item color="#0bbd87" icon="el-icon-check" placement="top">
<el-card>
<p class="title">提交审批</p>
<p class="author"
>申请人{{ queryParams.applyFor }}</p
>
<p class="time"
>申请时间{{ queryParams.updateTimes }}</p
>
<p class="author">申请人{{ queryParams.applyFor }}</p>
<p class="time">申请时间{{ queryParams.updateTimes }}</p>
</el-card>
</el-timeline-item>
<el-timeline-item
@ -236,12 +184,8 @@
>
<el-card>
<p class="title">{{ v.name }}</p>
<p class="author" v-if="queryParams[v.authorKey]"
>审核人{{ queryParams[v.authorKey] }}</p
>
<p class="time" v-if="queryParams[v.timeKey]"
>审核时间{{ queryParams[v.timeKey] }}</p
>
<p class="author" v-if="queryParams[v.authorKey]">审核人{{ queryParams[v.authorKey] }}</p>
<p class="time" v-if="queryParams[v.timeKey]">审核时间{{ queryParams[v.timeKey] }}</p>
<p class="remark" v-if="queryParams[v.remarkKey]"
>审核意见{{ queryParams[v.remarkKey] }}</p
>
@ -270,12 +214,7 @@
</div>
<!-- 同意 -->
<el-dialog
title="审核意见"
:visible.sync="examineVisible"
width="600px"
:close-on-click-modal="false"
>
<el-dialog title="审核意见" :visible.sync="examineVisible" width="600px" :close-on-click-modal="false">
<el-input
placeholder="请输入审核意见"
type="textarea"
@ -302,12 +241,7 @@
</div>
</el-dialog>
<!-- 驳回 -->
<el-dialog
title="审核意见"
:visible.sync="refuseVisible"
width="600px"
:close-on-click-modal="false"
>
<el-dialog title="审核意见" :visible.sync="refuseVisible" width="600px" :close-on-click-modal="false">
<el-input
placeholder="请输入审核意见"
type="textarea"
@ -333,23 +267,63 @@
>
</div>
</el-dialog>
<!--差缺量-弹框 -->
<el-dialog title="差缺量" :visible.sync="differenceVisible" width="50%">
<el-form ref="dialogForm" :model="dialogForm" inline size="small" @submit.native.prevent>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="dialogForm.keyWord"
placeholder="请输入关键字"
clearable
@keyup.enter.native="getDifferenceList"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDifferenceList">查询</el-button>
<el-button type="warning" icon="el-icon-download" @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<el-table :data="differenceList">
<el-table-column
align="center"
label="序号"
type="index"
:index="indexContinuation(dialogForm.pageNum, dialogForm.pageSize)"
/>
<el-table-column
v-for="(column, index) in differenceColumns"
:label="column.label"
:prop="column.prop"
:key="index"
align="center"
show-overflow-tooltip
></el-table-column>
</el-table>
<!-- 分页 -->
<pagination
v-show="dialogForm.total > 0"
:total="dialogForm.total"
:page.sync="dialogForm.pageNum"
:limit.sync="dialogForm.pageSize"
@pagination="getDifferenceList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="differenceVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
import {
auditLeaseByCompanyCq,
getLeaseListAllCq,
rejectLeaseByCompanyCq,
updateLeaseTaskStatusConfirmByCq,
getPreNumInUse,
} from '@/api/claimAndRefund/receive'
import { mapState } from 'vuex'
export default {
@ -474,6 +448,34 @@ export default {
timestamp: '2018-04-11',
},
],
//
dialogForm: {
pageNum: 1,
pageSize: 10,
keyWord: '',
typeId: '',
total: 0,
},
differenceVisible: false,
differenceList: [],
differenceColumns: [
{
prop: 'proName',
label: '领料工程',
},
{
prop: 'unitName',
label: '领料单位',
},
{
prop: 'code',
label: '单号',
},
{
prop: 'preNum',
label: '领料数量',
},
],
}
},
computed: {
@ -594,11 +596,7 @@ export default {
const res = await getLeaseListAllCq({ taskId })
this.loading = false
this.queryParams = { ...this.queryParams, ...res.rows[0] }
this.$set(
this.queryParams,
'leaseApplyInfo',
this.queryParams.leaseApplyInfoList[0],
)
this.$set(this.queryParams, 'leaseApplyInfo', this.queryParams.leaseApplyInfoList[0])
this.queryParams.leaseApplyDetails.forEach((v) => {
this.$set(v, 'applyFor', this.queryParams.applyFor)
this.$set(v, 'updateTimes', this.queryParams.updateTimes)
@ -752,13 +750,11 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download(
'system/dict/type/export',
{
...this.queryParams,
},
`type_${new Date().getTime()}.xlsx`,
)
const params = {
keyWord: this.dialogForm.keyWord,
typeId: this.dialogForm.typeId,
}
this.download('material/base/tm_task/exportPreNumInUse', params, `占用单据_${new Date().getTime()}.xlsx`)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
@ -767,6 +763,29 @@ export default {
this.$store.dispatch('dict/cleanDict')
})
},
//
async handleDifference(row) {
console.log('🚀 ~ handleDifference ~ row:', row)
this.dialogForm.typeId = row.typeId
this.differenceVisible = true
this.getDifferenceList()
},
//
async getDifferenceList() {
console.log('🚀 ~ 差缺量列表 ~ :', this.dialogForm)
try {
const params = {
...this.dialogForm,
}
delete params.total
const res = await getPreNumInUse(params)
console.log('🚀 ~ handleDifference ~ res:', res)
this.differenceList = res.data.rows
this.dialogForm.total = res.data.total
} catch (error) {
console.log('🚀 ~ handleDifference ~ error:', error)
}
},
},
}
</script>

View File

@ -28,12 +28,7 @@
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
@ -45,12 +40,7 @@
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="关键字" prop="keyword">
@ -64,19 +54,8 @@
</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>
@ -91,12 +70,7 @@
>新建</el-button>
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
>导出</el-button
>
</el-col>
@ -110,18 +84,10 @@
<!-- v-hasPermi="['store:labelType:remove']"-->
<!-- >刷新缓存</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="leaseAuditList"
@selection-change="handleSelectionChange"
border
>
<el-table v-loading="loading" :data="leaseAuditList" @selection-change="handleSelectionChange" border>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column
label="序号"
@ -139,75 +105,28 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column
label="领料单号"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料类型"
align="center"
prop="leaseType"
:show-overflow-tooltip="true"
>
<el-table-column label="领料单号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="领料类型" align="center" prop="leaseType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.leaseType == 0">工程租赁</span>
<span v-if="scope.row.leaseType == 1">长期领用</span>
</template>
</el-table-column>
<el-table-column
label="领料单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料工程"
align="center"
prop="proName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="协议号"
align="center"
prop="agreementCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料人"
align="center"
prop="leasePerson"
:show-overflow-tooltip="true"
/>
<el-table-column
label="联系电话"
align="center"
prop="leasePhone"
:show-overflow-tooltip="true"
/>
<el-table-column
label="申请人"
align="center"
prop="applyFor"
:show-overflow-tooltip="true"
/>
<el-table-column label="领料单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="领料工程" align="center" prop="proName" :show-overflow-tooltip="true" />
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
<el-table-column label="领料人" align="center" prop="leasePerson" :show-overflow-tooltip="true" />
<el-table-column label="联系电话" align="center" prop="leasePhone" :show-overflow-tooltip="true" />
<el-table-column label="申请人" align="center" prop="applyFor" :show-overflow-tooltip="true" />
<el-table-column
label="预计领料时间"
align="center"
prop="estimateLeaseTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="申请时间"
align="center"
prop="createTimes"
:show-overflow-tooltip="true"
/>
<el-table-column label="申请时间" align="center" prop="createTimes" :show-overflow-tooltip="true" />
<el-table-column
label="任务状态"
align="center"
@ -216,11 +135,7 @@
width="150"
/>
<!-- <el-table-column label="审批结果 " align="center" prop="dictName" :show-overflow-tooltip="true" />-->
<el-table-column
label="备注"
align="center"
:show-overflow-tooltip="true"
>
<el-table-column label="备注" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span
v-if="
@ -234,21 +149,13 @@
</el-table-column>
<el-table-column label="操作" width="160" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleView(scope.row)"
>查看</el-button
>
<el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
<el-button
size="mini"
type="text"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:fgs']"
v-if="
Number(scope.row.examineStatusId) == 31 ||
Number(scope.row.examineStatusId) == 117
"
v-if="Number(scope.row.examineStatusId) == 31 || Number(scope.row.examineStatusId) == 117"
>审批</el-button
>
<el-button
@ -267,12 +174,7 @@
style="color: #e6a23c"
>编辑</el-button
>
<el-button
size="mini"
type="text"
@click="openLld(scope.row)"
>领料单</el-button
>
<el-button size="mini" type="text" @click="openLld(scope.row)">领料单</el-button>
</template>
</el-table-column>
</el-table>
@ -289,120 +191,61 @@
<el-dialog :visible.sync="open" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div
class="title"
style="
text-align: center;
font-weight: 600;
font-size: 16px;
"
>领料单</div
>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px">领料单</div>
<div>
<span>库管员</span>
<!-- 下拉 -->
<el-select
v-show="showSelect"
id="printArea"
ref="elSelect"
v-model="maTypeUserId"
placeholder="请选择"
style="width: 180px"
clearable
filterable
size="small"
@change="changeMaType"
>
<el-option
v-for="(item, index) in maTypeUserList"
:key="index"
:label="item.maTypeUserName"
:value="item.maTypeUserId"
/>
</el-select>
<span v-show="!showSelect" @click="showSelect = true" style="cursor: pointer">{{ maTypeUserName }}</span>
</div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>领料单位</span>
{{ leaseApplyData.unitName }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>工程名称</span>
{{ leaseApplyData.proName }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>时间</span>
{{ leaseApplyData.updateTimes }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>编号</span>
{{ leaseApplyData.code }}
</div>
</div>
<el-table
:data="leaseApplyDetails"
class="table"
border
style="margin-top: 20px; padding: 1px"
>
<el-table :data="leaseApplyDetails" class="table" border style="margin-top: 20px; padding: 1px">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column
label="序号"
align="center"
type="index"
/>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
/>
<el-table-column
label="计量单位"
align="center"
prop="unitName"
/>
<el-table-column
label="预领数量"
align="center"
prop="preNum"
/>
<el-table-column
label="备注"
align="center"
prop="remark"
/>
<el-table-column
label="出库方式"
align="center"
prop="manageTypeName"
/>
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<el-table-column label="规格型号" align="center" prop="typeModelName" />
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="预领数量" align="center" prop="preNum" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="出库方式" align="center" prop="manageTypeName" />
</el-table>
<div
class="fillIn"
style="
margin-top: 30px;
display: flex;
justify-content: space-between;
"
>
<div class="fillIn" style="margin-top: 30px; display: flex; justify-content: space-between">
<div class="item" style="width: 25%">
<span>审核</span>
</div>
@ -427,19 +270,13 @@
</template>
<script>
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
import {
getLeaseManageListAllCq,
getUnitData,
getProData,
getLeaseListAllCq,
getMaTypeKeepList,
} from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login'
import vueEasyPrint from 'vue-easy-print'
@ -526,8 +363,21 @@ export default {
leaseApplyDetails: [],
//
leaseApplyData: {},
showSelect: true,
maTypeUserId: '', // id
maTypeUserName: '', //
taskId: '', // id
//
maTypeUserList: [],
}
},
// maTypeUserId
watch: {
maTypeUserId: function (newVal, oldVal) {
console.log('🚀 ~ newVal:', newVal)
},
},
created() {
this.GetUserInfo()
// this.getList();
@ -664,8 +514,19 @@ export default {
//
async openLld(row) {
this.open = true
this.taskId = row.taskId
this.maTypeUserId = ''
this.getLeaseListAllCq()
// const res = await getLeaseListAllCq({ taskId: row.taskId })
const res = await getLeaseListAllCq({ taskId: row.taskId })
// this.leaseApplyDetails = res.rows[0].leaseApplyDetails
// this.leaseApplyData = res.rows[0]
// console.log('this.leaseApplyData ============', this.leaseApplyData)
this.getMaTypeList(row)
},
async getLeaseListAllCq() {
const res = await getLeaseListAllCq({ taskId: this.taskId, maTypeUserId: this.maTypeUserId })
this.leaseApplyDetails = res.rows[0].leaseApplyDetails
this.leaseApplyData = res.rows[0]
@ -674,7 +535,10 @@ export default {
},
//
print() {
this.$refs.remarksPrintRef.print()
this.showSelect = false
this.$nextTick(() => {
this.$refs.remarksPrintRef.print()
})
},
//
@ -744,6 +608,25 @@ export default {
this.$store.dispatch('dict/cleanDict')
})
},
//
async getMaTypeList(row) {
const res = await getMaTypeKeepList({ taskId: row.taskId })
// console.log('🚀 ~ getMaTypeList ~ res:', res)
this.maTypeUserList = res.data
},
changeMaType() {
// console.log('🚀 ~ changeMaType ~ :', this.maTypeUserId)
if (this.maTypeUserId) {
// this.showSelect = false
this.maTypeUserName = this.maTypeUserList.find(
(item) => item.maTypeUserId == this.maTypeUserId,
).maTypeUserName
} else {
// this.showSelect = true
this.maTypeUserName = ''
}
this.getLeaseListAllCq()
},
},
}
</script>

View File

@ -124,7 +124,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"
@ -317,7 +317,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"

View File

@ -135,7 +135,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"
@ -322,7 +322,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"

View File

@ -135,7 +135,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"
@ -322,7 +322,7 @@
:action="uploadUrl"
:headers="headers"
list-type="picture-card"
accept="image/*,application/pdf,application/msword"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:file-list="domain.fileList"

View File

@ -66,12 +66,7 @@
<!-- :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
@ -91,12 +86,7 @@
filterable
style="width: 240px"
>
<el-option
v-for="dict in dicSelectList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
<el-option v-for="dict in dicSelectList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
@ -112,69 +102,32 @@
></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">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="multiple"
@click="checkClick"
<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 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"
border
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column
label="序号"
align="center"
width="80"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
>
<!-- <template slot-scope="scope">
<span>{{
@ -182,68 +135,19 @@
}}</span>
</template> -->
</el-table-column>
<el-table-column
label="修试审核单号"
align="center"
prop="scrapNum"
show-overflow-tooltip
/>
<el-table-column
label="单位名称"
align="center"
prop="unitName"
show-overflow-tooltip
/>
<el-table-column
label="工程名称"
align="center"
prop="projectName"
show-overflow-tooltip
/>
<el-table-column
label="机具类型"
align="center"
prop="itemType"
show-overflow-tooltip
/>
<el-table-column
label="任务创建人"
align="center"
prop="createBy"
show-overflow-tooltip
/>
<el-table-column
label="任务创建时间"
align="center"
prop="createTime"
show-overflow-tooltip
/>
<el-table-column
label="维修单号"
align="center"
prop="repairNum"
show-overflow-tooltip
/>
<el-table-column label="修试审核单号" align="center" prop="scrapNum" show-overflow-tooltip />
<el-table-column label="单位名称" align="center" prop="unitName" show-overflow-tooltip />
<el-table-column label="工程名称" align="center" prop="projectName" show-overflow-tooltip />
<el-table-column label="机具类型" align="center" prop="itemType" show-overflow-tooltip />
<el-table-column label="任务创建人" align="center" prop="createBy" show-overflow-tooltip />
<el-table-column label="任务创建时间" align="center" prop="createTime" show-overflow-tooltip />
<el-table-column label="维修单号" align="center" prop="repairNum" show-overflow-tooltip />
<el-table-column
label="审核状态"
align="center"
prop="taskStatusName"
show-overflow-tooltip
/>
<el-table-column
label="不通过原因"
align="center"
prop="remark"
show-overflow-tooltip
/>
<el-table-column label="审核状态" align="center" prop="taskStatusName" show-overflow-tooltip />
<el-table-column label="不通过原因" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
<el-button size="mini" type="text" icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')"
>查看</el-button
>
<!-- -->
@ -255,6 +159,9 @@
@click="handleUpdate(scope.row, 'update')"
>审核</el-button
>
<el-button size="mini" type="text" icon="el-icon-document" @click="openUpkeep(scope.row)"
>保养记录表</el-button
>
</template>
</el-table-column>
</el-table>
@ -268,13 +175,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title="dialogTitle"
:visible.sync="open"
width="1300px"
append-to-body
:before-close="onClose"
>
<el-dialog :title="dialogTitle" :visible.sync="open" width="1300px" append-to-body :before-close="onClose">
<el-form
:model="dialogQueryParams"
ref="queryForm"
@ -335,19 +236,10 @@
></selectTree>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="getdialogList"
<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 icon="el-icon-refresh" size="mini" @click="resetQueryDialog">重置</el-button>
</el-form-item>
</el-row>
</el-form>
@ -358,12 +250,7 @@
height="500px"
@selection-change="handleDialogSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectableDialog"
/>
<el-table-column type="selection" width="55" align="center" :selectable="selectableDialog" />
<!-- <el-table-column
label="序号"
align="center"
@ -382,74 +269,50 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(
queryParams.pageNum,
queryParams.pageSize,
)
"
/>
<el-table-column
label="机具名称"
align="center"
prop="machineTypeName"
:show-overflow-tooltip="true"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<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="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修数量"
align="center"
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="maCode" width="200" :show-overflow-tooltip="true" />
<el-table-column label="维修总量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
<el-table-column label="维修数量" align="center" 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">
<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"
class-name="small-padding fixed-width"
width="200px"
>
<el-table-column label="附件" align="center" prop="fileList" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-zoom-in"
@click="repairRecord(scope.row)"
<el-upload
class="upload-demo"
:action="uploadUrl"
:headers="headers"
accept="image/*,application/pdf,.doc,.docx"
multiple
:limit="5"
:on-preview="handlePreview"
:before-remove="beforeRemove"
:on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
:on-exceed="handleExceed"
:before-upload="beforeUpload"
:file-list="scope.row.fileList"
:on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)"
>
<el-button size="small" type="text">点击上传</el-button>
</el-upload>
</template>
</el-table-column>
<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="repairRecord(scope.row)"
>维修记录</el-button
>
<!-- <el-button
@ -475,15 +338,8 @@
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
>
<el-button type="primary" @click="submitForm(1)" :disabled="dialogMultiple">通过</el-button>
<el-button @click="returnSubmit(1)" :disabled="dialogMultiple">不通过</el-button>
</div>
</el-dialog>
@ -496,74 +352,25 @@
width="1200px"
>
<el-table :data="repairRecordList" height="450px">
<el-table-column
label="序号"
align="center"
width="80"
type="index"
>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
(repairRecordParams.pageNum - 1) * 10 +
scope.$index +
1
}}</span>
<span>{{ (repairRecordParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="维修内容"
align="center"
prop="repairContent"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修数量"
align="center"
prop="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修人"
align="center"
prop="repairer"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修方式"
align="center"
prop="repairType"
:show-overflow-tooltip="true"
>
<el-table-column label="维修内容" align="center" prop="repairContent" :show-overflow-tooltip="true" />
<el-table-column label="维修数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
<el-table-column label="维修人" align="center" prop="repairer" :show-overflow-tooltip="true" />
<el-table-column label="维修方式" align="center" prop="repairType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.repairType == '1'">内部</span>
<span v-if="scope.row.repairType == '2'">返厂</span>
<span v-if="scope.row.repairType == '3'">报废</span>
</template>
</el-table-column>
<el-table-column
label="返厂名称"
align="center"
prop="supplier"
: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"
>
<el-table-column label="返厂名称" align="center" prop="supplier" :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>
@ -575,18 +382,11 @@
<!-- prop="partName"-->
<!-- :show-overflow-tooltip="true"-->
<!-- />-->
<el-table-column
label="配件数量"
align="center"
prop="partNum"
:show-overflow-tooltip="true"
>
<el-table-column label="配件数量" align="center" prop="partNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span
@click="partRecord(scope.row)"
style="color: blue; text-decoration: underline"
>{{ scope.row.partNum }}</span
>
<span @click="partRecord(scope.row)" style="color: blue; text-decoration: underline">{{
scope.row.partNum
}}</span>
</template>
</el-table-column>
@ -596,12 +396,7 @@
<!-- prop="partPrice"-->
<!-- :show-overflow-tooltip="true"-->
<!-- />-->
<el-table-column
label="类型"
align="center"
prop="partType"
:show-overflow-tooltip="true"
>
<el-table-column label="类型" align="center" prop="partType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.partType == '0'">不收费</span>
<span v-if="scope.row.partType == '1'">收费</span>
@ -626,38 +421,14 @@
width="1200px"
>
<el-table :data="partRecordList" height="450px">
<el-table-column
label="序号"
align="center"
width="80"
type="index"
>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
(partRecordParams.pageNum - 1) * 10 +
scope.$index +
1
}}</span>
<span>{{ (partRecordParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="配件名称"
align="center"
prop="partName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="配件数量"
align="center"
prop="partNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="配件费用"
align="center"
prop="partCost"
:show-overflow-tooltip="true"
/>
<el-table-column label="配件名称" align="center" prop="partName" :show-overflow-tooltip="true" />
<el-table-column label="配件数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
<el-table-column label="配件费用" align="center" prop="partCost" :show-overflow-tooltip="true" />
<!-- <el-table-column-->
<!-- label="类型"-->
<!-- align="center"-->
@ -669,12 +440,7 @@
<!-- <span v-if="scope.row.partType == '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" />
</el-table>
<pagination
v-show="partRecordTotal > 0"
@ -694,10 +460,7 @@
>
<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>
@ -706,9 +469,7 @@
</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
@ -721,10 +482,7 @@
>
<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>
@ -738,12 +496,7 @@
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"
@ -768,16 +521,104 @@
append-to-body
width="400px"
>
<div class="submit_box_openFour">
你选择了{{ selectionList.length }}条数据,请进行审批
</div>
<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 title="维修记录表" :visible.sync="upkeepVisible" width="46%">
<vue-easy-print tableShow ref="printRef">
<div style="padding: 0 30px">
<h2 style="text-align: center; font-size: 33px">重庆市送变电工程有限公司</h2>
<h3 style="text-align: center; font-size: 28px">设备维修保养记录表</h3>
<div
style="
border: 1px solid #000;
min-height: 800px;
line-height: 1.9;
font-size: 20px;
position: relative;
box-sizing: border-box;
width: 100%;
"
>
<!-- 第一行 -->
<div style="display: flex; border-bottom: 1px solid #000">
<div style="text-align: center; border-right: 1px solid #000; width: 25%">设备名称</div>
<div style="text-align: center; border-right: 1px solid #000; width: 25%">型号厂家</div>
<div style="text-align: center; border-right: 1px solid #000; width: 18%">编号</div>
<div style="text-align: center; border-right: 1px solid #000; width: 12%">数量</div>
<div style="text-align: center; border-right: 1px solid #000; width: 20%">主修人</div>
<div style="text-align: center; width: 20%">验收人</div>
</div>
<!-- 第二行 -->
<div style="display: flex; border-bottom: 1px solid #000">
<div style="text-align: center; border-right: 1px solid #000; width: 25%">{{
upkeepObj.typeName
}}</div>
<div style="text-align: center; border-right: 1px solid #000; width: 25%">{{
upkeepObj.itemType
}}</div>
<div
style="
text-align: center;
border-right: 1px solid #000;
width: calc(18%);
white-space: pre-wrap;
word-break: break-word;
"
><span style="margin: 0 5px">{{ upkeepObj.repairNum }}</span></div
>
<div style="text-align: center; border-right: 1px solid #000; width: 12%">{{
upkeepObj.num
}}</div>
<div style="text-align: center; border-right: 1px solid #000; width: 20%">{{
upkeepObj.createBy
}}</div>
<div style="text-align: center; width: 20%">{{ upkeepObj.createBy }}</div>
</div>
<!-- 第三行 -->
<div style="display: flex; border-bottom: 1px solid #000">
<div style="padding-left: 10px; border-right: 1px solid #000; width: 20.85%">设备名称</div>
<div style="padding-left: 10px">{{ upkeepObj.unitName }} {{ upkeepObj.projectName }}</div>
</div>
<!-- 第四行 -->
<div style="width: 100%; min-height: 200px; border-bottom: 1px solid #000; padding-left: 10px"
>设备维修前情况:
</div>
<!-- 第五行 -->
<div style="width: 100%; min-height: 200px; border-bottom: 1px solid #000; padding-left: 10px"
>技术鉴定情况:
</div>
<!-- 第六行 -->
<div style="width: 100%; min-height: 200px; padding-left: 10px">维修处理情况: </div>
<div
style="
width: 100%;
border-top: 1px solid #000;
padding-left: 10px;
position: absolute;
bottom: 20px;
left: 0;
"
>验收情况:
</div>
</div>
<div style="text-align: end; font-size: 20px; margin-top: 20px">
<span>{{ '2025' }} </span>
<span>{{ '3' }} </span>
<span>{{ '10' }} </span>
</div>
</div>
</vue-easy-print>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="upkeepVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -799,12 +640,17 @@ import {
} from '@/api/repairTest/repair'
import selectTree from '../repair/selectTree.vue'
import Tree from '@/views/repairTest/repair/tree.vue'
import vueEasyPrint from 'vue-easy-print'
export default {
name: 'TestExamine',
components: { Tree, selectTree },
components: { Tree, selectTree, vueEasyPrint },
dicts: ['sys_normal_disable'],
data() {
return {
uploadUrl: process.env.VUE_APP_BASE_API + '/system/sys/file/upload', //
headers: {
Authorization: 'Bearer ' + localStorage.getItem('token'),
},
checkResultOne: false,
defaultData: null,
selectionList: [],
@ -900,6 +746,8 @@ export default {
pageSize: 10,
},
partRecordTotal: 0,
upkeepVisible: false, //
upkeepObj: {},
}
},
created() {
@ -920,9 +768,7 @@ export default {
/** 查询字典类型列表 */
getList() {
this.loading = true
getQuestListApi(
this.addDateRange(this.queryParams, this.dateRange),
).then((response) => {
getQuestListApi(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
this.typeList = response.rows
this.total = response.total
this.loading = false
@ -1042,9 +888,7 @@ export default {
//
handleSelectionChange(selection) {
this.selectionList = selection
this.checkResultOne = selection.every(
(item) => item.taskStatus == 46,
)
this.checkResultOne = selection.every((item) => item.taskStatus == 46)
this.ids = selection.map((item) => item.dictId)
this.single = selection.length != 1
this.multiple = !selection.length
@ -1253,6 +1097,61 @@ export default {
`试验检验单_${new Date().getTime()}.xlsx`,
)
},
// -
print() {
this.$nextTick(() => {
this.$refs.printRef.print()
})
},
//
openUpkeep(row) {
console.log('🚀 ~ openUpkeep ~ row:', row)
this.upkeepVisible = true
this.upkeepObj = row
},
handlePreview(file) {
console.log('🚀 ~ handlePreview ~ file:', file)
if (file.response) {
window.open(file.response.data.fileUrl)
} else {
window.open(file.fileUrl)
}
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 5 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`,
)
},
beforeUpload(file) {
const isLtMB = file.size / 1024 / 1024 < 20
if (!isLtMB) {
this.$message.error('上传文件大小不能超过 20MB!')
}
return isLtMB
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name} `)
},
handleSuccess(res, file, fileList, row) {
console.log('🚀 ~ handleSuccess ~ res:', res)
console.log('🚀 ~ handleSuccess ~ file:', file)
console.log('🚀 ~ handleSuccess ~ fileList:', fileList)
console.log('🚀 ~ handleSuccess ~ row:', row)
if (res.code == 200) {
if (!row.fileList) {
row.fileList = []
}
row.fileList.push({
typeId: row.typeId,
fileName: res.data.fileName,
fileUrl: res.data.fileUrl,
})
}
console.log('🚀 ~ row.fileList=fileList.map ~ row.fileList:', row.fileList)
},
},
}
</script>