Browse Source

余纱弹窗查询功能

jbb 2 years ago
parent
commit
c7361aff8c

+ 0 - 1
src/views/reportForms/fabric-loss-table.vue

@@ -973,7 +973,6 @@ export default {
           click: event => {
             this.$refs.purchaseLeftModal.surplusYarnData = record.fabricPoOrderOutList;
             this.$refs.purchaseLeftModal.allDataList = record.fabricPoOrderOutList;
-            this.$refs.purchaseLeftModal.queryParam = {};
             this.$refs.purchaseLeftModal.surplusYarnModVis = true
           }
         }

+ 1 - 0
src/views/reportForms/fabric-loss-table/iquantityMoreLessModal.vue

@@ -5,6 +5,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     :footer="null"
+     @cancel="close"
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">

+ 18 - 5
src/views/reportForms/fabric-loss-table/purchaseLeftModal.vue

@@ -5,6 +5,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     :footer="null"
+    @cancel="close"
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
@@ -148,8 +149,8 @@ export default {
       surplusYarnModVis: false,
       // 查询条件
       queryParam: {
-        aboardorderNum: '', // aboardorderNum
-        planNum: '' // 计划号
+        ccode: '', // aboardorderNum
+        cplanCode: '' // 计划号
       }
     }
   },
@@ -219,17 +220,29 @@ export default {
     },
     // 弹框查询按钮
     searchQuery() {
-      this.surplusYarnData = this.allDataList.filter(e=>(this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1) 
-        && (this.queryParam.cplanCode == null || e.cplanCode.toLowerCase().indexOf(this.queryParam.cplanCode.toLowerCase())>-1));
+      var data = []
+       this.allDataList.map(e=>{
+         if(!e.ccode){e.ccode = ''}
+         if(!e.cplanCode){e.cplanCode = ''}
+         if(e.ccode.includes(this.queryParam.ccode) && e.cplanCode.includes(this.queryParam.cplanCode)){
+             data.push(e)
+           }  
+       });
+       this.surplusYarnData =data
     },
     // 重置
     searchReset() {
-      this.queryParam = {}
+      this.queryParam = {
+        ccode: '', // aboardorderNum
+        cplanCode: '' // 计划号
+      }
+      this.surplusYarnData =this.allDataList
       // this.getShipmentList()
     },
     close() {
       this.$emit('close')
       this.surplusYarnModVis = false
+      this.searchReset()
     },
     showTotal(data) {
       return (