jiangping
2023-08-21 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930
web_standard/src/components/ext/OperaWorkorderDetailWindow.vue
@@ -95,6 +95,11 @@
                <span>{{ row.num + row.umodel.name }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="duration" label="报工时长" min-width="100px">
              <template slot-scope="{row}">
                <span>{{ timesToStr(row.duration) }}</span>
              </template>
            </el-table-column>
            <!-- <el-table-column prop="doneType" label="报工类型" min-width="60px">
              <template slot-scope="{row}">
                <span v-if="row.doneType==0" class="valid-style">合格</span>
@@ -488,11 +493,24 @@
          values.forEach(item => {
            sums[index] = addPrecision(item, sums[index])
          })
          if (index===7) {
            sums[index] = this.timesToStr(sums[index])
          }
        } else {
          sums[index] = '-';
        }
      });
      return sums
    },
    timesToStr(times) {
      if (times==0||!times) {
        return '-'
      }
      // let sec = times%60
      let lesMin = Math.floor(times/60)
      let min = lesMin%60
      let hours =  Math.floor(lesMin/60)
      return `${hours}时${min}分`
    }
  }
}