Browse Source

采购数量弹窗增加批号筛选条件

jbb 2 years ago
parent
commit
7f9d5bf73d

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

@@ -955,17 +955,14 @@ export default {
             if (record.cpoid == '来源余料') {
               this.$refs.surplusYarnModal.surplusYarnData = record.fabricPoOrderOutList;
               this.$refs.surplusYarnModal.allDataList = record.fabricPoOrderOutList;
-              this.$refs.surplusYarnModal.queryParam = {};
               this.$refs.surplusYarnModal.surplusYarnModVis = true
             }else if (record.cpoid == '其他入库') {
               this.$refs.otherYarnsInModal.otherYarnsInData = record.fabricPoOrderOutList;
               this.$refs.otherYarnsInModal.allDataList = record.fabricPoOrderOutList;
-              this.$refs.otherYarnsInModal.queryParam = {};
               this.$refs.otherYarnsInModal.otherYarnsInModVis = true
             } else {
               this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;              
               this.$refs.purchaseAmountModal.allDataList = record.fabricPoOrderInList;
-              this.$refs.purchaseAmountModal.queryParam = {};
               this.$refs.purchaseAmountModal.purchaseAmountModVis = true
             }
           }

+ 27 - 5
src/views/reportForms/fabric-loss-table/otherYarnsInModal.vue

@@ -5,6 +5,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     :footer="null"
+     @cancel="close"
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
@@ -24,6 +25,12 @@
               </a-form-item>
             </a-col>
 
+             <a-col :md="6" :sm="8">
+              <a-form-item label="批号">
+                <a-input placeholder="请输入批号" v-model="queryParam.cbatch"></a-input>
+              </a-form-item>
+            </a-col>
+
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@@ -158,8 +165,9 @@ export default {
       otherYarnsInModVis: false,
       // 查询条件
       queryParam: {
-        purchaseAboardOrderNum: '', // 委外订单号
-        planNum: '' // 计划号
+        ccode: '', // 委外订单号
+        cplanCode: '', // 计划号
+        cbatch:''
       }
     }
   },
@@ -229,17 +237,31 @@ export default {
     },
     // 弹框查询按钮
     searchQuery() {
-      this.otherYarnsInData = 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(item=>{
+           if(!item.ccode){item.ccode = ''}
+           if(!item.cbatch){item.cbatch = ''}
+           if(!item.cplanCode){item.cplanCode = ''}
+            if(item.ccode.includes(this.queryParam.ccode) && item.cbatch.includes(this.queryParam.cbatch)&&item.cplanCode.includes(this.queryParam.cplanCode)){
+             data.push(item)
+           }     
+      });
+      this.otherYarnsInData =data
     },
     // 重置
     searchReset() {
-      this.queryParam = {}
+      this.queryParam = {
+        ccode:'',
+        cplanCode:'',
+        cbatch:''
+      }
+      this.otherYarnsInData = this.allDataList
       // this.getShipmentList()
     },
     close() {
       this.$emit('close')
       this.otherYarnsInModVis = false
+      this.searchReset()
     },
     showTotal(data) {
       return (

+ 23 - 5
src/views/reportForms/fabric-loss-table/purchaseAmountModal.vue

@@ -5,6 +5,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     :footer="null"
+    @cancel="close"
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
@@ -17,6 +18,11 @@
                 <a-input placeholder="请输入单据号" v-model="queryParam.ccode"></a-input>
               </a-form-item>
             </a-col>
+             <a-col :md="6" :sm="8">
+              <a-form-item label="批号">
+                <a-input placeholder="请输入批号" v-model="queryParam.cbatch"></a-input>
+              </a-form-item>
+            </a-col>
 
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -180,8 +186,8 @@ export default {
 
       // 查询条件
       queryParam: {
-        yarnNum: '', // 纱批
-        purchasePrice: '' // 采购单价
+        ccode: '', // 纱批
+        cbatch: '' // 采购单价
       }
     }
   },
@@ -262,18 +268,30 @@ export default {
     },
     // 弹框查询按钮
     searchQuery() {
-      this.purchaseAmountData = this.allDataList.filter(e=> this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1);
+      var data = []
+       this.allDataList.map(item=>{
+           if(!item.ccode){item.ccode = ''}
+           if(!item.cbatch){item.cbatch = ''}
+            if(item.ccode.includes(this.queryParam.ccode) && item.cbatch.includes(this.queryParam.cbatch)){
+             data.push(item)
+           }     
+      });
+      this.purchaseAmountData =data
       
     },
     // 重置
     searchReset() {
-      this.queryParam.title = ''
-      this.queryParam.isRelease = ''
+      this.queryParam ={
+        ccode:'',
+        cbatch:''
+      }
+      this.purchaseAmountData = this.allDataList
       // this.getShipmentList()
     },
     close() {
       this.$emit('close')
       this.purchaseAmountModVis = false
+      this.searchReset()
     },
     showTotal(data) {
       return (

+ 26 - 5
src/views/reportForms/fabric-loss-table/surplusYarnModal.vue

@@ -5,6 +5,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     :footer="null"
+     @cancel="close"
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
@@ -23,6 +24,11 @@
                 <a-input placeholder="请输入计划号" v-model="queryParam.cplanCode"></a-input>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="批号">
+                <a-input placeholder="请输入批号" v-model="queryParam.cbatch"></a-input>
+              </a-form-item>
+            </a-col>
 
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -161,8 +167,9 @@ export default {
       surplusYarnModVis: false,
       // 查询条件
       queryParam: {
-        aboardorderNum: '', // aboardorderNum
-        planNum: '' // 计划号
+        ccode: '', // 委外订单号
+        cplanCode: '', // 计划号
+        cbatch:''
       }
     }
   },
@@ -232,17 +239,31 @@ 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(item=>{
+           if(!item.ccode){item.ccode = ''}
+           if(!item.cbatch){item.cbatch = ''}
+           if(!item.cplanCode){item.cplanCode = ''}
+            if(item.ccode.includes(this.queryParam.ccode) && item.cbatch.includes(this.queryParam.cbatch)&&item.cplanCode.includes(this.queryParam.cplanCode)){
+             data.push(item)
+           }     
+      });
+      this.surplusYarnData =data
     },
     // 重置
     searchReset() {
-      this.queryParam = {}
+      this.queryParam = {
+        ccode:'',
+        cplanCode:'',
+        cbatch:''
+      }
+      this.surplusYarnData = this.allDataList
       // this.getShipmentList()
     },
     close() {
       this.$emit('close')
       this.surplusYarnModVis = false
+      this.searchReset()
     },
     showTotal(data) {
       return (