From 00ed7e51cecfc5e97e88bf2c9838c87362ea396d Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 07 四月 2026 15:36:11 +0800
Subject: [PATCH] 添加 配置 开启 socket.io 以启动客户端静默打印功能
---
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue | 91 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 77 insertions(+), 14 deletions(-)
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue
index a7e7679..64df014 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong.vue
+++ b/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>
@@ -128,6 +129,16 @@
</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%">
<el-option v-for="(item, index) in HOrganizationList" :key="index" :value="item.ID" :label="item.Name"></el-option>
@@ -153,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"
@@ -177,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 鏍¢獙
},
@@ -211,7 +222,10 @@
,HInspectionCycle:0 //澶嶆鍛ㄦ湡(澶�)
,HReInspectionDate:null //澶嶆鏃ユ湡
,HPOOrderBillMTO:"" //閲囪喘璺熻釜鍙�
-
+ ,HSeOrderBillNo:"" //瀹㈡埛璁㈠崟鍙�
+ ,HCusModel:"" //浜у搧鍨嬪彿
+ ,HMTONo:null //璁″垝璺熻釜鍙�
+ ,HSourceBillSEQ:0 //婧愬崟琛屽彿
,HOrganizationID:0 //缁勭粐ID
,HOrganization:"" //缁勭粐鍚嶇О
},
@@ -271,7 +285,7 @@
tableData_BarCode:[], //鏉$爜鍒楄〃table 鏁版嵁
RowIndex_BarCode:0, //鏉$爜鍒楄〃table 琛岀储寮�
- openPrintList:true, //鎵撳嵃寮圭獥鏄剧ず鏍囪
+ openPrintList:false, //鎵撳嵃寮圭獥鏄剧ず鏍囪
printListShow:false, //鎵撳嵃妯℃澘鏁版嵁鏄剧ず鏍囪
selectedData_BarCode:0, //鏉$爜鍒楄〃table 閫変腑鏁版嵁闆嗗悎
};
@@ -307,10 +321,25 @@
}
},
//#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 => {
+ axios.get(this.$baseUrl + '/Web/GetOrganizations',{async:false}).then(response => {
let result = response.data
if (result.count == 1) {
var data = result.data;
@@ -415,6 +444,13 @@
return Result = false;
}
+ var regex = /^\d{4}-\d{2}-\d{2}$/; //姝e垯琛ㄨ揪寮忥細鏍¢獙 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("灏惧寘鏁伴噺涓嶈兘涓虹┖锛侊紒");
@@ -448,6 +484,7 @@
this.$modal.msgError("鏉$爜鐢熸垚鏁伴噺澶т簬鏈�澶у彲鐢熸垚鏁伴噺銆�" + ((dataArray[0].鏁伴噺 * 1) - (dataArray[0].宸茬敓鎴愭潯鐮佹暟閲� * 1)) + "銆�!!");
return false;
}
+
var sMainData_temp = [
{
@@ -459,7 +496,7 @@
, "HMaterNumber": this.initMainData.HMaterNumber
, "HMaterName": this.initMainData.HMaterName
, "HMaterModel": this.initMainData.HMaterModel
- , "HCusModel": ""
+ , "HCusModel": this.initMainData.HCusModel
, "HCusMaterName": ""
, "HEmpID": 0
, "HEmpNumber": ""
@@ -472,6 +509,7 @@
, "HQty": this.initMainData.HQty_SourceBill
, "HMinQty": this.initMainData.HMinQty
, "HBQty": this.initMainData.HBQty
+ , "HSourceBillSEQ":this.initMainData.HSourceBillSEQ
, "HPackQty": 0
, "HCoilNO": ""
, "HFurnaceNO": ""
@@ -505,6 +543,8 @@
, "HInspectionCycle": this.initMainData.HInspectionCycle
, "HReInspectionDate": this.initMainData.HReInspectionDate
, "HPOOrderBillMTO": this.initMainData.HPOOrderBillMTO
+ , "HSeOrderBillNo": this.initMainData.HSeOrderBillNo
+ , "HMTONo": this.initMainData.HMTONo
}
]
@@ -563,7 +603,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
@@ -573,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) {
//鑾峰彇鍙傛暟
@@ -583,19 +642,19 @@
var HSourceEntryID = params[params[2]]; //婧愬崟瀛恑d
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("鍗曟嵁宸茬粡鍏ㄩ儴涓嬫帹锛屽鏋滄兂缁х画涓嬫帹锛屽幓鏉$爜妗f浣滃簾瀵瑰簲鏉$爜");
+ }
}
else{
res = "none";
@@ -617,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;
@@ -639,6 +698,10 @@
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.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);
@@ -655,7 +718,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
},
--
Gitblit v1.9.1