liding
4 天以前 4a25e7e3256c85ee07076492a7b5a6fe0b9c7041
fix(report-preparation): CMA章默认不选中,调整印章自动匹配逻辑
已修改1个文件
16 ■■■■■ 文件已修改
src/views/business/reportPreparation/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue
@@ -186,7 +186,7 @@
      <div class="seal-select-block" v-loading="sealLoading">
        <div class="seal-select-title">
          <span>按位置选择印章</span>
          <span class="seal-select-tip">自动匹配 MA章 / 1号章 / 检验检测类印章,每项可单独调整或清空</span>
          <span class="seal-select-tip">CMA章默认不选,报告章和骑缝章自动匹配,每项可单独调整或清空</span>
        </div>
        <div v-if="sealOptions.length" class="seal-position-grid">
          <div v-for="position in sealPositions" :key="position.key" class="seal-position-card">
@@ -1304,15 +1304,15 @@
          .map(item => Number(item.trim()))
          .filter(id => availableIds.includes(id))
        const legacyId = legacyIds[0] || null
        const maSeal = this.sealOptions.find(item => String(item.name).toUpperCase().includes('MA'))
        const reportSeal = this.sealOptions.find(item => item.name === '1号章')
          || this.sealOptions.find(item => !String(item.name).toUpperCase().includes('MA') && !String(item.name).includes('骑缝'))
          || this.sealOptions[0]
        const seamSeal = this.sealOptions.find(item => /检验检测|检测检验/.test(String(item.name || '')))
          || this.sealOptions.find(item => String(item.name).includes('骑缝'))
        const defaultSealOptions = this.sealOptions.filter(item => !String(item.name).toUpperCase().includes('MA'))
        const reportSeal = defaultSealOptions.find(item => item.name === '1号章')
          || defaultSealOptions.find(item => !String(item.name).includes('骑缝'))
          || defaultSealOptions[0]
        const seamSeal = defaultSealOptions.find(item => /检验检测|检测检验/.test(String(item.name || '')))
          || defaultSealOptions.find(item => String(item.name).includes('骑缝'))
        this.selectedSealPositions = {
          maSealId: availableIds.includes(Number(row && row.maSealId))
            ? Number(row.maSealId) : (maSeal ? Number(maSeal.id) : null),
            ? Number(row.maSealId) : null,
          reportSealId: availableIds.includes(Number(row && row.reportSealId))
            ? Number(row.reportSealId) : (legacyId || (reportSeal ? Number(reportSeal.id) : null)),
          seamSealId: availableIds.includes(Number(row && row.seamSealId))