yusheng 1 هفته پیش
والد
کامیت
7d901732ec
3فایلهای تغییر یافته به همراه54 افزوده شده و 40 حذف شده
  1. 2 2
      manifest.json
  2. 4 4
      pages/index/index.scss
  3. 48 34
      pages/pcs/components/workOrderReport.vue

+ 2 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.4.16",
+    "versionName" : "V1.0.4.17",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -12,7 +12,7 @@
                     // "target" : "http://192.168.1.110:18086/",
                     // "target" : "http://123.249.79.125/api/",
                     // "target" : "http://192.168.1.125:18086/",
-                    "target" : "http://192.168.1.251:18086/",
+                    "target" : "http://114.116.248.196:86/api/",
                     // "target" : "http://110.41.182.105/api/",
                     // "target": "http://116.63.185.248:80/api",
                     // "target" : "http://192.168.1.251:18186/",

+ 4 - 4
pages/index/index.scss

@@ -100,10 +100,10 @@ page {
 				color: $uni-text-color;
 				width: 90%;
 				text-align: center;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				line-height: 1.4;
+				// overflow: hidden;
+				// text-overflow: ellipsis;
+				// white-space: nowrap;
+				// line-height: 1.4;
 			}
 
 			.badge {

+ 48 - 34
pages/pcs/components/workOrderReport.vue

@@ -308,8 +308,8 @@
 		vehiclePhotoUrl: [],
 		purchaseOrderId: '',
 		purchaseOrderNo: '',
-		clientEnvironmentId: uni.getStorageSync("userInfo") &&
-			uni.getStorageSync("userInfo").clientEnvironmentId,
+		// clientEnvironmentId: uni.getStorageSync("userInfo") &&
+		// 	uni.getStorageSync("userInfo").clientEnvironmentId,
 	};
 	import {
 		getById,
@@ -468,7 +468,8 @@
 				this.form.purchaseOrderNo = data.orderNo;
 			},
 			getCode() {
-				if (this.clientEnvironmentId == 10) {
+				let userInfo = uni.getStorageSync("userInfo")
+				if (userInfo.clientEnvironmentId == 10) {
 					return this.pageName == 'QualityInspection' ?
 						'06mei' :
 						this.pageName == 'TransportAsh' ?
@@ -484,17 +485,18 @@
 			async getOrderDetials(id) {
 				try {
 					const data = await getById(id);
-					let userInfo=uni.getStorageSync("userInfo")
+
+					let userInfo = uni.getStorageSync("userInfo")
 
 					if (data.type == 1) {
 						//班组报工默认单前登录人
 						data.executeUsers = [{
-							groupId:userInfo.groupId,
+							groupId: userInfo.groupId,
 							groupName: userInfo.groupName,
 							teamId: null,
 							teamName: '',
 							userId: userInfo.userId,
-							userName:userInfo.name
+							userName: userInfo.name
 						}];
 					}
 
@@ -585,11 +587,11 @@
 							}
 						});
 					}
+					console.log(userInfo, 'this.clientEnvironmentId')
 					//宇信
 					if (
-						this.clientEnvironmentId == 10 && ['productionRecords',
-							'qualityTestRecords'
-						].includes(this.pageName)
+						userInfo.clientEnvironmentId == 10 && ['productionRecords', 'qualityTestRecords'].includes(this
+							.pageName)
 					) {
 						//客户:5#和6#默认是重油公司7#默认是红山 2008389016775864321==7#
 						if (this.form.productLineId == '2008389016775864321') {
@@ -634,12 +636,12 @@
 
 						_this.uploadFile(res.tempFilePaths).then(res => {
 							res.forEach(item => {
-								let fileNames = item.storePath.split('/')
-								let url =
-									'/main/file/getFile?objectName=' + item.storePath +
-									'&fullfilename=' + fileNames[fileNames.length -
-										1]
-								_this.form.vehiclePhotoUrl.push(url)
+								// let fileNames = item.storePath.split('/')
+								// let url =
+								// 	'/main/file/getFile?objectName=' + item.storePath +
+								// 	'&fullfilename=' + fileNames[fileNames.length -
+								// 		1]
+								_this.form.vehiclePhotoUrl.push(item.storePath)
 							})
 
 							uni.hideLoading()
@@ -650,10 +652,12 @@
 				});
 			},
 			getUrl(arr) {
-				console.log(arr, 'arr')
+				// console.log(arr, 'arr')
 				if (arr.length) {
 					return arr.map(item => {
-						return this.apiUrl + item
+						let fileNames = item.split('/')
+						return this.apiUrl + '/main/file/getFile?objectName=' + item + '&fullfilename=' +
+							fileNames[fileNames.length - 1]
 					})
 				} else {
 					return []
@@ -875,23 +879,33 @@
 					});
 					return;
 				}
-				// if (this.pageName == 'steamInjectionInspectionRecord' && !this.form.contactName) {
-				// 	this.$refs.uToast.show({
-				// 		type: "error",
-				// 		icon: false,
-				// 		message: `请选择甲方检查人!`,
-				// 	});
-				// 	return;
-				// }
-				// if (this.pageName == 'solidWasteRecord' && !this.form.supplierName) {
-				// 	this.$refs.uToast.show({
-				// 		type: "error",
-				// 		icon: false,
-				// 		message: `请选择处理方!`,
-				// 	});
-				// 	return;
-				// }
-
+				if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
+					.supplierName) {
+					this.$refs.uToast.show({
+						type: "error",
+						icon: false,
+						message: `请选择供应商!`,
+					});
+					return;
+				}
+				if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
+					.purchaseOrderNo) {
+					this.$refs.uToast.show({
+						type: "error",
+						icon: false,
+						message: `请选择采购订单!`,
+					});
+					return;
+				}
+				if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
+					.vehiclePhotoUrl.length) {
+					this.$refs.uToast.show({
+						type: "error",
+						icon: false,
+						message: `请选择照片!`,
+					});
+					return;
+				}
 
 				// 验证报工时间必须大于等于检查时间
 				const startTime = new Date(this.form.checkStartTime).getTime();