Browse Source

底腿历史优化

menchuang 1 năm trước cách đây
mục cha
commit
ff77fb4a85
1 tập tin đã thay đổi với 8 bổ sung36 xóa
  1. 8 36
      pages/statistics/history_details_bottom_leg.vue

+ 8 - 36
pages/statistics/history_details_bottom_leg.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
-		<view class="uni-media-list">
+		<view class="uni-media-list" v-for="(value, key) in dataJson.zEngineeringNodeBo.zEngineeringInfoBoList"
+			:key="key" v-if="isEdit(value)">
 
 			<view class="uni-media-list-body">
-				<view v-for="(value, key) in dataJson.zEngineeringNodeBo.zEngineeringInfoBoList" :key="key"
-					v-if="isEdit(value)">
+				<view>
 					<view class="uni-media-list-text-top">
 						<view class="tit-text">施工时间:</view>{{value.updateTime}}
 					</view>
@@ -23,16 +23,16 @@
 						<view class="tit-text">
 							施工位置
 						</view>
-						<view style="display: flex; justify-content: right; width: 70%;">
-							<view v-if="isEmpty(value.constructAddre)" @click="pickerShow('position')">
+						<view style="display: flex; align-items: center; justify-content: right; width: 70%;">
+							<view v-if="isEmpty(value.constructAddre)" @click="pickerShow('position')" style="margin-right: 20rpx;">
 								<span style="color: darkgray;">请选择施工位置</span>
 							</view>
-							<view v-else @click="pickerShow('position',key)">
+							<view v-else @click="pickerShow('position',key)" style="margin-right: 20rpx;">
 								<span style="color: black;">{{value.constructAddre}}</span>
 							</view>
 							<input class="uni-input" type="number" v-model="value.zEngineeringMaterialBo[0].number"
-								style="text-align: center; border: 1px solid #cccccc; border-radius: 20rpx;width: 60px;"></input>
+								style="text-align: center; border: 1px solid #cccccc; border-radius: 20rpx;width: 60px; margin-left: 10rpx;margin-right: 10rpx;"></input>
 						</view>
 
@@ -214,7 +214,6 @@
 						this.title = response.data.zEngineeringNodeBo.type;
 						this.enginType = response.data.enginType;
 						this.enginClassification = response.data.enginClassification;
-
 					} else {
 						this.hideButton = true;
 						this.$modal.msg("暂无历史信息")
@@ -228,21 +227,6 @@
 			close(e) {
 				this.open = false
 			},
-			btnAdd(key, index) {
-
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
-
-					'materialQuality': '',
-					'materialQualityName': '',
-					'number': '',
-					'specifications': '',
-					'specificationsName': ''
-
-				});
-			},
-			btnDel(key, index) {
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
-			},
 			pickerShow(type, index) {
 				this.dataIndex = index;
 				this.dataType = type;
@@ -253,18 +237,6 @@
 					});
 				}
 			},
-			// 截取小数点前的字符串
-			getIntegerPart(numStr, i) {
-				return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
-			},
-			setInfoBoNumber(key, index, number, i) {
-				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
-					.number;
-				let resAry = Ynumber.toString().split('.');
-				resAry[i] = number
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
-					.join('.');
-			},
 			bindTextAreaBlur(e, index) {
 				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0].remark = e;
 			},
@@ -273,7 +245,7 @@
 				this.openDict = false;
 				if (this.dataType == 'position') {
 					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].constructAddre = item
-					.dictValue;
+						.dictValue;
 				}
 
 			},