src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -1,14 +1,15 @@
<template>
    <div style="margin: 10px;">
        <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
        <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;"get_BarCodeBillList>
            <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>
            <el-button type="primary" @click="get_BarCodeBillHSEQ">条码行号查询</el-button>
        </div>
        <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">条码生成</div>
        <el-form :model="initMainData" label-width="80px">
            <el-row>
                <el-col :span="6">
                <el-col :span="6">
                    <el-form-item label="日期">
                        <el-date-picker v-model="initMainData.HDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%"> </el-date-picker>
                    </el-form-item>
@@ -224,7 +225,7 @@
                ,HSeOrderBillNo:""                                      //客户订单号
                ,HCusModel:""                                           //产品型号
                ,HMTONo:null                                            //计划跟踪号
                ,HSourceBillSEQ:0                                       //源单行号
                ,HOrganizationID:0                                      //组织ID
                ,HOrganization:""                                       //组织名称
            },
@@ -493,6 +494,7 @@
                    , "HQty": this.initMainData.HQty_SourceBill
                    , "HMinQty": this.initMainData.HMinQty
                    , "HBQty": this.initMainData.HBQty
                    , "HSourceBillSEQ":this.initMainData.HSourceBillSEQ
                    , "HPackQty": 0
                    , "HCoilNO": ""
                    , "HFurnaceNO": ""
@@ -567,6 +569,25 @@
            this.$router.push({ path: "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin" }).catch(() => { });
        },
        //#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(() => { });
        },
        //#endregion
        //#region 条码列表复选框选择状态变更监听事件
        onSelectionChange_BarCode(selection){
@@ -602,6 +623,36 @@
            })
        },
        //#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
                },
            })
        },
        //#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 下推页面初始化
        async setInit_PushBill(HSourceInterID,HSourceEntryID) {
@@ -615,20 +666,26 @@
            
            //获取源单信息
            var temp = null;
            var res = "none"
            var res  = "none"
            var res1 = "none"
            try{
                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);
                    }else{
                        res = "none";
                        this.$modal.msgError("未查询到当前单据!!!");
                res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID);
                if(res1.data.data.length<=0){
                    this.$modal.msgError("金蝶云中的数据未同步,请检查收料通知单是否审核");
                }else{
                    if(res.data.code=="1"){
                        if(res.data.data.length>0){
                            res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                        }else{
                            res = "none";
                            this.$modal.msgError("单据已经全部下推,如果想继续下推,去条码档案作废对应条码");
                        }
                    }
                }
                else{
                    res = "none";
                    this.$modal.msgError(res.data.Message);
                    else{
                        res = "none";
                        this.$modal.msgError(res.data.Message);
                    }
                }
            }catch(error){
                res = "none";
@@ -671,6 +728,7 @@
            this.initMainData.HSeOrderBillNo = dataArray[0].客户订单号;
            this.initMainData.HCusModel = dataArray[0].产品型号;
            this.initMainData.HMTONo = dataArray[0].计划跟踪号;
            this.initMainData.HSourceBillSEQ =dataArray[0].源单行号;
            this.initMainData.HMinQty = 0;
            if(this.initMainData.HMinQty>0){
                this.initMainData.HBQty = (this.initMainData.HQty_SourceBill / this.initMainData.HMinQty) + (this.initMainData.HQty_SourceBill%this.initMainData.HMinQty == 0?0:1);