From c9bd26c6cdac80e94e79da47c5113d95ba6e726f Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期二, 31 三月 2026 11:51:27 +0800
Subject: [PATCH] 运单列表打印功能
---
.env.development | 6
src/views/component/printList/hBarPlanPrint.vue | 54 +++--
src/views/logistics/transportGPS/WL_YayBill.vue | 44 +---
public/static/grf/出运单.grf | 375 +++++++++++++++++++++++++++++++++++++++++
src/views/component/printList/barcode.vue | 9 +
5 files changed, 432 insertions(+), 56 deletions(-)
diff --git a/.env.development b/.env.development
index 3fbe31a..22d5afc 100644
--- a/.env.development
+++ b/.env.development
@@ -6,15 +6,15 @@
# 鏅轰簯杩堟�滾-MOM绠$悊绯荤粺/寮�鍙戠幆澧�
# VUE_APP_BASE_API = http://localhost:81/API/
-# VUE_APP_BASE_API = 'http://47.96.97.237/API/'
+VUE_APP_BASE_API = 'http://47.96.97.237/API/'
# VUE_APP_BASE_API = 'http://220.189.218.155:9010/API/'
# VUE_APP_BASE_API = 'http://localhost:8082/LuBaoAPI/'
#閿﹂殕
# VUE_APP_BASE_API_INNER = http://192.168.1.11/API/
# VUE_APP_BASE_API = http://61.174.29.234:8880/API/
# 瀹佹尝 鍥涚淮灏�
-VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
-VUE_APP_BASE_API = http://220.189.218.155:9010/API/
+# VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
+# VUE_APP_BASE_API = http://220.189.218.155:9010/API/
#鏉滆春
# VUE_APP_BASE_API = http://localhost:8082/API/
# 鍐呯綉鍦板潃娴嬭瘯
diff --git "a/public/static/grf/\345\207\272\350\277\220\345\215\225.grf" "b/public/static/grf/\345\207\272\350\277\220\345\215\225.grf"
new file mode 100644
index 0000000..bdbd86e
--- /dev/null
+++ "b/public/static/grf/\345\207\272\350\277\220\345\215\225.grf"
@@ -0,0 +1,375 @@
+锘縶
+ "Version":"6.8.2.2",
+ "Title":"1a.绠�鍗曡〃鏍�",
+ "Author":"閿愭氮鎶ヨ〃杞欢",
+ "Description":"婕旂ず涓�涓渶鍩烘湰鐨勫垪琛ㄦ姤琛ㄣ��",
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "TopMargin":1.5,
+ "BottomMargin":1.5
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "PrintAdaptMethod":"ResizeToFit",
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"鍗曟嵁鍙�"
+ },
+ {
+ "Name":"鐗╂枡浠g爜"
+ },
+ {
+ "Name":"鐗╂枡鍚嶇О"
+ },
+ {
+ "Name":"鐗╂枡鏁伴噺",
+ "DBFieldName":"鏁伴噺"
+ },
+ {
+ "Name":"濮嬪彂鍦�"
+ },
+ {
+ "Name":"鏃ユ湡",
+ "Type":"DateTime",
+ "Format":"yyyy//MM//mm"
+ },
+ {
+ "Name":"鐩殑鍦�"
+ },
+ {
+ "Name":"杩愯緭绫诲瀷"
+ },
+ {
+ "Name":"鍙告満"
+ },
+ {
+ "Name":"杞﹀瀷"
+ },
+ {
+ "Name":"杞︾墝鍙�"
+ },
+ {
+ "Name":"瀹㈡埛"
+ },
+ {
+ "Name":"鎻愯揣鍦板潃"
+ },
+ {
+ "Name":"鍒拌揣鍦板潃"
+ },
+ {
+ "Name":"鎵胯繍鍟�"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"鍗曟嵁鍙�",
+ "Width":2.77813
+ },
+ {
+ "Name":"鐗╂枡浠g爜",
+ "Width":2.80458
+ },
+ {
+ "Name":"鐗╂枡鍚嶇О",
+ "Width":2.61938
+ },
+ {
+ "Name":"瑙勬牸鍨嬪彿",
+ "Width":4.84188
+ },
+ {
+ "Name":"Column1",
+ "Width":3.96875
+ },
+ {
+ "Name":"Column2",
+ "Width":2.77813
+ },
+ {
+ "Name":"Column3",
+ "Width":2.77813
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"鍗曟嵁鍙�",
+ "TextAlign":"MiddleCenter",
+ "DataField":"杩愯緭绫诲瀷"
+ },
+ {
+ "Column":"鐗╂枡浠g爜",
+ "TextAlign":"MiddleCenter",
+ "DataField":"鐗╂枡浠g爜"
+ },
+ {
+ "Column":"鐗╂枡鍚嶇О",
+ "TextAlign":"MiddleCenter",
+ "DataField":"鐗╂枡鍚嶇О"
+ },
+ {
+ "Column":"瑙勬牸鍨嬪彿",
+ "TextAlign":"MiddleCenter",
+ "DataField":"鐗╂枡鏁伴噺"
+ },
+ {
+ "Column":"Column1",
+ "DataField":"瀹㈡埛"
+ },
+ {
+ "Column":"Column2",
+ "DataField":"鎻愯揣鍦板潃"
+ },
+ {
+ "Column":"Column3",
+ "DataField":"鍒拌揣鍦板潃"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "BackColor":"C0C0C0",
+ "Height":0.608542,
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Bold":true,
+ "Charset":134
+ },
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"鍗曟嵁鍙�",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"杩愯緭绫诲瀷"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"鐗╂枡浠g爜",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"鐗╂枡浠g爜"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"鐗╂枡鍚嶇О",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"鐗╂枡鍚嶇О"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"瑙勬牸鍨嬪彿",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"鐗╂枡鏁伴噺"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column1",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"瀹㈡埛"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column2",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"鎻愯揣鍦板潃"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column3",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter",
+ "Text":"鍒拌揣鍦板潃"
+ }
+ ]
+ }
+ },
+ "ReportHeader":[
+ {
+ "Height":2.98979,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Center":"Horizontal",
+ "Left":6.29708,
+ "Top":0.79375,
+ "Width":3.41313,
+ "Height":0.582083,
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":150000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"鍑鸿繍鍗�"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Top":2.40771,
+ "Width":2.19604,
+ "Height":0.582083,
+ "Text":"鍙戣揣閫氱煡鍗�"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":2.40771,
+ "Top":2.40771,
+ "Width":2.19604,
+ "Height":0.582083,
+ "DataField":"鍗曟嵁鍙�"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox2",
+ "Left":3.99521,
+ "Top":2.40771,
+ "Width":2.61938,
+ "Height":0.582083,
+ "Text":"濮嬪彂鍦�"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox2",
+ "Left":5.60917,
+ "Top":2.40771,
+ "Width":2.80458,
+ "Height":0.582083,
+ "DataField":"濮嬪彂鍦�"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox3",
+ "Left":11.0067,
+ "Top":0.79375,
+ "Width":1.79917,
+ "Height":0.582083,
+ "Text":"鏃ユ湡"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox3",
+ "Left":12.409,
+ "Top":0.79375,
+ "Width":2.01083,
+ "Height":0.582083,
+ "DataField":"鏃ユ湡"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox4",
+ "Left":8.20208,
+ "Top":2.40771,
+ "Width":2.19604,
+ "Height":0.582083,
+ "Text":"鐩殑鍦�"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox4",
+ "Left":10.2129,
+ "Top":2.40771,
+ "Width":2.59292,
+ "Height":0.608542,
+ "DataField":"鐩殑鍦�"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox6",
+ "Left":12.409,
+ "Top":2.40771,
+ "Width":1.5875,
+ "Height":0.608542,
+ "Text":"鎵胯繍鍟�"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox6",
+ "Left":13.9965,
+ "Top":2.40771,
+ "Width":2.01083,
+ "Height":0.582083,
+ "DataField":"鎵胯繍鍟�"
+ },
+ {
+ "Type":"Line",
+ "Name":"Line1",
+ "Left":3.99521,
+ "Top":1.5875,
+ "Width":6.61458
+ }
+ ]
+ }
+ ],
+ "ReportFooter":[
+ {
+ "Name":"ReportFooter1",
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox5",
+ "Width":2.59292,
+ "Height":0.396875,
+ "Text":"鍙告満"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox5",
+ "Left":2.59292,
+ "Width":2.4,
+ "Height":0.396875,
+ "DataField":"鍙告満"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox7",
+ "Left":5.00063,
+ "Width":2.19604,
+ "Height":0.396875,
+ "Text":"杞﹀瀷"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox7",
+ "Left":6.40292,
+ "Width":3.20146,
+ "Height":0.396875,
+ "DataField":"杞﹀瀷"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox8",
+ "Left":8.59896,
+ "Width":2.01083,
+ "Height":0.396875,
+ "Text":"杞︾墝鍙�"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox8",
+ "Left":10.6098,
+ "Width":1.98438,
+ "Height":0.396875,
+ "DataField":"杞︾墝鍙�"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/views/component/printList/barcode.vue b/src/views/component/printList/barcode.vue
index 921c0cf..683c8c4 100644
--- a/src/views/component/printList/barcode.vue
+++ b/src/views/component/printList/barcode.vue
@@ -58,6 +58,7 @@
return datajson;
},
async getPrintData() {
+ console.log(this.$route.query.Type)
// 鍦ㄥぇ鎵归噺鎵撳嵃鐨勬椂鍊� url闀垮害鍙兘瓒単et鍏佽鐨勯暱搴� 鍚庣闇�鎸夐渶姹� 鏀规垚POST璇锋眰
let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
let sql = "";
@@ -84,6 +85,12 @@
let condition = decodeURI(this.handleMessage.linterid.toString());
condition = condition.split(',').map(e => `'${e}'`).join(',')
sql = `exec h_p_GetSPBarCode_Swell N'${condition}'`;
+ } else if (this.$route.query.Type == "WL_YayBill") {
+ sql = "select * from h_v_WL_YayBilllist where hmainid in(" +
+ this.handleMessage.linterid.toString() +
+ ") order by hmainid desc";
+ console.log(sql)
+
}
try{
let res = await axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
@@ -95,6 +102,8 @@
},
});
// 灏� 娓叉煋鏁版嵁 鍜� 妯℃澘鍔犺浇鍒版湰鍦�
+ console.log(res)
+
let result = res.data;
this.json_data.recordset = result.data;
this.grfPath = "./static/grf/" + OpenTmp + ".grf";
diff --git a/src/views/component/printList/hBarPlanPrint.vue b/src/views/component/printList/hBarPlanPrint.vue
index 0683433..fd5c52e 100644
--- a/src/views/component/printList/hBarPlanPrint.vue
+++ b/src/views/component/printList/hBarPlanPrint.vue
@@ -39,6 +39,7 @@
return datajson;
},
ws_both_from_object() {
+ console.log(this.$route.query.Type)
let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
let sql = "";
if (this.$route.query.Type == "Kf_SellOutBillList") {
@@ -71,12 +72,14 @@
) AS t
GROUP BY CEILING(CAST(t.row_num AS FLOAT) / 2)
ORDER BY orderid;`;
- } else if (this.$route.query.Type == "Cg_ContractTransportBillMainList") {
- sql = "exec h_p_Cg_ContractTransportBillMainList " +
- this.handleMessage.linterid.toString();
+ } else if (this.$route.query.Type == "WL_YayBill") {
+
+ sql = "select * from h_v_WL_YayBilllist where hmainid in(" +
+ this.handleMessage.linterid.toString() +
+ ") order by hmainid desc";
}
- axios
- .get(this.$baseUrl + "/CommonModel/searchMethod", {
+ this.$nextTick(() => {
+ axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
params: {
sql: sql,
user: sessionStorage["HUserName"],
@@ -84,25 +87,28 @@
// , "HSubID": data[i].hsubid
},
})
- .then((response) => {
- let result = response.data;
- this.json_data.recordset = result.data;
- //鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- var args = {
- type: "preview", //璁剧疆涓嶅悓鐨勫睘鎬у彲浠ユ墽琛屼笉鍚岀殑浠诲姟锛屽锛歱review print pdf xls csv txt rtf img grd
- // report: this.json_report, //report: JSON.stringify(json_report),
- report: urlAddRandomNo("./static/grf/" + OpenTmp + ".grf"),
- data: this.json_data, //data: JSON.stringify(json_data)
- };
- console.log(args, this.json_data);
- webapp_ws_ajax_run(args);
- // var reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", "./static/grf/閿�鍞嚭搴撳崟.grf", this.json_data);
- // reportViewer.start();
- })
- .catch((error) => {
- console.log(22222, error);
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ .then((response) => {
+ console.log(111, OpenTmp, response)
+ let result = response.data;
+ this.json_data.recordset = result.data;
+ //鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ var args = {
+ type: "preview", //璁剧疆涓嶅悓鐨勫睘鎬у彲浠ユ墽琛屼笉鍚岀殑浠诲姟锛屽锛歱review print pdf xls csv txt rtf img grd
+ // report: this.json_report, //report: JSON.stringify(json_report),
+ report: urlAddRandomNo("./static/grf/" + OpenTmp + ".grf"),
+ data: this.json_data, //data: JSON.stringify(json_data)
+ };
+ console.log(args, this.json_data);
+ webapp_ws_ajax_run(args);
+ // var reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", "./static/grf/閿�鍞嚭搴撳崟.grf", this.json_data);
+ // reportViewer.start();
+ })
+ .catch((error) => {
+ console.log(22222, error);
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ })
+
},
},
};
diff --git a/src/views/logistics/transportGPS/WL_YayBill.vue b/src/views/logistics/transportGPS/WL_YayBill.vue
index 4a67634..4ec5d85 100644
--- a/src/views/logistics/transportGPS/WL_YayBill.vue
+++ b/src/views/logistics/transportGPS/WL_YayBill.vue
@@ -164,10 +164,10 @@
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
@click="set_ConfirmBill">渚涘簲鍟嗙‘璁�</el-button>
</el-col>
- <el-col :span="1.5">
+ <el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
@click="hanleCarOrDriver(form = rowForm)">鍒嗛厤杞﹁締鍜屽徃鏈�</el-button>
- </el-col>
+ </el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
@click="openDataDialog(14, form = rowForm)">鍒嗛厤杞﹁締</el-button>
@@ -263,8 +263,8 @@
</el-dialog>
<!-- 鎵撳嵃 -->
<el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
- <PrintList :linterid=this.rowForm.HInterID :MyMsg=this.rowForm.HInterID :Type='HBillType'
- :HModName="HModName" @rowEditClose="rowSetClose" v-if="printListShow" />
+ <PrintList :linterid='printIds' :MyMsg='printIds' :Type='HBillType' :HModName="HBillType"
+ @rowEditClose="rowSetClose" v-if="printListShow" />
<!-- <div>111</div> -->
</el-dialog>
@@ -274,7 +274,8 @@
<el-input v-model="formVolume.鍗曟嵁鍙�" placeholder="璇疯緭鍏ュ崟鎹彿" disabled />
</el-form-item>
<el-form-item label="闆跺崟鍗犵敤浣撶Н">
- <el-input-number v-model="formVolume.currentVolume" :placeholder="`闆舵媴浣撶Н: ${formVolume.闆舵媴浣撶Н || 0}`" />
+ <el-input-number v-model="formVolume.currentVolume"
+ :placeholder="`闆舵媴浣撶Н: ${formVolume.闆舵媴浣撶Н || 0}`" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -344,7 +345,7 @@
baseURL: process.env.VUE_APP_BASE_API, //鍚庣鎺ュ彛鍓嶇紑(鍚庣鏈嶅姟鍣╥p鍦板潃)
HModName: "Cg_ContractTransportBillMainList",
- HBillType: "Cg_ContractTransportBillMainList",
+ HBillType: "WL_YayBill",
OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
copyType: 0, //澶嶅埗鏍囪銆傛墦寮�缂栬緫缁勪欢鏃讹紝鐢ㄤ簬鍖哄垎缂栬緫杩樻槸澶嶅埗
HInterID: null,
@@ -445,6 +446,7 @@
totalNameList: [], // 闇�瑕佽缃悎璁¤鐨勫垪鏁扮粍
tableData: [], // 鍒楄〃鏁版嵁銆傜敤浜巘able鐩戝惉浜嬩欢
ids: [], // 閫変腑琛岀殑hmainid鏁扮粍
+ printIds: '', //鎵撳嵃閫夋嫨Id瀛楁
single: true, // 褰撻�変腑鐨勮鏁颁笉涓�1鏃朵负true銆傜敤浜庣鐢ㄧ浉鍏虫搷浣�
multiple: true, // 褰撻�変腑鐨勮鏁颁负0鏃朵负true銆傜敤浜庣鐢ㄧ浉鍏虫搷浣�
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
@@ -860,7 +862,7 @@
HInterID: 0,
HEntryID0: 0,
currentVolume: 0,
-
+
鍗曟嵁鍙�: ''
}
},
@@ -1175,29 +1177,13 @@
//#region 鎵撳嵃
get_PrintReport() {
- if (this.ids.length != 1) {
- this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�")
- } else if (this.rowForm.鍗曟嵁鐘舵�� != "宸插鏍�" && !this.defaintOperationByCompanyName()) {
- this.$modal.msgError("鎵撳嵃澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'宸插鏍�'鐘舵��!!");
+ if (this.ids.length == 0) {
+ this.$modal.msgError("璇疯嚦灏戦�夋嫨涓�琛屾暟鎹�")
} else {
- axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
- params: { "HInterID": this.rowForm.HInterID }
- }).then(response => {
- var result = response.data
- if (result.count == 1) {
- this.printListShow = true
- this.openPrintList = true
- // this.$router.push({ path:'/printList', query: { linterid: this.rowForm.hmainid,MyMsg:this.rowForm.hmainid,Type:'Kf_SellOutBillList' }})
- } else {
- this.$modal.msgError(result.code + result.Message)
- }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
-
-
+ this.printIds = this.ids.join(',')
+ this.printListShow = true
+ this.openPrintList = true
}
- // var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
},
//#endregion
@@ -1356,7 +1342,7 @@
axios({
method: 'GET',
url: this.baseURL + "WLYayBillController/selectDriver1",
- params: {
+ params: {
"CarHNumber": this.carDriverForm.CarHNumber,
"CarHName": this.carDriverForm.CarHName,
"DriverHName": this.carDriverForm.DriverHName,
--
Gitblit v1.9.1