wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue
@@ -2,15 +2,15 @@
    <div style="margin: 10px;">
        <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="close">退 出</el-button> -->
            <el-button type="primary" @click="get_PrintReport">打印</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>
        <el-form :model="initMainData" label-width="80px">
            <el-row>
                <el-col :span="6">
                    <el-form-item label="日期">
                        <el-date-picker v-model="initMainData.HDate" type="date" placeholder="选择日期" value-format="yyyy-MM-ddT" style="width: 100%"> </el-date-picker>
                        <el-date-picker v-model="initMainData.HDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%"> </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
@@ -112,7 +112,7 @@
            <el-row>
                <el-col :span="6">
                    <el-form-item label="生产日期">
                        <el-date-picker v-model="initMainData.HInspectionDate" type="date" placeholder="选择日期" value-format="yyyy-MM-ddT" style="width: 100%"> </el-date-picker>
                        <el-date-picker v-model="initMainData.HInspectionDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%"> </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
@@ -122,11 +122,21 @@
                </el-col>
                <el-col :span="6">
                    <el-form-item label="复检日期">
                        <el-date-picker v-model="initMainData.HReInspectionDate" type="date" placeholder="选择日期" value-format="yyyy-MM-ddT" style="width: 100%" disabled> </el-date-picker>
                        <el-date-picker v-model="initMainData.HReInspectionDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%" disabled> </el-date-picker>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="客户订单号">
                        <el-input v-model="initMainData.HSeOrderBillNo" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="产品型号">
                        <el-input v-model="initMainData.HCusModel" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="组织" @change="onChangeMethod_HOrganization">
                        <el-select v-model="initMainData.HOrganizationID" placeholder="请选择组织" style="width: 100%">
@@ -155,10 +165,10 @@
        </el-form>
        <!-- 打印弹窗 -->
        <!-- <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
        <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
                HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
        </el-dialog> -->
        </el-dialog>
    </div>
</template>
<script>
@@ -211,6 +221,9 @@
                ,HInspectionCycle:0                                     //复检周期(天)
                ,HReInspectionDate:null                                 //复检日期
                ,HPOOrderBillMTO:""                                     //采购跟踪号
                ,HSeOrderBillNo:""                                      //客户订单号
                ,HCusModel:""                                           //产品型号
                ,HMTONo:null                                            //计划跟踪号
                
                ,HOrganizationID:0                                      //组织ID
                ,HOrganization:""                                       //组织名称
@@ -270,6 +283,10 @@
            ],
            tableData_BarCode:[],                                       //条码列表table 数据
            RowIndex_BarCode:0,                                         //条码列表table 行索引
            openPrintList:false,                                         //打印弹窗显示标记
            printListShow:false,                                        //打印模板数据显示标记
            selectedData_BarCode:0,                                     //条码列表table 选中数据集合
        };
    },
    async created() {
@@ -306,7 +323,7 @@
        //#region 获取组织下拉列表数据
        async get_OrganizationList() {
            axios.get(this.baseURL + '/Web/GetOrganizations',{async:false}).then(response => {
            axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => {
                let result = response.data
                if (result.count == 1) {
                    var data = result.data;
@@ -411,6 +428,13 @@
                return Result = false;
            }
            var regex = /^\d{4}-\d{2}-\d{2}$/;                              //正则表达式:校验 yyyy-MM-dd
            temp = this.initMainData.HInspectionDate;
            if(!regex.test(temp)){
                this.$modal.msgError("请设置生产日期!!!");
                return Result = false;
            }
            // var HEndQty = this.initMainData.HEndQty;
            // if (HEndQty == "") {
            //     this.$modal.msgError("尾包数量不能为空!!");
@@ -455,7 +479,7 @@
                    , "HMaterNumber": this.initMainData.HMaterNumber
                    , "HMaterName": this.initMainData.HMaterName
                    , "HMaterModel": this.initMainData.HMaterModel
                    , "HCusModel": ""
                    , "HCusModel": this.initMainData.HCusModel
                    , "HCusMaterName": ""
                    , "HEmpID": 0
                    , "HEmpNumber": ""
@@ -501,6 +525,8 @@
                    , "HInspectionCycle": this.initMainData.HInspectionCycle
                    , "HReInspectionDate": this.initMainData.HReInspectionDate
                    , "HPOOrderBillMTO": this.initMainData.HPOOrderBillMTO
                    , "HSeOrderBillNo": this.initMainData.HSeOrderBillNo
                    , "HMTONo": this.initMainData.HMTONo
                }
            ]
@@ -520,9 +546,24 @@
        },
        //#endregion
        //#region 打印按钮点击事件
        get_PrintReport() {
            if (this.selectedData_BarCode.length == 0) {
                this.$modal.msgError("请选择数据");
            } else {
                this.rowSel = [];
                for (var i = 0; i < this.selectedData_BarCode.length; i++) {
                    this.rowSel.push(this.selectedData_BarCode[i].HItemID.toString());
                }
                this.printListShow = true;
                this.openPrintList = true;
            }
        },
        //#endregion
        //#region 条码列表复选框选择状态变更监听事件
        onSelectionChange_BarCode(selection){
            this.selectedData_BarCode = selection;
        },
        //#endregion
    
@@ -544,7 +585,7 @@
            var res = "none";
            var sql = "select * from h_v_IF_POInStockBillList_Source where 1=1 and HMainID = " + HSourceInterID + " and HSubID = " + HSourceEntryID;
            var ModRightNameCheck = "";
            return axios.get(this.baseURL + '/CommonModel/searchMethod', {
            return axios.get(this.$baseUrl + '/CommonModel/searchMethod', {
                async:false,
                params: {
                    "sql": sql
@@ -614,12 +655,15 @@
            this.initMainData.HSupNumber = dataArray[0].供应商代码==null?"":dataArray[0].供应商代码;
            this.initMainData.HSupName = dataArray[0].供应商==null?"":dataArray[0].供应商;
            this.initMainData.HBatchNo = dataArray[0].批号==null?"":dataArray[0].批号;
            this.initMainData.HQty_SourceBill = (dataArray[0].数量 * 1) - (dataArray[0].已生成条码数量 * 1);
            this.initMainData.HQty_SourceBill = ((dataArray[0].数量 * 1) - (dataArray[0].已生成条码数量 * 1))<0?0:((dataArray[0].数量 * 1) - (dataArray[0].已生成条码数量 * 1));
            this.initMainData.HReInspectionFlag = dataArray[0].复检标记==1?true:false;
            this.initMainData.HInspectionCycle = dataArray[0].复检标记==1?dataArray[0].复检周期:0;
            this.initMainData.HInspectionDate = dataArray[0].复检标记==1?moment(dataArray[0].检验日期).format('YYYY-MM-DD'):null;
            this.initMainData.HReInspectionDate = dataArray[0].复检标记==1?moment(dataArray[0].检验日期).add(dataArray[0].复检周期,"days").format('YYYY-MM-DD') :null;
            this.initMainData.HPOOrderBillMTO = dataArray[0].采购跟踪号;
            this.initMainData.HSeOrderBillNo = dataArray[0].客户订单号;
            this.initMainData.HCusModel = dataArray[0].产品型号;
            this.initMainData.HMTONo = 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);
@@ -636,7 +680,7 @@
        SaveBarCodeCreate(sMainSub, CampanyName) {
            axios({
                method: 'post',
                url: this.baseURL + "/Sc_BarCode/Sub_SaveBill_JinLong",
                url: this.$baseUrl + "/Sc_BarCode/Sub_SaveBill_JinLong",
                data: {
                    "msg": sMainSub, "CampanyName": CampanyName
                },