ソースを参照

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

zjy 3 年 前
コミット
d28c7fff98

+ 25 - 2
src/business/platform/form/formrender/index.vue

@@ -61,6 +61,14 @@
                 ref="customComponent"
                 v-bind="customComponentAtts"
             />
+             <!-- 标签打印弹窗 -->
+             <Scan
+                currentScan = "sampleTag"
+                v-if="scanVisible"
+                :scanVisible = "scanVisible"
+                :obj = "scanList"
+                @scanOff = "closeScan"
+            />
         </ibps-watermark>
     </div>
 </template>
@@ -71,6 +79,7 @@
     import DynamicForm from './dynamic-form/dynamic-form'
     import IbpsWatermark from '@/components/ibps-watermark'
     import panle from '@/components/jbd-panel'
+    import Scan from '@/views/system/jbdScan/scan.vue'
 
     const JFormId = 'JForm'
 
@@ -78,7 +87,8 @@
         components: {
             DynamicForm,
             panle,
-            IbpsWatermark
+            IbpsWatermark,
+            Scan
         },
         props: {
             isDialog: {
@@ -146,7 +156,10 @@
                 number: 0,
                 // 个性定制
                 customComponent: null,
-                customComponentAtts: {}
+                customComponentAtts: {},
+                // 标签弹窗
+                scanVisible: false,
+                scanList: []
             }
         },
         computed: {
@@ -555,6 +568,16 @@
             // 更新store
             updateStore(action, data) {
                 this.$store.dispatch(action, data)
+            },
+            scanHandlerObj(list){
+                this.scanList = list
+                this.scanVisible = true
+            },
+            closeScan(){
+              this.scanVisible = false
+              // this.$emit("update:scanVisible",this.scanVisible)
+              this.$emit("close")
+              console.log(111)
             }
         }
     }

+ 49 - 49
src/plugins/error/index.js

@@ -3,58 +3,58 @@ import store from '@/store'
 import util from '@/utils/util'
 
 export default {
-  install(Vue, options) {
-    function writeLog(logType) {
-      return (error, vm, info = '') => {
-        Vue.nextTick(() => {
-          store.dispatch('ibps/log/push', {
-            message: `${info}: ${isObject(error) ? error.message : error}`,
-            type: logType,
-            meta: {
-              error,
-              vm
+    install (Vue, options) {
+        function writeLog (logType) {
+            return (error, vm, info = '') => {
+                Vue.nextTick(() => {
+                    store.dispatch('ibps/log/push', {
+                        message: `${info}: ${isObject(error) ? error.message : error}`,
+                        type: logType,
+                        meta: {
+                            error,
+                            vm
+                        }
+                    })
+                    if (process.env.NODE_ENV !== 'development') return
+                    util.log.capsule('ibps', 'ErrorHandler', logType)
+                    util.log.danger('>>>>>> 错误信息 >>>>>>')
+                    console.log(info)
+                    //   util.log.danger('>>>>>> Vue 实例 >>>>>>')
+                    //   console.log(vm)
+                    util.log.danger('>>>>>> Error >>>>>>')
+                    console.log(error)
+                })
             }
-          })
-          if (process.env.NODE_ENV !== 'development') return
-          util.log.capsule('ibps', 'ErrorHandler', logType)
-          // util.log.danger('>>>>>> 错误信息 >>>>>>')
-          // console.log(info)
-          // util.log.danger('>>>>>> Vue 实例 >>>>>>')
-          // console.log(vm)
-          // util.log.danger('>>>>>> Error >>>>>>')
-          // console.log(error)
-        })
-      }
-    }
-    if (process.env.NODE_ENV === 'development') {
-      Vue.config.warnHandler = writeLog('warning')
-    }
-    Vue.config.errorHandler = writeLog('danger')
-    window.onunhandledrejection = error => {
-      store.dispatch('ibps/log/push', {
-        message: get(error, 'reason.message', 'Unknown error'),
-        type: 'danger',
-        meta: {
-          error: get(error, 'reason'),
-          trace: get(error, 'reason.stack')
         }
-      })
-    }
-    window.onerror = (event, source, lineno, colno, error) => {
-      if (event === 'ResizeObserver loop limit exceeded') { // 忽略这个错误
-        return
-      }
+        if (process.env.NODE_ENV === 'development') {
+            Vue.config.warnHandler = writeLog('warning')
+        }
+        Vue.config.errorHandler = writeLog('danger')
+        window.onunhandledrejection = error => {
+            store.dispatch('ibps/log/push', {
+                message: get(error, 'reason.message', 'Unknown error'),
+                type: 'danger',
+                meta: {
+                    error: get(error, 'reason'),
+                    trace: get(error, 'reason.stack')
+                }
+            })
+        }
+        window.onerror = (event, source, lineno, colno, error) => {
+            if (event === 'ResizeObserver loop limit exceeded') { // 忽略这个错误
+                return
+            }
 
-      store.dispatch('ibps/log/push', {
-        message: get(error, 'message', 'Unknown error'),
-        type: 'danger',
-        meta: {
-          error,
-          trace: get(error, 'stack'),
-          source: `${source}@${lineno}:${colno}`,
-          event: event
+            store.dispatch('ibps/log/push', {
+                message: get(error, 'message', 'Unknown error'),
+                type: 'danger',
+                meta: {
+                    error,
+                    trace: get(error, 'stack'),
+                    source: `${source}@${lineno}:${colno}`,
+                    event: event
+                }
+            })
         }
-      })
     }
-  }
 }

+ 48 - 0
src/views/component/normalSelect.vue

@@ -0,0 +1,48 @@
+<template>
+    <el-select
+        id="normalSelect"
+        ref="test"
+        v-model="selected"
+        filterable
+        :multiple="field.field_options.custom_class === 'multiple'"
+        :disabled="field.disabled" 
+        placeholder="请选择"
+    >
+        <el-option
+            v-for="item in options"
+            :key="item.val"
+            :label="item.label"
+            :value="item.val"
+        ></el-option>
+    </el-select>
+</template>
+
+<script>
+    export default {
+        props: {
+            formData: {
+                type: Object,
+                default: {}
+            },
+            field: {
+                type: Object,
+                default: {}
+            },
+            value: {
+                type: String,
+                default: ''
+            }
+        },
+        watch: {
+            selected(v) {
+                this.$emit('change-data', this.field.field_options.component_name, v)
+            }
+        },
+        data() {
+            return {
+                options: [],
+                selected: this.field.field_options.custom_class === 'multiple' ? [] : ''
+            }
+        }
+    }
+</script>

+ 1 - 1
src/views/infosManage/externalFiles/externalFiles.vue

@@ -19,7 +19,7 @@
                         :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns"
                         :loading="loading" @action-event="handleAction">
                         <template slot="wenjinachayue" slot-scope="scope">
-                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="true" />
+                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="false" />
                         </template>
                     </ibps-crud>
                 </template>

+ 1 - 1
src/views/infosManage/internalFiles/internalFiles.vue

@@ -19,7 +19,7 @@
                         :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns"
                         :loading="loading" @action-event="handleAction">
                         <template slot="wenjinachayue" slot-scope="scope">
-                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="true" />
+                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="false" />
                         </template>
                     </ibps-crud>
                 </template>

+ 2 - 1
src/views/system/jbdHome/board/checkBoard.vue

@@ -239,7 +239,8 @@
             // 获取中间图表数据
             getMiddleData() {
                 // 获取检测数据
-                const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rw.qi_wang_wan_cheng, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_rwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm where rw.jian_ce_yuan_ = ipe.ID_ and rw.jian_ce_xiang_mu_ = tm.id_ and rw.create_time_ like '${this.month}%'`
+                // const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rw.qi_wang_wan_cheng, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_rwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm where rw.jian_ce_yuan_ = ipe.ID_ and rw.jian_ce_xiang_mu_ = tm.id_ and rw.create_time_ like '${this.month}%'`
+                const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rwz.wan_cheng_shi_jia, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_rwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm, t_mjrwfpzb rwz where rwz.jian_ce_yuan_ = ipe.ID_ and rwz.ren_wu_bian_hao_ = tm.id_ and rw.id_ = rwz.wai_jian_ and rw.create_time_ like '${this.month}%'`
                 // 获取检测受理类型数据
                 const sql2 = `select count(tm.jian_ce_lei_bie_ = '理化' or null) as lh, count(tm.jian_ce_lei_bie_ = '微生物' or null) as wsw, count(tm.jian_ce_lei_bie_ = '细胞活率' or null) as xbhl, count(tm.jian_ce_lei_bie_ = '残留检测' or null) as cljc, count(tm.jian_ce_lei_bie_ = '细胞鉴别' or null) as xbjb from t_jchzb tj, t_mjjcnlfw tm where tj.jian_ce_xiang_mu_ = tm.id_ and tj.create_time_ like '${this.month}%'`
 

+ 72 - 68
src/views/system/jbdScan/goods/sampleTag.vue

@@ -3,7 +3,7 @@
     <el-dialog 
       width="21cm"
       height="10cm" 
-       :modal-append-to-body='false' title="样品标签" :visible.sync="scanVisible">
+       :modal-append-to-body='true' :append-to-body="true" title="样品标签" :visible.sync="scanVisible">
       <!-- 表单是否显示 -->
       <div style="height:500px">
           <div ref="qrcode" id="box">
@@ -25,30 +25,31 @@
                       <div>样本编号:</div>
                       <div>{{ item1.serial }}</div>
                     </div>
-                    <div class="lh" style="margin-left: 5px">
+                    <div class="lh" style="margin-left: 8px">
+                    <div>样品数量:</div>
+                    <div>{{ index2 + 1 }}/{{ item1.num }}支</div>
+                  </div>
+                    <!-- <div class="lh" style="margin-left: 5px">
                       <div>收样时间:</div>
-                      <div></div>
-                    </div>
+                      <div>{{ item1.num }}</div>
+                    </div> -->
                   </div>
-                  <div class="lh">
-                    <div>样品类型:</div>
+                  <!-- <div class="lh">
+                    <div>检测项目:</div>
                     <div>{{ item1.type }}</div>
-                  </div>
-                  <div class="lh">
+                  </div> -->
+                  <!-- <div class="lh">
                     <div>存储条件:</div>
                     <div>{{ item1.condition }}</div>
-                  </div>
+                  </div> -->
 
                   <div class="lh">
                     <div>流转状态:</div>
                     <div>▢待检,▢已检,▢留样</div>
                   </div>
-                  <div class="lh">
-                    <div>样品数量:</div>
-                    <div>{{ index2 + 1 }}/{{ item1.num }}支</div>
-                  </div>
+                 
                   <div class="ewm">
-                    <vue-barcode :value="item1.serial" :width="1" :height="15" ></vue-barcode>
+                    <vue-barcode :value="item1.serial" :width=1.5 :height=25 :fontSize=15 :margin=3 ></vue-barcode>
                   </div>
 
                   <!-- <div
@@ -108,11 +109,12 @@ export default {
       list: [{
         name: 5,
         serial: 5,
-        type: 5,
-        num: 5,
-        condition: 5
+        // type: 5,
+        num: 5
+        // condition: 5
       }],
-      visible: true
+      visible: true,
+      sampleShuLiangList:[]
     }
   },
   watch: {
@@ -129,68 +131,70 @@ export default {
       this.$refs.easyPrint.print()
     },
     getInit() {
+      // console.log('getInit:',this.obj)
+      this.sampleShuLiangList = []
       var idStr = '';
       this.obj.forEach(item=>{
-        idStr += item + ','
+        idStr += item.split(" ")[0] + ','
+        this.sampleShuLiangList.push(parseInt(item.split(" ")[1]))
       })
       idStr = idStr.substring(0,idStr.length-1);
-      console.log(idStr)
-      this.getLook(idStr)
+      this.getLooks(idStr,this.sampleShuLiangList)
+
     },
-    getLook(id) {
+    getLooks(id,list) {
       console.log(id)
-      let sql = `select * from t_lhypb where find_in_set(parent_id_,'${id}')`
+      console.log(list)
+      let sql = `select * from t_mjypb where find_in_set(id_,'${id}')`
+      // console.log(sql)
+      repostCurd("sql", sql).then(res => {
+          const data = res.variables.data
+          let list = []
+          data.forEach((item,index) => {
+            // let num = parseInt(item.shou_yang_shu_lia)
+            let num = this.sampleShuLiangList[index]
+            // console.log(num)
+            if(typeof(num) == 'number'){
+                let o = {
+                  name: item.yang_pin_ming_che,
+                  serial: item.yang_pin_bian_hao,
+                  // type: item.jian_ce_xiang_mu_,
+                  num: num,
+                  // condition: item.yang_ben_yun_shu_
+                }
+                list.push(o)
+            }
+          })
+          this.list = list
+      })
+    },
+    getLook(id) {
+      // console.log(id)
+      let sql = `select * from t_mjypdjb where find_in_set(id_,'${id}')`
       console.log(sql)
       repostCurd("sql", sql).then(res => {
-        if (res.state === 200) {
           const data = res.variables.data
+          // console.log(data)
           let list = []
           data.forEach(item => {
-            if (item.yang_pin_lei_xing != '' && parseInt(item.shu_liang_) > 0) {
-              let o = {
-                name: item.yang_pin_ming_che,
-                serial: item.yang_pin_bian_hao,
-                type: item.yang_pin_lei_xing,
-                num: item.shu_liang_,
-                condition: item.yang_ben_yun_shu_
-              }
-              list.push(o)
-            }
-            if (item.yang_pin_lei_er_ != '' && parseInt(item.shu_liang_er_) > 0) {
-              let o = {
-                name: item.yang_pin_ming_che,
-                serial: item.yang_pin_bian_hao,
-                type: item.yang_pin_lei_er_,
-                num: item.shu_liang_er_,
-                condition: item.yang_pin_yun_shu_
-              }
-              list.push(o)
-            }
-            if (item.yang_pin_lei_san_ != '' && parseInt(item.shu_liang_san_) > 0) {
-              let o = {
-                name: item.yang_pin_ming_che,
-                serial: item.yang_pin_bian_hao,
-                type: item.yang_pin_lei_san_,
-                num: item.shu_liang_san_,
-                condition: item.yang_pin_yun_san
-              }
-              list.push(o)
+            let num = parseInt(item.shou_yang_shu_lia)
+            if(typeof(num) == 'number'){
+              // console.log(num)
+              // for(let i = 0;i<num;i++){
+                let o = {
+                  name: item.yang_pin_ming_che,
+                  serial: item.yang_pin_bian_hao,
+                  // type: item.jian_ce_xiang_mu_,
+                  num: num,
+                  // condition: item.yang_ben_yun_shu_
+                }
+                list.push(o)
+            // }
             }
-            if (item.yang_pin_lei_si_ != '' && parseInt(item.shu_liang_si_) > 0) {
-              let o = {
-                name: item.yang_pin_ming_che,
-                serial: item.yang_pin_bian_hao,
-                type: item.yang_pin_lei_si_,
-                num: item.shu_liang_si_,
-                condition: item.yang_pin_yun_si_
-              }
-              list.push(o)
-            }
-
           })
+          // console.log(list)
           this.list = list
-
-        }
+          // console.log(this.list)
       })
     }
   }
@@ -204,7 +208,7 @@ export default {
 
 .tagBox {
   width: 240px;   // 300  240
-  height: 140px;  // 180  150
+  height: 94px;  // 180  150  140
   position: relative;
   border: 1px solid #000000;
   padding: 2px;
@@ -241,7 +245,7 @@ export default {
 
 .lh {
   // line-height: auto;
-  font-size: 4px;  //16
+  font-size: 8px;  //16
   display: flex;
   align-items: center;
 

+ 3 - 1
src/views/system/jbdScan/scan.vue

@@ -5,7 +5,9 @@
     :is="currentScan"
     :scanVisible="scanVisible"
     :obj = "obj"
-    @scanOff = "scanOff"/>
+    @scanOff = "scanOff"
+    @close   = "scanVisible=false"
+    />
   </div>
 </template>