This commit is contained in:
itcast 2025-12-22 09:38:15 +08:00
parent caa22e1cb2
commit 52b4614688
4 changed files with 34 additions and 10 deletions

View File

@ -242,7 +242,9 @@
</el-form-item>
<!-- 多选 -->
<el-form-item v-if="item.inputType == 3" :label="item.propertyName">
<el-select v-model="item.propertyValue" multiple placeholder="请选择" clearable style="width: 100%">
<el-select v-model="item.propertyValue" multiple placeholder="请选择"
:clearable="item.propertyValue !='' && item.propertyValue != null"
style="width: 100%">
<el-option
v-for="(item, index) in handleData(item.value)"
:key="index"

View File

@ -346,7 +346,8 @@
<template v-slot="{ row }" v-else-if="item.prop == 'devType'">
<span>
{{ row.mainCategory ? row.mainCategory + '>' : '' }}
{{ row.branch ? row.subCategory + '>' : row.subCategory }}{{ row.branch }}
{{ row.branch ? row.subCategory : row.subCategory }}
<!-- {{ row.branch }}-->
</span>
</template>
<template v-slot="{ row }" v-else-if="item.prop == 'upDownStatus'">
@ -783,7 +784,7 @@ export default {
manufacturerList: [], //
columns2: [],
columns: [
{ key: 0, label: `所属省份`, prop: 'province', visible: true },
// { key: 0, label: ``, prop: 'province', visible: true },
{ key: 1, label: `产权单位`, prop: 'propertyUnit', visible: true },
{ key: 2, label: `专业`, prop: 'major', visible: true },
{ key: 3, label: `工序`, prop: 'process', visible: true },
@ -792,14 +793,14 @@ export default {
{ key: 6, label: `规格型号`, prop: 'specificationModel', visible: true },
{ key: 7, label: `装备编码`, prop: 'code', visible: true },
{ key: 8, label: `装备状态`, prop: 'status', visible: true },
{ key: 44, label: `上下架状态`, prop: 'upDownStatus', visible: true },
// { key: 44, label: ``, prop: 'upDownStatus', visible: true },
{ key: 9, label: `使用年限`, prop: 'serviceLife', visible: true },
{ key: 10, label: `使用项目`, prop: 'usingProject', visible: true },
{ key: 11, label: `使用到期时间`, prop: 'expirationTime', visible: true },
{ key: 12, label: `使用次数`, prop: 'usageCount', visible: true },
{ key: 13, label: `维修次数`, prop: 'repairCount', visible: true },
{ key: 14, label: `装备原始编码`, prop: 'originalCode', visible: true },
{ key: 15, label: `计量单位`, prop: 'unit', visible: true },
// { key: 15, label: ``, prop: 'unit', visible: true },
{ key: 16, label: `生产厂家`, prop: 'manufacturer', visible: true },
{ key: 17, label: `出厂日期`, prop: 'productionDate', visible: true },
{ key: 18, label: `采购日期`, prop: 'purchaseDate', visible: true },

View File

@ -142,9 +142,7 @@
<td>{{ item.devCode }}</td>
<td>{{ item.devNum }}</td>
<td>
{{ item.useStartTime ? item.useStartTime : '-' }}
{{ item.useEndTime ? item.useEndTime : '-' }}
{{item.useTime}}
</td>
</tr>
</tbody>

View File

@ -566,7 +566,20 @@ export default {
row.num = 1
}
},
// yyyy-MM-dd
formatDateToYmd(dateVal) {
if (!dateVal) return null
// Date
const date = new Date(dateVal)
//
if (isNaN(date.getTime())) return null
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
},
//
//
async submit() {
this.$refs.queryForm.validate(async(valid) => {
@ -585,12 +598,22 @@ export default {
//
this.queryParams.type = 1
this.queryParams.leaseType = 0
// 退 yyyy-MM-dd
const submitQueryParams = {
...this.queryParams,
useTime: this.formatDateToYmd(this.queryParams.useTime)
}
// 退 yyyy-MM-dd
const tempTableList = this.ids.map(item => ({
...item,
category: null // category
category: null, // category
useTime: this.formatDateToYmd(item.useTime)
}))
const params = {
devInfo: this.queryParams,
devInfo: submitQueryParams,
devDetailsList: tempTableList // devType
}