吴羡
2 天以前 825172fe39308a3c8a36c4bece5aba7c8761b0db
fix: 完善检验设备显示与报告印章提示

- 检验、原始记录页设备下拉固定宽度,避免被压缩后看不到已选设备
- 保存检验条件时不再提交设备选择,避免覆盖已保存的设备
- 报告编制无启用印章时给出明确引导并阻止提交批准
- 模板编制价格留空时按 0 保存
已修改5个文件
41 ■■■■■ 文件已修改
src/views/business/inspectionTask/components/InspectionWord.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionView/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/model/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/components/InspectionWord.vue
@@ -45,7 +45,8 @@
            </el-form-item>
            <el-form-item label="设备:">
              <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
                size="small" placeholder="请选择设备" style="width: 360px"
                class="device-select" size="small" placeholder="请选择设备"
                style="width: 360px !important; min-width: 360px; flex: 0 0 360px"
                @change="m => subOtherForm(m, 'deviceIds')">
                <el-option v-for="device in deviceOptions" :key="device.id" :label="device.label"
                  :value="device.id" />
@@ -1798,6 +1799,14 @@
  flex: none;
}
/* 设备下拉固定宽度,禁止被行内布局压缩,否则选中内容不可见 */
.template-panel:deep(.device-select) {
  display: inline-block !important;
  width: 360px !important;
  min-width: 360px;
  flex: 0 0 360px;
}
.template-panel__unit {
  margin-left: 4px;
  color: var(--lims-text-2);
src/views/business/inspectionTask/inspection.vue
@@ -187,7 +187,8 @@
          </el-form-item>
          <el-form-item label="设备:">
            <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
              size="small" placeholder="请选择设备" style="width: 360px"
              class="device-select" size="small" placeholder="请选择设备"
              style="width: 360px !important; min-width: 360px; flex: 0 0 360px"
              @change="(m) => subOtherForm(m, 'deviceIds')">
              <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" />
            </el-select>
@@ -1910,7 +1911,6 @@
            temperature: form.temperature == null ? null : form.temperature,
            detectionTime: form.detectionTime || null,
            detectionPlace: form.detectionPlace || null,
            deviceIds: Array.isArray(form.deviceIds) ? [...form.deviceIds] : [],
          });
        }));
      } catch (error) {
@@ -2324,6 +2324,14 @@
  flex: none;
}
/* 设备下拉固定宽度,禁止被行内布局压缩,否则选中内容不可见 */
.template-panel:deep(.device-select) {
  display: inline-block !important;
  width: 360px !important;
  min-width: 360px;
  flex: 0 0 360px;
}
.template-panel__unit {
  margin-left: 4px;
  color: var(--lims-text-2);
src/views/business/inspectionView/index.vue
@@ -155,7 +155,8 @@
          </el-form-item>
          <el-form-item label="设备:">
            <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
                       placeholder="请选择设备" size="small" style="width: 360px"
                       class="device-select" placeholder="请选择设备" size="small"
                       style="width: 360px !important; min-width: 360px; flex: 0 0 360px"
                       @change="m => subOtherForm(m, 'deviceIds')">
              <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label"
                         :value="device.id" />
@@ -2540,6 +2541,14 @@
  flex: none;
}
/* 设备下拉固定宽度,禁止被行内布局压缩,否则选中内容不可见 */
.template-panel:deep(.device-select) {
  display: inline-block !important;
  width: 360px !important;
  min-width: 360px;
  flex: 0 0 360px;
}
.template-panel__unit {
  margin-left: 4px;
  color: var(--lims-text-2);
src/views/business/reportPreparation/index.vue
@@ -165,7 +165,7 @@
            <div v-else class="seal-position-empty">该位置不盖章</div>
          </div>
        </div>
        <el-empty v-if="!sealLoading && sealOptions.length === 0" description="暂无启用印章,请先在印章管理中维护" :image-size="54" />
        <el-empty v-if="!sealLoading && sealOptions.length === 0" description="暂无启用印章,请先到「基础配置 → 印章管理」新增并启用印章" :image-size="54" />
      </div>
      <template #footer><span  class="dialog-footer">
        <el-button :disabled="loadingApprove" @click="approveReasonVisible = true">不批准</el-button>
@@ -1060,6 +1060,9 @@
    },
    // 批准通过
    subApprove() {
      if (!this.sealOptions.length) {
        return this.$message.error('暂无启用的印章,请先到「基础配置 → 印章管理」新增并启用印章')
      }
      const selectedIds = Object.values(this.selectedSealPositions).filter(id => id != null)
      if (!selectedIds.length) {
        return this.$message.error('请至少为一个位置选择印章')
src/views/standard/model/index.vue
@@ -247,6 +247,8 @@
              break;
            case "编辑":
              params.thing = this.copyForm.thing ? this.copyForm.thing : "";
              // 价格留空仍按 0 保存;模板编制保存不传价格,需由后端保持原值
              params.price = params.price == null ? 0 : params.price;
              upStandardTemplate(params)
                .then((res) => {
                  this.isShowCopyTem = false;