From aee0cc33754f91e51bde6c05ce386e07d6060c92 Mon Sep 17 00:00:00 2001
From: 1178634255 <1178634255@qq.com>
Date: Mon, 22 May 2023 16:35:04 +0800
Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?=
 =?UTF-8?q?=E7=94=B3=E8=B4=AD=E5=8D=95=E4=B8=8E=E7=94=B3=E8=B4=AD=E5=8D=95?=
 =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=E4=B8=8D=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/purchase/purApply/purApplyEditDiaolog.vue | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/views/purchase/purApply/purApplyEditDiaolog.vue b/src/views/purchase/purApply/purApplyEditDiaolog.vue
index c07f81b0..4d20ff2f 100644
--- a/src/views/purchase/purApply/purApplyEditDiaolog.vue
+++ b/src/views/purchase/purApply/purApplyEditDiaolog.vue
@@ -51,6 +51,7 @@
                 style="width: 90%"
                 :clearable="false"
                 value-format="yyyy-MM-dd HH:mm:ss"
+                :disabled-date="disabledArrivalDate"
               >
               </el-date-picker>
             </el-form-item>
@@ -220,6 +221,7 @@ export default {
         id: null,
         billNo: null,
         createTime: "",
+        arrivalTime: '',
         remark: "",
         deptCode: null,
         invCode: null,
@@ -294,7 +296,9 @@ export default {
             if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
               return this.$message.error("到货时间不能为空!");
             }
-
+            if (this.formData.arrivalTime<this.formData.createTime) {
+              return this.$message.error("到货时间不能比单据日期早!!!");
+            }
             for (let i = 0; i < this.codeArray.length; i++) {
               if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
                 return this.$message.error('单据数量不能为0');
@@ -318,6 +322,9 @@ export default {
         }
       });
     },
+    disabledArrivalDate(time) {
+      return time.getTime() < new Date(this.formData.createTime).getTime()
+    },
     submitFunction(status) {
       let tMessage = status === '1' ? '保存' : '提交';
       this.loading = true;