소스 검색

fix:“修复订单明细筛选所有设备不生效的问题”

soobin 2 년 전
부모
커밋
6e61432457
2개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      src/components/typeSelectList/index.less
  2. 9 3
      src/components/typeSelectList/index.vue

+ 1 - 0
src/components/typeSelectList/index.less

@@ -24,6 +24,7 @@
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
+        padding: 0 8px;
       }
     }
 

+ 9 - 3
src/components/typeSelectList/index.vue

@@ -110,6 +110,7 @@ export default {
       clientId: '',
       payType: '',
       productNo: '',
+      equipmentId: '',
       companyType: '',
       machineType: ''
     });
@@ -227,9 +228,14 @@ export default {
     const equipmentSourceList = ref([]);
     const deviceConfirm = (currentValue) => {
       allDevices.value = currentValue;
-      const selectEquipment = equipmentSourceList.value.filter(i => i.name === currentValue);
-      if (selectEquipment && selectEquipment.length > 0) {
-        searchParams.equipmentId = selectEquipment[0].id;
+      console.log("currentValue",currentValue)
+      if(currentValue != t('typeSelectList.allDevices')) {
+        const selectEquipment = equipmentSourceList.value.filter(i => i.name === currentValue);
+        if (selectEquipment && selectEquipment.length > 0) {
+          searchParams.equipmentId = selectEquipment[0].id;
+        }
+      } else {
+        searchParams.equipmentId = '';
       }
       deviceType.value = false;
       outputDate();