Przeglądaj źródła

fix:物料流程节点打印&内审进度查询

zhangjingyuan 3 lat temu
rodzic
commit
75de4f4175

+ 23 - 5
src/business/platform/form/formrender/index.vue

@@ -69,6 +69,13 @@
                 :obj = "scanList"
                 @scanOff = "closeScan"
             />
+            <ruKuDan
+                :currentScan = "currentDom"
+                v-if="alertVisible"
+                :alertVisible = "alertVisible"
+                :obj = "domList"
+                @rukuOff = "closeRuKuDan"
+            />
         </ibps-watermark>
     </div>
 </template>
@@ -80,7 +87,7 @@
     import IbpsWatermark from '@/components/ibps-watermark'
     import panle from '@/components/jbd-panel'
     import Scan from '@/views/system/jbdScan/scan.vue'
-
+    import ruKuDan from '@/views/system/jbdScan/ruKuDan.vue'
     const JFormId = 'JForm'
 
     export default {
@@ -88,7 +95,8 @@
             DynamicForm,
             panle,
             IbpsWatermark,
-            Scan
+            Scan,
+            ruKuDan
         },
         props: {
             isDialog: {
@@ -159,7 +167,10 @@
                 customComponentAtts: {},
                 // 标签弹窗
                 scanVisible: false,
-                scanList: []
+                scanList: [],
+                alertVisible:false,
+                currentDom:'caigourukudan',
+                domList:[],
             }
         },
         computed: {
@@ -571,14 +582,21 @@
             },
             scanHandlerObj(list){
                 this.scanList = list
-                // console.log(list)
                 this.scanVisible = true
             },
+            scanHandle(currentDom,list){
+                this.currentDom= currentDom
+                this.domList =list;
+                this.alertVisible = true;
+            },
             closeScan(){
               this.scanVisible = false
               // this.$emit("update:scanVisible",this.scanVisible)
               this.$emit("close")
-              console.log(111)
+            },
+            closeRuKuDan(){
+              this.alertVisible = false
+              this.$emit("close")
             }
         }
     }

+ 5 - 3
src/views/system/jbdScan/goods/bwlingliaodan.vue

@@ -154,7 +154,7 @@ export default {
   },
   data() {
     return {
-      onePageRow: 1,
+      // onePageRow: 1,
       value: "",
       id: "",
       list: [],
@@ -268,8 +268,10 @@ export default {
               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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_1ydalp9' 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_;
+                if(res.variables.data.length > 0){
+                  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_;

+ 11 - 5
src/views/system/jbdScan/goods/caigourukudan.vue

@@ -8,7 +8,7 @@
       :visible.sync="scanVisible"
     >
       <!-- 表单是否显示 -->
-      <div style="height: 500px; width: 90%; margin: 0 auto">
+      <div style="height: 500px; width: 90%; margin: 0 auto" v-if="scanVisible">
         <div ref="qrcode" id="box">
           <vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
             <div
@@ -272,17 +272,20 @@ export default {
       this.getLook(this.obj);
     },
     getLook(id) {
+      console.log(id)
       this.list = [];
       let this_ = this;
       let name1, name2, name3;
       let time1, time2, time3;
+      console.log(id,"22")
       id.forEach((item) => {
         let sql = `select * FROM t_wljsysjlb WHERE id_='${item}'`;
         repostCurd("sql", sql).then((res) => {
+          debugger
           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}' LIMIT 1)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) => {
+            debugger
             name2 = res.variables.data[0].NAME_ || 0;
             time2 = res.variables.data[0].CREATE_TIME_ || 0;
             data["name2"] = name2;
@@ -290,11 +293,13 @@ export default {
             let addhanshuiheji = 0;
             let addjine = 0;
             let addshuie = 0;
-            // 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}' LIMIT 1)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}' LIMIT 1) 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;
+              debugger
+              if(res.variables.data.length >0){
+                name3 = res.variables.data[0].NAME_ || 0;
+                time3 = res.variables.data[0].CREATE_TIME_ || 0;
+              }
               data["name3"] = name3;
               data["time3"] = time3;
               data.forEach((it) => {
@@ -315,6 +320,7 @@ export default {
               addhanshuiheji = 0;
               addjine = 0;
               addshuie = 0;
+              console.log(this_.list)
               console.log(this_.list);
             });
           });

+ 12 - 12
src/views/system/jbdScan/goods/chnangguirukudan.vue

@@ -39,9 +39,7 @@
                       采购订单编号:<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>
+                      日期 :<span style="margin-left: 10px">{{item1.dao_huo_ri_qi_}}</span>
                     </div>
                   </div>
                 </div>
@@ -123,7 +121,6 @@
         </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>
@@ -164,7 +161,7 @@ export default {
   },
   data() {
     return {
-      onePageRow: 1,
+      // onePageRow: 1,
       value: "",
       id: "",
       list: [],
@@ -206,7 +203,6 @@ export default {
       let jine = b*1*(c*1);
       let hshj = b*1*(a*1);
       let value = hshj - jine;
-      console.log(a,b,c)
       return value.toFixed(2);
     },
     addshuieToFixed:function(arr){
@@ -219,7 +215,7 @@ export default {
     addjineToFixed(arr){
       let adds =0;
       arr.forEach(item=>{
-        debugger
+        
         adds =adds+((item.shu_liang_*1) * (item.dan_jia_*1));
       })
       return adds.toFixed(2);
@@ -227,13 +223,13 @@ export default {
     addhshjToFixed(arr){
       let adds =0;
       arr.forEach(item=>{
-        debugger
+        
         adds =adds+((item.shu_liang_*1) * (item.dan_jia_han_shui_*1));
       })
       return adds.toFixed(2);
     },
     bumenfilters: function (value, list) {
-      // debugger
+      // 
       for (let i = 0; i < list.length; i++) {
         if (value == list[i].ID_) {
           return list[i].NAME_;
@@ -277,10 +273,10 @@ export default {
       return a.toFixed("2") * 1 + b.toFixed("2") * 1;
     },
     getInit() {
+
+      console.log(this.obj)
       var idStr = "";
-      this.obj.forEach((item) => {
-        idStr += item + ",";
-      });
+      this.obj.forEach((item) => {idStr += item + ",";});
       idStr = idStr.substring(0, idStr.length - 1);
       this.getLook(idStr);
     },
@@ -295,19 +291,23 @@ export default {
       let addjine = 0;
       let addshuie = 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_04lhxla' 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_1dk76gy' 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;

+ 8 - 4
src/views/system/jbdScan/goods/lingliaodan.vue

@@ -79,7 +79,7 @@
                         <td style="width: 120px">{{ item.bei_zhu_ }}</td>
                       </tr>
                     </tbody>
-                    <tfoot :align="right"
+                    <tfoot align="right"
                       valign="bottom"
                       style="text-align: right !important; height: 30px"
                     >
@@ -155,7 +155,7 @@ export default {
   },
   data() {
     return {
-      onePageRow: 1,
+      // onePageRow: 1,
       value: "",
       id: "",
       list: [],
@@ -277,8 +277,12 @@ export default {
               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_}' LIMIT 1) 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_;
+
+                if(res.variables.data >0){
+                  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_;

+ 5 - 9
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -60,13 +60,9 @@
               <div style="width: 90%; margin: 0 auto; line-height: 35px">
                 内审不符合项(CNAS)
               </div>
-              <el-table
-                :data="CNASTableData"
-                border
-                style="width: 90%; margin: 0 auto"
-              >
+              <el-table :data="CNASTableData" border style="width: 90%; margin: 0 auto">
                 <el-table-column
-                  prop="bu_fu_he_xiang_mi"
+                  prop="xiang_miao_shu_r_"
                   label="不符合项描述"
                   width="300"
                 >
@@ -98,8 +94,8 @@
                   </template>
                 </el-table-column>
                 <el-table-column prop="fu_ze_ren_" label="负责人" width="60">
-                  <template slot-scope="scope"
-                    >{{ scope.row.fu_ze_ren_ | emfiltes(employeeList) }}
+                  <template slot-scope="scope">
+                    {{ scope.row.fu_ze_ren_ | emfiltes(employeeList) }}
                   </template>
                 </el-table-column>
                 <el-table-column
@@ -132,7 +128,7 @@
                 style="width: 90%; margin: 0 auto"
               >
                 <el-table-column
-                  prop="bu_fu_he_xiang_mi"
+                  prop="xiang_miao_shu_r_"
                   label="不符合项描述"
                   width="300"
                 >

+ 37 - 0
src/views/system/jbdScan/ruKuDan.vue

@@ -0,0 +1,37 @@
+<template>
+  <div>
+    {{currentScan}}
+    <component
+    :is="currentScan"
+    :alertVisible ="alertVisible "
+    :obj = "obj"
+    @rukuOff = "rukuOff"
+    @close="alertVisible =false"
+    />
+  </div>
+</template>
+
+<script>
+  /* 共同调用类, 与脚本统一调用。*/
+
+
+import caigourukudan from './wuliao/caigourukudan'
+import chnangguirukudan from './wuliao/chnangguirukudan'
+import lingliaodan from './wuliao/lingliaodan'
+import bwlingliaodan from './wuliao/bwlingliaodan'
+export default {
+  components: {caigourukudan,chnangguirukudan,lingliaodan,bwlingliaodan },
+
+  props:{
+    currentScan:String,
+    alertVisible :Boolean,
+    obj:Array
+  },
+
+  methods:{
+    rukuOff(val){
+       this.$emit('rukuOff',val)
+    }
+  },
+}
+</script>

+ 381 - 0
src/views/system/jbdScan/wuliao/bwlingliaodan.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="领料单"
+      :visible.sync="alertVisible "
+    >
+      <!-- 表单是否显示 -->
+      <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.ling_liao_bu_men_|bumenfilters(bumenList)
+                      }}</span>
+                    </div>
+                  </div>
+                  <div>
+                    <div
+                      style="margin-left: 20px;margin-right: 5px;font-size: 10px;">
+                      领料单编号:<span style="margin-left: 10px">{{
+                        item1.ling_liao_dan_bia
+                      }}</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; line-height: 22px">序号</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.bei_zhu_ }}</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 style="float: left">
+                    领用人/日期:
+                    {{ item1.name1 }}/{{ item1.ling_liao_ri_qi_ }}
+                  </div> 
+                  <div style="margin: 0 auto" v-show="false">
+                    审核人/日期 :
+                    {{ 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,
+    },
+    alertVisible : {
+      type: Boolean,
+      default: false,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      // onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      bumenList:[]
+    };
+  },
+  created() {
+    this.getInit();
+    this.bumenListRequest();
+  },
+  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}' LIMIT 1) AND NODE_ID_ = 'Activity_0dbdxg7' ORDER BY CREATE_TIME_ DESC LIMIT 1)`;
+      repostCurd("sql", s3).then((res) => {
+        return res.variables.data[0].NAME_;
+      });
+    },
+    bumenfilters: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].ID_) {
+          return list[i].NAME_;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+  },
+  watch: {
+    obj() {
+      this.getInit();
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    bumenListRequest(){ //部门列表
+      let sql = "select ID_,NAME_ FROM  ibps_party_org ";
+      let this_ = this;
+      repostCurd("sql", sql).then((res) => {
+      return (this_.bumenList = res.variables.data);
+    });
+    },
+    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;
+    },
+    toDecimal2(x) {
+      var f = parseFloat(x);
+      if (isNaN(f)) {
+        return false;
+      }
+      var f = Math.round(x * 100) / 100;
+      var s = f.toString();
+      var rs = s.indexOf(".");
+      if (rs < 0) {
+        rs = s.length;
+        s += ".";
+      }
+      while (s.length <= rs + 2) {
+        s += "0";
+      }
+      return s;
+    },
+    getLook(id) {
+      let this_ = this;
+      this.list = [];
+      let sql = `select * FROM t_bzwzlld 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_bzwzlldmx  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 bian_zhi_ren_ FROM t_bzwzlld 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_0ttun9m' 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_1ydalp9' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+              repostCurd("sql", s3).then((res) => {
+                if(res.variables.data.length > 0){
+                  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_dan_bia"] = item.ling_liao_dan_bia;
+                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"];
+                });
+
+                data["heji"] = this_.toDecimal2(data["heji"]);
+                this_.list.push(data);
+                chushi = 0;
+              });
+            });
+          });
+        });
+      });
+    },
+  },
+};
+</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>

+ 408 - 0
src/views/system/jbdScan/wuliao/caigourukudan.vue

@@ -0,0 +1,408 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="采购入库单"
+      :visible.sync="alertVisible "
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px; width: 90%; margin: 0 auto" v-if="alertVisible ">
+        <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].shen_gou_bu_men_ | bumenfilters(bumenList)
+                      }}</span>
+                    </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_| gongyingshang(gongyingshangList) }}</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_|numToFixed(item1[0].dan_jia_)}}</td>
+                        <td style="width: 45px">{{ item1[0].shui_e_ }}</td>
+                        <td style="width: 45px">{{ item1[0].jin_e_ |numToFixed(item1[0].jin_e_)}}</td>
+                        <td style="width: 60px">
+                          {{ item1[0].han_shui_he_ji_|numToFixed(item1[0].han_shui_he_ji_) }}
+                        </td>
+                      </tr>
+                      <tr>
+                        <td style="width: 30px"></td>
+                        <td style="width: 70px"></td>
+                        <td style="width: 120px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 80px"></td>
+                        <td style="width: 120px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 45px">合计:</td>
+                        <td style="width: 45px">{{ item1.addshuie }}</td>
+                        <td style="width: 45px">{{ item1.addjine }}</td>
+                        <td style="width: 60px">{{ item1.addhanshuiheji }}</td>
+                      </tr>
+                    </tbody>
+                  </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,
+    },
+    alertVisible : {
+      type: Boolean,
+      default: false,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      gongyingshangList: [],
+      bumenList: [],
+    };
+  },
+  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);
+    });
+    let sql1 = `select ID_,NAME_ FROM  ibps_party_org `; //部门列表
+    repostCurd("sql", sql1).then((res) => {
+      return (this.bumenList = res.variables.data);
+    });
+  },
+  filters: {
+    gongyingshang: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].id_) {
+          return list[i].gong_ying_shang_m;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+    numToFixed: function (value) {
+      return (value*1).toFixed(2)
+    },
+    bumenfilters: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].ID_) {
+          return list[i].NAME_;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+  },
+  watch: {
+    obj() {
+      this.getInit();
+    },
+  },
+  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;
+    },
+    toDecimal2(x) {
+      var f = parseFloat(x);
+      if (isNaN(f)) {
+        return false;
+      }
+      var f = Math.round(x * 100) / 100;
+      var s = f.toString();
+      var rs = s.indexOf(".");
+      if (rs < 0) {
+        rs = s.length;
+        s += ".";
+      }
+      while (s.length <= rs + 2) {
+        s += "0";
+      }
+      return s;
+    },
+    getInit() {
+      // var idStr = "";
+      // this.obj.forEach((item) => {
+      //   idStr += item + ",";
+      // });
+      // idStr = idStr.substring(0, idStr.length - 1);
+      this.getLook(this.obj);
+    },
+    getLook(id) {
+      console.log(id)
+      this.list = [];
+      let this_ = this;
+      let name1, name2, name3;
+      let time1, time2, time3;
+      console.log(id,"22")
+      id.forEach((item) => {
+        let sql = `select * FROM t_wljsysjlb WHERE id_='${item}'`;
+        repostCurd("sql", sql).then((res) => {
+          debugger
+          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}') AND b.NODE_ID_ = 'Activity_1pha4py' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+          repostCurd("sql", s2).then((res) => {
+            debugger
+            name2 = res.variables.data[0].NAME_ || 0;
+            time2 = res.variables.data[0].CREATE_TIME_ || 0;
+            data["name2"] = name2;
+            data["time2"] = time2;
+            let addhanshuiheji = 0;
+            let addjine = 0;
+            let addshuie = 0;
+            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}' LIMIT 1) AND b.NODE_ID_ = 'Activity_04ff3k5' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+            repostCurd("sql", s3).then((res) => {
+              debugger
+              if(res.variables.data.length >0){
+                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["addhanshuiheji"] = this.addNumber(
+                  addhanshuiheji,
+                  it.han_shui_he_ji_
+                );
+                data["addjine"] = this.addNumber(addjine, it.jin_e_);
+                data["addshuie"] = this.addNumber(addshuie, it.shui_e_);
+                addhanshuiheji = data["addhanshuiheji"];
+                addjine = data["addjine"];
+                addshuie = data["addshuie"];
+              });
+              data["addhanshuiheji"] = this_.toDecimal2(data["addhanshuiheji"]);
+              data["addjine"] = this_.toDecimal2(data["addjine"]);
+              data["addshuie"] = this_.toDecimal2(data["addshuie"]);
+              this_.list.push(data);
+              addhanshuiheji = 0;
+              addjine = 0;
+              addshuie = 0;
+              console.log(this_.list)
+              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>

+ 424 - 0
src/views/system/jbdScan/wuliao/chnangguirukudan.vue

@@ -0,0 +1,424 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="采购入库单"
+      :visible.sync="alertVisible "
+    >
+      <!-- 表单是否显示 -->
+      <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.shen_gou_bu_men_|bumenfilters(bumenList)
+                      }}</span>
+                    </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_| gongyingshang(gongyingshangList) }} </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_|numToFixed}}</td>
+                        <td style="width: 45px"> {{ item.dan_jia_han_shui_|shuieToFixed(item.shu_liang_,item.dan_jia_) }}</td>
+                        <td style="width: 45px">{{ item.dan_jia_|jineToFixed(item.shu_liang_)}}</td>
+                        <td style="width: 60px">{{ item.dan_jia_han_shui_|jineToFixed(item.shu_liang_) }}</td>
+                      </tr>
+                      <tr>
+                        <td style="width: 30px"></td>
+                        <td style="width: 70px"></td>
+                        <td style="width: 120px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 80px"></td>
+                        <td style="width: 120px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 60px"></td>
+                        <td style="width: 45px"></td>
+                        <td style="width: 45px">合计:</td>
+                        <td style="width: 45px">{{ item1|addshuieToFixed}}</td>
+                        <td style="width: 45px">{{ item1|addjineToFixed}}</td>
+                        <td style="width: 60px">{{ item1|addhshjToFixed }}</td>
+                      </tr>
+                    </tbody>
+                  </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,
+    },
+    alertVisible : {
+      type: Boolean,
+      default: false,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      // onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      gongyingshangList: [],
+      bumenList: [],
+    };
+  },
+  created() {
+    this.getInit();
+    let sql = `select *  FROM  t_gysml`;
+    repostCurd("sql", sql).then((res) => {
+      this.gongyingshangList = res.variables.data;
+    });
+    let sql1 = `select ID_,NAME_ FROM  ibps_party_org `;
+    repostCurd("sql", sql1).then((res) => {
+      return (this.bumenList = res.variables.data);
+    });
+  },
+  filters: {
+    gongyingshang: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].id_) {
+          return list[i].gong_ying_shang_m;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+    numToFixed: function (value) {
+      return (value*1).toFixed(2)
+    },
+    jineToFixed:function(a,b){
+     let value = (a * 1) * (b * 1);
+     
+     return value.toFixed(2)
+    },
+    shuieToFixed:function(a,b,c){
+      let jine = b*1*(c*1);
+      let hshj = b*1*(a*1);
+      let value = hshj - jine;
+      return value.toFixed(2);
+    },
+    addshuieToFixed:function(arr){
+      let adds =0;
+      arr.forEach(item=>{
+        adds =adds+(((item.shu_liang_*1) * (item.dan_jia_han_shui_*1)) - ((item.shu_liang_*1) * (item.dan_jia_*1)) );
+      })
+      return adds.toFixed(2);
+    },
+    addjineToFixed(arr){
+      let adds =0;
+      arr.forEach(item=>{
+        
+        adds =adds+((item.shu_liang_*1) * (item.dan_jia_*1));
+      })
+      return adds.toFixed(2);
+    },
+    addhshjToFixed(arr){
+      let adds =0;
+      arr.forEach(item=>{
+        
+        adds =adds+((item.shu_liang_*1) * (item.dan_jia_han_shui_*1));
+      })
+      return adds.toFixed(2);
+    },
+    bumenfilters: function (value, list) {
+      // 
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].ID_) {
+          return list[i].NAME_;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+  },
+
+  watch: {
+    obj() {
+      this.getInit();
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    toDecimal2(x) {
+      var f = parseFloat(x);
+      if (isNaN(f)) {
+        return false;
+      }
+      var f = Math.round(x * 100) / 100;
+      var s = f.toString();
+      var rs = s.indexOf(".");
+      if (rs < 0) {
+        rs = s.length;
+        s += ".";
+      }
+      while (s.length <= rs + 2) {
+        s += "0";
+      }
+      return s;
+    },
+    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(idStr);
+    },
+    getLook(id) {
+      this.list = [];
+      let this_ = this;
+      let sql = `select * FROM t_yszb WHERE FIND_IN_SET(id_,'${id}')`;
+      let zhubiao = [];
+      let name1, name2, name3;
+      let time1, time2, time3;
+      let addhanshuiheji = 0;
+      let addjine = 0;
+      let addshuie = 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_04lhxla' 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_1dk76gy' 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["gong_ying_shang_"] = item.gong_ying_shang_;
+                data["shen_gou_bu_men_"] = item.shen_gou_bu_men_;
+                data["cai_gou_ding_dan_"] = item.cai_gou_ding_dan_;
+                data["dao_huo_ri_qi_"] = item.dao_huo_ri_qi_;
+                data.forEach((it) => {
+                  data["addhanshuiheji"] = this.addNumber(
+                    addhanshuiheji,
+                    it.han_shui_he_ji_
+                  );
+                  data["addjine"] = this.addNumber(addjine, it.jin_e_);
+                  data["addshuie"] = this.addNumber(addshuie, it.shui_e_);
+                  addhanshuiheji = data["addhanshuiheji"];
+                  addjine = data["addjine"];
+                  addshuie = data["addshuie"];
+                });
+                data["addhanshuiheji"] = this_.toDecimal2(
+                  data["addhanshuiheji"]
+                );
+                data["addjine"] = this_.toDecimal2(data["addjine"]);
+                data["addshuie"] = this_.toDecimal2(data["addshuie"]);
+                this_.list.push(data);
+                addhanshuiheji = 0;
+                addjine = 0;
+                addshuie = 0;
+                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>

+ 391 - 0
src/views/system/jbdScan/wuliao/lingliaodan.vue

@@ -0,0 +1,391 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="26cm"
+      height="12cm"
+      :modal-append-to-body="false"
+      title="领料单"
+      :visible.sync="alertVisible "
+    >
+      <!-- 表单是否显示 -->
+      <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.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; line-height: 22px">序号</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_ |numToFixed(item.dan_jia_) }}</td>
+                        <td style="width: 60px">{{ item.dan_jia_|jineToFixed(item.shu_liang_ ) }}</td>
+                        <td style="width: 80px">{{ item.yong_tu_ }}</td>
+                        <td style="width: 120px">{{ item.bei_zhu_ }}</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,
+    },
+    alertVisible : {
+      type: Boolean,
+      default: false,
+    },
+    currentScan: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      // onePageRow: 1,
+      value: "",
+      id: "",
+      list: [],
+      visible: true,
+      bumenList:[],
+    };
+  },
+  created() {
+    this.getInit();
+    this.bumenListRequest();
+  },
+  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}' LIMIT 1) AND NODE_ID_ = 'Activity_0dbdxg7' ORDER BY CREATE_TIME_ DESC LIMIT 1)`;
+      repostCurd("sql", s3).then((res) => {
+        return res.variables.data[0].NAME_;
+      });
+    },
+    numToFixed: function (value) {
+      return (value*1).toFixed(2)
+    },
+    jineToFixed:function(a,b){
+     let value = (a * 1) * (b * 1)
+     return value.toFixed(2)
+    },
+    bumenfilters: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].ID_) {
+          return list[i].NAME_;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
+  },
+  watch: {
+    obj() {
+      this.getInit();
+    },
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print();
+      // this.$refs.easyPrint.window.print()
+    },
+    bumenListRequest(){ //部门列表
+      let sql = "select ID_,NAME_ FROM  ibps_party_org ";
+      let this_ = this;
+      repostCurd("sql", sql).then((res) => {
+       this_.bumenList = res.variables.data;
+      });
+    },
+    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;
+    },
+    toDecimal2(x) {
+      var f = parseFloat(x);
+      if (isNaN(f)) {
+        return false;
+      }
+      var f = Math.round(x * 100) / 100;
+      var s = f.toString();
+      var rs = s.indexOf(".");
+      if (rs < 0) {
+        rs = s.length;
+        s += ".";
+      }
+      while (s.length <= rs + 2) {
+        s += "0";
+      }
+      return s;
+    },
+    getLook(id) {
+      let this_ = this;
+      this.list = [];
+      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;
+        console.log(zhubiao)
+        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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_0t9dfi3' 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_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_0dbdxg7' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
+              repostCurd("sql", s3).then((res) => {
+
+                if(res.variables.data >0){
+                  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["bu_men_ming_cheng"] = item.bu_men_ming_cheng;
+                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"];
+                });
+
+                data["heji"] = this_.toDecimal2(data["heji"]);
+                this_.list.push(data);
+                chushi = 0;
+              });
+            });
+          });
+        });
+      });
+    },
+  },
+};
+</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>