gjy 3 lat temu
rodzic
commit
15e433ec17

+ 1 - 1
components/chat/more.vue

@@ -14,6 +14,6 @@
 	}
 </script>
 
-<style lang="less">
+<style >
 
 </style>

+ 12 - 0
pages.json

@@ -438,12 +438,24 @@
 				"navigationBarTitleText": "质检打印小票"
 			}
 		},
+		{
+			"path": "pages/erpbusiness/exbleConnect",
+			"style": {
+				"navigationBarTitleText": "出库打印小票"
+			}
+		},
 		{
 			"path": "pages/erpbusiness/jjbleConnect",
 			"style": {
 				"navigationBarTitleText": "检斤打印小票"
 			}
 		},
+		{
+			"path": "pages/erpbusiness/exbleConnect",
+			"style": {
+				"navigationBarTitleText": "出库打印小票"
+			}
+		},
 		{
 			"path": "pages/erpbusiness/sendCommand",
 			"style": {

+ 113 - 51
pages/erp/exWarehousing/exWarehousing.vue

@@ -41,7 +41,8 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">皮重(吨)</view>
-				<input type="digit" @input='calculate' v-model='detailData.tare' class="right-bottom" placeholder="输入皮重"></input>
+				<input type="digit" @input='calculate' v-model='detailData.tare' class="right-bottom"
+					placeholder="输入皮重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">净重(吨)</view>
@@ -109,8 +110,10 @@
 				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号" v-if="!showCar"></input>
 				<!-- <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view> -->
 				<!-- 自运合同车牌号需下拉 -->
-				<view v-if="!carno" v-show="showCar" @click="carno = true">{{detailData.carNo?detailData.carNo :"请选择车牌号"}}</view>
-				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno" mode="selector">
+				<view v-if="!carno" v-show="showCar" @click="carno = true">
+					{{detailData.carNo?detailData.carNo :"请选择车牌号"}}</view>
+				<u-picker :range="carList" range-key="carNo" @confirm='carPicker($event)' v-model="carno"
+					mode="selector">
 				</u-picker>
 			</view>
 			<view class="row row-bottom" v-if="detailData.outType=='火运'">
@@ -121,20 +124,18 @@
 				class="row row-bottom">
 				<view class="left">箱号</view>
 				<input v-model='detailData.boxNo' class="right-bottom" placeholder="请输入箱号" type="digit"></input>
-				<input v-model='detailData.boxNoOther' class="right-bottom" type="digit"
-					placeholder="请输入箱号"></input>
+				<input v-model='detailData.boxNoOther' class="right-bottom" type="digit" placeholder="请输入箱号"></input>
 			</view>
-			<view v-if='!detailData.outType||detailData.outType=="汽运" || detailData.outType=="集装箱船"' class="row row-bottom">
+			<view v-if='!detailData.outType||detailData.outType=="汽运" || detailData.outType=="集装箱船"'
+				class="row row-bottom">
 				<view class="left">封号</view>
-				<input v-model='detailData.titleNo' class="right-bottom"
-					placeholder="请输入封号" type="digit"></input>
-				<input v-model='detailData.titleNoOther' class="right-bottom"
-					placeholder="请输入封号" type="digit"></input>
+				<input v-model='detailData.titleNo' class="right-bottom" placeholder="请输入封号" type="digit"></input>
+				<input v-model='detailData.titleNoOther' class="right-bottom" placeholder="请输入封号" type="digit"></input>
 			</view>
 			<view v-if='detailData.outType=="火运"' class="row row-bottom">
 				<view class="left">车厢号</view>
-				<input v-model='detailData.wingNumber' @input="toUpperCase2" class="right-bottom"
-					placeholder="请输入车厢号" type="digit"></input>
+				<input v-model='detailData.wingNumber' @input="toUpperCase2" class="right-bottom" placeholder="请输入车厢号"
+					type="digit"></input>
 				<input v-model='detailData.wingNumberOther' @input="toUpperCase3" class="right-bottom"
 					placeholder="请输入车厢号" type="digit"></input>
 			</view>
@@ -198,6 +199,12 @@
 			<u-button type="primary" class="submit" hover-class="none" @click="submit(1)">暂存</u-button>
 			<u-button type="primary" class="submit" hover-class="none" @click="submit(2)">提交</u-button>
 		</view>
+		<u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
+			<view class="buns_item">
+				<view class="but_css" @click="print">打印小票</view>
+				<view class="but_css" @click="close">返回</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 <script>
@@ -212,6 +219,8 @@
 		},
 		data() {
 			return {
+				weightbills: {},
+				isShowPrint: false,
 				show: false,
 				show1: false,
 				show2: false,
@@ -222,7 +231,7 @@
 				show7: false,
 				isPC: true,
 				show8: false,
-				carno:false,
+				carno: false,
 				usestart: '',
 				multiSelector: [{
 						name: '汽运',
@@ -312,8 +321,8 @@
 				netWeight: "",
 				inOutShow: false,
 				inOutNoList: [],
-				carList:[],//车牌号下拉
-				showCar:false,
+				carList: [], //车牌号下拉
+				showCar: false,
 			}
 		},
 		computed: {
@@ -333,7 +342,7 @@
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.detailData.goodsName = _data.goodsName;
-			this.detailData.inOutType = _data.inOutType;
+			this.detailData.inOutType = _data.inOutType ? _data.inOutType : '';
 			if (this.detailData.inOutType == '销售出库') {
 				this.detailData.inOutTypeKey = 1
 			} else if (this.detailData.inOutType == '移库出库') {
@@ -348,7 +357,7 @@
 			// if (_data.contractNo) {
 			// 	this.detailData.contractNo = _data.contractNo;
 			// }
-			this.detailData.goodsNameKey = _data.goodsNameKey;
+			this.detailData.goodsNameKey = _data.goodsNameKey ? _data.goodsNameKey : '';
 			if (!_data.tranCarInfoList) {
 				this.isPC = false
 				_data.tranCarInfoList = []
@@ -390,14 +399,24 @@
 			this.handler()
 		},
 		methods: {
+			print() {
+				uni.navigateTo({
+					url: '/pages/erpbusiness/exbleConnect'
+				})
+			},
+			close() {
+				this.isShowPrint = false
+				uni.navigateBack({})
+			},
 			inOutNo() {
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: 1,
-					warehouseName:this.warehouseName,
-					agentKey : this.userInfo.id
+					warehouseName: this.warehouseName,
+					agentKey: this.userInfo.id
 				}).then(res => {
 					this.inOutNoList = res.data.data
-					this.detailData.inOutTaskNo = this.inOutNoList[0].inOutTaskNo
+					this.detailData.inOutTaskNo = this.inOutNoList[0].inOutTaskNo ? this.inOutNoList[0]
+						.inOutTaskNo : ''
 					this.detailData.agent = this.inOutNoList[0].agent
 					if (this.inOutNoList[0].contractNo) {
 						this.detailData.contractNo = this.inOutNoList[0].contractNo
@@ -413,21 +432,21 @@
 						compId: helper.erpWarehouse.compId,
 					}).then(res => {
 						if (res.data.code == 200) {
-							for(let i = 0 ; i < res.data.data.length ; i++){
-								 // "MYCGYMHLJ2021102401"
-								if(res.data.data[i].contractNo == this.detailData.contractNo){//如果查到该合同
-								if(res.data.data[i].deliverType == '1'){//判断自运1,他运2合同
-									this.showCar = true
-								}else{
-									this.showCar = false
-								}
-								if(res.data.data[i].tranCarInfoList){
-									this.carList = res.data.data[i].tranCarInfoList   //车牌号下拉列表
+							for (let i = 0; i < res.data.data.length; i++) {
+								// "MYCGYMHLJ2021102401"
+								if (res.data.data[i].contractNo == this.detailData.contractNo) { //如果查到该合同
+									if (res.data.data[i].deliverType == '1') { //判断自运1,他运2合同
+										this.showCar = true
+									} else {
+										this.showCar = false
+									}
+									if (res.data.data[i].tranCarInfoList) {
+										this.carList = res.data.data[i].tranCarInfoList //车牌号下拉列表
+									}
 								}
-							 }
-						  }
+						 }
 						}
-					})	
+					})
 				})
 				// this.$api.doRequest('get', 'warehouseBaseInfo/selectContractNoList', ).then(res => {
 				// 	this.contractNoList = res.data.data
@@ -453,16 +472,21 @@
 				this.detailData.goodsName = this.inOutNoList[e[0]].goodsName
 				this.detailData.grade = this.inOutNoList[e[0]].grade
 				this.detailData.inOutType = this.inOutNoList[e[0]].inOutType
+				this.weightbills.goodsName = this.inOutNoList[e[0]].goodsName
 				if (this.detailData.inOutType == '销售出库') {
-					if(this.detailData.tips = '买方' + this.contractNoList[i].buyer){
-						this.detailData.tips = '买方' + this.contractNoList[i].buyer+
-						'( ' +
-						this.contractNoList[i].unitContractPrice +
-						'元/吨)'
-					}else{
-						this.detailData.tips = '买方' + this.contractNoList[i].buyer
+					this.weightbills.buyer = this.inOutNoList[e[0]].buyer
+					this.weightbills.seller = uni.getStorageSync('compName')
+					if (this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer) {
+						this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer +
+							'( ' +
+							this.contractNoList[e[0]].unitContractPrice +
+							'元/吨)'
+					} else {
+						this.detailData.tips = '买方' + this.contractNoList[e[0]].buyer
 					}
 				} else if (this.detailData.inOutType == '移库出库') {
+					this.weightbills.buyer = this.inOutNoList[e[0]].receiveWarehouse
+					this.weightbills.seller = uni.getStorageSync('compName')
 					this.detailData.tips = '入货库' + this.inOutNoList[e[0]].warehouseName
 				}
 			},
@@ -571,7 +595,7 @@
 			carPicker(e) {
 				// this.detailData.gradeKey = e[0] + 1
 				this.detailData.carNo = this.carList[e].carNo
-				this.detailData.carId=this.carList[e].id
+				this.detailData.carId = this.carList[e].id
 			},
 			onProgress(e) {},
 			onRemove() {
@@ -698,14 +722,17 @@
 					this.$api.msg('出库类型不能为空')
 					return
 				}
-				if (!this.detailData.carNo && num == 2) {
-					this.$api.msg('车牌号不能为空')
-					return
-				}
-				if (this.detailData.carNo.length != 7) {
-					this.$api.msg('车牌号输入有误!')
-					return
+				if(this.detailData.outType=="集装箱船"||this.detailData.outType=="汽运"){
+					if (!this.detailData.carNo && num == 2) {
+						this.$api.msg('车牌号不能为空')
+						return
+					}
+					if (this.detailData.carNo.length != 7) {
+						this.$api.msg('车牌号输入有误!')
+						return
+					}
 				}
+				
 				if (!this.detailData.addressUrl && num == 2) {
 					this.$api.msg('请上传磅单')
 					return
@@ -842,10 +869,30 @@
 								that.detailData).then(res => {
 								console.log(res, "报异常")
 								if (res.data.code == 200) {
+									that.weightbills.carNo = that.detailData.carNo
+									that.weightbills.boxNo = that.detailData.boxNo
+									that.weightbills.boxNoOther = that.detailData.boxNoOther
+									that.weightbills.wingNumber = that.detailData.wingNumber
+									that.weightbills.wingNumberOther = that.detailData.wingNumberOther
+									that.weightbills.shipName = that.detailData.shipName
+									that.weightbills.shipNumber = that.detailData.shipNumber
+									that.weightbills.type = that.detailData.type
+									that.weightbills.grossWeight = that.detailData.grossWeight
+									that.weightbills.tare = that.detailData.tare
+									that.weightbills.netWeight = that.detailData.netWeight
+									that.weightbills.outType = that.detailData.outType
+									that.weightbills.backOffice = that.detailData.outType
+									var date = new Date()
+									that.weightbills.updateDate = date.getFullYear() + '-' + (date
+											.getMonth() + 1) + '-' + date.getDate() + ' ' + date
+									.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
+									
 									that.$api.msg(title)
-									setTimeout(() => {
-										uni.navigateBack()
-									}, 1000)
+									that.isShowPrint = true
+									uni.setStorageSync("exWarehousing_print", that.weightbills)
+									// setTimeout(() => {
+									// 	uni.navigateBack()
+									// }, 1000)
 								} else {
 									that.$api.msg(res.data.message)
 								}
@@ -964,4 +1011,19 @@
 		display: flex;
 		z-index: 9999;
 	}
+
+	.buns_item {
+		display: flex;
+		padding: 80rpx 0 50rpx 0;
+		justify-content: space-around;
+	}
+
+	.but_css {
+		background: #22C572;
+		width: 40%;
+		padding: 20rpx;
+		color: #fff;
+		text-align: center;
+		border-radius: 20rpx;
+	}
 </style>

+ 5 - 0
pages/erp/index.vue

@@ -215,6 +215,10 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
+			uni.showLoading({
+				title:"加载中...",
+				mask:true
+			})
 			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
 				if (res.data.data == "INVALID") {
 					this.isShowAlert1 = true;
@@ -358,6 +362,7 @@
 						this.allWarehouse = res.data.data
 						this.warehouseList = res.data.data
 						this.isShowBtn = true
+						uni.hideLoading()
 						if (_showData) {
 							this.warehouseName = _showData.warehouseName
 							this.compId = _showData.compId

+ 2 - 2
pages/erpbusiness/add_quality_testing.vue

@@ -314,17 +314,17 @@
 			this.managementType = options.managementType
 		},
 		onShow() {
-
 			let that = this
 			this.purchasePriceList = uni.getStorageSync('purchasePriceList')
 			if (uni.getStorageSync('checkcustomer')) {
 
 				let _customerInfo = uni.getStorageSync('checkcustomer')
 				if (_customerInfo.shipperName) {
+					this.gridList.identityId = _customerInfo.id
 					//点击登记客户
 					this.gridList.customerName = _customerInfo.shipperName
 					this.gridList.customerPhone = _customerInfo.shipperPhone
-					this.gridList.carNumber=uni.getStorageSync('carNo')
+					this.gridList.carNumber=_customerInfo.carNo
 				} else {
 					//点击搜索客户
 					this.gridList.customerName = _customerInfo.customerName

+ 20 - 15
pages/erpbusiness/customer.vue

@@ -31,16 +31,16 @@
 		<view class="content content1">
 			<view style='padding-left:20px;color:#AFB3BF;font-size:14px;' v-if='show==false'>登记客户</view>
 
-			<view v-for='item in registeredCustomer'>
-				<view class="dj-customer" v-for="(item1,index) in item.carList" @click="registeredCustomerClick(item,item1)">
-					<view class="left">{{item1}}</view>
+			<!-- <view v-for='item in registeredCustomer'> -->
+				<view class="dj-customer" v-for="(item,index) in registeredCustomer" @click="registeredCustomerClick(item,item1)">
+					<view class="left">{{item.carNo}}</view>
 					<view class="right">
 						<view class="span1">{{item.shipperName}}(货)</view>
 						<view class="">{{item.supplier}}(商)</view>
 					</view>
 
 				</view>
-			</view>
+			<!-- </view> -->
 		</view>
 
 		<view v-show="isContent">
@@ -142,23 +142,28 @@
 				this.recentCustomers = []
 			}
 
-			this.$api.doRequest('get', '/grainDeliveryRegistration/grainDeliveryRegistrationCustomer', {
-				warehouseName: this.warehouseName
+			this.$api.doRequest('get', '/shippingInformation/selectShippingInformation', {
+				warehouseName: this.warehouseName,
+				compId:  uni.getStorageSync('pcUserInfo').compId,
 			}).then(res => {
 				if (res.data.data) {
 					let _endTime = Date.parse(new Date());
 					let _startTime = ""
 					for (let i = 0; i < res.data.data.length; i++) {
-						let _carList = res.data.data[i].shippingInformationList
-						for (let k = 0; k < _carList.length; k++) {
-							//判断是记录是否失效
 							_startTime = new Date((res.data.data[i].validityDate + ' 00:00:00')).getTime();
-							if (_endTime - _startTime <= 0) {
-								let _ecarList = _carList[k].carNo.split(',')
-									_carList[k].carList = _ecarList
-									this.registeredCustomer.push(_carList[k])
-							}
-						}
+								if (_endTime - _startTime <= 0) {
+										this.registeredCustomer.push(res.data.data[i])
+								}
+						// let _carList = res.data.data[i].shippingInformationList
+						// for (let k = 0; k < _carList.length; k++) {
+						// 	//判断是记录是否失效
+						// 	_startTime = new Date((res.data.data[i].validityDate + ' 00:00:00')).getTime();
+						// 	if (_endTime - _startTime <= 0) {
+						// 		let _ecarList = _carList[k].carNo.split(',')
+						// 			_carList[k].carList = _ecarList
+						// 			this.registeredCustomer.push(_carList[k])
+						// 	}
+						// }
 					}
 					console.log(this.registeredCustomer)
 				}

+ 375 - 0
pages/erpbusiness/exbleConnect.vue

@@ -0,0 +1,375 @@
+<template>
+	<view class="content">
+		
+		<button class="btn" type="primary" :loading="isSearching" @tap="startSearch">搜索打印机</button>
+		<button class="btn" type="warn" @tap="stopSearch">停止搜索</button>
+		
+		
+		<view v-for="(item) in list" :data-title="item.deviceId" :data-name="item.name" :data-advertisData="item.advertisServiceUUIDs"
+		 :key="item.deviceId" @tap="bindViewTap">
+			<view class="item">
+				<view class="deviceId block">{{item.deviceId}}</view>
+				<view class="name block">{{item.name}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				isSearching: false, //是否正在搜索中
+				list: [],
+				services: [],
+				serviceId: 0,
+				writeCharacter: false,
+				readCharacter: false,
+				notifyCharacter: false
+			};
+		},
+		computed: mapState(['sysinfo', 'Bluetooth']),
+		onLoad() {
+			// console.log(this.Bluetooth)
+			
+		},
+		onUnload() {
+			//停止搜索蓝牙设备
+			if (this.isSearching) {
+				uni.stopBluetoothDevicesDiscovery();
+			}
+		},
+		methods: {
+			//错误码提示
+			errorCodeTip(code) {
+				if (code == 0) {
+					//正常
+				} else if (code == 10000) {
+					uni.showToast({
+						title: '未初始化蓝牙适配器',
+						icon: 'none'
+					})
+				} else if (code == 10001) {
+					uni.showToast({
+						title: '当前蓝牙适配器不可用',
+						icon: 'none'
+					})
+				} else if (code == 10002) {
+					uni.showToast({
+						title: '没有找到指定设备',
+						icon: 'none'
+					})
+				} else if (code == 10003) {
+					uni.showToast({
+						title: '连接失败',
+						icon: 'none'
+					})
+				} else if (code == 10004) {
+					uni.showToast({
+						title: '没有找到指定服务',
+						icon: 'none'
+					})
+				} else if (code == 10005) {
+					uni.showToast({
+						title: '没有找到指定特征值',
+						icon: 'none'
+					})
+				} else if (code == 10006) {
+					uni.showToast({
+						title: '当前连接已断开',
+						icon: 'none'
+					})
+				} else if (code == 10007) {
+					uni.showToast({
+						title: '当前特征值不支持此操作',
+						icon: 'none'
+					})
+				} else if (code == 10008) {
+					uni.showToast({
+						title: '其余所有系统上报的异常',
+						icon: 'none'
+					})
+				} else if (code == 10009) {
+					uni.showToast({
+						title: 'Android 系统特有,系统版本低于 4.3 不支持 BLE',
+						icon: 'none'
+					})
+				}
+			},
+			//开始搜索蓝牙
+			startSearch() {
+				let that = this
+				uni.openBluetoothAdapter({
+					success(res) {
+						uni.getBluetoothAdapterState({
+							success(res2) {
+								console.log('getBluetoothAdapterState:', res2)
+								if (res2.available) {
+									that.isSearching = true;
+									if (res2.discovering) {
+										uni.showToast({
+											title: '正在搜索附近打印机设备',
+											icon: "none"
+										})
+										return;
+									}
+			
+									//获取蓝牙设备信息
+									that.getBluetoothDevices()
+			
+									// that.checkPemission()
+								} else {
+									uni.showModal({
+										title: '提示',
+										content: '本机蓝牙不可用',
+									})
+								}
+							}
+						});
+					},
+					fail() {
+						uni.showModal({
+							title: '提示',
+							content: '蓝牙初始化失败,请打开蓝牙',
+						})
+					}
+				})
+			},
+			stopSearch() {
+				uni.stopBluetoothDevicesDiscovery({
+					success: (res) => {
+						this.isSearching = false;
+						console.log('stop:', res)
+					},
+					fail: (e) => {
+						console.log('stop:', e)
+						this.errorCodeTip(e.errCode);
+					}
+				})
+			},
+			//校验权限
+			checkPemission() {
+				let that = this
+				let {
+					BLEInformation
+				} = that.Bluetooth;
+				let platform = BLEInformation.platform;
+				that.getBluetoothDevices();
+			},
+			//获取蓝牙设备信息
+			getBluetoothDevices() {
+				let that = this
+				that.list = [];
+				uni.startBluetoothDevicesDiscovery({
+					success(res) {
+						// console.log(res)
+						//蓝牙设备监听 uni.onBluetoothDeviceFound
+						plus.bluetooth.onBluetoothDeviceFound((result) => {
+							console.log('onBluetoothDeviceFound:', result)
+							let arr = that.list;
+							let devices = [];
+							let list = result.devices;
+							for (let i = 0; i < list.length; ++i) {
+								if (list[i].name && list[i].name != "未知设备") {
+									let arrNew = arr.filter((item) => {
+										return item.deviceId == list[i].deviceId;
+									});
+									// console.log('arrNew:',arrNew.length)
+									if (arrNew.length == 0) {
+										devices.push(list[i]);
+									}
+								}
+							}
+			
+							that.list = arr.concat(devices);
+						});
+						that.time = setTimeout(() => {
+							// uni.getBluetoothDevices
+							plus.bluetooth.getBluetoothDevices({
+								success(res2) {
+									let devices = [];
+									let list = res2.devices;
+									for (let i = 0; i < list.length; ++i) {
+										if (list[i].name && list[i].name != "未知设备") {
+											devices.push(list[i]);
+										}
+									}
+			
+									that.list = devices;
+									console.log('getBluetoothDevices:',res2);
+								},
+							})
+			
+							clearTimeout(that.time);
+						}, 3000);
+					}
+				});
+			
+			},
+			//绑定蓝牙
+			bindViewTap(e) {
+				let that = this;
+				let {
+					title
+				} = e.currentTarget.dataset;
+				let {
+					BLEInformation
+				} = that.Bluetooth;
+				this.stopSearch();
+				
+				that.serviceId = 0;
+				that.writeCharacter = false;
+				that.readCharacter = false;
+				that.notifyCharacter = false;
+				uni.showLoading({
+					title: '正在连接',
+				})
+				console.log('deviceId:', title)
+				// uni.createBLEConnection
+				plus.bluetooth.createBLEConnection({
+					deviceId: title,
+					success(res) {
+						console.log('createBLEConnection success:', res)
+						BLEInformation.deviceId = title;
+						that.$store.commit('BLEInformationSet', BLEInformation);
+						uni.hideLoading()
+						that.getSeviceId()
+					},
+					fail(e) {
+						that.errorCodeTip(e.errCode);
+						uni.hideLoading()
+					}
+				})
+			},
+			//获取蓝牙设备所有服务(service)。
+			getSeviceId() {
+				let that = this;
+				let {
+					BLEInformation
+				} = that.Bluetooth;
+				console.log('BLEInformation.deviceId:',BLEInformation.deviceId)
+				// uni.getBLEDeviceServices
+				let t=setTimeout(()=>{
+					plus.bluetooth.getBLEDeviceServices({
+						deviceId: BLEInformation.deviceId,
+						success(res) {
+							console.log('getBLEDeviceServices success:',res)
+							that.services = res.services;
+							that.getCharacteristics()
+						},
+						fail: function(e) {
+							that.errorCodeTip(e.code);	
+							console.log('getBLEDeviceServices fail:',e)
+						}
+					})
+					clearTimeout(t);
+				},1500)
+			},
+			getCharacteristics() {
+				var that = this
+				let {
+					services: list,
+					serviceId: num,
+					writeCharacter: write,
+					readCharacter: read,
+					notifyCharacter: notify
+				} = that;
+				let {
+					BLEInformation
+				} = that.Bluetooth;
+				// uni.getBLEDeviceCharacteristics
+				plus.bluetooth.getBLEDeviceCharacteristics({
+					deviceId: BLEInformation.deviceId,
+					serviceId: list[num].uuid,
+					success(res) {
+						// console.log(res)
+						for (var i = 0; i < res.characteristics.length; ++i) {
+							var properties = res.characteristics[i].properties
+							var item = res.characteristics[i].uuid
+							if (!notify) {
+								if (properties.notify) {
+									BLEInformation.notifyCharaterId = item;
+									BLEInformation.notifyServiceId = list[num].uuid;
+									that.$store.commit('BLEInformationSet', BLEInformation);
+									notify = true
+								}
+							}
+							if (!write) {
+								if (properties.write) {
+									BLEInformation.writeCharaterId = item;
+									BLEInformation.writeServiceId = list[num].uuid;
+									that.$store.commit('BLEInformationSet', BLEInformation);
+									write = true
+								}
+							}
+							if (!read) {
+								if (properties.read) {
+									BLEInformation.readCharaterId = item;
+									BLEInformation.readServiceId = list[num].uuid;
+									that.$store.commit('BLEInformationSet', BLEInformation);
+									read = true
+								}
+							}
+						}
+						if (!write || !notify || !read) {
+							num++
+							that.writeCharacter = write;
+							that.readCharacter = read;
+							that.notifyCharacter = notify;
+							that.serviceId = num;
+							if (num == list.length) {
+								uni.showModal({
+									title: '提示',
+									content: '找不到该读写的特征值',
+								})
+							} else {
+								that.getCharacteristics()
+							}
+						} else {
+							that.openControl()
+						}
+					},
+					fail: function(e) {
+						console.log("getBLEDeviceCharacteristics fail:",e);
+						that.errorCodeTip(e.errCode);	
+					}
+				})
+			},
+			openControl: function() {
+				uni.navigateTo({
+					url: '/pages/erpbusiness/exsendCommand'
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.btn {
+		margin-top: 50rpx;
+		height: 40px;
+		width: 600rpx;
+		line-height: 40px;
+		background: #22C572;
+	}
+
+	.item {
+		display: block;
+		font-family: Arial, Helvetica, sans-serif;
+		font-size: 14px;
+		margin: 0 30px;
+		margin-top: 10px;
+		background-color: #FFA850;
+		border-radius: 5px;
+		border-bottom: 2px solid #68BAEA;
+	}
+
+	.block {
+		display: block;
+		color: #ffffff;
+		padding: 5px;
+	}
+</style>

+ 448 - 0
pages/erpbusiness/exsendCommand.vue

@@ -0,0 +1,448 @@
+<template>
+	<view class="content">
+		<view class="body">
+			<!-- 	<view>
+				<textarea class="result" v-model="returnResult"></textarea>
+			</view>
+			<textarea class="input" @input="inputEvent" /> -->
+			<!-- <button type="primary" @tap="sendData">发送(票据可使用)</button> -->
+
+			<view style='margin-top:4%;display: flex;flex-direction: row;'>
+				<button type='primary' class="btn" @tap='receiptTest' :loading='isReceiptSend'
+					:disabled='isReceiptSend'>打印出库小票</button>
+				<!-- <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>标签测试</button> -->
+			</view>
+
+			<view style='margin-top:4%;display: flex;flex-direction: row;'>
+				<!-- hidden='true' -->
+				<canvas canvas-id='edit_area_canvas'
+					:style="{width:canvasWidth+'px',height:canvasHeight+'px'}"></canvas>
+			</view>
+
+			<!-- <picker style='margin:20px' mode='selector' :range='buffSize' :value='buffIndex' @change='buffBindChange'>
+				当前每次发送字节数为(点击可更换):{{buffSize[buffIndex]}}
+			</picker>
+		
+			<picker style='margin:20px' mode='selector' :range='printNum' :value='printNumIndex' @change='printNumBindChange'>
+				当前打印份数(点击可更换):{{printNum[printNumIndex]}}
+			</picker> -->
+
+		</view>
+	</view>
+</template>
+
+<script>
+	var tsc = require("../../util/ble/tsc.js");
+	var esc = require("../../util/ble/esc.js");
+	var encode = require("../../util/ble/encoding.js");
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				sendContent: "",
+				looptime: 0,
+				currentTime: 1,
+				lastData: 0,
+				oneTimeData: 0,
+				returnResult: "",
+				canvasWidth: 180,
+				canvasHeight: 180,
+				imageSrc: '../../static/img/abc_ic_star_black_16dp.png',
+				buffSize: [],
+				buffIndex: 0,
+				printNum: [],
+				printNumIndex: 0,
+				printerNum: 1,
+				currentPrint: 1,
+				isReceiptSend: false,
+				isLabelSend: false,
+				gridList: {}
+			};
+		},
+		computed: mapState(['sysinfo', 'Bluetooth']),
+		onLoad() {
+			let that = this;
+			let {
+				BLEInformation
+			} = that.Bluetooth;
+			uni.notifyBLECharacteristicValueChange({
+				deviceId: BLEInformation.deviceId,
+				serviceId: BLEInformation.notifyServiceId,
+				characteristicId: BLEInformation.notifyCharaterId,
+			 state: true,
+				success(res) {
+					uni.onBLECharacteristicValueChange(function(r) {
+						console.log(`characteristic ${r.characteristicId} has changed, now is ${r}`)
+					})
+				},
+			 fail: function(e) {
+					console.log(e)
+			 },
+				complete: function(e) {
+					console.log(e)
+				}
+			})
+		},
+		onReady() {
+			let list = []
+			let numList = []
+			let j = 0
+			for (let i = 20; i < 200; i += 10) {
+				list[j] = i;
+				j++
+			}
+			for (let i = 1; i < 10; i++) {
+				numList[i - 1] = i
+			}
+			this.buffSize = list;
+			this.oneTimeData = list[0];
+			this.printNum = numList;
+			this.printerNum = numList[0];
+		},
+		onShow() {
+			this.gridList = uni.getStorageSync("exWarehousing_print")
+			console.log(this.gridList)
+			let that = this;
+			let width;
+			let height;
+			uni.getImageInfo({
+				src: that.imageSrc,
+				success(res) {
+					console.log(res.width)
+					console.log(res.height)
+					width = res.width
+					height = res.height
+					that.canvasWidth = res.width;
+					that.canvasHeight = res.height;
+				}
+			})
+			const ctx = uni.createCanvasContext("edit_area_canvas", this);
+			// if (app.globalData.platform == "android") {
+			//   ctx.translate(width, height)
+			//   ctx.rotate(180 * Math.PI / 180)
+			// }
+			ctx.drawImage(this.imageSrc, 0, 0, width, height);
+			ctx.draw();
+		},
+		onUnload() {
+			let that = this;
+			let {
+				BLEInformation
+			} = that.Bluetooth;
+			// uni.closeBLEConnection({
+			//      deviceId: BLEInformation.deviceId,
+			//      success: function(res) {
+			//        console.log("关闭蓝牙成功")
+			//      },
+			//    })	
+		},
+		methods: {
+			//获取输入内容
+			inputEvent(e) {
+				this.sendContent = e.detail.value;
+			},
+			//输入框点击发送
+			sendData() {
+				let data = this.sendContent + "\n"
+				this.looptime = 0;
+				var content = new encode.TextEncoder(
+					'gb18030', {
+						NONSTANDARD_allowLegacyEncoding: true
+					}).encode(data);
+
+				this.prepareSend(content);
+			},
+			//打印票据数据
+			receiptTest() {
+				var that = this;
+				var canvasWidth = that.canvasWidth
+				var canvasHeight = that.canvasHeight
+				var command = esc.jpPrinter.createNew()
+				command.init()
+				// 标题
+				command.bold(1); //加粗
+				command.setFontSize(16); //字体大小
+				command.setSelectJustification(1) //居中
+				// command.rowSpace(10);
+				command.setText("出库检斤单");
+				command.setPrint();
+				command.rowSpace(60);
+				command.bold(0); //取消加粗
+				command.setFontSize(0); //正常字体
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("时间:" + that.gridList.updateDate);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("送货单位:" + that.gridList.seller);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("收货单位:" + that.gridList.buyer);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("货名:" + that.gridList.goodsName);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("质检员:" + that.gridList.backOffice);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("毛重(吨)" + that.gridList.grossWeight);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("皮重(吨)" + that.gridList.tare);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("净重(吨)" + that.gridList.netWeight);
+				command.setPrint();
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("运输方式:" + that.gridList.outType);
+				command.setPrint();
+				
+				if(that.gridList.outType=="集装箱船"||taht.gridList.outType=="汽运"){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("车牌号:" + that.gridList.carNo);
+					command.setPrint();
+				}else if(that.gridList.outType=="火运"){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("车号:" + that.gridList.carNo);
+					command.setPrint();
+				}else if(that.gridList.outType=="散船"){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("船名:" + that.gridList.shipName);
+					command.setPrint();
+				}
+				if (that.gridList.outType=="集装箱船"||that.gridList.outType=="汽运") {
+					//箱号
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("箱号-1:" + that.gridList.boxNo);
+					command.setPrint();
+					//箱号
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("箱号-2:" + that.gridList.boxNoOther);
+					command.setPrint();
+				}else if(that.gridList.outType=="火运"){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("车厢号-1:" + that.gridList.wingNumber);
+					command.setPrint();
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("车厢号-2:" + that.gridList.wingNumberOther);
+					command.setPrint();
+				}else if(that.gridList.outType=="散船"){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("船次:" + that.gridList.shipNumber);
+					command.setPrint();
+				}
+
+				//客户签名
+				command.rowSpace(100);
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("客户签名:");
+				command.setPrint();
+				command.rowSpace(100);
+				//收货单位签名或盖章
+				command.setSelectJustification(0); //居左
+				command.setLeftMargin(30)
+				command.setText("收货单位签名或盖章:");
+				command.setPrintAndFeed(150);
+				command.setPrintAndFeedRow(8);
+				that.isReceiptSend = true;
+				that.prepareSend(command.getData());
+			},
+
+			//准备发送,根据每次发送字节数来处理分包数量
+			prepareSend(buff) {
+				console.log(buff);
+				let that = this
+				let time = that.oneTimeData
+				let looptime = parseInt(buff.length / time);
+				let lastData = parseInt(buff.length % time);
+				console.log(looptime + "---" + lastData)
+				this.looptime = looptime + 1;
+				this.lastData = lastData;
+				this.currentTime = 1;
+				that.Send(buff)
+			},
+			//查询打印机状态
+			queryStatus() {
+				let command = esc.jpPrinter.Query();
+				command.getRealtimeStatusTransmission(1);
+			},
+			//分包发送
+			Send(buff) {
+				let that = this
+				let {
+					currentTime,
+					looptime: loopTime,
+					lastData,
+					oneTimeData: onTimeData,
+					printerNum: printNum,
+					currentPrint
+				} = that;
+				let buf;
+				let dataView;
+				if (currentTime < loopTime) {
+					buf = new ArrayBuffer(onTimeData)
+					dataView = new DataView(buf)
+					for (var i = 0; i < onTimeData; ++i) {
+						dataView.setUint8(i, buff[(currentTime - 1) * onTimeData + i])
+					}
+				} else {
+					buf = new ArrayBuffer(lastData)
+					dataView = new DataView(buf)
+					for (var i = 0; i < lastData; ++i) {
+						dataView.setUint8(i, buff[(currentTime - 1) * onTimeData + i])
+					}
+				}
+				console.log("第" + currentTime + "次发送数据大小为:" + buf.byteLength)
+				let {
+					BLEInformation
+				} = that.Bluetooth;
+
+				plus.bluetooth.writeBLECharacteristicValue({
+					deviceId: BLEInformation.deviceId,
+					serviceId: BLEInformation.writeServiceId,
+					characteristicId: BLEInformation.writeCharaterId,
+					value: buf,
+					success: function(res) {
+						console.log(res)
+					},
+					fail: function(e) {
+						console.log(e)
+					},
+					complete: function() {
+						currentTime++
+						if (currentTime <= loopTime) {
+							that.currentTime = currentTime;
+							that.Send(buff)
+						} else {
+							uni.showToast({
+								title: '已打印第' + currentPrint + '张',
+							})
+							if (currentPrint == printNum) {
+								that.looptime = 0;
+								that.lastData = 0;
+								that.currentTime = 1;
+								that.isReceiptSend = false;
+								that.isLabelSend = false;
+								that.currentPrint = 1;
+							} else {
+								currentPrint++;
+								that.currentPrint = currentPrint;
+								that.currentTime = 1;
+								that.Send(buff)
+							}
+						}
+					}
+				})
+			},
+			buffBindChange: function(res) { //更改打印字节数
+				let index = res.detail.value
+				let time = this.buffSize[index]
+				this.buffIndex = index;
+				this.oneTimeData = time;
+			},
+			printNumBindChange: function(res) { //更改打印份数
+				let index = res.detail.value
+				let num = this.printNum[index]
+				this.printNumIndex = index;
+				this.printerNum = num;
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.input {
+		text-align: top;
+		width: 90%;
+		height: 150px;
+		margin-left: 4%;
+		margin-right: 4%;
+		margin-top: 10px;
+		margin-bottom: 12px;
+		border: 1px solid slategray;
+	}
+
+	.receiver_info_scroll_view {
+		width: 90%;
+		height: 200px;
+		margin-left: 4%;
+		margin-right: 4%;
+		margin-top: 10px;
+		margin-bottom: 25px;
+		border: 1px solid black;
+	}
+
+	.result {
+		width: 90%;
+		height: 150px;
+		border: 1px solid black;
+		margin-left: 4%;
+		margin-bottom: 4%;
+		margin-top: 5%;
+	}
+
+	button {
+		width: 90%;
+		margin-left: 5%;
+		margin-right: 5%;
+	}
+
+	.switch {
+		float: right;
+		margin-right: 20px;
+		margin-bottom: 16px;
+	}
+
+	text {
+		color: #fff;
+		display: block;
+	}
+
+	input {
+		color: gainsboro;
+		float: left;
+	}
+
+	.v_net_ssid {
+		width: 100%;
+		background: #fff;
+	}
+
+	.v_net_passw {
+		width: 100%;
+		background: antiquewhite;
+	}
+
+	.swiper {
+		width: 100%;
+		height: 100%;
+	}
+	.btn{
+		margin-top: 50rpx;
+		background: #22C572;
+	}
+	uni-button[loading][type=primary] {
+	    color: hsla(0,0%,100%,.6);
+	    background-color: #22C572;
+	}
+</style>

+ 14 - 6
pages/erpbusiness/sm/sm.vue

@@ -101,19 +101,27 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onLoad(options) {
+			let _list = [];
+			if(options.data){
+				for (var p1 in options) {
+				          if (options.hasOwnProperty(p1)){
+							   _list.push(p1);
+						  }              
+				      }
+			}
 			//#ifdef APP-PLUS
 			this.user.title = options.data.split(',')[2]
 			this.user.companyId = options.data.split(',')[1]
-			this.compId = options.data.split(',')[1]
-			this.qualityNo = options.data.split(',')[2]
-			this.cangid = options.data.split(',')[3]
+			this.compId = options.data.split(",")[1]
+			this.qualityNo = _list[1]
+			this.cangid = _list[2]
 			//#endif
 		},
 		onShow() {
-			// this.qualityNo = "SGRK202112140060004"
-			// this.cangid = "374a8a02ecfe40dc9abdcd902dd564f5"
 			// this.compId = "2710b21efc1e4393930c5dc800010dc4"
-			console.log(this.qualityNo,this.cangid,this.compId)
+			// this.qualityNo = "SGRK202112040001"
+			// this.cangid = "1c9949fa0dc04c5e84f9bea9c809856c"
+			console.log("查看",this.qualityNo,this.compId,this.cangid)
 			if (this.cangid) { //判断是在哪扫码进入的
 				this.show = false
 				this.show1 = true

+ 10 - 13
pages/task/audit/tradeServices_audit.vue

@@ -74,7 +74,7 @@
 				<view v-for="(item,index) in count">
 					<view class="row">
 						<view class="left ">
-							<u-input v-model="item.modifyExpense" placeholder="输入费用名称,1-8个字" />
+							<u-input v-model="item.modifyExpense" placeholder="输入费用名称,1-8个字" maxlength="8"/>
 						</view>
 						<view class="right">
 							<u-input v-model="item.expenses" @input="calculation" input-align="right" placeholder="输入金额" type="digit" />
@@ -87,8 +87,9 @@
 					<view class="add">
 						<u-button @click="add" type="success" class="btnAdd" :disabled="addshow">添加费用</u-button>
 					</view>
-					<view class="count_item"><span>合计应还:</span><span class="number">¥{{tradeList.amountDue}}</span>
-					</view>
+					<view class=" flex count_item">
+						<span>合计应还:</span><span class="number">¥{{tradeList.amountDue}}</span>
+				    </view>
 				</view>
 			</view>
 		</u-form>
@@ -307,6 +308,7 @@
 					});
 				} else {//通过
 				   if(this.tradeList.approveStatus == "待银行审批"){
+					   this.tradeList.amountToRepaid = this.tradeList.amountDue//设置待还金额 = 应还金额
 					   this.$api.doRequest('post', '/tradeWarehouseReceiptAppl/api/editTradeWarehouseReceiptAppl', this.tradeList)
 					   .then(res => {
 						   if(res.data.code == 200){
@@ -334,8 +336,7 @@
 							   	}
 							   });
 						   }
-					   })
-					   
+					   })  
 				   }else{
 					   this.$api.doRequest('post', '/workflow/api/handle', {
 						taskId: this.tradeList.taskId,
@@ -360,14 +361,12 @@
 							})
 						}
 					});
-				   }
-					
+				   }	
 				}
 			},
 			auditInfo() {
 				uni.navigateTo({
-					url: '/pages/task/audit_info?id=' + this.tradeList.id + "&workflowId=" + this.tradeList
-						.workflowId
+					url: '/pages/task/audit_info?id=' + this.tradeList.id + "&workflowId=" + this.tradeList.workflowId
 				})
 			},
 			filterFileType(index, lists) {
@@ -556,13 +555,11 @@
 				margin: 0 16rpx;
 			}
 		}
-
 	}
 
 	.count {
 		width: 100%;
 		margin: 20rpx 0;
-
 		.add {
 			width: 162rpx;
 			height: 64rpx;
@@ -573,11 +570,11 @@
 			text-align: center;
 			font-size: 28rpx;
 		}
-
 		.count_item {
+			width: 70%;
+			justify-content: flex-end;
 			font-size: 30rpx;
 			line-height: 70rpx;
-
 			.number {
 				font-size: 32rpx;
 				font-weight: 600;

+ 6 - 45
pages/task/audit/tradeServices_audit_approval.vue

@@ -3,7 +3,6 @@
 		<u-form ref="uForm">
 			<view class="form_item">
 				<view class="title">申请信息</view>
-				<!-- <u-divider ></u-divider> -->
 				<u-form-item label-width='260' label="业务编号" :borderBottom="false">
 					<u-input v-model="tradeList.billNo" input-align="right" placeholder="暂无" disabled />
 				</u-form-item>
@@ -74,18 +73,16 @@
 				<view v-for="(item,index) in count">
 					<view class="row">
 						<view class="left ">
-							<u-input v-model="item.modifyExpense" placeholder="输入费用名称,1-8个字" />
+							<u-input v-model="item.modifyExpense" placeholder="输入费用名称,1-8个字" disabled/>
 						</view>
 						<view class="right">
 							<u-input v-model="item.expenses"  input-align="right" placeholder="暂无" type="digit" disabled/>
 							</u-input><span class="yuan">元</span>
-							
 						</view>
 					</view>
 				</view>
 				<view class="flex count">
-					
-					<view class="count_item"><span>合计应还:</span><span class="number">¥{{tradeList.amountDue}}</span>
+					<view class=" flex count_item"><span>合计应还:</span><span class="number">¥{{tradeList.amountDue}}</span>
 					</view>
 				</view>
 			</view>
@@ -102,25 +99,6 @@
 		<view style='padding:10px;' class='flex bottom-btn'>
 			<u-button @click='reject' type="error" class="btn1" hover-class='none'>返回</u-button>
 		</view>
-		<view v-if="show" class="shade">
-			<view class="wrap">
-				<view class="alert-top">
-					<view class="titleAudit">
-						{{title}}
-					</view>
-					<u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
-				</view>
-				<view class="u-textarea-style">
-					<view class="right-bottom">
-						{{auditMind.length}}/100个字
-					</view>
-					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
-						maxlength="100" />
-				</view>
-				<view @click='close()' class="cancel">取消</view>
-				<view @click='passSubmit()' class="confirm">确定</view>
-			</view>
-		</view>
 	</view>
 </template>
 
@@ -139,20 +117,12 @@
 				imgUrl: [],
 				tradeList: {},
 				isShowAlert: false,
-				show: false,
-				content: "",
-				title: "",
-				auditMind: "", //审核意见
 				count: [],
-				addshow: false
 			}
 		},
 		onLoad(options) {
 			this.id = options.id
 			this.getList()
-		},
-		onshow() {
-
 		},
 		methods: {
 			getList() {
@@ -397,7 +367,8 @@
 
 			.yuan {
 				line-height: 70rpx;
-				margin: 0 16rpx;
+				// margin: 0 16rpx;
+				margin-left: 16rpx;
 			}
 		}
 
@@ -406,19 +377,9 @@
 	.count {
 		width: 100%;
 		margin: 20rpx 0;
-
-		.add {
-			width: 162rpx;
-			height: 64rpx;
-			background: #22C572;
-			border-radius: 10rpx;
-			color: #FFFFFF;
-			line-height: 64rpx;
-			text-align: center;
-			font-size: 28rpx;
-		}
-
+		justify-content: flex-end;
 		.count_item {
+			// width: 70%;
 			font-size: 30rpx;
 			line-height: 70rpx;
 

+ 10 - 0
pages/task/audit_info.vue

@@ -12,6 +12,12 @@
 					{{item.auditMind}}
 				</view>
 			</view>
+			<view class="auditList_item" v-if="show">
+			<u-empty
+			        mode="data"
+			        icon="http://cdn.uviewui.com/uview/empty/car.png">
+			</u-empty>
+			</view>
 		</view>
 
 	</view>
@@ -24,6 +30,7 @@
 				workflowId: "",
 				id: "",
 				auditList: [],
+				show:false,
 			}
 		},
 		onLoad(options) {
@@ -40,6 +47,9 @@
 					workflowId: this.workflowId
 				}).then(res => {
 					this.auditList = res.data.data
+					if(this.auditList.length == 0 ){
+						this.show = true
+					}
 				}).catch(res => {
 					if (res.errmsg) {
 						uni.showToast({

+ 1 - 1
pages/user/depotAcquisition/grainDeliveryRecord.vue

@@ -109,7 +109,7 @@
 				}
 				this.$api.doRequest('get', '/grainDeliveryRegistration/selectGrainDeliveryRegistration', _obj)
 					.then(res => {
-						if (res.data.code == 200) {debugger
+						if (res.data.code == 200) {
 							let curPageData = []
 							for (let i = 0; i < res.data.data.length; i++) {
 								let _data = res.data.data[i];

+ 2 - 14
store/bluetooth/index.js

@@ -2,22 +2,10 @@ let sysinfo = uni.getSystemInfoSync();
 const Bluetooth = {
 	state: {
 		//蓝牙信息
-		BLEInformation: {
-			platform: sysinfo.platform || "",
-			deviceId: "",
-			writeCharaterId: "",
-			writeServiceId: "",
-			notifyCharaterId: "",
-			notifyServiceId: "",
-			readCharaterId: "",
-			readServiceId: "",
-		}
+		
 	},
 	mutations:{
-		BLEInformationSet(state, info){
-			console.log(info)
-			state.BLEInformation = info;
-		}
+		
 	}
 }
 

+ 16 - 5
store/index.js

@@ -1,8 +1,6 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 Vue.use(Vuex)
-//蓝牙设置
-import Bluetooth from '@/store/bluetooth/index.js'
 let lifeData = {};
 
 try {
@@ -41,6 +39,7 @@ const saveLifeData = function(key, value) {
 		uni.setStorageSync('lifeData', tmp);
 	}
 }
+let sysinfo = uni.getSystemInfoSync();
 
 
 const store = new Vuex.Store({
@@ -91,7 +90,18 @@ const store = new Vuex.Store({
 		clientId: lifeData.clientId?lifeData.clientId: "",
 		// 确定收货
 		isConfigfreightTransport:true,
-		choice:""
+		choice:"",
+		//蓝牙信息
+		BLEInformation: {
+			platform: sysinfo.platform || "",
+			deviceId: "",
+			writeCharaterId: "",
+			writeServiceId: "",
+			notifyCharaterId: "",
+			notifyServiceId: "",
+			readCharaterId: "",
+			readServiceId: "",
+		}
 	},
 	mutations: {
 		$uStore(state, payload) {
@@ -141,8 +151,9 @@ const store = new Vuex.Store({
 		state.enter = provider
 		console.log(state)
 		},
-		
-		
+		BLEInformationSet(state, info){
+			state.BLEInformation = info;
+		}
 	},
 	actions: {