.金蝶云跳转的条码生成页面,增加按钮 查看本单生成条码,跳转到条码档案(优化)
3个文件已修改
208 ■■■■ 已修改文件
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -405,6 +405,10 @@
    //#region 快速过滤
    handleQuery() {
      var params = this.get_UrlVars();
      var HSourceInterID = params[params[1]];
      var HSourceEntryID = params[params[2]];
      var HSEQ  = params[params[3]];
      this.sWhere = ''
      if (this.queryParams.ColName && this.queryParams.Comparator) {
        var com = "";
@@ -487,14 +491,17 @@
      if (this.queryParams.HMaterName) {
        this.sWhere += " and 物料名称 like ''%" + this.queryParams.HMaterName + "%''";
      }
      if(HSEQ!=''&&HSEQ!=null){
         this.sWhere += " and 源单行号 = ''" + HSEQ + "''";
      }
      if(HSourceInterID!=''&&HSourceInterID!=null){
         this.sWhere += " and HSourceInterID = ''" + HSourceInterID + "''";
      }
      if(HSourceEntryID!=''&&HSourceEntryID!=null){
         this.sWhere += " and HSourceEntryID = ''" + HSourceEntryID + "''";
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''";
      }
      if(sessionStorage["HMainSourceBillNo"] &&sessionStorage["HMainSourceBillNo"].length>0){
        this.sWhere += " and 源单单号 like ''%" + sessionStorage["HMainSourceBillNo"] + "%''";
      }
       if (sessionStorage["HSourceBillSEQ"] &&sessionStorage["HSourceBillSEQ"].length>0) {
        this.sWhere += " and 源单行号 = ''" + sessionStorage["HSourceBillSEQ"] + "''";
      }
      //如果是自动登录,则只能查看供应商自己的条码。
      if (sessionStorage["HAutoLogin"] == "1") {
@@ -594,6 +601,18 @@
    //#endregion
    //#region 获取参数
      get_UrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        },
    //#endregion
    //#region 删除
    handleDrop() {
    },
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue
@@ -164,7 +164,7 @@
                </el-tab-pane>
            </el-tabs>
        </el-form>
        <!-- 打印弹窗 -->
        <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
@@ -188,7 +188,7 @@
        return {
            baseURL: process.env.VUE_APP_BASE_API,                      //后端接口访问前缀
            HModName: "Gy_BarCodeBill_JinLong",                         //模块名称
            disabledFlag_BarCodeProduce:false,                           //禁用标记-生成 按钮
            disabledFlag_BarCodeProduce:false,                           //禁用标记-生成 按钮                                           // iframe URL
            rules:{                                                     //表头form 校验
            },
@@ -321,26 +321,22 @@
            }
        },
        //#endregion
        //#region 条码行号查询按钮点击事件
        //#region下推生成条码
        async get_BarCodeBillHSEQ() {
            var params = this.get_UrlVars();
            var HSourceInterID = params[params[1]];
            var HSourceEntryID = params[params[2]];
            var res2 = await this.getPushSource_POInStockBillInit1(HSourceInterID);
            var res1 = await this.getPushSource_POInStockBillInit2(HSourceEntryID);
            var temp = res1.data.data[0];
            var dataArray = [temp];
            var temp1 = res2.data.data[0];
            var dataArray1 = [temp1];
            sessionStorage["HAutoLogin"] = "2";
            sessionStorage["HMainSourceBillNo"] = dataArray1[0].HBillNo;
            sessionStorage["HSourceBillSEQ"] = dataArray[0].HSEQ;
            this.$router.push({
                path: "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin"
            }).catch(() => { });
                var params = this.get_UrlVars();
                var HSourceInterID = params[params[1]];
                var HSourceEntryID = params[params[2]];
                var res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID,HSourceEntryID);
                var temp = res1.data.data[0];
                var dataArray = [temp];
                var HSEQ = dataArray[0].HSEQ;
               this.$router.push({
               path: `/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin?OperationType=4&HSourceInterID=${HSourceInterID}&HSourceEntryID=${HSourceEntryID}&HSEQ=${HSEQ}`
               }).catch(() => { });
        },
        //#endregion
          //#endregion
        //#region 获取组织下拉列表数据
        async get_OrganizationList() {
            axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => {
@@ -617,32 +613,21 @@
            })
        },
        //#endregion
         //#region 根据表的主表内码查询表中数据
        async getPushSource_POInStockBillInit1(HSourceInterID) {
            var res = "none";
            var sql = "select * from Cg_POInStockBillMain where 1=1 and hinterid = " + HSourceInterID ;
        //#region 根据主内码与子内码获取源单收料通知单数据
        async getPushSource_POInStockBillInit1(HSourceInterID, HSourceEntryID) {
            var sql = `SELECT m.*, s.*
                    FROM Cg_POInStockBillMain m
                    INNER JOIN Cg_POInStockBillSub s ON m.hinterid = s.HInterID
                    WHERE 1=1`;
            sql += ` AND m.hinterid = ${HSourceInterID}`;
            sql += ` AND s.HEntryID = ${HSourceEntryID}`;
            var ModRightNameCheck = "";
            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                async:false,
                params: {
                    "sql": sql
                    , "user": sessionStorage["HUserName"]
                    , "ModRightNameCheck": ModRightNameCheck
                },
            })
        },
        //#endregion
          //#region 根据主内码与子内码获取源单收料通知单数据
        async getPushSource_POInStockBillInit2(HSourceEntryID) {
            var res = "none";
            var sql = "select * from Cg_POInStockBillSub where 1=1 and  HEntryID = " + HSourceEntryID;
            var ModRightNameCheck = "";
            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                async:false,
                params: {
                    "sql": sql
                    , "user": sessionStorage["HUserName"]
                    , "ModRightNameCheck": ModRightNameCheck
                    "sql": sql,
                    "user": sessionStorage["HUserName"],
                    "ModRightNameCheck": ModRightNameCheck
                },
            })
        },
@@ -662,21 +647,14 @@
            var res = "none"
            try{
                res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                var res2 = await this.getPushSource_POInStockBillInit1(HSourceInterID);
                var temp1 = res2.data.data[0];
                var dataArray1 = [temp1];
                if(res.data.code=="1"){
                    if(dataArray1[0].HBillStatus!=2){
                         res = "none";
                        this.$modal.msgError("单据未审核,请审核");
                    res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                    if(res.data.data.length>0){
                        res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                    }else{
                        if(res.data.data.length>0){
                            res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                        }else{
                            res = "none";
                            this.$modal.msgError("单据已经全部下推,如果想继续下推,去条码档案作废对应条码");
                        }
                    }
                        res = "none";
                        this.$modal.msgError("单据已经全部下推,如果想继续下推,去条码档案作废对应条码");
                   }
                }
                else{
                    res = "none";
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -1,6 +1,6 @@
<template>
    <div style="margin: 10px;">
        <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;"get_BarCodeBillList>
        <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
            <el-button type="primary" @click="onClickMethod_BarCodeProduce" :disabled="disabledFlag_BarCodeProduce">生成</el-button>
            <el-button type="primary" @click="get_PrintReport">打印</el-button>
            <el-button type="primary" @click="get_BarCodeBillList">条码档案</el-button>
@@ -164,7 +164,7 @@
                </el-tab-pane>
            </el-tabs>
        </el-form>
        <!-- 打印弹窗 -->
        <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
@@ -188,7 +188,7 @@
        return {
            baseURL: process.env.VUE_APP_BASE_API,                      //后端接口访问前缀
            HModName: "Gy_BarCodeBill_JinLong_AutoLogin",               //模块名称
            disabledFlag_BarCodeProduce:false,                          //禁用标记-生成 按钮
            disabledFlag_BarCodeProduce:false,                          //禁用标记-生成 按钮                                             // iframe URL
            rules:{                                                     //表头form 校验
            },
@@ -570,24 +570,31 @@
        },
        //#endregion
        
        //#region 条码行号查询按钮点击事件
        async get_BarCodeBillHSEQ(){
            var params = this.get_UrlVars();
            var HSourceInterID = params[params[1]];
            var HSourceEntryID = params[params[2]];
            var HSourceBillNo =  params[params[4]];
            var res1 = await this.getPushSource_POInStockBillInit2(HSourceEntryID);
            var temp = res1.data.data[0];
            var dataArray = [temp];
            sessionStorage["HAutoLogin"] = "2";
            sessionStorage["HMainSourceBillNo"] = HSourceBillNo;
            sessionStorage["HSourceBillSEQ"] = dataArray[0].HSEQ;
            this.$router.push({
                path: "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin"
            }).catch(() => { });
         //#region下推生成条码
        async get_BarCodeBillHSEQ() {
                var params = this.get_UrlVars();
                var HSourceInterID = params[params[1]];
                var HSourceEntryID = params[params[2]];
                var res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID,HSourceEntryID);
                var temp = res1.data.data[0];
                var dataArray = [temp];
                var HSEQ
                if (dataArray && dataArray.length > 0 && dataArray[0]) {
                    if (dataArray[0].HSEQ == '') {
                        HSEQ = 0;
                    } else {
                        HSEQ = dataArray[0].HSEQ;
                    }
                } else {
                    HSEQ = 0;
                }
                this.$router.push({
               path: `/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin?OperationType=4&HSourceInterID=${HSourceInterID}&HSourceEntryID=${HSourceEntryID}&HSEQ=${HSEQ}`
               }).catch(() => { });
        },
        //#endregion
          //#endregion
        //#region 条码列表复选框选择状态变更监听事件
        onSelectionChange_BarCode(selection){
@@ -623,35 +630,25 @@
            })
        },
        //#endregion
        //#region 根据主内码与子内码获取源单收料通知单数据
        async getPushSource_POInStockBillInit2(HSourceEntryID) {
            var res = "none";
            var sql = "select * from Cg_POInStockBillSub where 1=1 and  HEntryID = " + HSourceEntryID;
       //#region 根据主内码与子内码获取源单收料通知单数据(合并版)
        async getPushSource_POInStockBillInit1(HSourceInterID, HSourceEntryID) {
            var sql = `SELECT m.*, s.*
                    FROM Cg_POInStockBillMain m
                    INNER JOIN Cg_POInStockBillSub s ON m.hinterid = s.HInterID
                    WHERE 1=1`;
            sql += ` AND m.hinterid = ${HSourceInterID}`;
            sql += ` AND s.HEntryID = ${HSourceEntryID}`;
            var ModRightNameCheck = "";
            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                async:false,
                params: {
                    "sql": sql
                    , "user": sessionStorage["HUserName"]
                    , "ModRightNameCheck": ModRightNameCheck
                    "sql": sql,
                    "user": sessionStorage["HUserName"],
                    "ModRightNameCheck": ModRightNameCheck
                },
            })
        },
        //#endregion
        //#region 根据表的主表内码查询表中数据
        async getPushSource_POInStockBillInit1(HSourceInterID) {
            var res = "none";
            var sql = "select * from Cg_POInStockBillMain where 1=1 and hinterid = " + HSourceInterID ;
            var ModRightNameCheck = "";
            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                async:false,
                params: {
                    "sql": sql
                    , "user": sessionStorage["HUserName"]
                    , "ModRightNameCheck": ModRightNameCheck
                },
            })
        },
        //#endregion
    
        //#region 下推页面初始化
@@ -669,11 +666,11 @@
            var res  = "none"
            var res1 = "none"
            try{
                res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID);
                res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID,HSourceEntryID);
                if(res1.data.data.length<=0){
                    this.$modal.msgError("金蝶云中的数据未同步,请检查收料通知单是否审核");
                    this.$modal.msgError("当前单据未同步,请返回金蝶云SRM平台送货单列表找到该单据在查看页面点击【传递WMS】按钮!!");
                }else{
                    res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                    if(res.data.code=="1"){
                        if(res.data.data.length>0){
                            res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);