src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
@@ -90,7 +90,7 @@
              @click="handleRecord(scope.row)">审核</el-button>
            <el-button v-if="scope.row.recordStatus === 2 || scope.row.recordStatus === 3"
              size="small" link type="primary" @click="handleDown(scope.row)">导出</el-button>
            <el-button v-if="scope.row.recordStatus === 0 && scope.row.recordContrastStatus === 0"
            <el-button v-if="scope.row.recordStatus === 0 || scope.row.recordStatus === 1"
              size="small" link type="danger" @click="deleteFun1(scope.row.planDetailsId)">删除</el-button>
          </template>
        </el-table-column>
@@ -114,10 +114,14 @@
            </el-col>
            <el-col :span="12">
              <el-form-item label="检查日期:" prop="checkTime">
                <el-date-picker v-model="form.checkTime" :disabled="operationType === 'view'" clearable
                  format="YYYY-MM" placeholder="选择检查日期" size="small" style="width:100%" type="month"
                  value-format="YYYY-MM">
                </el-date-picker>
                <el-input v-if="operationType === 'view'" :model-value="formatCheckMonth(null, null, form.checkTime)"
                  disabled size="small"></el-input>
                <template v-else>
                  <el-date-picker v-model="checkTimeEditValue" clearable format="YYYY-MM-DD" placeholder="选择检查日期"
                    size="small" style="width:100%" type="date" value-format="YYYY-MM-DD">
                  </el-date-picker>
                  <div v-if="isMonthOnlyCheckTime" class="check-time-tip">系统登记只到月份,选择具体日期后将按日保存</div>
                </template>
              </el-form-item>
            </el-col>
            <el-col :span="8">
@@ -500,7 +504,7 @@
    },
    // 明细-删除
    deleteFun1(id) {
      this.$confirm('删除后,若该设备还有审核通过的核查记录,档案的最近核查日期将回退到最近一次完成记录;若没有,则清空档案的核查日期和核查周期。是否继续?', '提示', {
      this.$confirm('删除后,该行未审核的核查记录及附件会一并删除;若该设备还有审核通过的核查记录,档案的最近核查日期将回退到最近一次完成记录;若没有,则清空档案的核查日期和核查周期。是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
@@ -650,6 +654,19 @@
      }
      return list
    },
    // 日期控件只接受 YYYY-MM-DD;系统登记的待核查行只有年月,未改日期时不能把“日”写进表单
    checkTimeEditValue: {
      get() {
        const val = this.form.checkTime || ''
        return /^\d{4}-\d{2}$/.test(val) ? `${val}-01` : val
      },
      set(val) {
        this.form.checkTime = val || ''
      }
    },
    isMonthOnlyCheckTime() {
      return /^\d{4}-\d{2}$/.test(this.form.checkTime || '')
    },
  },
}
</script>
@@ -737,6 +754,14 @@
  margin-bottom: 12px;
}
.check-time-tip {
  width: 100%;
  font-size: 12px;
  line-height: 1.4;
  color: #909399;
  margin-top: 2px;
}
.export-panel {
  border: 1px solid #e4e7ed;
  border-radius: 6px;