chenhaozhe
2025-12-14 a5c586097b6fd8c90580f7e789f2b0d1ad320c7a
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
1个文件已添加
22个文件已修改
203 ■■■■ 已修改文件
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/FbStepFoldinBillList/EmployeeDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/FbStepFoldinBillList/SupplierDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/GyCustomer/CustomerEdit/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/GyCustomer/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/AreaDialog/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/BarCodeDetail/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/CurrencyDialog/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/CustomerTypeDialog/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/PackStockDetail/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/SettleStyleDialog/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/printList/barcode.vue 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/printList/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyEmployee/edit/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyEmployee/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyMaterial/GyMaterialCorrection.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyStockPlace/edit/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyWarehouse/edit/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -39,6 +39,7 @@
    "jsencrypt": "3.0.0-rc.1",
    "moment": "^2.30.1",
    "nprogress": "0.2.0",
    "print-js": "^1.6.0",
    "quill": "2.0.2",
    "screenfull": "5.0.2",
    "sortablejs": "^1.10.2",
src/App.vue
@@ -7,6 +7,7 @@
<script>
import ThemePicker from "@/components/ThemePicker"
require("@/utils/grhtml5-6.8-min");
export default {
  name: "App",
src/router/index.js
@@ -523,7 +523,7 @@
          title: "采购退料单列表(已入库)",
          activeMenu: "purchase/postockInBack",
        },
      }
      },
    ],
  },
  //#endregion
@@ -1432,7 +1432,8 @@
    children: [
      {
        path: "/basic/gy/gyCartypelist",
        component: () => import("@/views/basic/gyCartypelist/gyCartypelist.vue"),
        component: () =>
          import("@/views/basic/gyCartypelist/gyCartypelist.vue"),
        name: "GyCartype",
        meta: { title: "车型列表", activeMenu: "basic/gy" },
      },
@@ -1471,7 +1472,8 @@
  //#region 费用基础资料
  //#region 费用项目列表
  {//src\views\basic\gyItemMoney\gyItemMoney.vue
  {
    //src\views\basic\gyItemMoney\gyItemMoney.vue
    path: "/basic/gy/gyItemMoney",
    component: Layout,
    hidden: true,
@@ -1493,7 +1495,8 @@
  //#endregion
  
  //#region 辅助属性基础资料
   {//src\views\basic\gyItemMoney\gyItemMoney.vue
  {
    //src\views\basic\gyItemMoney\gyItemMoney.vue
    path: "/basic",
    component: Layout,
    hidden: true,
@@ -1530,6 +1533,12 @@
    component: () => import("@/views/component/printList/hBarPlanPrint"),
    hidden: true,
  },
  //#region 打印列表(网页)
  {
    path: "/hBarPlanPrintWeb",
    component: () => import("@/views/component/printList/barcode.vue"),
    hidden: true,
  },
  //#endregion
  //#endregion
  //#endregion
src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue
@@ -504,7 +504,7 @@
        }
      ],
      selectedRows: [],
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
    }
  },
  computed: {
src/views/FbStepFoldinBillList/EmployeeDialog.vue
@@ -260,7 +260,7 @@
      selectedRows: [],
      currentFilterName: '',
      activeCollapse: ['more'],
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
    }
  },
  watch: {
src/views/FbStepFoldinBillList/SupplierDialog.vue
@@ -290,7 +290,7 @@
      selectedRows: [],
      currentFilterName: '',
      activeCollapse: ['more'],
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
    }
  },
  watch: {
src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue
@@ -504,7 +504,7 @@
        }
      ],
      selectedRows: [],
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
    }
  },
  computed: {
src/views/GyCustomer/CustomerEdit/index.vue
@@ -519,7 +519,7 @@
      saveDisabled: false,
      auditDisabled: false,
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin'
    }
  },
src/views/GyCustomer/index.vue
@@ -356,7 +356,7 @@
      uploadData: [],
      uploadTableLoading: false,
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
      user: "admin",
    };
  },
src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue
@@ -269,7 +269,7 @@
      linterid: 0,
      HSouceBillType: '',
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
    }
  },
src/views/component/AreaDialog/index.vue
@@ -194,7 +194,7 @@
      // 隐藏字段
      hiddenFields: ["HItemID", "短代码", "父级ID", "等级", "末级标志", "助记码", "创建组织", "英文名称"],
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin',
      HModName: 'Gy_AreaSet'
    }
src/views/component/BarCodeDetail/index.vue
@@ -125,7 +125,7 @@
      allColumns: [],
      selectedColumns: [],
      selectedRows: [],
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
    }
  },
  methods: {
src/views/component/CurrencyDialog/index.vue
@@ -209,7 +209,7 @@
      
      hiddenFields: ["HItemID"],
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin',
      HModName: 'Gy_Currency',
      HModuleName: '货币列表维护'
src/views/component/CustomerTypeDialog/index.vue
@@ -335,7 +335,7 @@
      // 隐藏字段
      hiddenFields: ["HItemID"],
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin',
      HModName: 'Gy_CusType',
      HModuleName: '客户分类列表维护'
src/views/component/PackStockDetail/index.vue
@@ -116,7 +116,7 @@
      allColumns: [],                               
      selectedColumns: [],
      selectedRows: [],
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
    }
  },
  methods: {
src/views/component/SettleStyleDialog/index.vue
@@ -220,7 +220,7 @@
      // 隐藏字段
      hiddenFields: ["HItemID", "HUSEORGID", "HCREATEORGID", "父级ID"],
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin',
      HModName: 'Gy_SettleStyle',
      HModuleName: '结算方式维护',
src/views/component/printList/barcode.vue
New file
@@ -0,0 +1,143 @@
<template>
  <div>
    <button @click="getTemp">打印</button>
    <div id="report_holder"> </div>
  </div>
</template>
<script>
import PrintJS from 'print-js'
import axios from "axios";
export default {
  name: "HBarPlanPrintWeb",
  data() {
    return {
      styleList: [],
      handleMessage: this.$route.query,
      pageSize: {
        width: 0,
        height: 0
      },
      reportViewer: null,
      baseUrl: process.env.VUE_APP_BASE_API,
      json_data: {
        recordset: [],
      },
      grfPath: "",
    }
  },
  async mounted() {
    // 获取 打印的数据
    await this.getPrintData()
    rubylong.grhtml5.barcodeURL = this.baseUrl + "/Utility/Barcode.ashx";
    this.reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", this.grfPath,  this.json_data.recordset,
    );
    this.reportViewer.start();
  },
  methods: {
    getUrlVars_JSON() {
      var datajson;
      var str = this.propsData; //获取链接中传递的参数
      var arr = str.substring(str.lastIndexOf("=") + 1);
      datajson = JSON.parse(decodeURI(arr));
      return datajson;
    },
    async getPrintData() {
      let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
      let sql = "";
      if (this.$route.query.Type == "Kf_SellOutBillList") {
        sql =
          "exec h_p_Kf_SellOutBillList_PrintSellOutBill " +
          this.handleMessage.linterid.toString();
      } else if (this.$route.query.Type == "HGy_BarCodeBill") {
        sql =
          "select * from h_v_IF_BarCodeBillList where hmainid in(" +
          this.handleMessage.linterid.toString() +
          ") order by hmainid desc";
      } else if (this.$route.query.Type == "HPOInStockBill") {
        sql =
          "select * from h_v_Sc_PrintMouldProdOutBillList where hmainid=" +
          this.handleMessage.linterid.toString() +
          " order by hmainid";
      } else if (this.$route.query.Type == "HGyStockPlaceBarCode") {
        let condition = decodeURI(this.handleMessage.linterid.toString());
        sql = `SELECT
                CEILING(CAST(t.row_num AS FLOAT) / 2) AS orderid,
                MAX(CASE WHEN t.row_num % 2 = 1 THEN t.条码编号 END) AS 条码编号1,
                MAX(CASE WHEN t.row_num % 2 = 1 THEN t.仓位名称 END) AS 仓位名称1,
                MAX(CASE WHEN t.row_num % 2 = 0 THEN t.条码编号 END) AS 条码编号2,
                MAX(CASE WHEN t.row_num % 2 = 0 THEN t.仓位名称 END) AS 仓位名称2
              FROM (
                SELECT
                  条码编号, 仓位名称,
                  ROW_NUMBER() OVER (ORDER BY t1.HItemID) AS row_num
                FROM h_v_IF_StockPlaceList t1 where 条码编号 in (${condition})
              ) AS t
              GROUP BY CEILING(CAST(t.row_num AS FLOAT) / 2)
              ORDER BY orderid;`;
      }
      try{
        let res =  await axios.get(this.baseURL + "/CommonModel/searchMethod", {
          params: {
            sql: sql,
            user: sessionStorage["HUserName"],
            ModRightNameCheck: "",
            // , "HSubID": data[i].hsubid
          },
        })
        // 将 渲染数据 和 模板加载到本地
        let result = res.data;
          this.json_data.recordset = result.data;
          this.grfPath = "./static/grf/" + OpenTmp + ".grf"
          console.log(this.json_data);
      }catch(err) {
        this.$modal.msgError("接口请求失败!" + err);
      }
    },
    getTemp() {
      // 对每个要打印的对象添加分页
      let docs = document.querySelectorAll('[_grrecno]')
      this.pageSize.width = docs[0].offsetWidth
      this.pageSize.height = docs[0].offsetHeight
      docs.forEach((elem, index) => {
        elem.classList.add('printable')
      })
      let styles = document.querySelectorAll('[id^="_gridcss"]')
      this.styleList.push(...styles)
      this.execPrint()
    },
    execPrint() {
      PrintJS({
        printable: 'report_holder',
        scanStyles: false,
        type: 'html',
        style: this.styleList[0].innerText + ` @media print {
            .printable {
              page-break-inside: avoid;
              page-break-after: always;
            }
            @page {
              size: ${this.pageSize.width + 1}px ${this.pageSize.height + 1}px;
              margin: 0;
              padding: 0;
            }
            * {
              margin: 0;
              padding: 0;
            }
        `,
      })
    }
  }
}
</script>
<style></style>
src/views/component/printList/index.vue
@@ -3,6 +3,7 @@
        <el-form ref="formData" :model="formData" label-width="100px">
            <div style="padding: 10px; ">
                <el-button type="primary" size="small" @click="printClick">报表打印</el-button>
                <el-button type="primary" size="small" @click="printClickWeb">报表打印(网页)</el-button>
            </div>
            <el-table v-loading="loading" :data="printdata" ref="printTable" max-height="540"
                @selection-change="handleSelectionChange" :row-class-name="rowSysIndex" border>
@@ -66,6 +67,10 @@
        handlePrint() {
            this.openPrint = true
        },
        printClickWeb() {
          const routeUrl = this.$router.resolve({ path: '/hBarPlanPrintWeb',query:{linterid:this.linterid.toString(),Type:this.Type.toString(),OpenTmp: encodeURIComponent(this.rowForm.模板名称)} });
          window.open(routeUrl.href, '_blank');
        },
        printClick() {
            const routeUrl = this.$router.resolve({ path: '/hBarPlanPrint',query:{linterid:this.linterid.toString(),Type:this.Type.toString(),OpenTmp: encodeURIComponent(this.rowForm.模板名称)} });
            window.open(routeUrl.href, '_blank');
src/views/gyEmployee/edit/index.vue
@@ -902,7 +902,7 @@
      CheckBillDisabled: true,
      // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3)
      HInterID: null,
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
      user: "admin",
      currentRow: [],
      lastSelectedRowIndex: null, // 用于记录上次点击的行索引
src/views/gyEmployee/index.vue
@@ -572,7 +572,7 @@
      subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用)
      OperationType: null, //保存类型(新增1修改3)
      HInterID: null,
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
      user: "admin",
      currentRow: [],
      lastSelectedRowIndex: null, // 用于记录上次点击的行索引
src/views/gyMaterial/GyMaterialCorrection.vue
@@ -385,7 +385,7 @@
      // 模块名称
      HModName: 'Gy_Material_Correction',
      
      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
      user: 'admin'
    }
  },
src/views/gyStockPlace/edit/index.vue
@@ -139,7 +139,7 @@
      CheckBillDisabled: true,
      // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3)
      HInterID: null,
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
      user: "admin",
      currentRow: [],
      lastSelectedRowIndex: null, // 用于记录上次点击的行索引
src/views/gyWarehouse/edit/index.vue
@@ -243,7 +243,7 @@
      CheckBillDisabled: true,
      // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3)
      HInterID: null,
      baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
      user: "admin",
      currentRow: [],
      lastSelectedRowIndex: null, // 用于记录上次点击的行索引