Prechádzať zdrojové kódy

add:采购订单及标签打印

zjy 3 rokov pred
rodič
commit
a597b0200f

+ 2 - 0
package.json

@@ -85,8 +85,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",

+ 9 - 0
src/business/platform/data/templaterender/templates/list.vue

@@ -243,6 +243,7 @@
     <Scan
     :currentScan = "scanName"
     :scanVisible = "scanVisible"
+    :obj = "obj"
     v-if="scanVisible"
     @scanOff = "scanOff"
     />
@@ -352,6 +353,7 @@ export default {
       defaultFormData: {},
       scanVisible:false,
       scanName:'',
+      obj :'',
 
       initialization: false,
       tableHeight: document.body.clientHeight,
@@ -763,6 +765,13 @@ export default {
       this.scanVisible = true
       this.scanName = val
     },
+    /*按钮传参*/
+    scanHandlerObj(val,obj){
+      console.log(val,obj)
+      this.scanVisible = true
+      this.scanName = val
+      this.obj = obj
+    },
     /* 返回关闭*/
     scanOff(val){
       this.scanVisible = false

+ 354 - 0
src/views/system/jbdScan/goods/caigourukudan.vue

@@ -0,0 +1,354 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="采购入库单"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 90%; margin: 0 auto">
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div
+              v-for="(item1, index1) in list"
+              :key="index1"
+              style="margin-bottom: 30px"
+            >
+              <div style="page-break-after: always">
+                <!-- <div class="tagBox">
+                  <div>供应商:{{item1[0].gong_ying_shang_}}</div>
+                  <div style="  margin-left: 20px;">采购订单编号{{item1[0].cai_gou_ding_dan_}}</div>
+                  <div style="  margin-left: 20px;">入库日期{{item1[0].dao_ku_ri_qi_}}</div>
+                </div> -->
+                <div class="word-title">
+                  <h4>采购入库单</h4>
+                </div>
+                <div class="tagBox">
+                  <div>
+                    <div style="font-size: 10px">
+                      供应商:<span style="margin-left: 10px">{{
+                        item1[0].gong_ying_shang_
+                          | gongyingshang(gongyingshangList)
+                      }}</span>
+                    </div>
+                  </div>
+                  <div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      采购订单编号:<span style="margin-left: 10px">
+                        {{ item1[0].cai_gou_ding_dan_ }}</span
+                      >
+                    </div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      日期:<span style="margin-left: 10px">{{
+                        item1[0].dao_ku_ri_qi_
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+
+                <div>
+                  <table border="1">
+                    <thead>
+                      <tr>
+                        <th style="width: 40px">序号</th>
+                        <th style="font-weight: normal">物料编码</th>
+                        <th style="font-weight: normal">物料名称</th>
+                        <th>货号</th>
+                        <th>批号</th>
+                        <th>规格/特征量值</th>
+                        <th>生产商/品牌</th>
+                        <th>数量</th>
+                        <th>单位</th>
+                        <th>单价(含税)</th>
+                        <th>税率</th>
+                        <th>单价</th>
+                        <th>税额</th>
+                        <th>金额</th>
+                        <th>含税合计</th>
+                      </tr>
+                    </thead>
+                    <tbody>
+                      <tr>
+                        <td style="width: 30px">{{ index1 }}</td>
+                        <td style="width: 70px">
+                          {{ item1[0].wu_liao_dai_ma_ }}
+                        </td>
+                        <td style="width: 120px">
+                          {{ item1[0].wu_liao_ming_chen }}
+                        </td>
+                        <td style="width: 60px">{{ item1[0].huo_hao_ }}</td>
+                        <td style="width: 60px">{{ item1[0].pi_hao_ }}</td>
+                        <td style="width: 80px">{{ item1[0].gui_ge_ }}</td>
+                        <td style="width: 120px">{{ item1[0].chang_jia_ }}</td>
+                        <td style="width: 45px">
+                          {{ item1[0].dao_huo_shu_liang }}
+                        </td>
+                        <td style="width: 60px">{{ item1[0].dan_wei_ }}</td>
+                        <td style="width: 60px">{{ item1[0].dan_jia_han_shui_ }}</td>
+                        <td style="width: 45px">{{ item1[0].shui_lv_ }}</td>
+                        <td style="width: 45px">{{ item1[0].dan_jia_ }}</td>
+                        <td style="width: 45px">{{ item1[0].shui_e_ }}</td>
+                        <td style="width: 45px">{{ item1[0].jin_e_ }}</td>
+                        <td style="width: 60px">
+                          {{ item1[0].han_shui_he_ji_ }}
+                        </td>
+                      </tr>
+                    </tbody>
+                    <tfoot
+                      align="right"
+                      valign="bottom"
+                      style="text-align: right !important; height: 30px"
+                    >
+                      <tr>
+                        <td colspan="15" style="text-align: right !important">
+                          合计:{{ item1.heji }}
+                        </td>
+                      </tr>
+                    </tfoot>
+                  </table>
+                </div>
+                <div class="bottom">
+                  <div>仓管员/日期 :{{ item1.name2 }} /{{ item1.time2 }}</div>
+                  <div>
+                    审核人(部门负责人)/日期 :{{ item1.name3 }} /{{
+                      item1.time3
+                    }}
+                  </div>
+                </div>
+              </div>
+            </div>
+          </vue-easy-print>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      gongyingshangList: [],
+    };
+  },
+  created() {
+    this.getInit();
+    let sql = `select id_,gong_ying_shang_m FROM  t_gysml`;
+    repostCurd("sql", sql).then((res) => {
+      return (this.gongyingshangList = res.variables.data);
+    });
+  },
+  filters: {
+    gongyingshang: function (value, list) {
+      if (!isNaN(value)) {
+        for (let i = 0; i < list.length; i++) {
+          if (value == list[i].id_) {
+            return list[i].gong_ying_shang_m;
+          }
+        }
+      } else {
+        return value;
+      }
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    addNumber(num1, num2) {
+      let a = parseFloat(num1);
+      let b = parseFloat(num2);
+      return a.toFixed("2") * 1 + b.toFixed("2") * 1;
+    },
+    riqi(value) {
+      let date = new Date(value);
+      let y = date.getFullYear(); //获取年份
+      let m = date.getMonth() + 1; //获取月份
+      m = m < 10 ? "0" + m : m; //月份不满10天显示前加0
+      let d = date.getDate(); //获取日期
+      d = d < 10 ? "0" + d : d; //日期不满10天显示前加0
+      return y + "-" + m + "-" + d;
+    },
+    addNumber(num1, num2) {
+      let a = parseFloat(num1);
+      let b = parseFloat(num2);
+      return a.toFixed("2") * 1 + b.toFixed("2") * 1;
+    },
+    getInit() {
+      // console.log(this.obj)
+      // var idStr = "";
+      // this.obj.forEach((item) => {
+      //   idStr += item + ",";
+      // });
+      // idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(this.obj);
+    },
+    getLook(id) {
+      let this_ = this;
+      let name1, name2, name3;
+      let time1, time2, time3;
+      let chushi =0;
+      id.forEach((item) => {
+        let sql = `select * FROM t_wljsysjlb WHERE id_='${item}'`;
+        repostCurd("sql", sql).then((res) => {
+          let data = res.variables.data;
+          // let s2 = `select NAME_,CREATE_TIME_ FROM ibps_party_employee where id_ =(select CREATE_BY_ FROM ibps_bpm_oper_log WHERE PROC_INST_ID_ = (SELECT PROC_INST_ID_ FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item}' )AND NODE_ID_ = 'Activity_1pha4py' ORDER BY CREATE_TIME_ DESC LIMIT 1)`;
+          let s2 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item}') AND b.NODE_ID_ = 'Activity_1pha4py' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+          repostCurd("sql", s2).then((res) => {
+
+            name2 = res.variables.data[0].NAME_ || 0;
+            time2 = res.variables.data[0].CREATE_TIME_ || 0;
+            data["name2"] = name2;
+            data["time2"] = time2;
+            // let s3 = `select NAME_,CREATE_TIME_ FROM ibps_party_employee where id_ =(select CREATE_BY_ FROM ibps_bpm_oper_log WHERE PROC_INST_ID_ = (SELECT PROC_INST_ID_ FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item}' )AND NODE_ID_ = 'Activity_04ff3k5' ORDER BY CREATE_TIME_ DESC LIMIT 1)`;
+            let s3 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item}') AND b.NODE_ID_ = 'Activity_04ff3k5' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+            repostCurd("sql", s3).then((res) => {
+
+              name3 = res.variables.data[0].NAME_ || 0;
+              time3 = res.variables.data[0].CREATE_TIME_ || 0;
+              data["name3"] = name3;
+              data["time3"] = time3;
+              data.forEach((it) => {
+                data["heji"] = this.addNumber(chushi, it.jin_e_);
+                chushi = data["heji"];
+              });
+              this_.list.push(data);
+              console.log(this_.list);
+            });
+          });
+        });
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bottom {
+  margin-top: 15px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 10px;
+}
+.word-title {
+  display: flex;
+  justify-content: center;
+}
+thead {
+  background: #f3f3f3;
+}
+.el-dialog__body {
+  color: #0d0e0f;
+  font-size: 10px !important;
+  word-break: none;
+}
+thead > tr > th {
+  font-size: 10px;
+  text-align: center;
+  font-weight: normal;
+  color: #01060c;
+}
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+}
+.tagBox {
+  position: relative;
+  width: 100%;
+  // border: 1px solid #000000;
+  padding: 5px;
+  display: flex;
+  display: flex;
+  justify-content: space-between;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 12px;
+  display: flex;
+  align-items: center;
+}
+
+* {
+  margin: 0;
+  padding: 0;
+}
+table {
+  border-collapse: collapse;
+  text-align: center;
+  border: 1px solid #01060c;
+}
+
+td {
+  width: 120px;
+  // height: 50px;
+  text-align: center;
+  font-size: 10px;
+}
+.friday {
+  width: 100px;
+  height: 50px;
+}
+</style>

+ 341 - 0
src/views/system/jbdScan/goods/chnangguirukudan.vue

@@ -0,0 +1,341 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="采购入库单"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 95%; margin: 0 auto">
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div
+              v-for="(item1, index1) in list"
+              :key="index1"
+              style="margin-bottom: 30px"
+            >
+              <div style="page-break-after: always">
+                <div class="word-title">
+                  <h4>采购入库单</h4>
+                </div>
+                <div class="tagBox">
+                  <div>
+                    <div style="font-size: 10px">
+                      供应商:<span style="margin-left: 10px">{{
+                        item1.gong_ying_shang_
+                          | gongyingshang(gongyingshangList)
+                      }}</span>
+                    </div>
+                  </div>
+                  <div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      采购订单编号:<span style="margin-left: 10px">{{
+                        item1.cai_gou_ding_dan_
+                      }}</span>
+                    </div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      日期:<span style="margin-left: 10px">{{
+                        item1.dao_huo_ri_qi_
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+                <div>
+                  <table border="1">
+                    <thead>
+                      <tr>
+                        <th style="width: 40px">序号</th>
+                        <th style="font-weight: normal">物料编码</th>
+                        <th style="font-weight: normal">物料名称</th>
+                        <th>货号</th>
+                        <th>批号</th>
+                        <th>规格/特征量值</th>
+                        <th>生产商/品牌</th>
+                        <th>数量</th>
+                        <th>单位</th>
+                        <th>单价(含税)</th>
+                        <th>税率</th>
+                        <th>单价</th>
+                        <th>税额</th>
+                        <th>金额</th>
+                        <th>含税合计</th>
+                      </tr>
+                    </thead>
+                    <tbody>
+                      <tr v-for="(item, index) in item1" :key="index">
+                        <td style="width: 30px">{{ index + 1 }}</td>
+                        <td style="width: 70px">{{ item.wu_liao_bian_ma_ }}</td>
+                        <td style="width: 120px">
+                          {{ item.wu_liao_ming_chen }}
+                        </td>
+                        <td style="width: 60px">{{ item.huo_hao_ }}</td>
+                        <td style="width: 60px">{{ item.pi_hao_ }}</td>
+                        <td style="width: 80px">{{ item.gui_ge_xing_hao_ }}</td>
+                        <td style="width: 120px">
+                          {{ item.gong_ying_shang_ }}
+                        </td>
+                        <td style="width: 45px">{{ item.shu_liang_ }}</td>
+                        <td style="width: 45px">{{ item.dan_wei_ }}</td>
+                        <td style="width: 60px">{{ item.dan_jia_han_shui_ }}</td>
+                        <td style="width: 45px">{{ item.shui_lv_ }}</td>
+                        <td style="width: 45px">{{ item.dan_jia_ }}</td>
+                        <td style="width: 45px">{{ item.shui_e_ }}</td>
+                        <td style="width: 45px">{{ item.jin_e_ }}</td>
+                        <td style="width: 60px">{{ item.han_shui_he_ji_ }}</td>
+                      </tr>
+                    </tbody>
+                    <tfoot
+                      align="right"
+                      valign="bottom"
+                      style="text-align: right !important; height: 30px"
+                    >
+                      <tr>
+                        <td colspan="15" style="text-align: right !important">
+                          合计:{{ item1.heji }}
+                        </td>
+                      </tr>
+                    </tfoot>
+                  </table>
+                </div>
+                <div class="bottom">
+                  <div>仓管员/日期 :{{ item1.name2 }} /{{ item1.time2 }}</div>
+                  <div>
+                    审核人(部门负责人)/日期 :{{ item1.name3 }} /{{
+                      item1.time3
+                    }}
+                  </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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      gongyingshangList: [],
+    };
+  },
+  created() {
+    this.getInit();
+    let sql = `select *  FROM  t_gysml`;
+    repostCurd("sql", sql).then((res) => {
+      this.gongyingshangList = res.variables.data;
+    });
+  },
+  filters: {
+    gongyingshang: function (value, list) {
+      console.log(value);
+      if (!isNaN(value)) {
+        for (let i = 0; i < list.length; i++) {
+          console.log(value == list[i].id_);
+          if (value == list[i].id_) {
+            return list[i].gong_ying_shang_m;
+          }
+        }
+      } else {
+        return value;
+      }
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    addNumber(num1, num2) {
+      let a = parseFloat(num1);
+      let b = parseFloat(num2);
+      return a.toFixed("2") * 1 + b.toFixed("2") * 1;
+    },
+    getInit() {
+      var idStr = "";
+      this.obj.forEach((item) => {
+        idStr += item + ",";
+      });
+      idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(idStr);
+    },
+    getLook(id) {
+      let this_ = this;
+      console.log(id);
+      let sql = `select * FROM t_yszb WHERE FIND_IN_SET(id_,'${id}')`;
+      let zhubiao = [];
+      let name1, name2, name3;
+      let time1, time2, time3;
+      let chushi = 0;
+      repostCurd("sql", sql).then((res) => {
+        zhubiao = res.variables.data;
+        zhubiao.forEach((item) => {
+          let sql1 = `select * FROM t_cgysjlb  WHERE FIND_IN_SET(wai_jian_,'${item.id_}')`;
+          repostCurd("sql", sql1).then((res) => {
+            let data = res.variables.data;
+            let s2 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}') AND b.NODE_ID_ = 'Activity_04lhxla' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+            repostCurd("sql", s2).then((res) => {
+              console.log(res.variables.data);
+              name2 = res.variables.data[0].NAME_;
+              time2 = res.variables.data[0].CREATE_TIME_;
+              console.log(name2, "name2");
+              data["name2"] = name2;
+              data["time2"] = time2;
+              let s3 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}') AND b.NODE_ID_ = 'Activity_1dk76gy' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+              console.log(s3);
+              repostCurd("sql", s3).then((res) => {
+                name3 = res.variables.data[0].NAME_;
+                time3 = res.variables.data[0].CREATE_TIME_;
+                data["name3"] = name3;
+                data["time3"] = time3;
+                 data["gong_ying_shang_"] = item.gong_ying_shang_;
+                data["cai_gou_ding_dan_"] = item.cai_gou_ding_dan_;
+                data["dao_huo_ri_qi_"] = item.dao_huo_ri_qi_;
+                data.forEach((it) => {
+                  debugger
+                  data["heji"] = this.addNumber(chushi, it.jin_e_);
+                  chushi = data["heji"];
+                });
+                this_.list.push(data);
+                console.log(this_.list, 1111111111);
+              });
+            });
+          });
+        });
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bottom {
+  margin-top: 15px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 10px;
+}
+.word-title {
+  display: flex;
+  justify-content: center;
+}
+thead {
+  background: #f3f3f3;
+}
+.el-dialog__body {
+  color: #0d0e0f;
+  font-size: 10px !important;
+  word-break: none;
+}
+thead > tr > th {
+  font-size: 10px;
+  text-align: center;
+  font-weight: normal;
+  color: #01060c;
+}
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+}
+.tagBox {
+  position: relative;
+  width: 100%;
+  // border: 1px solid #000000;
+  padding: 5px;
+  display: flex;
+  display: flex;
+  justify-content: space-between;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 12px;
+  display: flex;
+  align-items: center;
+}
+
+* {
+  margin: 0;
+  padding: 0;
+}
+table {
+  border-collapse: collapse;
+  text-align: center;
+  border: 1px solid #01060c;
+}
+
+td {
+  width: 120px;
+  // height: 50px;
+  text-align: center;
+  font-size: 10px;
+}
+.friday {
+  width: 100px;
+  height: 50px;
+}
+</style>

+ 223 - 0
src/views/system/jbdScan/goods/fenzhuangtag.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="18cm"
+      height="30cm"
+      :modal-append-to-body="false"
+      title="物料标签"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 100%">
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div v-for="(item1, index1) in list" :key="index1" class="box-content" >
+              <div
+                v-for="(item2, index2) in parseInt(item1.shu_liang_)"
+                :key="index2"               >
+                <div class="tagBox" >
+                  <div class="logo">
+                    <img style="width: 90px; height: 20px" src="./ming.jpg" alt="" />
+                  </div>
+                  <div class="lh">
+                    <div>物料名称:{{ item1.fen_zhuang_wu_lia }}{{ index2 }}</div>
+                    <div></div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div style="white-space: nowrap">
+                        物料代码:{{ item1.wu_liao_bian_ma_ }}
+                      </div>
+                      <div></div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">{{ item1.gui_ge_xing_hao_ }}</div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>货号:</div>
+                      <div>{{ item1.huo_hao_ }}</div>
+                    </div>
+                   <div class="lh" style="margin-left: 2px">
+                      <div>批号:{{ item1.fen_zhuang_pi_hao }}</div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>分装日期:{{ item1.parent_id_ | timesfiltes(listtimes) }}</div>
+                    </div>
+                    <div class="lh" style="margin-left: 2px">
+                      <div>有效期:</div>
+                      <div>{{ item1.you_xiao_qi_zhi_ }}</div>
+                    </div>
+                  </div>
+                  <div class="lh">
+                    <div>含量浓度:</div>
+                    <div>{{ item1.han_liang_nong_du }}</div>
+                  </div>
+                  <div class="lh">
+                    <div>状态</div>
+                    <div></div>
+                  </div>
+                  <div class="lh" style="height: 40px">
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+              </div>
+               <!-- <p v-if="index2==6" style="page-break-after: always"></p> -->
+            </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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      listtimes: [],
+      visible: true,
+    };
+  },
+  filters: {
+    timesfiltes: function (value, arr) {
+      for (let i = 0; i < arr.length; i++) {
+        console.log(arr[i].id_==value)
+        if (arr[i].id_ == value) {
+          console.log(arr[i].fen_zhuang_ri_qi_);
+          return arr[i].fen_zhuang_ri_qi_;
+        }
+      }
+    },
+  },
+  created() {
+    this.getInit();
+  },
+  // destroyed() {
+  //       window.location.reload()
+  //       document.body.innerHTML = oldContent
+  // },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+
+      // this.$refs.easyPrint.window.print()
+    },
+    getInit() {
+      // console.log(this.obj)
+      var idStr = "";
+      this.obj.forEach((item) => {
+        idStr += item + ",";
+      });
+      idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(idStr);
+    },
+    getLook(id) {
+      let this_ = this;
+      let sql = `select * FROM t_fzwlmx  WHERE FIND_IN_SET(parent_id_,'${id}')`;
+
+      repostCurd("sql", sql).then((res) => {
+        console.log(sql, "sql");
+        this_.list = res.variables.data;
+        console.log(this_.list);
+      });
+      let sql1 = `select * FROM t_fzwlrkd WHERE FIND_IN_SET(id_,'${id}')`;
+      repostCurd("sql", sql1).then((res) => {
+        this_.listtimes = res.variables.data;
+        console.log(this_.listtimes);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+//.bg {
+//}
+// @media print{
+//    body {
+//        height: auto !important;
+//    }
+// }
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+}
+.box-content {
+  display: flex;
+  flex-wrap: wrap;
+}
+.tagBox {
+  width: 250px;
+  height: 180px;
+  position: relative;
+  border: 1px solid #000000;
+  padding: 2px;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+  -ms-flex-direction: column;
+  flex-direction: column;
+  margin: 55px 4px 40px 2px;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 8px;
+  display: flex;
+  align-items: center;
+}
+</style>

+ 208 - 0
src/views/system/jbdScan/goods/jishutag.vue

@@ -0,0 +1,208 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="物料标签"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px;width: 100%">
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div v-for="(item1, index1) in list" :key="index1" class="box-content">
+              <div
+                v-for="(item2, index2) in parseInt(item1.dao_huo_shu_liang)||0"
+                :key="index2"
+               
+              >
+               <!-- style="page-break-after: always" -->
+                <div class="tagBox">
+                  <div class="logo">
+                    <img
+                      style="width: 90px; height: 20px"
+                      src="./ming.jpg"
+                      alt=""
+                    />
+                  </div>
+                  <div class="lh" style="white-space: nowrap">
+                    <div>物料名称:{{ item1.wu_liao_ming_chen }}</div>
+                    <div></div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div style="white-space: nowrap">
+                        物料代码:{{ item1.wu_liao_dai_ma_ }}
+                      </div>
+                      <div></div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">{{ item1.gui_ge_ }}</div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>货号:</div>
+                      <div>{{ item1.huo_hao_ }}</div>
+                    </div>
+                    <div class="lh" style="margin-left: 10px">
+                      <div>批号:{{ item1.pi_hao_ }}</div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>到库日期:{{ item1.dao_ku_ri_qi_ }}</div>
+                    </div>
+                    <div class="lh" style="margin-left: 10px">
+                      <div>有效期:{{ item1.you_xiao_qi_ }}</div>
+                    </div>
+                  </div>
+                  <div class="lh">
+                    <div>生产厂家:</div>
+                    <div>{{ item1.chang_jia_ }}</div>
+                  </div>
+                  <div class="lh">
+                    <div>状态</div>
+                    <div></div>
+                  </div>
+                  <div class="lh" style="height: 40px">
+                    <div></div>
+                    <div></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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [
+        {
+          name: 5,
+          serial: 5,
+          type: 5,
+          num: 5,
+          condition: 5,
+        },
+      ],
+      visible: true,
+    };
+  },
+  created() {
+    this.getInit();
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    getInit() {
+      // console.log(this.obj)
+      var idStr = "";
+      this.obj.forEach((item) => {
+        idStr += item + ",";
+      });
+      idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(idStr);
+    },
+    getLook(id) {
+      let this_ = this;
+      let sql = `select * FROM t_wljsysjlb  WHERE FIND_IN_SET(id_,'${id}')`;
+      repostCurd("sql", sql).then((res) => {
+        console.log(sql, "sql");
+        this_.list = res.variables.data;
+        console.log(this_.list);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+//.bg {
+//}
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+
+}
+.box-content {
+  display: flex;
+  flex-wrap: wrap;
+}
+.tagBox {
+  width: 250px;
+  height: 180px;
+  position: relative;
+  border: 1px solid #000000;
+  padding: 2px;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+  -ms-flex-direction: column;
+  flex-direction: column;
+  margin: 55px 4px 40px 2px;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 8px;
+  display: flex;
+  align-items: center;
+}
+</style>

+ 352 - 0
src/views/system/jbdScan/goods/lingliaodan.vue

@@ -0,0 +1,352 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="领料单"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 95%; margin: 0 auto" >
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div
+              v-for="(item1, index1) in list"
+              :key="index1"
+              style="margin-bottom: 30px"
+            >
+              <div style="page-break-after: always">
+                <div class="word-title">
+                  <h4>领料单</h4>
+                </div>
+                <div class="tagBox">
+                  <div>
+                    <div style="font-size: 10px">
+                      领料部门:<span style="margin-left: 10px">{{
+                        item1[0].bu_men_ming_cheng
+                      }}</span>
+                    </div>
+                  </div>
+                  <div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      领料单编号:<span style="margin-left: 10px">{{
+                        item1.ling_liao_chu_ku_
+                      }}</span>
+                    </div>
+                    <div
+                      style="
+                        margin-left: 20px;
+                        margin-right: 5px;
+                        font-size: 10px;
+                      "
+                    >
+                      领料日期:<span style="margin-left: 10px">{{
+                        item1.ling_liao_ri_qi_
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+                <div>
+                  <table border="1">
+                    <thead>
+                      <tr>
+                        <th style="width: 40px">序号</th>
+                        <th style="font-weight: normal">物料编码</th>
+                        <th style="font-weight: normal">物料名称</th>
+                        <th>货号</th>
+                        <th>批号</th>
+                        <th>规格/特征量值</th>
+                        <th>数量</th>
+                        <th>单位</th>
+                        <th>单价</th>
+                        <th>金额</th>
+                        <th>用途</th>
+                        <th>备注</th>
+                      </tr>
+                    </thead>
+                    <tbody>
+                      <tr v-for="(item, index) in item1" :key="index">
+                        <td style="width: 30px">{{ index + 1 }}</td>
+                        <td style="width: 90px">
+                          {{ item.wu_liao_bian_hao_ }}
+                        </td>
+                        <td style="width: 120px">
+                          {{ item.wu_liao_ming_chen }}
+                        </td>
+                        <td style="width: 60px">{{ item.huo_hao_ }}</td>
+                        <td style="width: 60px">{{ item.pi_hao_ }}</td>
+                        <td style="width: 120px">
+                          {{ item.gui_ge_xing_hao_ }}
+                        </td>
+                        <td style="width: 60px">{{ item.shu_liang_ }}</td>
+                        <td style="width: 60px">{{ item.dan_wei_ }}</td>
+                        <td style="width: 60px">{{ item.dan_jia_ }}</td>
+                        <td style="width: 60px">{{ item.jin_e_ }}</td>
+                        <td style="width: 80px">{{ item.yong_tu_ }}</td>
+                        <td style="width: 120px">{{ item.beizhu }}</td>
+                      </tr>
+                    </tbody>
+                    <tfoot
+                      align="right"
+                      valign="bottom"
+                      style="text-align: right !important; height: 30px"
+                    >
+                      <tr>
+                        <td colspan="13" style="text-align: right !important">
+                          合计:{{ item1.heji }}
+                        </td>
+                      </tr>
+                    </tfoot>
+                  </table>
+                </div>
+                <div class="bottom">
+                  <div></div>
+                  <div style="float:left">
+                    领用人/日期:{{ item1.name1 }}/{{ item1.ling_liao_ri_qi_ }}
+                  </div>
+                  <div style="margin: 0 auto;">
+                    审核人(部门负责人)/日期 :{{ item1.name2 }} /{{
+                      item1.time2
+                    }}
+                  </div>
+                  <div>
+                    发放人(仓库员)/日期 :{{ item1.name3 }}/{{ item1.time3 }}
+                  </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";
+import { Loading } from 'element-ui';
+import { toFixed } from "@/views/platform/form/formPrint/utils";
+
+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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+    };
+  },
+  created() {
+    this.getInit();
+  },
+  filters: {
+    name4: function (value) {
+      let s3 = `select NAME_,CREATE_TIME_ FROM ibps_party_employee where id_ =( select CREATE_BY_ FROM ibps_bpm_oper_log WHERE PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${value}' ) AND NODE_ID_ = 'Activity_0dbdxg7' ORDER BY CREATE_TIME_ DESC LIMIT 1)`;
+      repostCurd("sql", s3).then((res) => {
+        return res.variables.data[0].NAME_;
+      });
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    getInit() {
+      var idStr = "";
+      this.obj.forEach((item) => {
+        idStr += item + ",";
+      });
+      idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(idStr);
+    },
+    addNumber(num1, num2) {
+      let a = parseFloat(num1);
+      let b = parseFloat(num2);
+      return a.toFixed("2") * 1 + b.toFixed("2") * 1;
+    },
+    riqi(value) {
+      let date = new Date(value);
+      let y = date.getFullYear(); //获取年份
+      let m = date.getMonth() + 1; //获取月份
+      m = m < 10 ? "0" + m : m; //月份不满10天显示前加0
+      let d = date.getDate(); //获取日期
+      d = d < 10 ? "0" + d : d; //日期不满10天显示前加0
+      return y + "-" + m + "-" + d;
+    },
+
+    getLook(id) {
+      let this_ = this;
+      let sql = `select * FROM t_crkjlb WHERE FIND_IN_SET(id_,'${id}')`;
+      let zhubiao = [];
+      let name1, name2, name3;
+      let time1, time2, time3;
+      repostCurd("sql", sql).then((res) => {
+        zhubiao = res.variables.data;
+        zhubiao.forEach((item) => {
+          let sql1 = `select * FROM t_crkjlx  WHERE FIND_IN_SET(parent_id_,'${item.id_}')`;
+          let chushi = 0;
+          repostCurd("sql", sql1).then((res) => {
+            let data = res.variables.data;
+            if (!name1) {
+              let s1 = `select NAME_ FROM ibps_party_employee where id_ =( SELECT cao_zuo_ren_ FROM t_crkjlb WHERE id_ = '${item.id_}')`;
+              repostCurd("sql", s1).then((res) => {
+                name1 = res.variables.data[0].NAME_;
+                data["name1"] = name1;
+              });
+            }
+            let s2 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}') AND b.NODE_ID_ = 'Activity_0dbdxg7' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`
+            repostCurd("sql", s2).then((res) => {
+              name2 = res.variables.data[0].NAME_;
+              time2 = res.variables.data[0].CREATE_TIME_;
+              data["name2"] = name2;
+              data["time2"] = time2;
+              let s3 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y年%m月%d日') AS CREATE_TIME_ FROM ibps_party_employee  as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT  PROC_INST_ID_  FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}') AND b.NODE_ID_ = 'Activity_0dbdxg7' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+              repostCurd("sql", s3).then((res) => {
+                name3 = res.variables.data[0].NAME_;
+                time3 = res.variables.data[0].CREATE_TIME_;
+                data["name3"] = name3;
+                data["time3"] = time3;
+                data["ling_liao_chu_ku_"] = item.ling_liao_chu_ku_;
+                 data["id_"] = item.id_;
+                data["ling_liao_bu_men_"] = item.ling_liao_bu_men_;
+                data["ling_liao_ri_qi_"] = item.ling_liao_ri_qi_;
+                data["gong_ying_shang_"] = item.gong_ying_shang_ || 0;
+                data.forEach((it) => {
+                  data["heji"] = this.addNumber(chushi, it.jin_e_);
+                  chushi = data["heji"];
+                });
+                this_.list.push(data);
+                console.log(this_.list)
+              });
+            });
+          });
+        });
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bottom {
+  margin-top: 15px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 12px;
+}
+.word-title {
+  display: flex;
+  justify-content: center;
+}
+thead {
+  background: #f3f3f3;
+}
+.el-dialog__body {
+  color: #0d0e0f;
+  font-size: 10px !important;
+  word-break: none;
+}
+thead > tr > th {
+  font-size: 10px;
+  text-align: center;
+  font-weight: normal;
+  color: #01060c;
+}
+thead > tr > th > td {
+  font-size: 10px;
+  text-align: center;
+  font-weight: normal;
+  color: #01060c;
+}
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+}
+.tagBox {
+  position: relative;
+  width: 100%;
+  // border: 1px solid #000000;
+  padding: 5px;
+  display: flex;
+  display: flex;
+  justify-content: space-between;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 12px;
+  display: flex;
+  align-items: center;
+}
+
+* {
+  margin: 0;
+  padding: 0;
+}
+table {
+  border-collapse: collapse;
+  text-align: center;
+  border: 1px solid #01060c;
+}
+
+td {
+  width: 120px;
+  // height: 50px;
+  text-align: center;
+  font-size: 10px;
+}
+.friday {
+  width: 100px;
+  height: 50px;
+}
+</style>

BIN
src/views/system/jbdScan/goods/ming.jpg


+ 223 - 0
src/views/system/jbdScan/goods/tag.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="物料标签"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 100%">
+        <div ref="qrcode" id="box">
+          <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
+            <div v-for="(item1, index1) in list" :key="index1" class="box-content">
+              <div
+                v-for="(item2, index2) in parseInt(item1.shu_liang_)||0"
+                :key="index2"               >
+                <div class="tagBox">
+                  <div class="logo">
+                    <img style="width: 90px; height: 20px" src="./ming.jpg" alt="" />
+                  </div>
+                  <div class="lh">
+                    <div>物料名称:{{ item1.wu_liao_ming_chen }}{{ index2 }}</div>
+                    <div></div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div style="white-space: nowrap">
+                        物料代码:{{ item1.wu_liao_bian_ma_ }}
+                      </div>
+                      <div></div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">{{ item1.gui_ge_xing_hao_ }}</div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>货号:</div>
+                      <div>{{ item1.huo_hao_ }}</div>
+                    </div>
+                   <div class="lh" style="margin-left: 2px">
+                      <div>批号:{{ item1.pi_hao_ }}</div>
+                    </div>
+                  </div>
+                  <div class="la">
+                    <div class="lh">
+                      <div>到库日期:{{ item1.wai_jian_ | timesfiltes(listtimes) }}</div>
+                    </div>
+                    <div class="lh" style="margin-left: 2px">
+                      <div>有效期:</div>
+                      <div>{{ item1.you_xiao_qi_ }}</div>
+                    </div>
+                  </div>
+                  <div class="lh">
+                    <div>生产厂家:</div>
+                    <div>{{ item1.sheng_chan_chang_ }}</div>
+                  </div>
+                  <div class="lh">
+                    <div>状态</div>
+                    <div></div>
+                  </div>
+                  <div class="lh" style="height: 40px">
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+              </div>
+               <!-- <p v-if="index2==6" style="page-break-after: always"></p> -->
+            </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,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      listtimes: [],
+      visible: true,
+    };
+  },
+  filters: {
+    timesfiltes: function (value, arr) {
+      for (let i = 0; i < arr.length; i++) {
+        // console.log(arr[i].id_==value)
+        if (arr[i].id_ == value) {
+          console.log(arr[i].yan_shou_ru_ku_ri);
+          return arr[i].yan_shou_ru_ku_ri;
+        }
+      }
+    },
+  },
+  created() {
+    this.getInit();
+  },
+  // destroyed() {
+  //       window.location.reload()
+  //       document.body.innerHTML = oldContent
+  // },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+
+      // this.$refs.easyPrint.window.print()
+    },
+    getInit() {
+      // console.log(this.obj)
+      var idStr = "";
+      this.obj.forEach((item) => {
+        idStr += item + ",";
+      });
+      idStr = idStr.substring(0, idStr.length - 1);
+
+      this.getLook(idStr);
+    },
+    getLook(id) {
+      let this_ = this;
+      let sql = `select * FROM t_cgysjlb  WHERE FIND_IN_SET(wai_jian_,'${id}')`;
+
+      repostCurd("sql", sql).then((res) => {
+        console.log(sql, "sql");
+        this_.list = res.variables.data;
+        console.log(this_.list);
+      });
+      let sql1 = `select id_,yan_shou_ru_ku_ri FROM t_yszb  WHERE FIND_IN_SET(id_,'${id}')`;
+      repostCurd("sql", sql1).then((res) => {
+        this_.listtimes = res.variables.data;
+        console.log(this_.listtimes);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+//.bg {
+//}
+// @media print{
+//    body {
+//        height: auto !important;
+//    }
+// }
+.logo {
+  position: absolute;
+  top: -32px;
+  left: 0;
+}
+.box-content {
+  display: flex;
+  flex-wrap: wrap;
+}
+.tagBox {
+  width: 250px;
+  height: 180px;
+  position: relative;
+  border: 1px solid #000000;
+  padding: 2px;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+  -ms-flex-direction: column;
+  flex-direction: column;
+  margin: 55px 4px 40px 2px;
+  background-color: #fff;
+}
+
+.la {
+  display: flex;
+  align-items: center;
+}
+
+.lh {
+  // line-height: auto;
+  font-size: 8px;
+  display: flex;
+  align-items: center;
+}
+</style>

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

@@ -4,6 +4,7 @@
     <component
     :is="currentScan"
     :scanVisible="scanVisible"
+    :obj = "obj"
     @scanOff = "scanOff"/>
   </div>
 </template>
@@ -15,12 +16,19 @@ import material from './goods/material'
 import sample from './goods/sample'
 import sampleConfirmation from './goods/sampleConfirmation'
 import manualConfirmation from './goods/manualConfirmation'
+import tag from './goods/tag'
+import jishutag from './goods/jishutag'
+import caigourukudan from './goods/caigourukudan'
+import chnangguirukudan from './goods/chnangguirukudan'
+import lingliaodan from './goods/lingliaodan'
+import fenzhuangtag from './goods/fenzhuangtag'
 
 export default {
-  components: { facility,material,sample,sampleConfirmation,manualConfirmation},
+  components: { facility,material,sample,sampleConfirmation,manualConfirmation,tag,jishutag,caigourukudan,chnangguirukudan,lingliaodan,fenzhuangtag},
   props:{
     currentScan:String,
-    scanVisible:Boolean
+    scanVisible:Boolean,
+    obj:Array
   },
 
   methods:{