Просмотр исходного кода

task-6332 同步任务:试剂耗材更换验证子表增加字段

tianxinyu 1 неделя назад
Родитель
Сommit
297a914ecf

+ 34 - 5
src/views/component/newReagent/newReagent.vue

@@ -85,7 +85,7 @@
                 <span v-else>{{ row.nongDu || '/' }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="样品编号" prop="biaoBenHao" width="100">
+            <el-table-column :label="isAdjust ? '旧样品编号': '样品编号'" prop="biaoBenHao" width="100">
               <template slot-scope="{ row }">
                 <el-input
                   v-if="!disabled"
@@ -113,6 +113,17 @@
                 <span v-else>{{ row.jiuJieGuo || '/' }}</span>
               </template>
             </el-table-column>
+            <el-table-column label="新样品编号" prop="xinYangPinBianHao" width="100" v-if="isAdjust">
+              <template slot-scope="{ row }">
+                <el-input
+                  v-if="!disabled"
+                  v-model="row.xinYangPinBianHao"
+                  size="mini"
+                  placeholder="请输入"
+                />
+                <span v-else>{{ row.xinYangPinBianHao || '/' }}</span>
+              </template>
+            </el-table-column>
             <el-table-column
               label="新试剂测得结果"
               prop="xinJieGuo"
@@ -240,6 +251,7 @@ export default {
     }
   },
   data() {
+    const { setting } = this.$store.getters
     return {
       reagentData: [],
       copyDialogData: [],
@@ -254,7 +266,8 @@ export default {
       importTableDialogVisible: false,
       multipleSelection: [],
       isHz: false,
-      isCb: false
+      isCb: false,
+      isAdjust: setting?.reagent?.adjust || false,  //试剂更换验证,定量,子表改为新旧样品编号
     }
   },
   computed: {
@@ -352,6 +365,7 @@ export default {
         nongDu: '',
         biaoBenHao: '',
         jiuJieGuo: '',
+        xinYangPinBianHao: '',
         xinJieGuo: '',
         jiSuanFangShi: '|Y-X|/X(%)',
         shiJiChaZhi: '',
@@ -422,14 +436,18 @@ export default {
       this.importTableDialogVisible = true
     },
     handleDownload() {
+      let id = 'download_sjghdl'
+      if(this.isAdjust){
+        id = 'download_sjghdl_new'
+      }
       downloadFile({
-        id: 'download_sjghdl',
+        id,
         fileName: '试剂更换验证定量模板',
         ext: 'xlsx'
       })
     },
     getColumns() {
-      return [
+      let list = [
         {
           field_name: 'xiangFu',
           label: '是否相符',
@@ -447,7 +465,7 @@ export default {
         },
         {
           field_name: 'biaoBenHao',
-          label: '样品编号',
+          label: this.isAdjust ? '旧样品编号' : '样品编号',
           name: 'biaoBenHao'
         },
         {
@@ -496,6 +514,17 @@ export default {
           name: 'xiangMuFuHeLv'
         }
       ]
+
+      if(this.isAdjust){
+        list.splice(5, 0, {
+          field_name: 'xinYangPinBianHao',
+          label: '新样品编号',
+          name: 'xinYangPinBianHao'
+        })
+      }
+
+      console.log(list, 'list')
+      return list
     },
     getKeys(data) {
       return Array.isArray(data)

+ 2 - 2
src/views/component/reagentQualitative/reagentQualitative.vue

@@ -69,7 +69,7 @@
                   v-model="row.xinJieGuo"
                   size="mini"
                   maxlength="32"
-                  placeholder="请输入"
+                  placeholder="请输入检测结果"
                 />
                 <span v-else>{{ row.xinJieGuo }}</span>
               </template>
@@ -81,7 +81,7 @@
                   v-model="row.jiuJieGuo"
                   size="mini"
                   maxlength="32"
-                  placeholder="请输入"
+                  placeholder="请输入检测结果"
                 />
                 <span v-else>{{ row.jiuJieGuo }}</span>
               </template>