协议管理

This commit is contained in:
hongchao 2025-11-20 15:50:45 +08:00
parent b2d05098c1
commit 28dceae839
2 changed files with 119 additions and 14 deletions

View File

@ -869,6 +869,7 @@ export default {
console.log('🚀 ~ val:', val) console.log('🚀 ~ val:', val)
this.form.projectUnitId = null this.form.projectUnitId = null
this.form.unitId = null this.form.unitId = null
this.form.projectId = val.id
this.departList = [] this.departList = []
this.uniteList = [] this.uniteList = []
this.getUnitList() this.getUnitList()

View File

@ -38,15 +38,6 @@
style="width: 240px" style="width: 240px"
/> />
</el-form-item> </el-form-item>
<el-form-item prop="typeName">
<el-input
v-model="queryParams.typeName"
placeholder="请输入物资名称"
clearable
:maxlength="20"
style="width: 240px"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
@ -74,7 +65,12 @@
/> />
<el-table-column label="分公司" align="center" prop="impUnitName" min-width="160"/> <el-table-column label="分公司" align="center" prop="impUnitName" min-width="160"/>
<el-table-column label="工程名称" align="center" prop="proName" min-width="160"/> <el-table-column label="工程名称" align="center" prop="proName" min-width="160"/>
<el-table-column label="机具类型" align="center" prop="jijuType" /> <el-table-column label="机具类型" align="center" prop="jijuType" >
<template slot-scope="scope">
<el-tag v-if="scope.row.jijuType == '施工机具'" effect="plain">施工机具</el-tag>
<el-tag type="warning" v-if="scope.row.jijuType == '安全工器具'" effect="plain">安全工器具</el-tag>
</template>
</el-table-column>
<el-table-column label="需求数量" align="center" prop="needNum" :show-overflow-tooltip="true" /> <el-table-column label="需求数量" align="center" prop="needNum" :show-overflow-tooltip="true" />
<el-table-column label="已供数量(累计)" align="center" prop="supplyNum" :show-overflow-tooltip="true" /> <el-table-column label="已供数量(累计)" align="center" prop="supplyNum" :show-overflow-tooltip="true" />
<el-table-column label="差值已供G-需求F" align="center" prop="diffNum" :show-overflow-tooltip="true" /> <el-table-column label="差值已供G-需求F" align="center" prop="diffNum" :show-overflow-tooltip="true" />
@ -88,6 +84,66 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 二级弹窗-->
<el-dialog :title="titleDevice" :visible.sync="openDeviceRecord" width="1200px" append-to-body>
<el-form :model="dialogDeviceQuery" ref="dialogDeviceQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="dialogDeviceQuery.keyWord"
placeholder="请输入关键字"
clearable
:maxlength="20"
style="width: 240px"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogUseQuery">查询</el-button>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-download" size="mini" @click="handleDialogUserExport">导出</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loadingDevice" :data="deviceRecordList" :max-height="650">
<el-table-column
label="序号"
align="center"
width="80"
type="index"
:index="indexContinuation(dialogDeviceQuery.pageNum, dialogDeviceQuery.pageSize)"
></el-table-column>
<el-table-column label="工程名称" align="center" prop="proName" min-width="160"/>
<el-table-column label="物资名称" align="center" prop="typeName" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
<el-table-column label="库存数量" align="center" prop="storeNum" :show-overflow-tooltip="true" />
<el-table-column label="在修数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
<el-table-column label="待入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true" />
<el-table-column label="总保有量" align="center" prop="allNum" :show-overflow-tooltip="true" />
<el-table-column label="总在用工程明细" align="center" prop="allUsNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.allUsNum > 0" class="clickText" @click="openUserRecords(scope.row)">
{{ scope.row.allUsNum }}
</span>
<!-- 否则直接显示数字 -->
<span v-else>
{{ scope.row.allUsNum }}
</span>
</template>
</el-table-column>>
</el-table>
<pagination
v-show="dialogDeviceTotal > 0"
:total="dialogDeviceTotal"
:page.sync="dialogDeviceQuery.pageNum"
:limit.sync="dialogDeviceQuery.pageSize"
@pagination="getUserRecords"
/>
</el-dialog>
<!-- 在用编码设备弹窗--> <!-- 在用编码设备弹窗-->
<el-dialog :title="title" :visible.sync="openUseRecord" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="openUseRecord" width="1200px" append-to-body>
<el-form :model="dialogUseQuery" ref="dialogUseQuery" size="small" :inline="true" label-width="80px"> <el-form :model="dialogUseQuery" ref="dialogUseQuery" size="small" :inline="true" label-width="80px">
@ -117,7 +173,13 @@
type="index" type="index"
:index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)" :index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
></el-table-column> ></el-table-column>
<el-table-column label="工程名称" align="center" prop="proName" width="200" /> <el-table-column label="工程名称" align="center" prop="proName" width="200" >
<template slot-scope="scope">
<span class="clickText" @click="openUserRecords(scope.row)">
{{ scope.row.proName }}
</span>
</template>
</el-table-column>
<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 label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" /> <el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" /> <el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
@ -164,7 +226,6 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
keyWord: null, keyWord: null,
typeName: null, //
proName: null, proName: null,
startTime: null, startTime: null,
endTime: null endTime: null
@ -178,7 +239,20 @@ export default {
typeId: undefined typeId: undefined
}, },
useRecordList: [], // useRecordList: [], //
dialogUserTotal: 0 dialogUserTotal: 0,
//
openDeviceRecord: false, //
dialogDeviceQuery: { //
pageNum: 1,
pageSize: 10,
keyWord: undefined,
typeId: undefined
},
deviceRecordList: [], //
dialogDeviceTotal: 0, //
titleDevice: '查看', //
} }
}, },
created() { created() {
@ -202,7 +276,6 @@ export default {
this.loading = true this.loading = true
const params = { const params = {
keyWord: this.queryParams.keyWord, keyWord: this.queryParams.keyWord,
typeName: this.queryParams.typeName,
proName: this.queryParams.proName, proName: this.queryParams.proName,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
@ -270,6 +343,36 @@ export default {
) )
}, },
// ------------------ // ------------------
//
openDeviceRecords(row) {
this.openUseRecord = true
this.dialogUseQuery.typeId = row.typeId
this.dialogUseQuery.keyWord = ''
this.dialogUseQuery.pageNum = 1
this.dialogUseQuery.pageSize = 10
this.useRecordList = []
this.getDevicerRecords()
},
/** 查询二级弹窗设备列表 */
getDevicerRecords() {
this.loadingDevice = true
getAllUsDetailsApi(this.dialogDeviceQuery)
.then(response => {
this.deviceRecordList = response.data.rows
this.dialogDeviceTotal = response.data.total
})
.catch(() => {
this.deviceRecordList = []
this.dialogDeviceTotal = 0
})
.finally(() => {
this.loadingDevice = false
})
},
// //
openUserRecords(row) { openUserRecords(row) {
this.openUseRecord = true this.openUseRecord = true
@ -280,6 +383,7 @@ export default {
this.useRecordList = [] this.useRecordList = []
this.getUserRecords() this.getUserRecords()
}, },
/** 查询在用设备列表 */ /** 查询在用设备列表 */
getUserRecords() { getUserRecords() {
this.loading2 = true this.loading2 = true