dytyqx
8 天以前 9620ca5caed59bd206dce701a04a5a4e4cfb9dc5
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>
@@ -83,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>
@@ -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);