Procházet zdrojové kódy

Merge branch 'master' of http://119.23.210.103:3000/wy/mj_firm_former

wy před 3 roky
rodič
revize
01a70f58cf

+ 127 - 47
src/views/platform/bpmn/bpmInstHis/listType/CMAjiancedangan.vue

@@ -2,20 +2,27 @@
   <div>
     <div class="heads">CNAS/CMA检测档案</div>
     <div class="top-box">
-      <span class="t-span">检测申请单号</span
+      <span class="t-span">年份</span
       ><el-input
         class="inp"
-        v-model="shenqingdanid"
+        v-model="nianfen"
         placeholder="请输入内容"
         clearable
       ></el-input>
-      <span class="t-span">委托单位</span
+      <!-- <span class="t-span">检测申请单号</span
+      ><el-input
+        class="inp"
+        v-model="shenqingdanid"
+        placeholder="请输入内容"
+        clearable
+      ></el-input> -->
+      <!-- <span class="t-span">委托单位</span
       ><el-input
         class="inp"
         v-model="danwei"
         placeholder="请输入内容"
         clearable
-      ></el-input>
+      ></el-input> -->
       <span class="t-span">报告编号</span
       ><el-input
         class="inp"
@@ -41,58 +48,66 @@
         background: '#a7d6f8 !important',
       }"
     >
-      <el-table-column type="selection" width="55"> </el-table-column>
-      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="180">
+      <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
+      <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80" >
+        <template slot-scope="scope">
+              {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
         <template slot-scope="scope">
           {{ scope.row.he_tong_bian_hao_ | returnHetong(hetong) }}
         </template>
       </el-table-column>
-      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="180">
+      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150">
+      </el-table-column>
+      <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100">
       </el-table-column>
       <el-table-column
         prop="jian_ce_shen_qing"
-        label="检测申请单号"
-        width="180"
+        label="检测委托单号"
+        width="150"
       >
       </el-table-column>
-      <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
-      </el-table-column>
-      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期">
+      <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
+      </el-table-column> -->
+      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期" width="100">
       </el-table-column>
-      <el-table-column prop="yang_pin_bian_hao" label="样品编号">
+      <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150">
       </el-table-column>
-      <el-table-column prop="yang_pin_ming_che" label="样品名称">
+      <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150">
       </el-table-column>
-      <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
-      <el-table-column prop="lian_xi_dian_hua_" label="联系电话">
-      </el-table-column>
-      <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
+      <!-- <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
+      <el-table-column prop="lian_xi_dian_hua_" label="联系电话"></el-table-column> -->
+      <!-- <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
         <template slot-scope="scope">
           {{ scope.row.lei_bie_qu_fen_yu.toUpperCase() }}
         </template>
-      </el-table-column>
-      <el-table-column label="操作">
+      </el-table-column> -->
+      <!-- <el-table-column width="180"> </el-table-column> -->
+      <el-table-column label="操作" align="left" >
         <template slot-scope="scope">
           <el-popover placement="left" width="200" trigger="click">
             <div slot="reference" class="more">
-              <i class="el-icon-caret-bottom"></i>更多
+              <i class="el-icon-caret-bottom"></i>查阅
             </div>
-            <div class="item" style="color: #85ce61">
+            <!-- <div class="item" style="color: #85ce61">
               <i class="el-icon-s-order"></i> 合同
-            </div>
+            </div> -->
+
             <div
               class="item"
               style="color: #85ce61"
-              @click="alertReport(reports.hetongpingshen, scope.row.id_)"
+              @click="alertReport(reports.jianceshenqingdan, scope.row.id_)"
             >
-              <i class="el-icon-s-order"></i> 合同评审
+              <i class="el-icon-s-order"></i> 检测委托单
             </div>
             <div
               class="item"
               style="color: #85ce61"
-              @click="alertReport(reports.jianceshenqingdan, scope.row.id_)"
+              @click="alertReport(reports.hetongpingshen, scope.row.id_)"
             >
-              <i class="el-icon-s-order"></i> 检测申请单
+              <i class="el-icon-s-order"></i> 合同评审
             </div>
             <div>
               <el-popover placement="left" width="200" trigger="click">
@@ -102,7 +117,7 @@
                   slot="reference"
                   @click="juTiItem(scope.row)"
                 >
-                  <i class="el-icon-s-order"></i> 检测原始记录
+                  <i class="el-icon-s-order"></i> 检测记录
                 </div>
                 <div class="three-item">
                   <div
@@ -111,7 +126,7 @@
                     :key="it.id_"
                     @click="formEvent(it.jian_ce_xiang_mu_)"
                   >
-                    {{ it.jian_ce_xiang_mu_ }}
+                    {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
                 </div>
               </el-popover>
@@ -123,13 +138,35 @@
             >
               <i class="el-icon-s-order"></i> 检测报告审批表
             </div>
-            <div
+            <div v-if="false">
+              <el-popover placement="left" width="200" trigger="triggerType">
+                <div
+                  class="div_test item"
+                  style="color: #85ce61"
+                  slot="reference"
+                  @click="YubaogaoItem(scope.row)"
+                >
+                  <i class="el-icon-s-order"></i> 预报告
+                </div>
+                <div class="three-item">
+                  <div
+                    style="color: #85ce61; cursor: pointer"
+                    v-for="it in yubaogaoitem"
+                    :key="it.id_"
+                    @click="yuReports(reports.yubaogao,it.id)"
+                  >
+                  {{ it.jian_ce_xiang_mu_ }}预报告记录
+                  </div>
+                </div>
+              </el-popover>
+            </div>
+            <!-- <div
               class="item"
               style="color: #85ce61"
               @click="alertReport(reports.yubaogao, scope.row.id_)"
             >
               <i class="el-icon-s-order"></i> 预报告
-            </div>
+            </div> -->
             <div
               class="item"
               style="color: #85ce61"
@@ -195,11 +232,14 @@ export default {
         jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测报告.rpx",
       },
       shenqingdanid: "",
+      nianfen:'',
       danwei: "",
       bianhao: "",
       tableData: [],
       itemInfo: [], // 列表内容
+      yubaogaoitem:[],
       hetong: [],
+      triggerType:'click'
     };
   },
   filters: {
@@ -210,6 +250,15 @@ export default {
         }
       }
     },
+    yeare(value,dedal){
+      if(dedal=="年"){
+        return value.split("-")[0]
+      }else if(dedal=="月"){
+        return value.split("-")[0] + value.split("-")[1]
+      }else{
+        value
+      }
+    }
   },
   created() {
     let sql =
@@ -271,6 +320,41 @@ export default {
         });
       });
     },
+    YubaogaoItem(info) {
+      let itemId;
+      let this_ = this;
+      var sql =
+        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
+        info.id_ +
+        "'";
+      curdPost("sql", sql).then((res) => {
+        itemId = res.variables.data;
+        this_.runqianId = itemId[0].id_;
+        var itemSql =
+          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
+          itemId[0].jian_ce_xiang_mu2 +
+          ")";
+        curdPost("sql", itemSql).then((res) => {
+          this_.itemInfo = res.variables.data;
+          for (var i = 0; i++; i < this_itemInfo) {
+            if (this_itemInfo[i].shi_fou_yu_bao_ga =="是") {
+              this_.yubaogaoitem.push(it);
+            }
+          }
+          if (this_.yubaogaoitem.length == 0) {
+            this_.triggerType = "";
+            alert("此条报告没有预报告记录");
+            return;
+          }
+        });
+      });
+    },
+    yuReports(url,id){
+      this.alertReport(
+         url,
+         id
+    );
+    },
     formEvent(itemName) {
       if (itemName.includes("pH检测")) {
         this.alertReport(
@@ -384,8 +468,8 @@ export default {
     // pin凑sql
     selectSplit() {
       var q1, q2, q3;
-      if (this.shenqingdanid) {
-        q1 = "jian_ce_shen_qing ='" + this.shenqingdanid + "' ";
+      if (this.nianfen) {
+        q1 = "chu_ju_bao_gao_sh like'" +"%" + this.nianfen +"%"  + "' ";
       }
       if (this.danwei) {
         q2 = "wei_tuo_dan_wei_  = '" + this.danwei + "' ";
@@ -393,21 +477,21 @@ export default {
       if (this.bianhao) {
         q3 = "bao_gao_bian_hao_ = '" + this.bianhao + "'";
       }
-      if (this.shenqingdanid && this.danwei && this.bianhao) {
+      if (this.nianfen && this.danwei && this.bianhao) {
         return "where " + '"+q1+"' + " and " + q2 + " and " + q3 + " and ";
-      } else if (this.shenqingdanid && this.danwei && !this.bianhao) {
+      } else if (this.nianfen && this.danwei && !this.bianhao) {
         return "where " + q1 + " and " + q2 + " and ";
-      } else if (!this.shenqingdanid && this.danwei && this.bianhao) {
+      } else if (!this.nianfen && this.danwei && this.bianhao) {
         return "where " + q2 + " and " + q3 + " and ";
-      } else if (this.shenqingdanid && !this.danwei && this.bianhao) {
+      } else if (this.nianfen && !this.danwei && this.bianhao) {
         return "where " + q1 + " and " + q3 + " and ";
-      } else if (this.shenqingdanid && !this.danwei && !this.bianhao) {
+      } else if (this.nianfen && !this.danwei && !this.bianhao) {
         return "where " + q1 + " and ";
-      } else if (!this.shenqingdanid && this.danwei && !this.bianhao) {
+      } else if (!this.nianfen && this.danwei && !this.bianhao) {
         return "where " + q2 + " and ";
-      } else if (!this.shenqingdanid && !this.danwei && this.bianhao) {
+      } else if (!this.nianfen && !this.danwei && this.bianhao) {
         return "where " + q3 + " and ";
-      } else if (!this.shenqingdanid && !this.danwei && !this.bianhao) {
+      } else if (!this.nianfen && !this.danwei && !this.bianhao) {
         return "where";
       }
     },
@@ -423,16 +507,12 @@ export default {
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit 0,'" +
-        value +
-        "'";
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit 0," +value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit '" +
-        value +
-        "', 20";
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit " +value +", 20";
       this.loadData(sql);
     },
   },

+ 207 - 78
src/views/platform/bpmn/bpmInstHis/listType/CNASjiancedangan.vue

@@ -2,26 +2,34 @@
   <div>
     <div class="heads">CNAS检测档案</div>
     <div class="top-box">
-      <span class="t-span">检测申请单号</span
+      <span class="t-span">年份</span
       ><el-input
         class="inp"
-        v-model="shenqingdanid"
+        v-model="nianfen"
         placeholder="请输入内容"
         clearable
       ></el-input>
-      <span class="t-span">委托单位</span
+      <!-- <span class="t-span">检测申请单号</span
+      ><el-input
+        class="inp"
+        v-model="shenqingdanid"
+        placeholder="请输入内容"
+        clearable
+      ></el-input> -->
+      <!-- <span class="t-span">委托单位</span
       ><el-input
         class="inp"
         v-model="danwei"
         placeholder="请输入内容"
         clearable
-      ></el-input>
+      ></el-input> -->
       <span class="t-span">报告编号</span
       ><el-input
         class="inp"
         v-model="bianhao"
         placeholder="请输入内容"
-        clearable>
+        clearable
+      >
       </el-input>
       <el-button class="btn" type="primary" @click="search">
         <i class="ibps-icon-search"></i>查询
@@ -40,67 +48,132 @@
         background: '#a7d6f8 !important',
       }"
     >
-      <el-table-column type="selection" width="55"> </el-table-column>
-      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="180">
+      <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
+      <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80">
         <template slot-scope="scope">
-          {{scope.row.he_tong_bian_hao_|returnHetong(hetong)}}
+          {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
         </template>
       </el-table-column>
-      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="180"> 
+      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
+        <template slot-scope="scope">
+          {{ scope.row.he_tong_bian_hao_ | returnHetong(hetong) }}
+        </template>
       </el-table-column>
-      <el-table-column prop="jian_ce_shen_qing" label="检测申请单号" width="180">
+      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150">
       </el-table-column>
-      <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
+      <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100">
       </el-table-column>
-      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期">
+      <el-table-column
+        prop="jian_ce_shen_qing"
+        label="检测委托单号"
+        width="150"
+      >
       </el-table-column>
-      <el-table-column prop="yang_pin_bian_hao" label="样品编号">
+      <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
+      </el-table-column> -->
+      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期" width="100">
       </el-table-column>
-      <el-table-column prop="yang_pin_ming_che" label="样品名称">
+      <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150">
       </el-table-column>
-      <el-table-column prop="lian_xi_ren_" label="联系人">
+      <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150">
       </el-table-column>
-      <el-table-column prop="lian_xi_dian_hua_" label="联系电话">
+
+      <!-- <el-table-column prop="lian_xi_ren_" label="联系人">
       </el-table-column>
-       <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
+      <el-table-column prop="lian_xi_dian_hua_" label="联系电话">
+      </el-table-column> -->
+      <!-- <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
          <template slot-scope="scope">
            {{scope.row.lei_bie_qu_fen_yu.toUpperCase()}}
          </template>
-      </el-table-column>
-      <el-table-column label="操作">
+      </el-table-column> -->
+      <el-table-column label="操作" align="left">
         <template slot-scope="scope">
           <el-popover placement="left" width="200" trigger="click">
             <div slot="reference" class="more">
-              <i class="el-icon-caret-bottom"></i>更多            
+              <i class="el-icon-caret-bottom"></i>查阅
             </div>
-            <div class="item" style="color: #85ce61">
+            <!-- <div class="item" style="color: #85ce61">
               <i class="el-icon-s-order"></i> 合同
+            </div> -->
+
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.jianceshenqingdan, scope.row.id_)"
+            >
+              <i class="el-icon-s-order"></i> 检测委托单
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.hetongpingshen, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="reports.hetongpingshen, scope.row"
+            >
               <i class="el-icon-s-order"></i> 合同评审
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.jianceshenqingdan, scope.row.id_)">
-              <i class="el-icon-s-order"></i> 检测申请单
-            </div>
             <div>
               <el-popover placement="left" width="200" trigger="click">
-                <div class="div_test item" style="color: #85ce61" slot="reference" @click="juTiItem(scope.row)">
-                  <i class="el-icon-s-order"></i> 检测原始记录               
+                <div
+                  class="div_test item"
+                  style="color: #85ce61"
+                  slot="reference"
+                  @click="juTiItem(scope.row)"
+                >
+                  <i class="el-icon-s-order"></i> 检测记录
                 </div>
                 <div class="three-item">
-                  <div style="color: #85ce61; cursor: pointer" v-for="it in itemInfo" :key="it.id_" @click="formEvent(it.jian_ce_xiang_mu_)">
-                    {{ it.jian_ce_xiang_mu_ }}
+                  <div
+                    style="color: #85ce61; cursor: pointer"
+                    v-for="it in itemInfo"
+                    :key="it.id_"
+                    @click="formEvent(it.jian_ce_xiang_mu_)"
+                  >
+                    {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
                 </div>
               </el-popover>
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i> 检测报告审批表
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.yubaogao, scope.row.id_)">
-              <i class="el-icon-s-order"></i> 预报告
+            <div v-if="false">
+              <el-popover placement="left" width="200" trigger="triggerType">
+                <div
+                  class="div_test item"
+                  style="color: #85ce61"
+                  slot="reference"
+                  @click="YubaogaoItem(scope.row)"
+                >
+                  <i class="el-icon-s-order"></i> 预报告
+                </div>
+                <div class="three-item">
+                  <div
+                    style="color: #85ce61; cursor: pointer"
+                    v-for="it in yubaogaoitem"
+                    :key="it.id_"
+                    @click="yuReports(reports.yubaogao,it.id)"
+                  >
+                  {{ it.jian_ce_xiang_mu_ }}预报告记录
+                  </div>
+                </div>
+              </el-popover>
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.jiancebaogao, scope.row.id_)">
+            <!-- <div
+              class="item"
+              style="color: #85ce61"
+              @click="juTiItem(scope.row)"
+            >
+              <i class="el-icon-s-order"></i> 预报告
+            </div> -->
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.jiancebaogao, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i>检测报告
             </div>
           </el-popover>
@@ -161,29 +234,43 @@ export default {
         jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测报告.rpx",
       },
       shenqingdanid: "",
+      nianfen:'',
       danwei: "",
       bianhao: "",
       tableData: [],
       itemInfo: [], // 列表内容
-      hetong:[],
+      yubaogaoitm: [],
+      hetong: [],
+      triggerType: "click",
     };
   },
-  filters:{
-    returnHetong(value,arr){
-      for(var i =0;i<arr.length;i++){
-        if(arr[i].id_ == value){
+  filters: {
+    returnHetong(value, arr) {
+      for (var i = 0; i < arr.length; i++) {
+        if (arr[i].id_ == value) {
           return arr[i].he_tong_bian_hao_;
         }
       }
+    },
+    yeare(value,dedal){
+      if(dedal=="年"){
+        return value.split("-")[0]
+      }else if(dedal=="月"){
+        return value.split("-")[0] + value.split("-")[1]
+      }else{
+        value
+      }
     }
   },
   created() {
-    let sql = "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit 0,20";
+    let sql =
+      "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit 0,20";
     this.loadData(sql);
     // curdPost("sql", sql).then((response) => {
     //   this.tableData = response.variables.data;
     // });
-    let sumsql = "select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas'";
+    let sumsql =
+      "select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas'";
     curdPost("sql", sumsql).then((response) => {
       this.total = response.variables.data[0].sum;
     });
@@ -195,26 +282,27 @@ export default {
       this.listData = [];
       curdPost("sql", sql).then((res) => {
         this_.tableData = res.variables.data;
-        if(this_.tableData.length >0){
+        console.log(this_.tableData, "12121");
+        if (this_.tableData.length > 0) {
           this.hetongidFn(this_.tableData);
-        }else{
+        } else {
           this_.tableData = [];
         }
-        
       });
     },
-    hetongidFn(bianhaoArr){
-      var sqlStr ="";
-      var this_ =this;
-      bianhaoArr.forEach(item=> {
-        sqlStr += "'"+item.he_tong_bian_hao_ + "',"
+    hetongidFn(bianhaoArr) {
+      var sqlStr = "";
+      var this_ = this;
+      bianhaoArr.forEach((item) => {
+        sqlStr += "'" + item.he_tong_bian_hao_ + "',";
       });
-      sqlStr=sqlStr.substring(0,sqlStr.length-1);
+      sqlStr = sqlStr.substring(0, sqlStr.length - 1);
       sqlStr = "(" + sqlStr + ")";
-      let sql = "select he_tong_bian_hao_,id_ from t_bjd WHERE id_ in "+sqlStr;
-      curdPost("sql",sql).then(res=>{
+      let sql =
+        "select he_tong_bian_hao_,id_ from t_bjd WHERE id_ in " + sqlStr;
+      curdPost("sql", sql).then((res) => {
         this_.hetong = res.variables.data;
-      })
+      });
     },
     juTiItem(info) {
       let itemId;
@@ -227,7 +315,7 @@ export default {
         itemId = res.variables.data;
         this_.runqianId = itemId[0].id_;
         var itemSql =
-          "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
+          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
           itemId[0].jian_ce_xiang_mu2 +
           ")";
         curdPost("sql", itemSql).then((res) => {
@@ -235,6 +323,41 @@ export default {
         });
       });
     },
+    YubaogaoItem(info) {
+      let itemId;
+      let this_ = this;
+      var sql =
+        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
+        info.id_ +
+        "'";
+      curdPost("sql", sql).then((res) => {
+        itemId = res.variables.data;
+        this_.runqianId = itemId[0].id_;
+        var itemSql =
+          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
+          itemId[0].jian_ce_xiang_mu2 +
+          ")";
+        curdPost("sql", itemSql).then((res) => {
+          this_.itemInfo = res.variables.data;
+          for (var i = 0; i++; i < this_itemInfo) {
+            if (this_itemInfo[i].shi_fou_yu_bao_ga=="是") {
+              this_.yubaogaoitem.push(it);
+            }
+          }
+          if (this_.yubaogaoitem.length == 0) {
+            this_.triggerType = "";
+            alert("此条报告没有预报告记录");
+            return;
+          }
+        });
+      });
+    },
+    yuReports(url,id){
+      this.alertReport(
+         url,
+         id
+    );
+    },
     formEvent(itemName) {
       if (itemName.includes("pH检测")) {
         this.alertReport(
@@ -345,53 +468,59 @@ export default {
         );
       }
     },
+    isYubaogao(value, row) {
+      console.log(value, row.jian_ce_xiang_mu_, "1222222222");
+    },
     // pin凑sql
     selectSplit() {
-      var q1,q2,q3;
-      if (this.shenqingdanid) {
-        q1 = "jian_ce_shen_qing ='"+this.shenqingdanid+"' "  ;
+      var q1, q2, q3;
+      if (this.nianfen) {
+        q1 = "chu_ju_bao_gao_sh like'" +"%" + this.nianfen + "%" + "' ";
       }
-      if (this.danwei){
-        q2 = "wei_tuo_dan_wei_  = '"+this.danwei+"' " 
+      if (this.danwei) {
+        q2 = "wei_tuo_dan_wei_  = '" + this.danwei + "' ";
       }
-      if(this.bianhao){
-        q3 = "bao_gao_bian_hao_ = '"+this.bianhao+"'"
+      if (this.bianhao) {
+        q3 = "bao_gao_bian_hao_ = '" + this.bianhao + "'";
       }
-      if(this.shenqingdanid&&this.danwei&&this.bianhao){
-        return "where " + q1 +" and " + q2 + " and " + q3 + " and ";
-      }else if(this.shenqingdanid&&this.danwei&&!this.bianhao){
-        return "where " + q1 +" and " + q2 + " and ";
-      }else if(!this.shenqingdanid&&this.danwei&&this.bianhao){
+      if (this.nianfen && this.danwei && this.bianhao) {
+        return "where " + q1 + " and " + q2 + " and " + q3 + " and ";
+      } else if (this.nianfen && this.danwei && !this.bianhao) {
+        return "where " + q1 + " and " + q2 + " and ";
+      } else if (!this.nianfen && this.danwei && this.bianhao) {
         return "where " + q2 + " and " + q3 + " and ";
-      }else if(this.shenqingdanid&&!this.danwei&&this.bianhao){
-        return "where " + q1 +" and " + q3 + " and ";
-      }else if(this.shenqingdanid&&!this.danwei&&!this.bianhao){
+      } else if (this.nianfen && !this.danwei && this.bianhao) {
+        return "where " + q1 + " and " + q3 + " and ";
+      } else if (this.nianfen && !this.danwei && !this.bianhao) {
         return "where " + q1 + " and ";
-      }else if(!this.shenqingdanid&&this.danwei&&!this.bianhao){
+      } else if (!this.nianfen && this.danwei && !this.bianhao) {
         return "where " + q2 + " and ";
-      }else if(!this.shenqingdanid&&!this.danwei&&this.bianhao){
+      } else if (!this.nianfen && !this.danwei && this.bianhao) {
         return "where " + q3 + " and ";
-      }else if(!this.shenqingdanid&&!this.danwei&&!this.bianhao){
-        return "WHERE"
+      } else if (!this.nianfen && !this.danwei && !this.bianhao) {
+        return "WHERE";
       }
     },
     search() {
-      let moreSql = this.selectSplit()
-        var sql = "select * from t_mjjcbg "+ moreSql+" shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas' ORDER BY create_time_ DESC limit 0,20"
-        console.log(sql,'moresql');
+      let moreSql = this.selectSplit();
+      var sql =
+        "select * from t_mjjcbg " +
+        moreSql +
+        " shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas' ORDER BY create_time_ DESC limit 0,20";
+      console.log(sql, "moresql");
       this.loadData(sql);
     },
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否'' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit 0," + value;
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit 0,"+value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
+      console.log(value)
       let sql =
         "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit " +
-        value +
-        ", 20";
+        value +", 20";
       this.loadData(sql);
     },
   },

+ 127 - 38
src/views/platform/bpmn/bpmInstHis/listType/feijiancedangan.vue

@@ -2,20 +2,29 @@
   <div>
     <div class="heads">非CNAS/CMA检测档案</div>
     <div class="top-box">
-      <span class="t-span">检测申请单号</span
+      <span class="t-span">年份</span
+      ><el-input
+        class="inp"
+        v-model="nianfen"
+        placeholder="请输入内容"
+        clearable
+      >
+      </el-input>
+      <!-- <span class="t-span">检测委托单号</span
       ><el-input
         class="inp"
         v-model="shenqingdanid"
         placeholder="请输入内容"
         clearable
-      ></el-input>
-      <span class="t-span">委托单位</span
+      >
+      </el-input> -->
+      <!-- <span class="t-span">委托单位</span
       ><el-input
         class="inp"
         v-model="danwei"
         placeholder="请输入内容"
         clearable
-      ></el-input>
+      ></el-input> -->
       <span class="t-span">报告编号</span
       ><el-input
         class="inp"
@@ -40,56 +49,64 @@
         background: '#a7d6f8 !important',
       }"
     >
-      <el-table-column type="selection" width="55"> </el-table-column>
-      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="180">
+      <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
+      <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80">
+        <template slot-scope="scope">
+              {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
         <template slot-scope="scope">
           {{scope.row.he_tong_bian_hao_|returnHetong(hetong)}}
         </template>
       </el-table-column>
-      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="180"> 
+      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"> 
       </el-table-column>
-      <el-table-column prop="jian_ce_shen_qing" label="检测申请单号" width="180">
+      <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="150">
       </el-table-column>
-      <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
+      <el-table-column prop="jian_ce_shen_qing" label="检测委托单号" width="150">
       </el-table-column>
-      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期">
+      <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
+      </el-table-column> -->
+      <el-table-column prop="wei_tuo_ri_qi_" label="委托日期" width="100">
       </el-table-column>
-      <el-table-column prop="yang_pin_bian_hao" label="样品编号">
+      <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150">
       </el-table-column>
-      <el-table-column prop="yang_pin_ming_che" label="样品名称">
+      <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150">
       </el-table-column>
-      <el-table-column prop="lian_xi_ren_" label="联系人">
+      <!-- <el-table-column prop="lian_xi_ren_" label="联系人">
       </el-table-column>
       <el-table-column prop="lian_xi_dian_hua_" label="联系电话">
-      </el-table-column>
-       <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
+      </el-table-column> -->
+       <!-- <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
          <template slot-scope="scope">
            {{scope.row.lei_bie_qu_fen_yu}}CNAS/CMA
          </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="操作">
         <template slot-scope="scope">
           <el-popover placement="left" width="200" trigger="click">
             <div slot="reference" class="more">
-              <i class="el-icon-caret-bottom"></i>更多            
+              <i class="el-icon-caret-bottom"></i>查阅          
             </div>
-            <div class="item" style="color: #85ce61">
+            <!-- <div class="item" style="color: #85ce61">
               <i class="el-icon-s-order"></i> 合同
+            </div> -->
+
+            <div class="item" style="color: #85ce61" @click="alertReport(reports.jianceshenqingdan, scope.row.id_)">
+              <i class="el-icon-s-order"></i> 检测委托单
             </div>
             <div class="item" style="color: #85ce61" @click="alertReport(reports.hetongpingshen, scope.row.id_)">
               <i class="el-icon-s-order"></i> 合同评审
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.jianceshenqingdan, scope.row.id_)">
-              <i class="el-icon-s-order"></i> 检测申请单
-            </div>
             <div>
               <el-popover placement="left" width="200" trigger="click">
                 <div class="div_test item" style="color: #85ce61" slot="reference" @click="juTiItem(scope.row)">
-                  <i class="el-icon-s-order"></i> 检测原始记录               
+                  <i class="el-icon-s-order"></i> 检测记录               
                 </div>
                 <div class="three-item">
                   <div style="color: #85ce61; cursor: pointer" v-for="it in itemInfo" :key="it.id_" @click="formEvent(it.jian_ce_xiang_mu_)">
-                    {{ it.jian_ce_xiang_mu_ }}
+                    {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
                 </div>
               </el-popover>
@@ -97,9 +114,31 @@
             <div class="item" style="color: #85ce61" @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)">
               <i class="el-icon-s-order"></i> 检测报告审批表
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.yubaogao, scope.row.id_)">
-              <i class="el-icon-s-order"></i> 预报告
+            <div v-if="false">
+              <el-popover placement="left" width="200" trigger="triggerType">
+                <div
+                  class="div_test item"
+                  style="color: #85ce61"
+                  slot="reference"
+                  @click="YubaogaoItem(scope.row)"
+                >
+                  <i class="el-icon-s-order"></i> 预报告
+                </div>
+                <div class="three-item">
+                  <div
+                    style="color: #85ce61; cursor: pointer"
+                    v-for="it in yubaogaoitem"
+                    :key="it.id_"
+                    @click="yuReports(reports.yubaogao,it.id)"
+                  >
+                  {{ it.jian_ce_xiang_mu_ }}预报告记录
+                  </div>
+                </div>
+              </el-popover>
             </div>
+            <!-- <div class="item" style="color: #85ce61" @click="alertReport(reports.yubaogao, scope.row.id_)">
+              <i class="el-icon-s-order"></i> 预报告
+            </div> -->
             <div class="item" style="color: #85ce61" @click="alertReport(reports.jiancebaogao, scope.row.id_)">
               <i class="el-icon-s-order"></i>检测报告
             </div>
@@ -161,11 +200,14 @@ export default {
         jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测报告.rpx",
       },
       shenqingdanid:"",
+      nianfen:'',
       danwei:"",
       bianhao:"",
       tableData: [],
       itemInfo: [], // 列表内容
+      yubaogaoitem:[],
       hetong:[],
+      triggerType:"click"
     };
   },
   mixins: [GetReport],
@@ -176,6 +218,15 @@ export default {
           return arr[i].he_tong_bian_hao_;
         }
       }
+    },
+    yeare(value,dedal){
+      if(dedal=="年"){
+        return value.split("-")[0]
+      }else if(dedal=="月"){
+        return value.split("-")[0] + value.split("-")[1]
+      }else{
+        value
+      }
     }
   },
   created() {
@@ -348,11 +399,46 @@ export default {
         );
       }
     },
+    YubaogaoItem(info) {
+      let itemId;
+      let this_ = this;
+      var sql =
+        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
+        info.id_ +
+        "'";
+      curdPost("sql", sql).then((res) => {
+        itemId = res.variables.data;
+        this_.runqianId = itemId[0].id_;
+        var itemSql =
+          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
+          itemId[0].jian_ce_xiang_mu2 +
+          ")";
+        curdPost("sql", itemSql).then((res) => {
+          this_.itemInfo = res.variables.data;
+          for (var i = 0; i++; i < this_itemInfo) {
+            if (this_itemInfo[i].shi_fou_yu_bao_ga =="是") {
+              this_.yubaogaoitem.push(it);
+            }
+          }
+          if (this_.yubaogaoitem.length == 0) {
+            this_.triggerType = "";
+            alert("此条报告没有预报告记录");
+            return;
+          }
+        });
+      });
+    },
+    yuReports(url,id){
+      this.alertReport(
+         url,
+         id
+    );
+    },
     // pin凑sql
     selectSplit() {
       var q1,q2,q3;
-      if (this.shenqingdanid) {
-        q1 = "jian_ce_shen_qing ='"+this.shenqingdanid+"' ";
+      if (this.nianfen) {
+        q1 = "chu_ju_bao_gao_sh like'" +"%" +this.nianfen +"%"+"' ";
       }
       if (this.danwei){
         q2 = "wei_tuo_dan_wei_  = '"+this.danwei+"' ";
@@ -360,38 +446,41 @@ export default {
       if(this.bianhao){
         q3 = "bao_gao_bian_hao_ = '"+this.bianhao+"'";
       }
-      if(this.shenqingdanid&&this.danwei&&this.bianhao){
+      if(this.nianfen&&this.danwei&&this.bianhao){
         return "where " + '"+q1+"' +" and " + q2 + " and " + q3 + " and ";
-      }else if(this.shenqingdanid&&this.danwei&&!this.bianhao){
+      }else if(this.nianfen&&this.danwei&&!this.bianhao){
         return "where " + q1 +" and " + q2  + " and ";
-      }else if(!this.shenqingdanid&&this.danwei&&this.bianhao){
+      }else if(!this.nianfen&&this.danwei&&this.bianhao){
         return "where " + q2 + " and " + q3 + " and ";
-      }else if(this.shenqingdanid&&!this.danwei&&this.bianhao){
+      }else if(this.nianfen&&!this.danwei&&this.bianhao){
         return "where " + q1 +" and " + q3 + " and ";
-      }else if(this.shenqingdanid&&!this.danwei&&!this.bianhao){
+      }else if(this.nianfen&&!this.danwei&&!this.bianhao){
         return "where " + q1 + " and ";
-      }else if(!this.shenqingdanid&&this.danwei&&!this.bianhao){
+      }else if(!this.nianfen&&this.danwei&&!this.bianhao){
         return "where " + q2 + " and ";
-      }else if(!this.shenqingdanid&&!this.danwei&&this.bianhao){
+      }else if(!this.nianfen&&!this.danwei&&this.bianhao){
         return "where " + q3 + " and ";
-      }else if(!this.shenqingdanid&&!this.danwei&&!this.bianhao){
+      }else if(!this.nianfen&&!this.danwei&&!this.bianhao){
         return "WHERE"
       }
     },
     search() {
       let moreSql = this.selectSplit()
         var sql = "select * from t_mjjcbg " + moreSql+" shi_fou_yu_bao_ga ='否' and lei_bie_qu_fen_yu = '非' ORDER BY create_time_ DESC limit 0,20"
-      this.loadData(sql);
+     console.log(sql,"gengd")
+     this.loadData(sql);
     },
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0,'"+value+"'" ;
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0,"+value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga!='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit '"+value+"', 20";
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit "+value+", 20";
+
+        console.log(sql,"sql")
       this.loadData(sql);
     },
   },

+ 2 - 2
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -88,7 +88,7 @@ export default {
                   this_.$message.error("你要留样的话,存放位置不能为空哦!")
                   return;
                 }
-                if(ypInfoList[yp].shou_yang_wei_zhi != ''){
+                if(ypInfoList[yp].shou_yang_wei_zhi != null){
                   this_.$message.error("你要留样的话,就不要选收样存放位置!")
                   return;
                 }
@@ -109,7 +109,7 @@ export default {
                   this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
                   return;
                 }
-                if(ypInfoList[yp].liu_yang_wei_zhi_ != ''){
+                if(ypInfoList[yp].liu_yang_wei_zhi_ != null){
                   this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
                   return;
                 }

+ 2 - 2
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -97,7 +97,7 @@ export default {
                   this_.$message.error("你要留样的话,存放位置不能为空哦!")
                   return;
                 }
-                if(ypInfoList[yp].shou_yang_wei_zhi != ''){
+                if(ypInfoList[yp].shou_yang_wei_zhi != null){
                   this_.$message.error("你要留样的话,就不要选收样存放位置!")
                   return;
                 }
@@ -118,7 +118,7 @@ export default {
                   this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
                   return;
                 }
-                if(ypInfoList[yp].liu_yang_wei_zhi_ != ''){
+                if(ypInfoList[yp].liu_yang_wei_zhi_ != null){
                   this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
                   return;
                 }