代码提交
This commit is contained in:
parent
2ec044e166
commit
2c1850c735
|
|
@ -5,12 +5,15 @@
|
||||||
<el-card class="search-box">
|
<el-card class="search-box">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item prop="orderCreateUser" label="申请人">
|
<el-form-item prop="orderCreateUser" label="申请人">
|
||||||
<el-input clearable style="width: 200px" placeholder="请输入内容" v-model.trim="queryParams.orderCreateUser" />
|
<el-input clearable style="width: 200px" placeholder="请输入内容"
|
||||||
|
v-model.trim="queryParams.orderCreateUser"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间" prop="orderCreateTime">
|
<el-form-item label="申请时间" prop="orderCreateTime">
|
||||||
<el-date-picker type="daterange" style="width: 200px" unlink-panels range-separator="至"
|
<el-date-picker type="daterange" style="width: 200px" unlink-panels range-separator="至"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
|
||||||
v-model="queryParams.orderCreateTime" />
|
v-model="queryParams.orderCreateTime"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="审批状态" prop="entryStatus">
|
<el-form-item label="审批状态" prop="entryStatus">
|
||||||
|
|
@ -27,7 +30,8 @@
|
||||||
|
|
||||||
<el-form-item prop="specificationModel" label="规格型号">
|
<el-form-item prop="specificationModel" label="规格型号">
|
||||||
<el-input clearable style="width: 200px" placeholder="请输入内容"
|
<el-input clearable style="width: 200px" placeholder="请输入内容"
|
||||||
v-model.trim="queryParams.specificationModel" />
|
v-model.trim="queryParams.specificationModel"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="originalCode" label="装备原始编码">
|
<el-form-item prop="originalCode" label="装备原始编码">
|
||||||
|
|
@ -43,35 +47,26 @@
|
||||||
<el-form-item prop="productionDate" label="出厂日期">
|
<el-form-item prop="productionDate" label="出厂日期">
|
||||||
<el-date-picker type="daterange" style="width: 200px" unlink-panels range-separator="至"
|
<el-date-picker type="daterange" style="width: 200px" unlink-panels range-separator="至"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
|
||||||
v-model="queryParams.productionDate" />
|
v-model="queryParams.productionDate"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item prop="keyword" label="采购日期">
|
|
||||||
<el-date-picker
|
|
||||||
type="date"
|
|
||||||
style="width: 240px"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="请选择采购日期"
|
|
||||||
v-model="queryParams.applyTime"
|
|
||||||
/>
|
|
||||||
</el-form-item>-->
|
|
||||||
|
|
||||||
<el-form-item prop="minOriginalValue" label="资产原值(万元)">
|
<el-form-item prop="minOriginalValue" label="资产原值(万元)">
|
||||||
<el-input clearable style="width: 85px" placeholder="请输入" v-model.trim="queryParams.minOriginalValue" />
|
<el-input clearable style="width: 85px" placeholder="请输入" @input="handleNumberInput('minOriginalValue')" v-model.trim="queryParams.minOriginalValue" />
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="maxOriginalValue" label="-" style="margin-left: -85px;" label-width="107px">
|
<el-form-item prop="maxOriginalValue" label="-" style="margin-left: -85px;" label-width="107px">
|
||||||
<el-input clearable style="width: 85px" placeholder="请输入" v-model.trim="queryParams.maxOriginalValue" />
|
<el-input clearable style="width: 85px" @input="handleNumberInput('maxOriginalValue')" placeholder="请输入" v-model.trim="queryParams.maxOriginalValue" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" style="text-align: right;">
|
<el-col :span="24" style="text-align: right;">
|
||||||
|
|
||||||
<el-button class="primary-lease" size="mini" icon="el-icon-search" type="primary" @click="getEquipmentApplyList">
|
<el-button class="primary-lease" size="mini" icon="el-icon-search" type="primary"
|
||||||
|
@click="getEquipmentApplyList"
|
||||||
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="primary-lease" size="mini" icon="el-icon-refresh" @click="resetForm">
|
<el-button class="primary-lease" size="mini" icon="el-icon-refresh" @click="resetForm">
|
||||||
|
|
@ -97,8 +92,10 @@
|
||||||
<el-table ref="tableRef" :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
|
<el-table ref="tableRef" :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
|
||||||
<!-- <el-table :data="tableData" >-->
|
<!-- <el-table :data="tableData" >-->
|
||||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip column-key="orderNumber"
|
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
|
||||||
min-width="200" />
|
column-key="orderNumber"
|
||||||
|
min-width="200"
|
||||||
|
/>
|
||||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
||||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -115,17 +112,26 @@
|
||||||
|
|
||||||
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center"
|
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center"
|
||||||
min-width="100" />
|
min-width="100"
|
||||||
<el-table-column prop="originalCode" label="装备原始编码" show-overflow-tooltip align="center" min-width="100" />
|
/>
|
||||||
|
<el-table-column prop="originalCode" label="装备原始编码" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100" />
|
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
<!-- <el-table-column prop="orderNumber" label="采购日期" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="采购日期" align="center"/>-->
|
||||||
<el-table-column prop="originalValue" label="资产原值(万元)" show-overflow-tooltip align="center" min-width="100" />
|
<el-table-column prop="originalValue" label="资产原值(万元)" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
<!-- <el-table-column prop="orderNumber" label="最大使用年限(年)" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="最大使用年限(年)" align="center"/>-->
|
||||||
<!-- <el-table-column prop="orderNumber" label="下次维保日期" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="下次维保日期" align="center"/>-->
|
||||||
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center" min-width="100">
|
<el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
>
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 1)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 1)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -135,18 +141,23 @@
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 2)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 2)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center" min-width="100">
|
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
>
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 3)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 3)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="purchaseInvoices" label="采购发票" show-overflow-tooltip align="center" min-width="100">
|
<el-table-column prop="purchaseInvoices" label="采购发票" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
>
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-for="(item, index) in columns2" v-if="item.visible" :key="index" align="center"
|
<el-table-column v-for="(item, index) in columns2" v-if="item.visible" :key="index" align="center"
|
||||||
show-overflow-tooltip :label="item.label" :prop="item.prop">
|
show-overflow-tooltip :label="item.label" :prop="item.prop"
|
||||||
|
>
|
||||||
<template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)">
|
<template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)">
|
||||||
<span>
|
<span>
|
||||||
{{ getFeatureValue(row, item.prop) }}
|
{{ getFeatureValue(row, item.prop) }}
|
||||||
|
|
@ -156,11 +167,14 @@
|
||||||
<!-- <el-table-column prop="devCount" label="特征项1" align="center"/>-->
|
<!-- <el-table-column prop="devCount" label="特征项1" align="center"/>-->
|
||||||
<!-- <el-table-column prop="devCount" label="特征值1" align="center"/>-->
|
<!-- <el-table-column prop="devCount" label="特征值1" align="center"/>-->
|
||||||
<el-table-column prop="orderCreateUser" label="申请人" show-overflow-tooltip align="center" fixed="right"
|
<el-table-column prop="orderCreateUser" label="申请人" show-overflow-tooltip align="center" fixed="right"
|
||||||
min-width="100" />
|
min-width="100"
|
||||||
|
/>
|
||||||
<el-table-column prop="orderCreateTime" label="申请时间" show-overflow-tooltip align="center" fixed="right"
|
<el-table-column prop="orderCreateTime" label="申请时间" show-overflow-tooltip align="center" fixed="right"
|
||||||
min-width="100" />
|
min-width="100"
|
||||||
|
/>
|
||||||
<el-table-column prop="entryStatus" align="center" show-overflow-tooltip label="审批状态" fixed="right"
|
<el-table-column prop="entryStatus" align="center" show-overflow-tooltip label="审批状态" fixed="right"
|
||||||
min-width="100">
|
min-width="100"
|
||||||
|
>
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-tag v-if="row.entryStatus == 0" size="small" type="warning">待审批</el-tag>
|
<el-tag v-if="row.entryStatus == 0" size="small" type="warning">待审批</el-tag>
|
||||||
<el-tag v-if="row.entryStatus == 1" size="small" type="success">已通过</el-tag>
|
<el-tag v-if="row.entryStatus == 1" size="small" type="success">已通过</el-tag>
|
||||||
|
|
@ -187,7 +201,8 @@
|
||||||
<div class="pagination-wrapper">
|
<div class="pagination-wrapper">
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<pagination :total="total" @pagination="handlePageChange" :page.sync="queryParams.pageNum"
|
<pagination :total="total" @pagination="handlePageChange" :page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize" />
|
:limit.sync="queryParams.pageSize"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -259,12 +274,12 @@ export default {
|
||||||
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
|
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
|
||||||
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
|
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
|
||||||
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
||||||
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true },
|
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
dialogList: [],
|
dialogList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -272,6 +287,118 @@ export default {
|
||||||
this.getManufacturerSelectList()
|
this.getManufacturerSelectList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleNumberInput(key) {
|
||||||
|
let value = this.queryParams[key] || ''
|
||||||
|
|
||||||
|
// 1. 清理输入
|
||||||
|
const cleanedValue = this.cleanNumberInput(value)
|
||||||
|
|
||||||
|
// 2. 存储为上次有效值(清理后)
|
||||||
|
this.lastValidValues[key] = cleanedValue
|
||||||
|
|
||||||
|
// 3. 根据输入类型进行验证
|
||||||
|
if (key === 'minOriginalValue') {
|
||||||
|
this.queryParams[key] = this.validateMinValue(cleanedValue)
|
||||||
|
} else if (key === 'maxOriginalValue') {
|
||||||
|
this.queryParams[key] = this.validateMaxValue(cleanedValue)
|
||||||
|
} else {
|
||||||
|
this.queryParams[key] = cleanedValue
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 确保响应式更新
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 清理数字输入
|
||||||
|
cleanNumberInput(input) {
|
||||||
|
if (!input) return ''
|
||||||
|
|
||||||
|
// 过滤非数字和小数点
|
||||||
|
let cleaned = input.replace(/[^\d.]/g, '')
|
||||||
|
|
||||||
|
// 处理多个小数点
|
||||||
|
const dotIndex = cleaned.indexOf('.')
|
||||||
|
if (dotIndex !== -1) {
|
||||||
|
const before = cleaned.substring(0, dotIndex + 1)
|
||||||
|
const after = cleaned.substring(dotIndex + 1).replace(/\./g, '')
|
||||||
|
cleaned = before + after
|
||||||
|
}
|
||||||
|
|
||||||
|
// 限制小数位数
|
||||||
|
const parts = cleaned.split('.')
|
||||||
|
if (parts.length > 1) {
|
||||||
|
cleaned = parts[0] + '.' + parts[1].slice(0, 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cleaned
|
||||||
|
},
|
||||||
|
|
||||||
|
// 验证最小值(不能大于最大值)
|
||||||
|
validateMinValue(value) {
|
||||||
|
// 如果是空值或纯小数点,直接返回
|
||||||
|
if (!value || value === '.') return value
|
||||||
|
|
||||||
|
const maxValue = this.queryParams.maxOriginalValue
|
||||||
|
const minNum = this.safeParseNumber(value)
|
||||||
|
const maxNum = this.safeParseNumber(maxValue)
|
||||||
|
|
||||||
|
// 如果最大值无效,直接返回清理后的值
|
||||||
|
if (maxNum === null) return value
|
||||||
|
|
||||||
|
// 如果最小值大于最大值,则使用最大值
|
||||||
|
if (minNum !== null && minNum > maxNum) {
|
||||||
|
return maxValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
|
||||||
|
// 验证最大值(不能小于最小值)
|
||||||
|
validateMaxValue(value) {
|
||||||
|
// 如果是空值或纯小数点,直接返回
|
||||||
|
if (!value || value === '.') return value
|
||||||
|
|
||||||
|
const minValue = this.queryParams.minOriginalValue
|
||||||
|
const maxNum = this.safeParseNumber(value)
|
||||||
|
const minNum = this.safeParseNumber(minValue)
|
||||||
|
|
||||||
|
// 如果最小值无效,直接返回清理后的值
|
||||||
|
if (minNum === null) return value
|
||||||
|
|
||||||
|
// 如果最大值小于最小值,则使用最小值
|
||||||
|
if (maxNum !== null && maxNum < minNum) {
|
||||||
|
return minValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
|
||||||
|
// 安全解析数字
|
||||||
|
safeParseNumber(str) {
|
||||||
|
if (!str || str === '.' || isNaN(Number(str))) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return Number(str)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 同时验证两个值(在表单提交前调用)
|
||||||
|
validateNumberRange() {
|
||||||
|
const minNum = this.safeParseNumber(this.queryParams.minOriginalValue)
|
||||||
|
const maxNum = this.safeParseNumber(this.queryParams.maxOriginalValue)
|
||||||
|
|
||||||
|
if (minNum !== null && maxNum !== null && minNum > maxNum) {
|
||||||
|
// 交换值,使最小值 <= 最大值
|
||||||
|
const temp = this.queryParams.minOriginalValue
|
||||||
|
this.queryParams.minOriginalValue = this.queryParams.maxOriginalValue
|
||||||
|
this.queryParams.maxOriginalValue = temp
|
||||||
|
|
||||||
|
// 提示用户
|
||||||
|
this.$message.warning('已自动调整数值范围,确保最小值 ≤ 最大值')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
},
|
||||||
// 获取厂家
|
// 获取厂家
|
||||||
getManufacturerSelectList() {
|
getManufacturerSelectList() {
|
||||||
getManufacturerSelectApi().then((res) => {
|
getManufacturerSelectApi().then((res) => {
|
||||||
|
|
@ -285,6 +412,7 @@ export default {
|
||||||
* 获取装备申请列表
|
* 获取装备申请列表
|
||||||
*/
|
*/
|
||||||
getEquipmentApplyList() {
|
getEquipmentApplyList() {
|
||||||
|
this.validateNumberRange()
|
||||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
||||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
||||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
||||||
|
|
@ -448,7 +576,7 @@ export default {
|
||||||
this.dialogList = row.purchaseInvoices || []
|
this.dialogList = row.purchaseInvoices || []
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -564,6 +692,7 @@ export default {
|
||||||
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
|
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
|
||||||
background-color: #CCF1E9 !important;
|
background-color: #CCF1E9 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table__body tr.hover-row > td.el-table__cell {
|
.el-table__body tr.hover-row > td.el-table__cell {
|
||||||
background-color: #ccf1e9 !important;
|
background-color: #ccf1e9 !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
v-model="queryParams.orderCreateTime"
|
v-model="orderCreateTime"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
v-model="queryParams.productionDate"
|
v-model="productionDate"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -141,11 +141,15 @@
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!isAddVisible && orderStatus =='0'">
|
<el-button class="primary-lease" type="primary" @click="allApproved()"
|
||||||
|
v-if="!isAddVisible && orderStatus =='0'"
|
||||||
|
>
|
||||||
全部通过
|
全部通过
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!isAddVisible && orderStatus =='0'">
|
<el-button class="primary-lease" type="primary" @click="allReject()"
|
||||||
|
v-if="!isAddVisible && orderStatus =='0'"
|
||||||
|
>
|
||||||
全部驳回
|
全部驳回
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
|
@ -175,13 +179,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="specificationModel" label="规格型号" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
<el-table-column prop="originalCode" label="装备原始编码" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="originalCode" label="装备原始编码" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
<!-- <el-table-column prop="orderNumber" label="采购日期" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="采购日期" align="center"/>-->
|
||||||
<el-table-column prop="originalValue" label="资产原值(万元)" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="originalValue" label="资产原值(万元)" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
<!-- <el-table-column prop="orderNumber" label="最大使用年限(年)" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="最大使用年限(年)" align="center"/>-->
|
||||||
<!-- <el-table-column prop="orderNumber" label="下次维保日期" align="center"/>-->
|
<!-- <el-table-column prop="orderNumber" label="下次维保日期" align="center"/>-->
|
||||||
<el-table-column prop="operateAddress" label="所属省份" show-overflow-tooltip align="center" min-width="100"/>
|
<el-table-column prop="operateAddress" label="所属省份" show-overflow-tooltip align="center" min-width="100"/>
|
||||||
|
|
@ -195,7 +203,9 @@
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 2)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 2)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center" min-width="100">
|
<el-table-column prop="inspectionReports" label="定期检验报告" show-overflow-tooltip align="center"
|
||||||
|
min-width="100"
|
||||||
|
>
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 3)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 3)">查看</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -307,15 +317,17 @@ export default {
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
isAddVisible: false,
|
isAddVisible: false,
|
||||||
orderStatus: '',
|
orderStatus: '',
|
||||||
|
orderCreateTime: '',
|
||||||
|
productionDate: '',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
orderCreateUser: '',
|
orderCreateUser: '',
|
||||||
orderCreateTime: '',
|
|
||||||
entryStatus: '',
|
entryStatus: '',
|
||||||
name: '',
|
name: '',
|
||||||
specificationModel: '',
|
specificationModel: '',
|
||||||
originalCode: '',
|
originalCode: '',
|
||||||
manufacturer: '',
|
manufacturer: '',
|
||||||
productionDate: '',
|
|
||||||
minBuyPrice: '',
|
minBuyPrice: '',
|
||||||
maxBuyPrice: '',
|
maxBuyPrice: '',
|
||||||
orderId: '',
|
orderId: '',
|
||||||
|
|
@ -343,11 +355,11 @@ export default {
|
||||||
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
|
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
|
||||||
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
|
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
|
||||||
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
||||||
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true },
|
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
|
||||||
],
|
],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
dialogList: [],
|
dialogList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -368,12 +380,11 @@ export default {
|
||||||
* 获取装备申请列表
|
* 获取装备申请列表
|
||||||
*/
|
*/
|
||||||
getEquipmentApplyList() {
|
getEquipmentApplyList() {
|
||||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
this.queryParams.startOrderCreateTime = this.orderCreateTime ? this.orderCreateTime[0] : ''
|
||||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
this.queryParams.endOrderCreateTime = this.orderCreateTime ? this.orderCreateTime[1] : ''
|
||||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
this.queryParams.startProductionDate = this.productionDate ? this.productionDate[0] : ''
|
||||||
this.queryParams.endProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[1] : ''
|
this.queryParams.endProductionDate = this.productionDate ? this.productionDate[1] : ''
|
||||||
delete this.queryParams.orderCreateTime
|
|
||||||
delete this.queryParams.productionDate
|
|
||||||
getDeviceByOrderIdApi(this.queryParams)
|
getDeviceByOrderIdApi(this.queryParams)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.tableData = res.data.rows
|
this.tableData = res.data.rows
|
||||||
|
|
@ -412,7 +423,10 @@ export default {
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.$refs.queryFormRef.resetFields()
|
this.$refs.queryFormRef.resetFields()
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
|
this.orderCreateTime = ''
|
||||||
|
this.productionDate = ''
|
||||||
this.getEquipmentApplyList()
|
this.getEquipmentApplyList()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击事件处理函数 - 实现页面跳转
|
// 点击事件处理函数 - 实现页面跳转
|
||||||
|
|
@ -613,7 +627,7 @@ export default {
|
||||||
this.dialogList = row.purchaseInvoices || []
|
this.dialogList = row.purchaseInvoices || []
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -87,10 +87,10 @@
|
||||||
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||||
:on-success="(res) => handleFileSuccess(res, scope.row)"
|
:on-success="(res) => handleFileSuccess(res, scope.row)"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
:disabled="!canEdit || scope.row.bmFileInfos.length > 0"
|
v-if="!canEdit || !scope.row.bmFileInfos.length > 0"
|
||||||
:file-list="scope.row.bmFileInfos"
|
:file-list="scope.row.bmFileInfos"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="mini" :disabled="!canEdit">上传附件</el-button>
|
<el-button type="primary" size="mini" >上传附件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text" size="mini" @click="picturePreview(scope.row)">
|
<el-button v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text" size="mini" @click="picturePreview(scope.row)">
|
||||||
查看
|
查看
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ export default {
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() > Date.now()
|
return time.getTime() > Date.now()
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -223,7 +223,7 @@ export default {
|
||||||
greatGrandparentId: null, // 施工类型
|
greatGrandparentId: null, // 施工类型
|
||||||
grandparentTypeId: null, // 工具类型
|
grandparentTypeId: null, // 工具类型
|
||||||
parentTypeId: null, // 工具名称
|
parentTypeId: null, // 工具名称
|
||||||
typeName: null, // 规格型号
|
typeName: null // 规格型号
|
||||||
},
|
},
|
||||||
fourthParentList: [],
|
fourthParentList: [],
|
||||||
greatGrandparentList: [],
|
greatGrandparentList: [],
|
||||||
|
|
@ -246,12 +246,12 @@ export default {
|
||||||
'span',
|
'span',
|
||||||
{
|
{
|
||||||
style: { color: '#409EFF', cursor: 'pointer' },
|
style: { color: '#409EFF', cursor: 'pointer' },
|
||||||
on: { click: () => this.handleDialog(row, '0') },
|
on: { click: () => this.handleDialog(row, '0') }
|
||||||
},
|
},
|
||||||
row.availableNum,
|
row.availableNum
|
||||||
)
|
)
|
||||||
: h('span', {}, row.availableNum)
|
: h('span', {}, row.availableNum)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '自用数量',
|
label: '自用数量',
|
||||||
|
|
@ -262,12 +262,12 @@ export default {
|
||||||
'span',
|
'span',
|
||||||
{
|
{
|
||||||
style: { color: '#409EFF', cursor: 'pointer' },
|
style: { color: '#409EFF', cursor: 'pointer' },
|
||||||
on: { click: () => this.handleDialog(row, '3') },
|
on: { click: () => this.handleDialog(row, '3') }
|
||||||
},
|
},
|
||||||
row.inNum,
|
row.inNum
|
||||||
)
|
)
|
||||||
: h('span', {}, row.inNum)
|
: h('span', {}, row.inNum)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '共享数量',
|
label: '共享数量',
|
||||||
|
|
@ -278,12 +278,12 @@ export default {
|
||||||
'span',
|
'span',
|
||||||
{
|
{
|
||||||
style: { color: '#409EFF', cursor: 'pointer' },
|
style: { color: '#409EFF', cursor: 'pointer' },
|
||||||
on: { click: () => this.handleDialog(row, '1') },
|
on: { click: () => this.handleDialog(row, '1') }
|
||||||
},
|
},
|
||||||
row.shareNum,
|
row.shareNum
|
||||||
)
|
)
|
||||||
: h('span', {}, row.shareNum)
|
: h('span', {}, row.shareNum)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '在修数量',
|
label: '在修数量',
|
||||||
|
|
@ -294,36 +294,24 @@ export default {
|
||||||
'span',
|
'span',
|
||||||
{
|
{
|
||||||
style: { color: '#409EFF', cursor: 'pointer' },
|
style: { color: '#409EFF', cursor: 'pointer' },
|
||||||
on: { click: () => this.handleDialog(row, '2') },
|
on: { click: () => this.handleDialog(row, '2') }
|
||||||
},
|
},
|
||||||
row.repairNum,
|
row.repairNum
|
||||||
)
|
)
|
||||||
: h('span', {}, row.repairNum)
|
: h('span', {}, row.repairNum)
|
||||||
},
|
}
|
||||||
}, {
|
}, {
|
||||||
label: '退役数量',
|
label: '退役数量',
|
||||||
prop: 'scrapNum',
|
prop: 'scrapNum'
|
||||||
render: (h, { row }) => {
|
|
||||||
return row.manageMode == 0 && row.scrapNum > 0
|
|
||||||
? h(
|
|
||||||
'span',
|
|
||||||
{
|
|
||||||
style: { color: '#409EFF', cursor: 'pointer' },
|
|
||||||
on: { click: () => this.handleDialog(row, '2') },
|
|
||||||
},
|
},
|
||||||
row.scrapNum,
|
{ label: '工具总数(不含退役数)', prop: 'totalNum' },
|
||||||
)
|
|
||||||
: h('span', {}, row.scrapNum)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ label: '工具总数', prop: 'totalNum' },
|
|
||||||
{
|
{
|
||||||
label: '管理模式',
|
label: '管理模式',
|
||||||
prop: 'manageMode',
|
prop: 'manageMode',
|
||||||
render: (h, { row }) => {
|
render: (h, { row }) => {
|
||||||
return row.manageMode == '1' ? h('span', {}, '数量管理') : h('span', {}, '编码管理')
|
return row.manageMode == '1' ? h('span', {}, '数量管理') : h('span', {}, '编码管理')
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
// 表格数据
|
// 表格数据
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
|
@ -333,7 +321,7 @@ export default {
|
||||||
dialogForm: {
|
dialogForm: {
|
||||||
keyWord: '',
|
keyWord: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
},
|
},
|
||||||
dlgTotal: 0, // 弹框总条数
|
dlgTotal: 0, // 弹框总条数
|
||||||
dialogColumns: [
|
dialogColumns: [
|
||||||
|
|
@ -344,18 +332,18 @@ export default {
|
||||||
prop: 'toolCode',
|
prop: 'toolCode',
|
||||||
render: (h, { row }) => {
|
render: (h, { row }) => {
|
||||||
return row.toolCode ? h('span', {}, row.toolCode) : h('span', {}, '-')
|
return row.toolCode ? h('span', {}, row.toolCode) : h('span', {}, '-')
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '数量',
|
label: '数量',
|
||||||
prop: 'totalNum',
|
prop: 'totalNum',
|
||||||
render: (h, { row }) => {
|
render: (h, { row }) => {
|
||||||
return row.totalNum ? h('span', {}, row.totalNum) : h('span', {}, '1')
|
return row.totalNum ? h('span', {}, row.totalNum) : h('span', {}, '1')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
{ label: '所在工程', prop: 'proName' }
|
||||||
{ label: '所在工程', prop: 'proName' },
|
|
||||||
],
|
],
|
||||||
dialogList: [],
|
dialogList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -504,7 +492,6 @@ export default {
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出数据
|
* 导出数据
|
||||||
*/
|
*/
|
||||||
|
|
@ -512,10 +499,9 @@ export default {
|
||||||
this.download('/material-mall/toolLedger/exportAll', {
|
this.download('/material-mall/toolLedger/exportAll', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `工具台账_${new Date().getTime()}.xlsx`)
|
}, `工具台账_${new Date().getTime()}.xlsx`)
|
||||||
},
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue