Explorar el Código

修改数据报表,蓝牙打印机小票

wangchao hace 3 años
padre
commit
c5ef169823
Se han modificado 2 ficheros con 55 adiciones y 12 borrados
  1. 2 3
      pages/erpbusiness/sendCommand.vue
  2. 53 9
      pages/user/report.vue

+ 2 - 3
pages/erpbusiness/sendCommand.vue

@@ -104,7 +104,7 @@
 		},
 		onShow() {
 			this.gridList = uni.getStorageSync("quality_print")
-			this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
+			// this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
 			console.log(this.gridList)
 			let that = this;
 			let width;
@@ -193,8 +193,7 @@
 				command.rowSpace(60);
 				command.setSelectSizeOfModuleForQRCode(5);
 				command.setSelectErrorCorrectionLevelForQRCode(7)
-				command.setStoreQRCodeData(that.gridList.compId + '&' + that.gridList.qualityNo + '&' + that.gridList
-					.warehouseId);
+				command.setStoreQRCodeData(that.gridList.compId + '&' + that.gridList.qualityNo + '&' + that.gridList.warehouseId);
 				command.setPrintQRCode();
 				//客户姓名
 				command.setSelectJustification(0); //居左

+ 53 - 9
pages/user/report.vue

@@ -214,15 +214,17 @@
 				</maoScroll>
 			</view> -->
 			<view class="content7">
-				<view class="row1" v-for="(item,index) in ztList">
-					<view class="zt">
-						<view class="point"></view>在途
-					</view>
-					<view>{{item.startName}}</view>
-					→
-					<!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt=""> -->
-					<view class="">
-						{{item.endName}}
+				<view ref='scroll' class='scroll'>
+					<view class="row1" v-for="(item,index) in ztList">
+						<view class="zt">
+							<view class="point"></view>在途
+						</view>
+						<view>{{item.startName}}</view>
+						→
+						<!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt=""> -->
+						<view class="">
+							{{item.endName}}
+						</view>
 					</view>
 				</view>
 			</view>
@@ -241,6 +243,7 @@
 		},
 		data() {
 			return {
+				carInterval: '',
 				inventoryCost: '',
 				inventoryValue: '',
 				contractSelect: '0',
@@ -377,6 +380,9 @@
 			}
 			this.init()
 		},
+		destroyed() {
+			clearInterval(this.carInterval)
+		},
 		methods: {
 			goToPage(index) {
 				console.log(index)
@@ -750,9 +756,39 @@
 						}
 					}
 					this.chartlist = _list
+					this.scroll()
 					uni.hideLoading()
 				})
 			},
+			scroll() {
+				let _scroll = 0
+				let that = this
+				let _outHeight = ''
+				let _inHeight = ''
+				let obj = uni.createSelectorQuery().select('.content7')
+				obj.boundingClientRect(function(data) { // data - 各种参数
+					console.log(data)
+					_outHeight = data.height
+				}).exec()
+				setTimeout(function() {
+					let obj1 = uni.createSelectorQuery().select('.scroll')
+					obj1.boundingClientRect(function(data) { // data - 各种参数
+						console.log(data)
+						_inHeight = data.height
+					}).exec()
+					that.carInterval = setInterval(function() {
+						_scroll++
+						console.log(_scroll)
+						if (_scroll < _inHeight - _outHeight) {
+							that.$refs.scroll.$el.style.top = '-' + _scroll + 'px'
+						} else {
+							_scroll = 0
+						}
+					}, 50)
+
+				}, 0)
+
+			},
 			confirm(e) {
 				console.log(e)
 				this.nowDate = e[0].label + e[1].label
@@ -991,6 +1027,14 @@
 
 	.content7 {
 		position: relative;
+		overflow: hidden;
+		height: 400rpx;
+		margin-top: 20rpx;
+
+		.scroll {
+			position: absolute;
+			width: 100%;
+		}
 
 		.row1 {
 			background: #FAFAFA;