Преглед изворни кода

fix(inspectionReport): 优化不合格品报告模板样式与视图逻辑

- 调整报告模板布局与字体,增加公司名称动态显示
- 在查看模式下以只读文本替代输入控件
- 新增不合格描述、QA确认、委托方意见等字段展示
- 隐藏查看模式下的不合格评审编辑功能
yusheng пре 6 дана
родитељ
комит
d685ea90a0

Разлика између датотеке није приказан због своје велике величине
+ 457 - 271
src/views/inspectionReport/template/inspection_report3.vue


+ 24 - 8
src/views/unqualifiedProduct/unqualifiedList/detailList.vue

@@ -15,7 +15,7 @@
               v-for="item in tabOptions"
               :key="item.key"
               :class="{ active: activeComp == item.key }"
-              @click="activeComp = item.key"
+              @click="setKey(item.key)"
             >
               {{ item.name }}
             </li>
@@ -66,7 +66,7 @@
           <el-popconfirm
             class="ele-action"
             title="确定要删除吗?"
-            v-if="row.disposalStatus !== 2&&!form.sourceCode"
+            v-if="row.disposalStatus !== 2 && !form.sourceCode"
             @confirm="remove(row)"
           >
             <template v-slot:reference>
@@ -91,12 +91,19 @@
         v-if="activeComp == 'bpm' && form.processInstanceId"
         :id="form.processInstanceId"
       ></bpmDetail>
-      <div
+      <!-- <div
         style="width: 1200px"
         v-if="activeComp == 'html' && form.contentText.html"
         id="printSection"
         v-html="form.contentText.html"
-      ></div>
+      ></div> -->
+      <component
+        :is="'inspection_report3'"
+        v-if="activeComp == 'html'"
+        :key="'inspection_report3'"
+        ref="unqualifiedHtmlRef"
+        :isView="true"
+      ></component>
     </el-card>
 
     <!-- 处置弹窗(二级弹窗) -->
@@ -288,7 +295,7 @@
   // import OrderSearch from './components/detail-search.vue';
   import Edit from './components/edit.vue';
   import { getWarehouseList } from '@/api/samplemanagement';
-
+  import inspection_report3 from '@/views/inspectionReport/template/inspection_report3.vue';
   import dictMixins from '@/mixins/dictMixins';
   import { unacceptedProductStatus } from '@/utils/util';
   import { deepClone } from '@/utils';
@@ -310,6 +317,7 @@
   export default {
     components: {
       bpmDetail,
+      inspection_report3,
       Edit
     },
     mixins: [dictMixins, tabMixins],
@@ -623,7 +631,7 @@
     methods: {
       /* 打印 */
       print() {
-        const printSection = document.getElementById('printSection');
+        const printSection = document.getElementById('printSection1');
         console.log('printSection', printSection.innerHTML);
         // 创建打印任务
         const printWindow = window.open('', '_blank');
@@ -752,12 +760,20 @@ box-sizing: content-box;
       /* 表格数据源 */
       async datasource() {
         this.form = await getById(this.params.id);
-        console.log(this.form, 'this.form');
         if (this.form.contentText) {
           this.form.contentText = JSON.parse(this.form.contentText);
         }
       },
-
+      setKey(key) {
+        this.activeComp = key;
+        if (key == 'html') {
+          this.$nextTick(() => {
+            this.$refs.unqualifiedHtmlRef.init(
+              this.form.contentText?.basicInfoData || {}
+            );
+          });
+        }
+      },
       async getRefluxTask() {
         if (!this.params.workOrderCode) return;
         await refluxTask({

Неке датотеке нису приказане због велике количине промена