snow 1 рік тому
батько
коміт
5e3287f609

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/0.js


+ 39 - 8
src/views/purchaseIn/deliveryWorkOrder/index.vue

@@ -183,12 +183,22 @@
                   maxlength="40"
                   :size="searchSize"
                   class="input-with-select"
+                  @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                  "
                 >
                   <el-select
                     v-model="select"
                     style="width: 150px"
                     slot="prepend"
                     placeholder="关键字类型"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   >
                     <el-option label="销售订单编号" value="orderCode" />
                     <el-option label="采购单编号" value="cgdNo" />
@@ -505,22 +515,31 @@ export default {
         let model = JSON.parse(JSON.stringify(this.parmValue));
         delete model["s_input"];
         delete model["use_type"];
-        const { start, end, status } = this.parmValue;
+        const { status, supplierNo } = this.parmValue;
 
-        if(!start || !end){
-          this.$message.error("请选择时间范围");
+        if (
+          (this.parmValue.start !== "" && this.parmValue.end === "") ||
+          (this.parmValue.start === "" && this.parmValue.end !== "")
+        ) {
+          this.$message.warning("时间区间不完整!");
           this.loading = false;
-          return
+          return;
         }
 
-        if(this.getDiffDay(start,end) > 7){
-          this.$message.error("时间范围不能超过7天");
+        if(!status){
+          this.$message.error("请选择状态");
           this.loading = false;
           return;
         }
 
-        if(!status){
-          this.$message.error("请选择状态");
+        if(!Array.isArray(supplierNo) || supplierNo.length === 0){
+          this.$message.error("请选择供应商名称");
+          this.loading = false;
+          return;
+        }
+
+        if(this.pageInfo.total > 2000){
+          this.$message.error("导出数据不能超过2000条,请添加筛选条件");
           this.loading = false;
           return
         }
@@ -719,6 +738,17 @@ export default {
 
     // 时间
     async handleTime(e) {
+      if (
+        (this.parmValue.end === "" && this.parmValue.start !== "" && e.startTime === "") || 
+        (this.parmValue.start === "" && this.parmValue.end !== "" && e.endTime === "")
+      ) {
+        this.parmValue.page = 1;
+        this.parmValue.start = e.startTime;
+        this.parmValue.end = e.endTime;
+        await this.searchList();
+        return;
+      }
+
       if (e.startTime !== "") {
         this.parmValue.start = e.startTime;
       } else {
@@ -729,6 +759,7 @@ export default {
       } else {
         this.parmValue.end = "";
       }
+
       if (this.parmValue.start !== "" && this.parmValue.end !== "") {
         this.parmValue.page = 1;
         await this.searchList();

+ 32 - 8
src/views/supplierPurchaseIn/supplierDeliveryWorkOrder/index.vue

@@ -195,12 +195,22 @@
                   maxlength="40"
                   :size="searchSize"
                   class="input-with-select"
+                  @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                 >
                   <el-select
                     v-model="select"
                     style="width: 150px"
                     slot="prepend"
                     placeholder="关键字类型"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   >
                     <el-option label="销售订单编号" value="orderCode" />
                     <el-option label="采购单编号" value="cgdNo" />
@@ -494,22 +504,25 @@ export default {
         delete model['customer_name']
         delete model['select']
         delete model['use_type']
-        const { start, end, status } = this.parmValue;
+        const { status, customer_code } = this.parmValue;
 
-        if(!start || !end){
-          this.$message.error("请选择时间范围");
+        if (
+          (this.parmValue.start !== "" && this.parmValue.end === "") ||
+          (this.parmValue.start === "" && this.parmValue.end !== "")
+        ) {
+          this.$message.warning("时间区间不完整!");
           this.loading = false;
-          return
+          return;
         }
 
-        if(this.getDiffDay(start,end) > 7){
-          this.$message.error("时间范围不能超过7天");
+        if(!status){
+          this.$message.error("请选择状态");
           this.loading = false;
           return;
         }
 
-        if(!status){
-          this.$message.error("请选择状态");
+        if(this.pageInfo.total > 2000){
+          this.$message.error("导出数据不能超过2000条,请添加筛选条件");
           this.loading = false;
           return
         }
@@ -706,6 +719,17 @@ export default {
 
     // 时间
     async handleTime(e) {
+      if (
+        (this.parmValue.end === "" && this.parmValue.start !== "" && e.startTime === "") || 
+        (this.parmValue.start === "" && this.parmValue.end !== "" && e.endTime === "")
+      ) {
+        this.parmValue.page = 1;
+        this.parmValue.start = e.startTime;
+        this.parmValue.end = e.endTime;
+        await this.searchList();
+        return;
+      }
+
       if (e.startTime !== "") {
         this.parmValue.start = e.startTime;
       } else {

Деякі файли не було показано, через те що забагато файлів було змінено