瀏覽代碼

修改打印小票返回问题

wangchao 3 年之前
父節點
當前提交
4ccbf020a8

+ 6 - 0
pages/erp/index.vue

@@ -210,6 +210,12 @@
 				})
 			}
 		},
+		onBackPress() {
+				uni.switchTab({
+				    url: '/pages/user/user'
+				});
+				return true
+		},
 		// #endif
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),

+ 6 - 0
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -135,6 +135,12 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onBackPress() {
+			uni.switchTab({
+				url: '/pages/user/user'
+			});
+			return true
+		},
 		onPullDownRefresh() {
 			this.currentPage = 1
 			this.gridList = []

+ 7 - 1
pages/erpbusiness/exsendCommand.vue

@@ -7,9 +7,10 @@
 			<textarea class="input" @input="inputEvent" /> -->
 			<!-- <button type="primary" @tap="sendData">发送(票据可使用)</button> -->
 
-			<view style='margin-top:4%;display: flex;flex-direction: row;'>
+			<view style='margin-top:4%;display: flex;flex-direction: column;'>
 				<button type='primary' class="btn" @tap='receiptTest' :loading='isReceiptSend'
 					:disabled='isReceiptSend'>打印出库小票</button>
+					<button type='primary' class="btn" @tap='goToList'>返回列表页</button>
 				<!-- <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>标签测试</button> -->
 			</view>
 
@@ -139,6 +140,11 @@
 			//    })	
 		},
 		methods: {
+			goToList(){
+				uni.navigateTo({
+					url: '/pages/erp/index?companyId=1'
+				})
+			},
 			//获取输入内容
 			inputEvent(e) {
 				this.sendContent = e.detail.value;

+ 7 - 1
pages/erpbusiness/jjsendCommand.vue

@@ -7,9 +7,10 @@
 			<textarea class="input" @input="inputEvent" /> -->
 			<!-- <button type="primary" @tap="sendData">发送(票据可使用)</button> -->
 
-			<view style='margin-top:4%;display: flex;flex-direction: row;'>
+			<view style='margin-top:4%;display: flex;flex-direction: column;'>
 				<button class="btn" type='primary' @tap='receiptTest' :loading='isReceiptSend'
 					:disabled='isReceiptSend'>打印检斤单小票</button>
+					<button type='primary' class="btn" @tap='goToList'>返回列表页</button>
 				<!-- <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>标签测试</button> -->
 			</view>
 
@@ -138,6 +139,11 @@
 			//    })	
 		},
 		methods: {
+			goToList(){
+				uni.navigateTo({
+					url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection'
+				})
+			},
 			//获取输入内容
 			inputEvent(e) {
 				this.sendContent = e.detail.value;

+ 11 - 4
pages/erpbusiness/quality_testing.vue

@@ -38,7 +38,7 @@
 							<view class="left status2" v-if="item.status=='已复检'">复</view>
 							<view class="left status3" v-if="item.confirm=='1'">确</view>
 						</view>
-						
+
 						<view>
 							<view class="top-title">
 								<view v-if='managementType==1'>{{item.qualityNo}}</view>
@@ -164,7 +164,7 @@
 				warehouseCount: '',
 				commonWarehouseNo: '',
 				cangid: '',
-				warehouse:{},
+				warehouse: {},
 
 			}
 		},
@@ -187,6 +187,12 @@
 				})
 			}
 		},
+		onBackPress() {
+			uni.switchTab({
+				url: '/pages/user/user'
+			});
+			return true
+		},
 		// #endif
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
@@ -351,8 +357,9 @@
 				uni.navigateTo({
 					url: '/pages/erpbusiness/add_quality_testing?managementType=' + this.managementType +
 						'&cangid=' + this.cangid + '&warehouseCount=' + this.warehouseCount +
-						'&commonWarehouseNo=' + this.commonWarehouseNo + '&warehouseName=' + this.warehouseName
-						+ '&personCharge=' + this.warehouse.personCharge+ '&personPhone=' + this.warehouse.personPhone
+						'&commonWarehouseNo=' + this.commonWarehouseNo + '&warehouseName=' + this.warehouseName +
+						'&personCharge=' + this.warehouse.personCharge + '&personPhone=' + this.warehouse
+						.personPhone
 				})
 			},
 			del(item) {

+ 15 - 7
pages/erpbusiness/sendCommand.vue

@@ -7,9 +7,10 @@
 			<textarea class="input" @input="inputEvent" /> -->
 			<!-- <button type="primary" @tap="sendData">发送(票据可使用)</button> -->
 
-			<view style='margin-top:4%;display: flex;flex-direction: row;'>
+			<view style='margin-top:4%;display: flex;flex-direction: column;'>
 				<button type='primary' class="btn" @tap='receiptTest' :loading='isReceiptSend'
 					:disabled='isReceiptSend'>打印质检单小票</button>
+				<button type='primary' class="btn" @tap='goToList'>返回列表页</button>
 				<!-- <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>标签测试</button> -->
 			</view>
 
@@ -71,15 +72,15 @@
 				deviceId: BLEInformation.deviceId,
 				serviceId: BLEInformation.notifyServiceId,
 				characteristicId: BLEInformation.notifyCharaterId,
-			 state: true,
+				state: true,
 				success(res) {
 					uni.onBLECharacteristicValueChange(function(r) {
 						console.log(`characteristic ${r.characteristicId} has changed, now is ${r}`)
 					})
 				},
-			 fail: function(e) {
+				fail: function(e) {
 					console.log(e)
-			 },
+				},
 				complete: function(e) {
 					console.log(e)
 				}
@@ -140,6 +141,11 @@
 			//    })	
 		},
 		methods: {
+			goToList(){
+				uni.navigateTo({
+					url: '/pages/erpbusiness/quality_testing?managementType=1'
+				})
+			},
 			//获取输入内容
 			inputEvent(e) {
 				this.sendContent = e.detail.value;
@@ -510,12 +516,14 @@
 		width: 100%;
 		height: 100%;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 50rpx;
 		background: #22C572;
 	}
+
 	uni-button[loading][type=primary] {
-	    color: hsla(0,0%,100%,.6);
-	    background-color: #22C572;
+		color: hsla(0, 0%, 100%, .6);
+		background-color: #22C572;
 	}
 </style>