Просмотр исходного кода

入库单入库日期=收货单收货日期

huang_an 1 год назад
Родитель
Сommit
dce937cdbd
1 измененных файлов с 12 добавлено и 6 удалено
  1. 12 6
      src/views/bpm/stockManagement/storage.vue

+ 12 - 6
src/views/bpm/stockManagement/storage.vue

@@ -1025,10 +1025,9 @@
       },
       detailList: {
         handler(newVal) {
-          if(newVal.length){
-           this.initFormData()
+          if (newVal.length) {
+            this.initFormData();
           }
-      
         },
         deep: true
       }
@@ -1123,7 +1122,7 @@
       },
       // 初始化信息
       async initFormData() {
-        console.log(4)
+        console.log(4);
 
         this.formData.type = 1;
         this.formData.bizType = this.bizType;
@@ -1456,8 +1455,15 @@
       },
       // 赋值入库时间
       getNowFormatDate() {
-        let obj = this.getNowDate();
-        this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+        if (this.bizType == 2) {
+          let time = '00:00:00';
+          this.formData.storageTime = new Date(
+            `${this.form.receiveDate}T${time}`
+          );
+        } else {
+          let obj = this.getNowDate();
+          this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+        }
       },
       // 获取物品列表
       async getListItems() {