chenhaozhe
5 天以前 723793a0aa8d69cbbb463830a3344dbd6655cee5
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue
@@ -3,6 +3,7 @@
        <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_BarCodeBillHSEQ">条码行号查询</el-button>
            <!-- <el-button type="primary" @click="close">退 出</el-button> -->
        </div>
        <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">条码生成</div>
@@ -82,7 +83,7 @@
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="标准包装数">
                    <el-form-item label="数量/箱">
                        <el-input-number v-model="initMainData.HMinQty" @change="onChangeForHMinQty" />
                    </el-form-item>
                </el-col>
@@ -163,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"
@@ -187,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 校验
            },
@@ -224,7 +225,7 @@
                ,HSeOrderBillNo:""                                      //客户订单号
                ,HCusModel:""                                           //产品型号
                ,HMTONo:null                                            //计划跟踪号
                ,HSourceBillSEQ:0                                       //源单行号
                ,HOrganizationID:0                                      //组织ID
                ,HOrganization:""                                       //组织名称
            },
@@ -320,7 +321,22 @@
            }
        },
        //#endregion
        //#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 = dataArray[0].HSEQ;
               this.$router.push({
               path: `/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin?OperationType=4&HSourceInterID=${HSourceInterID}&HSourceEntryID=${HSourceEntryID}&HSEQ=${HSEQ}`
               }).catch(() => { });
        },
          //#endregion
        //#region 获取组织下拉列表数据
        async get_OrganizationList() {
            axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => {
@@ -468,6 +484,7 @@
                this.$modal.msgError("条码生成数量大于最大可生成数量【" + ((dataArray[0].数量 * 1) - (dataArray[0].已生成条码数量 * 1)) + "】!!");
                return false;
            }
            var sMainData_temp = [
                {
@@ -492,6 +509,7 @@
                    , "HQty": this.initMainData.HQty_SourceBill
                    , "HMinQty": this.initMainData.HMinQty
                    , "HBQty": this.initMainData.HBQty
                    , "HSourceBillSEQ":this.initMainData.HSourceBillSEQ
                    , "HPackQty": 0
                    , "HCoilNO": ""
                    , "HFurnaceNO": ""
@@ -595,7 +613,26 @@
            })
        },
        //#endregion
        //#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', {
                params: {
                    "sql": sql,
                    "user": sessionStorage["HUserName"],
                    "ModRightNameCheck": ModRightNameCheck
                },
            })
        },
        //#endregion
        //#region 下推页面初始化
        async setInit_PushBill(HSourceInterID,HSourceEntryID) {
            //获取参数
@@ -605,19 +642,19 @@
            var HSourceEntryID = params[params[2]];     //源单子id
            var HSourceBillType = params[params[3]];    //源单类型
            var HSourceBillNo = params[params[4]];      //源单单号
            //获取源单信息
            var temp = null;
            var res = "none"
            try{
                res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                if(res.data.code=="1"){
                    res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                    if(res.data.data.length>0){
                        res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
                    }else{
                        res = "none";
                        this.$modal.msgError("未查询到当前单据!!!");
                    }
                        this.$modal.msgError("单据已经全部下推,如果想继续下推,去条码档案作废对应条码");
                   }
                }
                else{
                    res = "none";
@@ -639,7 +676,7 @@
            this.initMainData.HDate = moment().format('YYYY-MM-DD');
            this.initMainData.HMainSourceInterID = HSourceInterID;
            this.initMainData.HMainSourceEntryID = HSourceEntryID;
            this.initMainData.HMainSourceBillNo = HSourceBillNo;
            this.initMainData.HMainSourceBillNo = dataArray[0].单据号;
            this.initMainData.HMainSourceBillType = HSourceBillType;
            this.initMainData.HPOOrderBillNo = dataArray[0].源单单号==null?"":dataArray[0].源单单号;
            this.initMainData.HMaterID = dataArray[0].HMaterID==null?0:dataArray[0].HMaterID;
@@ -664,6 +701,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);