gjy 1 tahun lalu
induk
melakukan
f11a07d082

+ 2 - 2
config/index.js

@@ -10,9 +10,9 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
-	// baseUrlNew: 'http://192.168.110.138:8090/',
+	baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	baseUrlNew: 'https://api2.eliangeyun.com/',
+	// baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 24 - 15
pages/erpbusiness/add_quality_testing.vue

@@ -523,6 +523,7 @@
 					name: '他运',
 					value: '他运'
 				}],
+				printId:'',
 				typevalue: '3',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
@@ -1446,9 +1447,18 @@
 				console.log(this.gridList)
 			},
 			print() {
-				uni.navigateTo({
-					url: '/pages/erpbusiness/bleConnect'
-				})
+				console.log(this.printId)
+				if(this.printId){
+					this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
+						id: this.printId
+					}).then(res => {
+						uni.setStorageSync("quality_print", res.data.data)
+						uni.navigateTo({
+							url: '/pages/erpbusiness/bleConnect'
+						})
+					})
+				}
+				
 			},
 			close() {
 				this.isShowPrint = false
@@ -1789,7 +1799,7 @@
 																			'/qualityInspectionManagement/api/addQualityInspection',
 																			that.gridList)
 																		.then(res => {
-																			
+																			that.printId=res.data.data
 																			uni.hideLoading()
 																			if (res.data.code ==
 																				200) {
@@ -1851,7 +1861,8 @@
 													'/qualityInspectionManagement/api/addQualityInspection',
 													that.gridList)
 												.then(res => {
-													
+													console.log(res)
+													that.printId=res.data.data
 													uni.hideLoading()
 													if (res.data.code == 200) {
 														that.$api.msg('提交成功')
@@ -1960,17 +1971,14 @@
 																						0
 																				}
 																			}
-																			that.gridList
-																				.warehouseInOutId =
-																				res
-																				.data.data
-																			that.$api
-																				.doRequest(
-																					'post',
-																					'/qualityInspectionManagement/api/addQualityInspection',
-																					that
-																					.gridList)
+																			that.gridList.warehouseInOutId =
+																			res.data.data
+																			that.$api.doRequest(
+																				'post',
+																				'/qualityInspectionManagement/api/addQualityInspection',
+																				that.gridList)
 																				.then(res => {
+																					that.printId=res.data.data
 																					if (res
 																						.data
 																						.code ==
@@ -2041,6 +2049,7 @@
 															'/qualityInspectionManagement/api/addQualityInspection',
 															that.gridList)
 														.then(res => {
+															that.printId=res.data.data
 															if (res.data.code == 200) {
 																that.$api.msg('提交成功')
 																that.gridList.warehouseId =

+ 5 - 5
pages/erpbusiness/sendCommand.vue

@@ -196,7 +196,7 @@
 			},
 			//打印票据数据
 			receiptTest() {
-				console.log(this.gridList)
+				console.log(this.gridList,this.gridList.weighingManagement)
 				var that = this;
 				var canvasWidth = that.canvasWidth
 				var canvasHeight = that.canvasHeight
@@ -242,17 +242,17 @@
 				//客户姓名
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
-				command.setText("客户姓名:" + that.gridList.customerName);
+				command.setText("客户姓名:" + that.gridList.customerName?that.gridList.customerName:'');
 				command.setPrint();
 				//客户身份证
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
-				command.setText("客户身份证:" + that.gridList.weighingManagement.customerNumberCard);
+				command.setText("客户身份证:" + (that.gridList.weighingManagement&&that.gridList.weighingManagement.customerNumberCard?that.gridList.weighingManagement.customerNumberCard:''));
 				command.setPrint();
 				//客户电话
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
-				command.setText("客户电话:" + that.gridList.weighingManagement.customerPhone);
+				command.setText("客户电话:" + (that.gridList.weighingManagement&&that.gridList.weighingManagement.customerPhone?that.gridList.weighingManagement.customerPhone:''));
 				command.setPrint();
 				//车牌号
 				command.setSelectJustification(0); //居左
@@ -295,7 +295,7 @@
 				//收货单位
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
-				command.setText("收货仓库:" + that.gridList.weighingManagement.warehouseName);
+				command.setText("收货仓库:" + (that.gridList.warehouseName?that.gridList.warehouseName:that.gridList.weighingManagement.warehouseName));
 				command.setPrint();
 				//联系人
 				// command.setSelectJustification(0); //居左