فهرست منبع

Merge branch 'master' into test

yijing 1 سال پیش
والد
کامیت
268ea2ffa4
1فایلهای تغییر یافته به همراه10 افزوده شده و 6 حذف شده
  1. 10 6
      src/views/bpm/stockManagement/storage.vue

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

@@ -37,7 +37,7 @@
             </el-form-item>
           </el-col> -->
           <el-col :span="6">
-            <el-form-item label="入库时间">
+            <el-form-item label="入库时间22">
               <el-date-picker v-model="formData.storageTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                 placeholder="选择日期时间">
               </el-date-picker></el-form-item></el-col>
@@ -1313,12 +1313,16 @@ export default {
     },
     // 赋值入库时间
     getNowFormatDate() {
-      if (this.bizType == '2' || this.bizType == '6') {
-        let time = '00:00:00';
-        this.formData.storageTime = this.form.receiveDate + ' ' + time;
+      const obj = this.getNowDate();
+      const defaultTime = '00:00:00';
+      const currentTime = `${obj.hour}:${obj.minute}:${obj.second}`;
+
+      if (this.bizType === '2' || this.bizType === '6') {
+        this.formData.storageTime = this.form.receiveDate
+          ? `${this.form.receiveDate} ${defaultTime}`
+          : `${obj.year}-${obj.month}-${obj.strDate} ${currentTime}`;
       } else {
-        let obj = this.getNowDate();
-        this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+        this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${currentTime}`;
       }
     },
     // 获取物品列表