Преглед на файлове

上传预览、调拨记录状态

unknown преди 1 месец
родител
ревизия
ec9bba9783

+ 7 - 5
components/x-form.vue

@@ -29,7 +29,8 @@
 				<u-form-item :required="item.required ? true : false" :label="item.label" :prop="item.field"
 					v-else-if="item.type == 'upload' && !item.visible">
 					<view class="card_form_item">
-						<u-upload :fileList="fileList1" name="1" multiple :maxCount="10" @afterRead="afterRead($event, item.field)"
+						<u-upload :fileList="fileList1" name="1" multiple :maxCount="10"
+							@afterRead="afterRead($event, item.field)"
 							@delete="deletePic($event, item.field)"></u-upload>
 					</view>
 				</u-form-item>
@@ -143,7 +144,7 @@
 				})
 			},
 			// 新增图片
-			async afterRead(event,type) {
+			async afterRead(event, type) {
 				// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
 				let lists = [].concat(event.file)
 				let fileListLen = this[`fileList${event.name}`].length
@@ -160,20 +161,21 @@
 					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
 						status: 'success',
 						message: '',
-						url: result
+						url: this.$baseUrl + result
 					}))
 					fileListLen++
 				}
 				var arr = []
 				this.fileList1.forEach(item1 => {
-					arr.push(item1.url)
+					let img = item1.url.split(this.$baseUrl)
+					arr.push(img[1])
 				})
 				this.model.addressImg = arr.join()
 				this.model[type] = this.model.addressImg
 				this.$refs.uForm.validateField('addressImg')
 			},
 			// 删除图片
-			deletePic(event,type) {
+			deletePic(event, type) {
 				this[`fileList${event.name}`].splice(event.index, 1)
 				var arr = []
 				this.fileList1.forEach(item1 => {

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "气瓶安全追溯",
     "appid" : "__UNI__10C0A5F",
     "description" : "",
-    "versionName" : "1.0.10",
+    "versionName" : "1.0.14",
     "versionCode" : 110,
     "transformPx" : false,
     /* 5+App特有相关 */

+ 18 - 20
pages/home/index.vue

@@ -3,32 +3,31 @@
 	<view class="card_index_bgc">
 		<view class="card_gas_cylinder">气瓶安全追溯管理系统</view>
 		<view class="card_port center_in">{{genreTitle}}</view>
-		<view class="card_cylinder">
+		<!-- <view class="card_cylinder">
 			<view class="card_bottle" v-for="(item,index) in dataList" :key="index" @click="scanCodes(item)">
 				<view class="card_fiche" :style="{backgroundColor:item.color}">
 					<span class="iconfont icon_image" :class="item.icon"></span>
 				</view>
 				<view class="title_hint">{{item.title}}</view>
 			</view>
-			<!-- <view class="card_bottle" @click="scanning">
+			<view class="card_bottle" @click="scanning">
 				<view class="card_fiche" :style="{backgroundColor:'#67C23A'}">
 					<span class="iconfont icon_image icon-saomachaxun"></span>
 					<view class="title_hint">扫码查询气瓶流转信息</view>
 				</view>
-			</view> -->
+			</view>
 			<view style="width: 25%;"></view>
 			<view style="width: 25%;"></view>
 			<view style="width: 25%;"></view>
-		</view>
+		</view> -->
 		<view class="card_cylinder border_top">
 			<view class="card_bottle" v-for="(item,index) in addList" :key="index" @click="scanCodes(item)">
 				<view class="card_fiche" :style="{backgroundColor:item.color}">
 					<span class="iconfont icon_image" :class="item.icon"></span>
+					<view class="title_hint">{{item.title}}</view>
 				</view>
-				<view class="title_hint">{{item.title}}</view>
 			</view>
-			<view style="width: 25%;"></view>
-			<view style="width: 25%;"></view>
+			<view style="width: 50%;"></view>
 		</view>
 	</view>
 </template>
@@ -56,12 +55,12 @@
 					id: 'step',
 					title: '流转信息',
 					icon: 'icon-saomachaxun',
-					color: '#195eea',
+					color: '#4792ef',
 				}, {
 					id: 'allot',
 					title: '钢瓶调拨',
 					icon: 'icon-moveais',
-					color: '#19baea',
+					color: '#01d0ff',
 				}, {
 					id: 'record',
 					title: '调拨记录',
@@ -141,7 +140,7 @@
 						qr_id: qrid,
 					},
 					success: (res) => {
-						console.log(res,134)
+						console.log(res, 134)
 						if (res.data.code == 0) {
 							var arr = res.data.data
 							// this.frequencyCoding = arr.inner_code
@@ -185,20 +184,20 @@
 		display: flex;
 		flex-direction: row;
 		flex-wrap: wrap;
-		justify-content: space-between;
+		justify-content: space-evenly;
 		margin: 30rpx;
 		background-color: #fff;
 		border-radius: 20rpx;
 		padding: 20rpx 0rpx;
-		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+		// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 	}
 
 	.card_bottle {
-		width: 25%;
-		margin: 10rpx 0rpx;
+		width: 45%;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
+		margin-bottom: 20rpx;
 	}
 
 	.card_fiche {
@@ -206,21 +205,20 @@
 		align-items: center;
 		flex-direction: column;
 		justify-content: center;
-		width: 120rpx;
-		height: 120rpx;
+		width: 100%;
+		padding: 25rpx 0rpx;
 		background-color: #027DB4;
-		border-radius: 26rpx;
+		border-radius: 16rpx;
 	}
 
 	.icon_image {
 		color: #fff;
-		font-size: 70rpx;
+		font-size: 80rpx;
 	}
 
 	.title_hint {
-		// height: 78rpx;
 		margin-top: 10rpx;
-		color: #606266;
+		color: #fff;
 		width: 70%;
 		text-align: center;
 		font-size: 26rpx;

+ 21 - 4
pages/information/cylinder.vue

@@ -107,9 +107,27 @@
 			},
 			// 输入钢瓶编号添加
 			addCode() {
-				this.codeList.push(this.frequencyCoding)
-				this.codeList = Array.from(new Set(this.codeList));
-				this.frequencyCoding = ''
+				function hasChinese(text) {
+					var pattern = /[\u4E00-\u9FA5]/; // Unicode编码范围包含中文字符
+					return pattern.test(text);
+				}
+				if (!this.frequencyCoding) {
+					return uni.$u.toast('请先输入单位内编号')
+				} else {
+					if (!hasChinese(this.frequencyCoding)) {
+						this.$api.get('/api/gas-cylinder/' + this.frequencyCoding).then(res => {
+							if (res.code == 200) {
+								this.codeList.push(this.frequencyCoding)
+								this.codeList = Array.from(new Set(this.codeList));
+								this.frequencyCoding = ''
+							} else {
+								uni.$u.toast(res.data.msg)
+							}
+						})
+					} else {
+						uni.$u.toast('请输入正确单位内编号')
+					}
+				}
 			},
 			// 添加一条
 			addLine() {
@@ -128,7 +146,6 @@
 					scanType: ['qrCode'],
 					autoZoom: false,
 					success: (res) => {
-						console.log(res, '--------');
 						if (res.result) {
 							let url = res.result;
 							const arrf = url.split('=')

+ 8 - 4
pages/information/transfer.vue

@@ -62,11 +62,14 @@
 				<u-checkbox-group v-model="checkedList" @change="checkboxChange">
 					<view style="width: 100%;display: flex;flex-direction: column;">
 						<view class="card_dinay frame" v-for="(item,index) in list" :key="index">
-							<u-checkbox :name="item.inner_code" :checked="item.checked"></u-checkbox>
-							<view style="display: flex;align-items: center;margin-left: 20rpx;">
-								<view class="item_current">{{index + 1}}</view>
-								<view class="item_title1">{{item.inner_code}}</view>
+							<view style="display: flex;align-items: center;">
+								<u-checkbox :name="item.inner_code" :checked="item.checked" :disabled="item.isAllot"></u-checkbox>
+								<view style="display: flex;align-items: center;margin-left: 20rpx;">
+									<view class="item_current">{{index + 1}}</view>
+									<view class="item_title1">{{item.inner_code}}</view>
+								</view>
 							</view>
+							<view class="blue_title" v-if="item.isAllot">调拨中</view>
 						</view>
 					</view>
 				</u-checkbox-group>
@@ -731,6 +734,7 @@
 	.card_dinay {
 		display: flex;
 		align-items: center;
+		justify-content: space-between;
 		width: calc(100% - 40rpx);
 		// border-bottom: 1rpx solid #d7d7d7;
 		padding: 30rpx 20rpx;

+ 62 - 10
pages/information/transferDetails.vue

@@ -31,18 +31,25 @@
 				<view class="title_code_a">钢瓶编号</view>
 				<view class="num_code">总数: {{userList.innerCodeList.length}}</view>
 			</view>
-			<view style="display: flex;flex-direction: column;">
-				<view class="item_card_tran frame" v-for="(item,index) in userList.innerCodeList">
-					<view style="width: 60rpx;margin-right: 10rpx;text-align: center;">{{index + 1}}</view>
-					<span style="font-weight: 600;">{{item}}</span>
+			<u-checkbox-group v-model="checkedList" @change="checkboxChange">
+				<view style="display: flex;flex-direction: column;width: 100%;">
+					<view class="item_card_tran frame" v-for="(item,index) in innerCodeData">
+						<view style="display: flex;align-items: center;">
+							<u-checkbox :name="item.inner_code" :checked="item.checked"
+								v-if="type == 1 && userList.status == 1"></u-checkbox>
+							<view style="width: 60rpx;margin-right: 10rpx;text-align: center;">{{index + 1}}</view>
+							<span style="font-weight: 600;">{{item.inner_code}}</span>
+						</view>
+						<view style="display: flex;align-items: center;" v-if="userList.status != 1">
+							<span class="blue_title" v-if="item.flag">已接收</span>
+							<span class="red_title" v-else>未接收</span>
+						</view>
+					</view>
 				</view>
-			</view>
+			</u-checkbox-group>
 		</view>
 		<view style="width: 100%;height: 120rpx;"></view>
-		<view class="btn_transfer_details" v-if="type == 1">
-			<view style="flex: 1;">
-				<u-button style="width: 90%;" type="error" @click="cancelAllocation">取消</u-button>
-			</view>
+		<view class="btn_transfer_details" v-if="type == 1 && userList.status == 1">
 			<view style="flex: 1;">
 				<u-button style="width: 90%;" type="primary" @click="submit">确定</u-button>
 			</view>
@@ -60,6 +67,8 @@
 				userList: {},
 				type: null,
 				transferTitle: '',
+				checkedList: [],
+				innerCodeData: [],
 			}
 		},
 		onLoad(value) {
@@ -74,6 +83,25 @@
 				} else {
 					this.transferTitle = '调拨详情'
 				}
+				this.checkedList = userArr.innerCodeList
+				this.innerCodeData = []
+				userArr.innerCodeList.forEach(item => {
+					let arr = {
+						inner_code: '',
+						checked: true,
+					}
+					arr.inner_code = item
+					if (userArr.acceptInnerCodeList == null) {
+						userArr.acceptInnerCodeList = []
+					}
+					if (userArr.acceptInnerCodeList.indexOf(item) > -1) {
+						arr.flag = true;
+					} else {
+						arr.flag = false;
+					}
+					this.innerCodeData.push(arr)
+				})
+				console.log(this.innerCodeData, userArr, 6767)
 				this.userList = userArr
 			}
 		},
@@ -99,7 +127,7 @@
 					acceptUserId: this.userList.acceptUserId,
 					allotCompanyId: this.userList.allotCompanyId,
 					acceptCompanyId: this.userList.acceptCompanyId,
-					innerCodeList: this.userList.innerCodeList,
+					innerCodeList: this.checkedList,
 				}).then(res => {
 					if (res.code == 200) {
 						uni.navigateBack({
@@ -109,6 +137,18 @@
 						uni.$u.toast(res.data.msg)
 					}
 				})
+			},
+			// 选择钢瓶
+			checkboxChange(value) {
+				for (let i = 0; i < this.innerCodeData.length; i++) {
+					let flag = value.includes(this.innerCodeData[i].inner_code);
+					if (flag) {
+						this.innerCodeData[i].checked = true
+					} else {
+						this.innerCodeData[i].checked = false
+					}
+				}
+				this.checkedList = this.checkedList.concat(value);
 			}
 		}
 	}
@@ -153,6 +193,7 @@
 	.item_card_tran {
 		display: flex;
 		align-items: center;
+		justify-content: space-between;
 		padding: 30rpx 30rpx 30rpx 0rpx;
 	}
 
@@ -175,5 +216,16 @@
 		display: flex;
 		align-items: center;
 		padding: 20rpx 0rpx;
+		border-top: 1rpx solid #f4f4f5;
+	}
+
+	.blue_title {
+		color: #53c21d;
+		font-size: 28rpx;
+	}
+
+	.red_title {
+		color: red;
+		font-size: 28rpx;
 	}
 </style>

+ 48 - 1
pages/information/transferRecord.vue

@@ -33,6 +33,12 @@
 					<span>单位内编号:</span>
 					<span class="examine_title" @click.stop="clickToView(item)">点击查看</span>
 				</view>
+				<view style="margin-top: 20rpx;" @click.stop="cancelAllocation(item)" v-if="item.status == 1">
+					<u-button type="warning" size="normal" text="取消调拨"></u-button>
+				</view>
+				<view style="margin-top: 20rpx;" @click.stop="delAllocation(item)" v-if="item.status == 3">
+					<u-button type="error" text="删除"></u-button>
+				</view>
 			</view>
 		</view>
 		<view style="margin-top: 40%;" v-else>
@@ -52,6 +58,7 @@
 				</view>
 			</view>
 		</u-popup>
+		<u-modal :show="hintShow" :content='hintTitle' showCancelButton @confirm="confirmAllocation" @cancel="hintShow = false"></u-modal>
 	</view>
 </template>
 
@@ -92,6 +99,9 @@
 				loadingMore: true,
 				innerCodeShow: false,
 				innerCodeData: [],
+				hintShow: false,
+				allotId: null,
+				hintTitle: '此操作将永久删除该调拨记录, 是否继续?',
 			}
 		},
 		onReachBottom() {
@@ -163,16 +173,49 @@
 			},
 			// 我调拨的/我接收的
 			standardClick(event) {
+				console.log(event, 25)
 				this.belowStandard = event.index
 				if (event.index == 0) {
+					this.bottleList[1].name = '调拨中'
 					this.myType = 'allot'
 				} else {
+					this.bottleList[1].name = '接收'
 					this.myType = 'accept'
 				}
 				this.Pagination.PageIndex = 1
 				this.list = []
 				this.getList()
 			},
+			// 取消调拨
+			cancelAllocation(event) {
+				this.$api.post('/api/gas-cylinder-allot/cancel', {
+					id: event.id,
+				}).then(res => {
+					if (res.code == 200) {
+						this.list = []
+						uni.$u.toast(res.msg)
+						this.getList()
+					}
+				})
+			},
+			// 删除
+			delAllocation(event) {
+				this.hintShow = true
+				this.allotId = event.id
+			},
+			// 确定删除
+			confirmAllocation() {
+				this.$api.delete('/api/gas-cylinder-allot', {
+					id: this.allotId,
+				}).then(res => {
+					if (res.code == 200) {
+						this.list = []
+						uni.$u.toast(res.msg)
+						this.getList()
+					}
+					this.hintShow = false
+				})
+			},
 			// 详情
 			recordParticulars(value) {
 				uni.setStorageSync('transferData', JSON.stringify(value));
@@ -194,7 +237,7 @@
 			getFlowStep(value) {
 				let array = flowStep()
 				const filteredArray = array.filter(item => item.value === value)
-				if(filteredArray.length > 0){
+				if (filteredArray.length > 0) {
 					return filteredArray[0].label
 				}
 			},
@@ -210,6 +253,10 @@
 		background-color: #f4f4f5;
 	}
 
+	.u-button--normal {
+		height: 70rpx !important;
+	}
+
 	.tabs_card_bg {
 		background-color: #fff;
 	}

+ 13 - 1
pages/mine/personal.vue

@@ -210,7 +210,7 @@
 							arrImg.forEach(item => {
 								let arr = {
 									thumb: this.$baseUrl + item,
-									url: item,
+									url: this.$baseUrl + item,
 								}
 								arrImg1.push(arr)
 							})
@@ -265,6 +265,18 @@
 				}).catch(() => {
 					uni.hideLoading();
 				})
+			},
+			eliminateImge(img) {
+				let arr = img.split(',')
+				console.log(img,arr,1)
+				let imgArr = []
+				arr.forEach(item => {
+					let img = item.split(this.$baseUrl)
+					imgArr.push(img[1])
+				})
+				let imgList = imgArr.join()
+				console.log(imgList,26)
+				return imgList
 			}
 		}
 	}

+ 6 - 3
pages/order/securityCheck.vue

@@ -239,21 +239,24 @@
 					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
 						status: 'success',
 						message: '',
-						url: result
+						url: this.$baseUrl + result
 					}))
 					fileListLen++
 				}
+				uni.hideLoading();
 				if (event.name == '1') {
 					var arr = []
 					this.fileList1.forEach(item1 => {
-						arr.push(item1.url)
+						let img = item1.url.split(this.$baseUrl)
+						arr.push(img[1])
 					})
 					this.ruleForm.homeCheckImg = arr.join()
 					this.$refs.uForm.validateField('homeCheckImg')
 				} else {
 					var arr1 = []
 					this.fileList2.forEach(item2 => {
-						arr.push(item2.url)
+						let img1 = item2.url.split(this.$baseUrl)
+						arr1.push(img1[1])
 					})
 					this.ruleForm.beforeRectifyImg = arr1.join()
 					this.$refs.uForm.validateField('beforeRectifyImg')

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
unpackage/dist/dev/app-plus/app-config-service.js


Файловите разлики са ограничени, защото са твърде много
+ 9 - 9
unpackage/dist/dev/app-plus/app-service.js


Файловите разлики са ограничени, защото са твърде много
+ 41 - 43
unpackage/dist/dev/app-plus/app-view.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/app-plus/view.umd.min.js


Някои файлове не бяха показани, защото твърде много файлове са промени