Переглянути джерело

commit 修改工程用料统计-条件筛选逻辑

menchuang 1 рік тому
батько
коміт
57d127bc91
1 змінених файлів з 17 додано та 13 видалено
  1. 17 13
      pages/statistics/statistics.vue

+ 17 - 13
pages/statistics/statistics.vue

@@ -61,15 +61,15 @@
 						<view v-if="this.isEmpty(this.materialValue.name)" style="margin-top: 10;"
 							@click="pickerShow('cz')">
 							<span style="color: darkgray;">请选择材料</span>
-							<image src="../../static/images/icon_right.png" class="to-right-icon"></image>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 						</view>
 						<view v-else style="display: flex;align-items: center; justify-content: flex-end;">
 							<view style="margin-top: 10; " @click="pickerShow('cz')">
 								<span style="color: black;">{{materialValue.name}}</span>
-								<!-- <image src="../../static/images/icon_right.png" class="to-right-icon"></image> -->
+								<!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
 							</view>
 							<uni-icons type="clear" size="24" color="#999"
-								style="margin-left:20rpx ;margin-right: -20rpx;" @click="clearThatTwoInfo"></uni-icons>
+								style="margin-left:20rpx ;margin-right: -20rpx;" @click="clearMaterialInfo"></uni-icons>
 						</view>
 					</view>
 				</view>
@@ -81,16 +81,16 @@
 						<view v-if="this.isEmpty(this.specificationValue.name)" style="margin-top: 10;"
 							@click="pickerShow('gg')">
 							<span style="color: darkgray;">请选择规格</span>
-							<image src="../../static/images/icon_right.png" class="to-right-icon"></image>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 						</view>
 						<view v-else style="display: flex;align-items: center; justify-content: flex-end;">
 							<view style="margin-top: 10;" @click="pickerShow('gg')">
 								<span style="color: black;">{{specificationValue.name}}</span>
-								<!-- <image src="../../static/images/icon_right.png" class="to-right-icon"></image> -->
+								<!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
 							</view>
 							<uni-icons type="clear" size="24" color="#999"
 								style="margin-left:20rpx ;margin-right: -20rpx;"
-								@click="this.specificationValue=''"></uni-icons>
+								@click="clearSpecificationInfo"></uni-icons>
 						</view>
 					</view>
 				</view>
@@ -499,10 +499,13 @@
 				} else if (this.type == 'cz') { //材料
 					this.materialValue = item;
 					this.specificationValue = ''; //重置规格
+					
+					this.queryMaterialsUsedList();
 					//根据材质ID 获取规格数据
 					getEnginSpecificationsList(item.id).then(res => {
 						this.materialList = res.data
 					})
+					
 				}
 			},
 			//关闭弹窗
@@ -557,13 +560,14 @@
 				}
 			},
 			//材料清空val 
-			clearThatTwoInfo() {
-				this.materialValue='';
-				this.specificationValue='';
-				// this.materialValue.name = ''
-				// if (this.specificationValue.name) {
-				// 	this.specificationValue.name = ''
-				// }
+			clearMaterialInfo() {
+				this.materialValue = '';
+				this.specificationValue = '';
+				this.queryMaterialsUsedList();
+			},
+			clearSpecificationInfo() {
+				this.specificationValue = '';
+				this.queryMaterialsUsedList();
 			}
 		}
 	}