dengjunjie
2025-04-19 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/basic/palletCodeInfo.js
@@ -1,4 +1,5 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import { th } from 'element-plus/es/locales.mjs';
import gridBody from './extend/printView.vue'
// import gridHeader from './extend/palletCodeAdd.vue'
let extension = {
@@ -32,20 +33,34 @@
        align: 'center',
        formatter: (row) => {
          return (
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-printer">打印</i>'
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-printer">生成条码</i>'
          );
        },
        // click: (row) => {
        //   let keys = [row.id]
        //   this.http.post("api/PalletCodeInfo/PrintBarcodeLib", keys, "正在打印条码....").then(x => {
        //     if (x.status)
        //       this.$message.success(x.message);
        //     else
        //       this.$message.error(x.message);
        //   });
        // }
        click: (row) => {
          let palletCodeInfoDTO = {
            PalletCode: row.palletCode,
            Width: row.width,
            Height: row.height,
            Size: row.size
          }
          this.http.post("api/PalletCodeInfo/newBarcodeLib", palletCodeInfoDTO, "正在生成条码....").then(x => {
           let codeImgSrc= 'data:image/png;base64,' + x;
          this.http.post("api/PalletCodeInfo/newBarcodeLib?key=" + row.id, "", "正在生成条码....").then(x => {
            let codeImgSrc = 'data:image/png;base64,' + x;
            this.$refs.gridBody.open(codeImgSrc);
          });
          // let palletCodeInfoDTO = {
          //   PalletCode: row.palletCode,
          //   Width: row.width,
          //   Height: row.height,
          //   Size: row.size,
          //   Code:row.code
          // }
          // this.http.post("api/PalletCodeInfo/newBarcodeLib", palletCodeInfoDTO, "正在生成条码....").then(x => {
          //  let codeImgSrc= 'data:image/png;base64,' + x;
          //   this.$refs.gridBody.open(codeImgSrc);
          // });
        }
      });
    },