Bläddra i källkod

修改任务分配带值

ZZJ 3 år sedan
förälder
incheckning
73f1c7558d

+ 103 - 0
package-lock.json

@@ -72,8 +72,10 @@
         "video.js": "^7.8.4",
         "vue": "^2.6.12",
         "vue-aplayer": "^1.6.1",
+        "vue-barcode": "^1.3.0",
         "vue-codemirror": "^4.0.6",
         "vue-count-to": "^1.0.13",
+        "vue-easy-print": "^0.0.8",
         "vue-echarts": "^5.0.0-beta.0",
         "vue-grid-layout": "^2.3.8",
         "vue-i18n": "^8.21.0",
@@ -12752,6 +12754,66 @@
         "js-yaml": "bin/js-yaml.js"
       }
     },
+    "node_modules/jsbarcode": {
+      "version": "3.11.5",
+      "resolved": "https://registry.npmmirror.com/jsbarcode/-/jsbarcode-3.11.5.tgz",
+      "integrity": "sha512-zv3KsH51zD00I/LrFzFSM6dst7rDn0vIMzaiZFL7qusTjPZiPtxg3zxetp0RR7obmjTw4f6NyGgbdkBCgZUIrA==",
+      "bin": {
+        "auto.js": "bin/barcodes/CODE128/auto.js",
+        "Barcode.js": "bin/barcodes/Barcode.js",
+        "barcodes": "bin/barcodes",
+        "canvas.js": "bin/renderers/canvas.js",
+        "checksums.js": "bin/barcodes/MSI/checksums.js",
+        "codabar": "bin/barcodes/codabar",
+        "CODE128": "bin/barcodes/CODE128",
+        "CODE128_AUTO.js": "bin/barcodes/CODE128/CODE128_AUTO.js",
+        "CODE128.js": "bin/barcodes/CODE128/CODE128.js",
+        "CODE128A.js": "bin/barcodes/CODE128/CODE128A.js",
+        "CODE128B.js": "bin/barcodes/CODE128/CODE128B.js",
+        "CODE128C.js": "bin/barcodes/CODE128/CODE128C.js",
+        "CODE39": "bin/barcodes/CODE39",
+        "constants.js": "bin/barcodes/ITF/constants.js",
+        "defaults.js": "bin/options/defaults.js",
+        "EAN_UPC": "bin/barcodes/EAN_UPC",
+        "EAN.js": "bin/barcodes/EAN_UPC/EAN.js",
+        "EAN13.js": "bin/barcodes/EAN_UPC/EAN13.js",
+        "EAN2.js": "bin/barcodes/EAN_UPC/EAN2.js",
+        "EAN5.js": "bin/barcodes/EAN_UPC/EAN5.js",
+        "EAN8.js": "bin/barcodes/EAN_UPC/EAN8.js",
+        "encoder.js": "bin/barcodes/EAN_UPC/encoder.js",
+        "ErrorHandler.js": "bin/exceptions/ErrorHandler.js",
+        "exceptions": "bin/exceptions",
+        "exceptions.js": "bin/exceptions/exceptions.js",
+        "fixOptions.js": "bin/help/fixOptions.js",
+        "GenericBarcode": "bin/barcodes/GenericBarcode",
+        "getOptionsFromElement.js": "bin/help/getOptionsFromElement.js",
+        "getRenderProperties.js": "bin/help/getRenderProperties.js",
+        "help": "bin/help",
+        "index.js": "bin/renderers/index.js",
+        "index.tmp.js": "bin/barcodes/index.tmp.js",
+        "ITF": "bin/barcodes/ITF",
+        "ITF.js": "bin/barcodes/ITF/ITF.js",
+        "ITF14.js": "bin/barcodes/ITF/ITF14.js",
+        "JsBarcode.js": "bin/JsBarcode.js",
+        "linearizeEncodings.js": "bin/help/linearizeEncodings.js",
+        "merge.js": "bin/help/merge.js",
+        "MSI": "bin/barcodes/MSI",
+        "MSI.js": "bin/barcodes/MSI/MSI.js",
+        "MSI10.js": "bin/barcodes/MSI/MSI10.js",
+        "MSI1010.js": "bin/barcodes/MSI/MSI1010.js",
+        "MSI11.js": "bin/barcodes/MSI/MSI11.js",
+        "MSI1110.js": "bin/barcodes/MSI/MSI1110.js",
+        "object.js": "bin/renderers/object.js",
+        "options": "bin/options",
+        "optionsFromStrings.js": "bin/help/optionsFromStrings.js",
+        "pharmacode": "bin/barcodes/pharmacode",
+        "renderers": "bin/renderers",
+        "shared.js": "bin/renderers/shared.js",
+        "svg.js": "bin/renderers/svg.js",
+        "UPC.js": "bin/barcodes/EAN_UPC/UPC.js",
+        "UPCE.js": "bin/barcodes/EAN_UPC/UPCE.js"
+      }
+    },
     "node_modules/jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
@@ -20165,6 +20227,14 @@
         "vue": "^2.5.16"
       }
     },
+    "node_modules/vue-barcode": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmmirror.com/vue-barcode/-/vue-barcode-1.3.0.tgz",
+      "integrity": "sha512-DxQ0hxes/dP6GajsJumpW6jV14VwlnTwStZbtE6G0wkewuJVDoDOdxUr5seGuxsMT9fJ0aty4X47Z5TG0M/gxg==",
+      "dependencies": {
+        "jsbarcode": "^3.5.8"
+      }
+    },
     "node_modules/vue-cli-plugin-i18n": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-1.0.1.tgz",
@@ -20199,6 +20269,18 @@
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
     },
+    "node_modules/vue-easy-print": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmmirror.com/vue-easy-print/-/vue-easy-print-0.0.8.tgz",
+      "integrity": "sha512-QF3CJvWkAWP8BSaxdIrmGASkkuNX3bDUXyWx7/rE8DGGShP20Ap2H0P1w5oKqgN7pJcHH8ZywdvhQk7ggp0Z4w==",
+      "dependencies": {
+        "vue": "^2.5.11"
+      },
+      "engines": {
+        "node": ">= 4.0.0",
+        "npm": ">= 3.0.0"
+      }
+    },
     "node_modules/vue-echarts": {
       "version": "5.0.0-beta.0",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",
@@ -32215,6 +32297,11 @@
         "esprima": "^4.0.0"
       }
     },
+    "jsbarcode": {
+      "version": "3.11.5",
+      "resolved": "https://registry.npmmirror.com/jsbarcode/-/jsbarcode-3.11.5.tgz",
+      "integrity": "sha512-zv3KsH51zD00I/LrFzFSM6dst7rDn0vIMzaiZFL7qusTjPZiPtxg3zxetp0RR7obmjTw4f6NyGgbdkBCgZUIrA=="
+    },
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
@@ -38470,6 +38557,14 @@
       "integrity": "sha512-c+ZAwZ63bVDsKkcHeKLAonIL2gY4nrVRdKypoPRXSkh+8B1cVhFT2tx8HSTNT6eX6WZyDtaYrEJfcgetrfvcdQ==",
       "requires": {}
     },
+    "vue-barcode": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmmirror.com/vue-barcode/-/vue-barcode-1.3.0.tgz",
+      "integrity": "sha512-DxQ0hxes/dP6GajsJumpW6jV14VwlnTwStZbtE6G0wkewuJVDoDOdxUr5seGuxsMT9fJ0aty4X47Z5TG0M/gxg==",
+      "requires": {
+        "jsbarcode": "^3.5.8"
+      }
+    },
     "vue-cli-plugin-i18n": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-1.0.1.tgz",
@@ -38500,6 +38595,14 @@
       "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
     },
+    "vue-easy-print": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmmirror.com/vue-easy-print/-/vue-easy-print-0.0.8.tgz",
+      "integrity": "sha512-QF3CJvWkAWP8BSaxdIrmGASkkuNX3bDUXyWx7/rE8DGGShP20Ap2H0P1w5oKqgN7pJcHH8ZywdvhQk7ggp0Z4w==",
+      "requires": {
+        "vue": "^2.5.11"
+      }
+    },
     "vue-echarts": {
       "version": "5.0.0-beta.0",
       "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",

+ 249 - 0
src/views/system/jbdScan/goods/sampleTag.vue

@@ -0,0 +1,249 @@
+<template>
+  <div class="bg">
+    <el-dialog 
+      width="21cm"
+      height="10cm" 
+       :modal-append-to-body='false' title="样品标签" :visible.sync="scanVisible">
+      <!-- 表单是否显示 -->
+      <div style="height:500px">
+          <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint"
+            :onePageRow="onePageRow"
+          >
+            <div v-for="(item1, index1) in list" :key="index1"  style="display: inline-block" >
+              <div v-for="(item2, index2) in parseInt(item1.num)" :key="index2" 
+              style="display: inline-block"
+              ><!-- style="page-break-after:always" -->
+               <div class="All">
+                <div class="tagBox">
+                  <div class="lh">
+                    <div>样本名称:</div>
+                    <div>{{ item1.name }}</div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>样本编号:</div>
+                      <div>{{ item1.serial }}</div>
+                    </div>
+                    <div class="lh" style="margin-left: 5px">
+                      <div>收样时间:</div>
+                      <div></div>
+                    </div>
+                  </div>
+                  <div class="lh">
+                    <div>样品类型:</div>
+                    <div>{{ item1.type }}</div>
+                  </div>
+                  <div class="lh">
+                    <div>存储条件:</div>
+                    <div>{{ item1.condition }}</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>
+                  </div>
+
+                  <!-- <div
+                    style="page-break-after: always; display: block !important;height: 40px"
+                  ></div> -->
+
+
+                </div>
+               </div>
+              </div>
+            </div>
+          </vue-easy-print>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
+        <el-button type="primary" @click="printDemo">打印标签</el-button>
+      </span>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+import VueBarcode from 'vue-barcode';
+import vueEasyPrint from "vue-easy-print";
+import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js';
+
+export default {
+  components: {
+    VueBarcode,
+    vueEasyPrint,
+  },
+  props: {
+    obj: {
+      default: [],
+      type: Array
+    },
+    onePageRow:{
+      type:Number,
+      default:3
+    },
+    blankLines:{
+      type:Boolean,
+      default:true
+    },
+    scanVisible:{
+      type:Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      value: '',
+      id: '',
+      list: [{
+        name: 5,
+        serial: 5,
+        type: 5,
+        num: 5,
+        condition: 5
+      }],
+      visible: true
+    }
+  },
+  watch: {
+    obj() {
+      this.getInit()
+      // console.log(this.obj)
+    }
+  },
+  created() {
+    this.getInit()
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print()
+    },
+    getInit() {
+      var idStr = '';
+      this.obj.forEach(item=>{
+        idStr += item + ','
+      })
+      idStr = idStr.substring(0,idStr.length-1);
+      console.log(idStr)
+      this.getLook(idStr)
+    },
+    getLook(id) {
+      console.log(id)
+      let sql = `select * from t_lhypb where find_in_set(parent_id_,'${id}')`
+      console.log(sql)
+      repostCurd("sql", sql).then(res => {
+        if (res.state === 200) {
+          const data = res.variables.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)
+            }
+            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)
+            }
+
+          })
+          this.list = list
+
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.bg {
+  // height: auto;
+}
+
+.tagBox {
+  width: 240px;   // 300  240
+  height: 140px;  // 180  150
+  position: relative;
+  border: 1px solid #000000;
+  padding: 2px;
+  display: inline-block;
+  // justify-content: space-around;
+  // flex-direction: column;
+  margin: 10px 5px;
+  border-radius: 4px;
+  background-color: #fff;
+}
+.ewm{
+
+}
+/*
+.tagBox {
+  width: 177.5px;   // 300  240
+  height: 106.5px;  // 180  150
+  position: relative;
+  border: 1px solid #000000;
+  padding: 20px;
+  display: flex;
+  justify-content: space-around;
+  flex-direction: column;
+  margin: 20px auto;
+  border-radius: 15px;
+  background-color: #fff;
+}
+*/
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 4px;  //16
+  display: flex;
+  align-items: center;
+
+}
+</style>

+ 1 - 0
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -292,6 +292,7 @@ export default {
                 rwzb["zhan_shi_biao_wai"] = mjwtsqbAllResult[i].ye_mian_zong_zhua
                 rwzb["zhuang_tai_"] = "任务待分配"                       //	状态
                 rwzb["gong_xian_zhi_"] = mjypbList[i].yang_pin_lei_xin			// 供限值
+                rwzb["yang_pin_bei_zhu_"] = mjypbList[i].bei_zhu_			// 样品备注
                 rwb.push(rwzb)
                 // let str = mjypbList[i].jian_ce_xiang_mu2.split(",")
                 // for (var p in str) {

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

@@ -22,9 +22,10 @@ import caigourukudan from './goods/caigourukudan'
 import chnangguirukudan from './goods/chnangguirukudan'
 import lingliaodan from './goods/lingliaodan'
 import fenzhuangtag from './goods/fenzhuangtag'
+import sampleTag from './goods/sampleTag'
 
 export default {
-  components: { facility,material,sample,sampleConfirmation,manualConfirmation,tag,jishutag,caigourukudan,chnangguirukudan,lingliaodan,fenzhuangtag},
+  components: { facility,material,sample,sampleConfirmation,manualConfirmation,tag,jishutag,caigourukudan,chnangguirukudan,lingliaodan,fenzhuangtag,sampleTag},
   props:{
     currentScan:String,
     scanVisible:Boolean,