wangchao %!s(int64=3) %!d(string=hai) anos
pai
achega
832bbf7868
Modificáronse 2 ficheiros con 33 adicións e 10 borrados
  1. 13 7
      pages/erpbusiness/add_quality_testing.vue
  2. 20 3
      pages/erpbusiness/sendCommand.vue

+ 13 - 7
pages/erpbusiness/add_quality_testing.vue

@@ -95,7 +95,7 @@
 				<view class="con-list">
 				<view class="con-list">
 					<view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
 					<view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
 					<u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName"
 					<u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName"
-						v-model="show5" mode="selector">
+						v-model="show6" mode="selector">
 					</u-picker>
 					</u-picker>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -333,9 +333,9 @@
 			<!-- <view @click='confirmInfo' class="button">确认初检信息</view> -->
 			<!-- <view @click='confirmInfo' class="button">确认初检信息</view> -->
 			<view @click='submit' class="button">提交</view>
 			<view @click='submit' class="button">提交</view>
 		</view>
 		</view>
-		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+<!-- 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
-			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal> -->
 		<u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
 		<u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
 			<view class="buns_item">
 			<view class="buns_item">
 				<view class="but_css" @click="print">打印小票</view>
 				<view class="but_css" @click="print">打印小票</view>
@@ -384,16 +384,18 @@
 				modalName: '',
 				modalName: '',
 				pricetext: '锁定',
 				pricetext: '锁定',
 				pricedisabled: false,
 				pricedisabled: false,
-				show8: false,
 				mycarStyle: '',
 				mycarStyle: '',
 				feild: undefined,
 				feild: undefined,
 				id: 0,
 				id: 0,
 				outType: '他运',
 				outType: '他运',
 				show: false,
 				show: false,
+				show3: false,
+				show2: false,
 				show4: false,
 				show4: false,
 				show5: false,
 				show5: false,
 				show6: false,
 				show6: false,
 				show7: false,
 				show7: false,
+				show8: false,
 				edit: true,
 				edit: true,
 				goodsdisabled: false,
 				goodsdisabled: false,
 				freighttext: '手动填写',
 				freighttext: '手动填写',
@@ -419,8 +421,7 @@
 				freightstatus: false,
 				freightstatus: false,
 				coststatus: false,
 				coststatus: false,
 				pageSize: 10,
 				pageSize: 10,
-				show3: false,
-				show2: false,
+				
 				goodsList: [],
 				goodsList: [],
 				currentPage: 1,
 				currentPage: 1,
 				value: false,
 				value: false,
@@ -580,6 +581,7 @@
 				}
 				}
 			}
 			}
 		},
 		},
+		
 		onLoad(options) {
 		onLoad(options) {
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.warehouseCount = Number(options.warehouseCount) + 1
 			this.warehouseCount = Number(options.warehouseCount) + 1
@@ -893,6 +895,7 @@
 
 
 				}
 				}
 				console.log(this.gridList)
 				console.log(this.gridList)
+				this.show4 =false
 			},
 			},
 			print() {
 			print() {
 				uni.navigateTo({
 				uni.navigateTo({
@@ -1152,7 +1155,7 @@
 																		'/qualityInspectionManagement/api/addQualityInspection',
 																		'/qualityInspectionManagement/api/addQualityInspection',
 																		that.gridList)
 																		that.gridList)
 																	.then(res => {
 																	.then(res => {
-																		if (res.data.code == 200) {
+																		if (res.data.code == 200) {debugger
 																			that.$api.msg('提交成功')
 																			that.$api.msg('提交成功')
 																			that.isShowPrint = true
 																			that.isShowPrint = true
 																			that.gridList
 																			that.gridList
@@ -1165,6 +1168,9 @@
 																			uni.setStorageSync(
 																			uni.setStorageSync(
 																				"quality_print",
 																				"quality_print",
 																				that.gridList)
 																				that.gridList)
+																				uni.setStorageSync(
+																					"quality_print_id",
+																					res.data.data)
 																			console.log(
 																			console.log(
 																				'that.gridList',
 																				'that.gridList',
 																				that.gridList)
 																				that.gridList)

+ 20 - 3
pages/erpbusiness/sendCommand.vue

@@ -64,6 +64,19 @@
 		},
 		},
 		computed: mapState(['sysinfo', 'Bluetooth']),
 		computed: mapState(['sysinfo', 'Bluetooth']),
 		onLoad() {
 		onLoad() {
+			uni.showLoading({
+				title: '加载中',
+				mask:true
+			})
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
+				id: uni.getStorageSync('quality_print_id')
+			}).then(res => {
+				uni.hideLoading()
+				if (res.data.data) {
+					let data = res.data.data
+					this.gridList.qualityNo = data.qualityNo
+				}
+			})
 			let that = this;
 			let that = this;
 			let {
 			let {
 				BLEInformation
 				BLEInformation
@@ -105,7 +118,7 @@
 		onShow() {
 		onShow() {
 			this.gridList = uni.getStorageSync("quality_print")
 			this.gridList = uni.getStorageSync("quality_print")
 			this.utils.nullToString(this.gridList)
 			this.utils.nullToString(this.gridList)
-			if(!this.gridList.compId){
+			if (!this.gridList.compId) {
 				this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
 				this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
 			}
 			}
 			console.log(this.gridList)
 			console.log(this.gridList)
@@ -144,7 +157,7 @@
 			//    })	
 			//    })	
 		},
 		},
 		methods: {
 		methods: {
-			goToList(){
+			goToList() {
 				uni.navigateTo({
 				uni.navigateTo({
 					url: '/pages/erpbusiness/quality_testing?managementType=1'
 					url: '/pages/erpbusiness/quality_testing?managementType=1'
 				})
 				})
@@ -166,6 +179,7 @@
 			},
 			},
 			//打印票据数据
 			//打印票据数据
 			receiptTest() {
 			receiptTest() {
+				console.log(this.gridList)
 				var that = this;
 				var that = this;
 				var canvasWidth = that.canvasWidth
 				var canvasWidth = that.canvasWidth
 				var canvasHeight = that.canvasHeight
 				var canvasHeight = that.canvasHeight
@@ -177,11 +191,13 @@
 				command.setSelectJustification(1) //居中
 				command.setSelectJustification(1) //居中
 				command.rowSpace(200);
 				command.rowSpace(200);
 				// command.rowSpace(10);
 				// command.rowSpace(10);
+
 				command.setText(that.gridList.qualityNo.substring(that.gridList.qualityNo.length - 3));
 				command.setText(that.gridList.qualityNo.substring(that.gridList.qualityNo.length - 3));
 				command.setPrint();
 				command.setPrint();
 				command.rowSpace(60);
 				command.rowSpace(60);
 				command.bold(0); //取消加粗
 				command.bold(0); //取消加粗
 				command.setFontSize(0); //正常字体
 				command.setFontSize(0); //正常字体
+
 				// 标题
 				// 标题
 				command.bold(1); //加粗
 				command.bold(1); //加粗
 				command.setFontSize(16); //字体大小
 				command.setFontSize(16); //字体大小
@@ -196,7 +212,8 @@
 				command.rowSpace(60);
 				command.rowSpace(60);
 				command.setSelectSizeOfModuleForQRCode(5);
 				command.setSelectSizeOfModuleForQRCode(5);
 				command.setSelectErrorCorrectionLevelForQRCode(7)
 				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.setPrintQRCode();
 				//客户姓名
 				//客户姓名
 				command.setSelectJustification(0); //居左
 				command.setSelectJustification(0); //居左