| | |
| | | <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> |
| | |
| | | ,HSeOrderBillNo:"" //客户订单号 |
| | | ,HCusModel:"" //产品型号 |
| | | ,HMTONo:null //计划跟踪号 |
| | | |
| | | ,HSourceBillSEQ:0 //源单行号 |
| | | ,HOrganizationID:0 //组织ID |
| | | ,HOrganization:"" //组织名称 |
| | | }, |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | //#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(() => { }); |
| | | }, |
| | | //#endregion |
| | | //#region 获取组织下拉列表数据 |
| | | async get_OrganizationList() { |
| | | axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => { |
| | |
| | | this.$modal.msgError("条码生成数量大于最大可生成数量【" + ((dataArray[0].数量 * 1) - (dataArray[0].已生成条码数量 * 1)) + "】!!"); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | var sMainData_temp = [ |
| | | { |
| | |
| | | , "HQty": this.initMainData.HQty_SourceBill |
| | | , "HMinQty": this.initMainData.HMinQty |
| | | , "HBQty": this.initMainData.HBQty |
| | | , "HSourceBillSEQ":this.initMainData.HSourceBillSEQ |
| | | , "HPackQty": 0 |
| | | , "HCoilNO": "" |
| | | , "HFurnaceNO": "" |
| | |
| | | }) |
| | | }, |
| | | //#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 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 setInit_PushBill(HSourceInterID,HSourceEntryID) { |
| | | //获取参数 |
| | |
| | | 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); |
| | | var res2 = await this.getPushSource_POInStockBillInit1(HSourceInterID); |
| | | var temp1 = res2.data.data[0]; |
| | | var dataArray1 = [temp1]; |
| | | if(res.data.code=="1"){ |
| | | if(res.data.data.length>0){ |
| | | res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID); |
| | | if(dataArray1[0].HBillStatus!=2){ |
| | | res = "none"; |
| | | this.$modal.msgError("单据未审核,请审核"); |
| | | }else{ |
| | | res = "none"; |
| | | this.$modal.msgError("未查询到当前单据!!!"); |
| | | if(res.data.data.length>0){ |
| | | res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID); |
| | | }else{ |
| | | res = "none"; |
| | | this.$modal.msgError("单据已经全部下推,如果想继续下推,去条码档案作废对应条码"); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | |
| | | 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; |
| | |
| | | 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); |