Explorar o código

发送明细参考订单数据筛选条件修改

jbb %!s(int64=2) %!d(string=hai) anos
pai
achega
2a06a68ad0
Modificáronse 1 ficheiros con 34 adicións e 13 borrados
  1. 34 13
      src/views/shipment-details/referOrderDataModal.vue

+ 34 - 13
src/views/shipment-details/referOrderDataModal.vue

@@ -66,16 +66,20 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="预发货日期">
-                  <a-date-picker
-                    placeholder="请选择预发货日期"
-                    format="YYYY-MM-DD"
-                    style="width:100%;"
-                    v-model="queryParam.preDeliveryDate"
+               <a-form-item label="预发货日期">
+                  <a-range-picker
+                    style="width: 100%"
+                    :mode="rangeMode"
+                    :placeholder="['开始日期', '结束日期']"
+                    :value="range"
+                    format = "YYYY-MM-DD"
+                    @change="rangeSelectChange"
                   />
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
             </template>
+
+
             <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>
@@ -424,7 +428,8 @@ export default {
         orderNumber: '', // 订单号
         account: '', //账套
         pageSize:100,
-        preDeliveryDate:'', //预发货日期
+        preDeliveryDateS:'', //预发货开始日期
+        preDeliveryDateE:'', //预发货结束日期
         flourOrGarment:'', //类型
         // pageNo: '', // 初始页
         // pageSize: '-1' // 每页显示条数
@@ -434,7 +439,9 @@ export default {
       confimList: [], //勾选的订单数组
       propList: [], //需要给新增页的数据
       dateRange:[],
+      range:[],//预发货日期数组
       dataRangeMode:['date','date'],
+      rangeMode:['date','date'],
     }
   },
   // 接收父组件 方法
@@ -447,9 +454,9 @@ export default {
     // 参照订单数据 查询
     getOrderList() {
       this.confirmLoading = true;
-      if (this.queryParam.preDeliveryDate != ""){
-        this.queryParam.preDeliveryDate = this.queryParam.preDeliveryDate.format('YYYY-MM-DD');
-      }
+      // if (this.queryParam.preDeliveryDate != ""){
+      //   this.queryParam.preDeliveryDate = this.queryParam.preDeliveryDate.format('YYYY-MM-DD');
+      // }
       this.$nextTick(() => {
         queryOrderData(this.queryParam).then(res => {
           this.confirmLoading = false;
@@ -501,7 +508,7 @@ export default {
         this.$message.error('请选择查询类型!');
       }else {
            this.queryParam.pageNo = '';
-      this.getOrderList();
+           this.getOrderList();
       }
     },
 
@@ -512,8 +519,10 @@ export default {
       this.queryParam.salesman = '';
       this.queryParam.customerName = '';
       this.dateRange = [];
+      this.range = [];
       this.queryParam.flourOrGarment = '';
-      this.queryParam.preDeliveryDate = '';
+      this.queryParam.preDeliveryDateS = '';
+      this.queryParam.preDeliveryDateE = '';
       this.orderListData = []
       this.selectedRowKeys = [];
       this.selectedRows = [];
@@ -529,6 +538,7 @@ export default {
       this.referOrderDataModVis = false;
       this.selectedRowKeys = [];
       this.orderListData = [];
+      this.queryParam = {}
       this.searchReset();
     },
     handleCancel() {
@@ -545,6 +555,17 @@ export default {
         this.queryParam.endDeliveryDate  = value[1].format('YYYY-MM-DD');
       }
     },
+
+    rangeSelectChange(value) {
+      this.range = value
+        if (value.length == 0){
+        this.queryParam.preDeliveryDateS = "";
+        this.queryParam.preDeliveryDateE = "";
+      }else{
+        this.queryParam.preDeliveryDateS = value[0].format('YYYY-MM-DD');
+        this.queryParam.preDeliveryDateE  = value[1].format('YYYY-MM-DD');
+      }
+    }
   },
   computed: {
     // 选中项