panhui 4 lat temu
rodzic
commit
b909797542
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      src/views/asset/Detail.vue

+ 5 - 1
src/views/asset/Detail.vue

@@ -696,7 +696,7 @@ export default {
             function getHolds() {
                 console.log(_this.info.holdDays);
                 if (_this.info.holdDays || _this.info.holdDays === 0) {
-                    if (_this.info.holdDays === 0 && this.info.source === 'OFFICIAL') {
+                    if (_this.info.holdDays === 0 && _this.info.source === 'OFFICIAL') {
                         return _this.$http.get('/sysConfig/get/OFFICIAL_CONSIGNMENT').then(res => {
                             holdDays = Number(res.value);
                             return Promise.resolve();
@@ -761,6 +761,10 @@ export default {
         },
         getTime() {
             let startTime = this.dayjs(this.info.createdAt).add(this.holdDays, 'days');
+            if (this.holdDays < 1) {
+                startTime = this.dayjs(this.info.createdAt).add(this.holdDays * 24, 'hours');
+            }
+
             let seconds = this.dayjs(startTime, 'YYYY-MM-DD HH:mm:ss').diff(this.dayjs(), 'second');
             let str = '';
             let d = Math.floor(seconds / 24 / 3600);