需求变动增加标准使用时间字段

This commit is contained in:
BianLzhaoMin 2025-09-15 14:18:41 +08:00
parent da18804cc2
commit acdb3df462
1 changed files with 67 additions and 47 deletions

View File

@ -258,8 +258,7 @@ const deleteRowInfo = async (row: any) => {
getList()
}
})
.catch(() => {
})
.catch(() => {})
}
//
const getDetailData = async (row: any) => {
@ -294,6 +293,7 @@ const getDetailData = async (row: any) => {
maintenanceAlarmDay,
isZone,
zoneId,
expirationTime,
} = res
Object.assign(addAndEditForm, {
@ -324,6 +324,7 @@ const getDetailData = async (row: any) => {
maintenanceAlarmDay,
isZone,
zoneId,
expirationTime,
})
if (settleinTitle.value == '装备编辑') {
@ -500,8 +501,7 @@ const handleUpdateUpDown = (row: any, maStatus: any) => {
getList()
}
})
.catch(() => {
})
.catch(() => {})
}
/*
@ -688,6 +688,13 @@ const equipRules = ref({
trigger: 'blur',
},
],
expirationTime: [
{
required: true,
trigger: 'change',
message: '请选择标准使用时间',
},
],
person: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
checkDate: [{ required: true, message: '校验日期不能为空', trigger: 'blur' }],
@ -745,8 +752,12 @@ const submitFun = (type: any) => {
equipRules.value.mainFileList = [] //
equipRules.value.detailsFileList = [] //
} else {
equipRules.value.mainFileList = [{ required: true, message: '请上传主展示图', trigger: 'change' }] //
equipRules.value.detailsFileList = [{ required: true, message: '请上传详情展示图', trigger: 'change' }] //
equipRules.value.mainFileList = [
{ required: true, message: '请上传主展示图', trigger: 'change' },
] //
equipRules.value.detailsFileList = [
{ required: true, message: '请上传详情展示图', trigger: 'change' },
] //
}
addAndEditFormRef.value.validate(async (valid: any) => {
@ -766,7 +777,7 @@ const submitFun = (type: any) => {
}
})
addAndEditForm.tableList = equipTableList.value
if (type != 2 && type !=4) {
if (type != 2 && type != 4) {
for (let i = 0; i < addAndEditForm.tableList.length; i++) {
const row = addAndEditForm.tableList[i]
for (const key in row) {
@ -1093,6 +1104,7 @@ const addAndEditForm = reactive<any>({
tableList: [],
isZone: true, //
zoneId: '', // id
expirationTime: '',
})
// const addAndEditFormTemp = reactive<any>()
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
@ -1556,33 +1568,28 @@ const handleDel = (index: any) => {
<el-form-item>
<el-button class="primary-lease" type="primary" @click="queryTableList"
>查询
</el-button
>
</el-button>
<el-button
class="primary-lease"
type="primary"
@click="resetTableList(queryFormRef)"
>重置
</el-button
>
</el-button>
<el-button class="primary-lease" type="primary" @click="equipmentDeployment"
>装备新增
</el-button
>
</el-button>
<el-button
class="primary-lease"
type="primary"
@click="handleUpdateUpDown(null, 2)"
>批量上架
</el-button
>
</el-button>
<el-button
class="primary-lease"
type="primary"
@click="handleUpdateUpDown(null, 1)"
>批量下架
</el-button
>
</el-button>
<!-- <el-button class="primary-lease" type="primary" @click="onTempDownLoad()"
>模板下载</el-button
> -->
@ -1591,8 +1598,7 @@ const handleDel = (index: any) => {
type="primary"
@click="handleBatchAddVisible"
>批量新增
</el-button
>
</el-button>
</el-form-item>
</el-col>
</el-row>
@ -1653,8 +1659,7 @@ const handleDel = (index: any) => {
<template #default="{ row }">
<el-button type="primary" size="small" @click="previewRowInfo(row)"
>查看
</el-button
>
</el-button>
<el-button
v-if="row.maStatus == 0 || row.maStatus == 1"
size="small"
@ -1878,7 +1883,7 @@ const handleDel = (index: any) => {
maxlength="20"
:controls="false"
align="left"
style="width: 100%;"
style="width: 100%"
/>
</el-form-item>
</el-col>
@ -1899,17 +1904,34 @@ const handleDel = (index: any) => {
v-model="addAndEditForm.deviceType"
placeholder="请选择管理方式"
clearable
style="width: 100%;"
style="width: 100%"
:disabled="!isAdd"
>
<el-option label="编码" :value="0" />
<el-option label="数量" :value="1" />
</el-select>
<span style="color: red">说明编码管理按一台一台管理一台设备一个唯一编码数量管理支持同规格型号批量录入一般小型工器具</span>
<span style="color: red"
>说明编码管理按一台一台管理一台设备一个唯一编码数量管理支持同规格型号批量录入一般小型工器具</span
>
</el-form-item>
</el-col>
<!-- 临时录入使用 - end -->
</el-row>
<!-- 9.15新增 -->
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="标准使用时间:" prop="expirationTime">
<el-date-picker
type="date"
style="width: 100%"
value-format="YYYY-MM-DD"
placeholder="请选择标准使用时间"
v-model="addAndEditForm.expirationTime"
/>
</el-form-item>
</el-col>
</el-row>
<!-- 1.13 需求变动要求隐藏 -->
<!-- <el-row :gutter="20">
<el-col :span="12">
@ -1955,7 +1977,8 @@ const handleDel = (index: any) => {
</el-col>
</el-row> -->
<!-- 临时录入暂时隐藏 - 2025年09月13日 -->
<div v-show="false">
<!-- 临时录入又需要隐藏 - 2025年09月15日 -->
<div>
<el-row
v-for="(item, index) in chunkedItems"
:key="index"
@ -2154,8 +2177,7 @@ const handleDel = (index: any) => {
:disabled="!addAndEditForm.deviceTypeList"
v-if="settleinTitle == '新增装备'"
>添加
</el-button
>
</el-button>
</div>
<!-- <el-row :gutter="20" v-if="!isEditForm && !isViewForm">
<el-col :span="24">
@ -2585,8 +2607,7 @@ const handleDel = (index: any) => {
@click="handleDeleteBack($index)"
v-show="$index != 0"
>删除
</el-button
>
</el-button>
</div>
</template>
</el-table-column>
@ -2616,8 +2637,7 @@ const handleDel = (index: any) => {
<a :href="uploadUrlTemp" download="模板">
<el-button class="primary-lease" type="primary" style="margin-left: 20px"
>模板下载
</el-button
>
</el-button>
</a>
</el-col>
<el-col :span="1.5" :offset="0">