dedsudiyu пре 22 часа
родитељ
комит
3ce262b812

+ 8 - 0
pages_hazardousWasteRecycling/api/index.js

@@ -120,4 +120,12 @@ export const hwmsAppRegisterApprovalApply = (data) => {
 		method: 'POST',
 		data: { ...data }
 	})
+};
+//查询-回收报备/登记权限
+export const hwmsAppRegisterApprovalMenuShow = (data) => {
+	return apiResquest({
+		url: `/hwms/app/registerApproval/menuShow`,
+		method: 'POST',
+		data: { ...data }
+	})
 };

+ 4 - 0
pages_hazardousWasteRecycling/views/historicalRecords/index.vue

@@ -233,6 +233,10 @@
 				.for-text-p{
 					font-size:30rpx;
 					line-height:50rpx;
+					display:block;
+					overflow:hidden;
+					text-overflow:ellipsis;
+					white-space:nowrap;
 				}
 				.for-type-p{
 					position: absolute;

+ 4 - 0
pages_hazardousWasteRecycling/views/historicalRecords/infoPage.vue

@@ -104,6 +104,10 @@
 			font-size:32rpx;
 			padding:0 50rpx;
 			color:#333;
+			display:block;
+			overflow:hidden;
+			text-overflow:ellipsis;
+			white-space:nowrap;
 		}
 		.positon-p{
 			position: absolute;

+ 26 - 6
pages_hazardousWasteRecycling/views/home/home.vue

@@ -1,13 +1,13 @@
 <template>
 	<view id="hazardousWasteRecyclingHome">
-		<view class="max-big-button-box" @click="goPage(1)">
+		<view class="max-big-button-box" v-if="buttonTypeA" @click="goPage(1)">
 			<img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_hsbb.png')">
 			<view class="right-box">
 				<view>回收报备</view>
 				<view>可在回收日前填写报备单</view>
 			</view>
 		</view>
-		<view class="max-big-button-box" @click="goPage(2)">
+		<view class="max-big-button-box" v-if="buttonTypeB" @click="goPage(2)">
 			<img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_czdj.png')">
 			<view class="right-box">
 				<view>登记称重</view>
@@ -33,24 +33,44 @@
 
 <script>
 	import {
-		demo1,
-		demo2
+		hwmsAppRegisterApprovalMenuShow,
 	} from '@/pages_hazardousWasteRecycling/api/index.js'
 	export default {
 		data() {
 			return {
-				
+				buttonTypeA:false,
+				buttonTypeB:false,
 			}
 		},
 		onLoad(option) {
 		},
 		onShow() {
-
+			this.hwmsAppRegisterApprovalMenuShow();
 		},
 		mounted() {
 			
 		},
 		methods: {
+			async hwmsAppRegisterApprovalMenuShow(){
+				const {
+					data
+				} = await hwmsAppRegisterApprovalMenuShow()
+				if (data.code == 200) {
+					if(data.data == 1){
+						this.$set(this,'buttonTypeA',true);
+						this.$set(this,'buttonTypeB',true);
+					}else if(data.data == 2){
+						this.$set(this,'buttonTypeA',true);
+						this.$set(this,'buttonTypeB',false);
+					}else if(data.data == 3){
+						this.$set(this,'buttonTypeA',false);
+						this.$set(this,'buttonTypeB',true);
+					}else if(data.data == 4){
+						this.$set(this,'buttonTypeA',false);
+						this.$set(this,'buttonTypeB',false);
+					}
+				}
+			},
 			goPage(type){
 				if(type == 1){
 					uni.navigateTo({

+ 1 - 1
pages_hazardousWasteRecycling/views/permissionApply/listPage.vue

@@ -63,7 +63,7 @@
 				queryParams: {
 					page: 1,
 					pageSize: 10,
-					status:1,
+					status:"",
 				},
 				typeIndex:0,
 				total: 0,

+ 35 - 13
pages_hazardousWasteRecycling/views/weighingRegistration/addPage.vue

@@ -44,13 +44,18 @@
 						@click="reductionItemButton(index)"
 						:src="imagesUrl('commonality/icon_zgsq_jian.png')">
 					</view>
-					<view class="sub-picker-box">
+					<view class="sub-picker-box" v-if="item.forData1&&item.forData4">
 						<view class="mark-box">*</view>
 						<view class="title-box">数量:</view>
+						<view class="picker-text-box">{{item.forData4+item.forData5}}</view>
+					</view>
+					<view class="sub-picker-box">
+						<view class="mark-box">*</view>
+						<view class="title-box">称重:</view>
 						<view class="reduction-button" @click="reductionAdd(1,index)">-</view>
-						<input class="input-p" type="digit" maxlength="10" @input="(val)=>handleInput(index,val)" v-model="item.forData4">
+						<input class="input-p" type="digit" maxlength="10" @input="(val)=>handleInput(index,val)" v-model="item.forData6">
 						<view class="add-button" @click="reductionAdd(2,index)">+</view>
-						<view class="unit-p">{{item.forData1?item.forData5:''}}</view>
+						<view class="unit-p">kg</view>
 					</view>
 				</view>
 				<view class="add-item-button" v-if="this.addForm.formData4.length < this.dialogOptionForList.length"
@@ -140,7 +145,7 @@
 						});
 						return
 					}
-					if(self.addForm.formData4[i].forData4 == 0){
+					if(self.addForm.formData4[i].forData6 == 0){
 						uni.showToast({
 							title: self.addForm.formData4[i].forData2+'没有填写数量',
 							icon: "none",
@@ -160,7 +165,7 @@
 				for(let i=0;i<self.addForm.formData4.length;i++){
 					obj.registerOrderAddItemBos.push({
 						typeId:self.addForm.formData4[i].forData1,
-						weight:self.addForm.formData4[i].forData4,
+						weight:self.addForm.formData4[i].forData6,
 					})
 				}
 				uni.navigateTo({
@@ -193,6 +198,7 @@
 										forData3:o,
 										forData4:data.data.wasteOrderDetailItemVos[i].quantity,
 										forData5:self.dialogOptionForList[o].unit,
+										forData6:0,
 										forList:self.dialogOptionForList,
 									}
 									list.push(JSON.parse(JSON.stringify(obj)))
@@ -227,13 +233,13 @@
 			reductionAdd(type,index){
 				if(type == 1){
 					//减
-					if(this.addForm.formData4[index].forData4>=1){
-						this.$set(this.addForm.formData4[index],'forData4',this.addForm.formData4[index].forData4-1);
+					if(this.addForm.formData4[index].forData6>=1){
+						this.$set(this.addForm.formData4[index],'forData6',this.addForm.formData4[index].forData6-1);
 					}
 				}else if(type == 2){
 					//加
-					if(this.addForm.formData4[index].forData4<9999){
-						this.$set(this.addForm.formData4[index],'forData4',this.addForm.formData4[index].forData4+1);
+					if(this.addForm.formData4[index].forData6<9999){
+						this.$set(this.addForm.formData4[index],'forData6',this.addForm.formData4[index].forData6+1);
 					}
 				}
 			},
@@ -254,6 +260,7 @@
 					forData3:'',
 					forData4:0,
 					forData5:'',
+					forData6:0,
 					forList:[],
 				})
 				this.filtrateList();
@@ -343,15 +350,15 @@
 			    let value = e.detail.value
 			    // 如果当前输入为空,直接允许清空
 			    if (!value) {
-			      this.addForm.formData4[index].forData4 = ''
+			      this.addForm.formData4[index].forData6 = ''
 			    } else if (value?.charAt(0) === '0' && value.charAt(1) && value.charAt(1) !== '.') {
 			      // // 1. 当第一位为0时,只能输入小数点【第二位必须是小数点】
 			      value = '0'
 			    }
 			    value = value.replace(/[^\d.]/g, '') // 清除"数字"和"."以外的字符
 			    value = value.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
-			    value = value.match(/^\d*(\.?\d{0,2})/g)[0] || '' // 保留2位小数
-			    this.addForm.formData4[index].forData4 = value
+			    value = value.match(/^\d*(\.?\d{0,3})/g)[0] || '' // 保留3位小数
+			    this.addForm.formData4[index].forData6 = value
 			  })
 			},
       //匹配数据
@@ -417,7 +424,14 @@
 			background-color: #fff;
 			border-radius:10rpx;
 			padding:20rpx 20rpx 0 10rpx;
+			.for-content-box:nth-child(1){
+				padding-top:0;
+				border-top:none;
+			}
 			.for-content-box{
+				margin-bottom:20rpx;
+				padding-top:30rpx;
+				border-top:1px solid #dedede;
 				.right-button{
 					margin-top:8rpx;
 					margin-left:20rpx;
@@ -446,6 +460,10 @@
 					flex:1;
 					height:40rpx;
 					line-height:40rpx;
+					display:block;
+					overflow:hidden;
+					text-overflow:ellipsis;
+					white-space:nowrap;
 				}
 				.title-box{
 					width:100rpx;
@@ -468,7 +486,7 @@
 						padding:0 20rpx;
 						color:#666;
 						line-height:60rpx;
-						width:400rpx;
+						width:300rpx;
 						display:block;
 						overflow:hidden;
 						text-overflow:ellipsis;
@@ -478,6 +496,10 @@
 						
 					}
 				}
+				.picker-text-box{
+					width:400rpx;
+					line-height:60rpx;
+				}
 				.reduction-button{
 					width:60rpx;
 					height:60rpx;

+ 3 - 0
pages_hazardousWasteRecycling/views/weighingRegistration/index.vue

@@ -172,6 +172,9 @@
 						view:nth-child(2){
 							flex:1;
 						}
+						view:nth-child(3){
+							font-size:24rpx;
+						}
 						.colorA{
 							color:#00EE76;
 						}

+ 4 - 2
pages_hazardousWasteRecycling/views/weighingRegistration/infoPage.vue

@@ -23,7 +23,7 @@
 			<view>{{item.typeName}}</view>
 			<view>{{item.weight}}kg</view>
 		</view>
-		<view class="img-box">
+		<view class="img-box" v-if="newData.images[0]">
 			<view>图片</view>
 			<view>
 				<img :src="baseUrl+img" v-for="(img,imgIndex) in newData.images" :key="imgIndex">
@@ -45,7 +45,9 @@
 		data() {
 			return {
 				baseUrl:config.base_url,
-				newData:{},
+				newData:{
+					images:[],
+				},
 			}
 		},
 		onLoad(option) {