按新要求修改

This commit is contained in:
Ledo 2025-06-06 08:42:21 +08:00
parent 74db1306cd
commit a1bcb1976c
3 changed files with 45 additions and 37 deletions

View File

@ -460,6 +460,9 @@ const getWorkTime = (type) =>{
const end = new Date(endTime).getTime();
const diffTime = Math.abs(end - start);
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
if(day == 0){
day += 1
}
if(type == 1){
return day * 8 + '小时';

View File

@ -247,10 +247,10 @@
// } else {
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
uni.navigateTo({ url })
// }
}
// selectedId
/* */
}
/* const viewClick = (item) => {
const params = {
@ -558,7 +558,7 @@
<!-- <view class="product-item" v-else-if="item.processDesignType == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'">工艺起止日期{{item.twoDimDate}} {{item.threeDimDate}} </view> -->
<view class="product-item">最新进度{{item.progress}}%</view>
<!-- <view class="product-item">最新进度{{item.progress}}%</view> -->
<!-- <view class="product-item">预计生产日期{{ item.startTime }} {{ item.entTime }}</view> -->
</view>
<view class="statusText" @click="handleDetail(item)">{{ statusText }}</view>

View File

@ -227,24 +227,29 @@
}
const overRow = async (row : any) => {
if (row.endTime == null) {
row.endTime = new Date().getTime()
var timeDiff = row.endTime - row.beginTime;
//
row.workTime = timeDiff / (1000 * 60 * 60);
row.maxTime = row.workTime;
// row.workTime = row.endTime - row.
}
if (row.beginTime == null) {
uni.showToast({ icon: 'none', title: '开始时间不能为空!请确认!' })
return
}
if (row.endTime == null) {
uni.showToast({ icon: 'none', title: '结束时间不能为空!请确认!' })
return
}
if (new Date(row.beginTime).getTime() > new Date(row.endTime).getTime()) {
uni.showToast({ icon: 'none', title: '开始时间不能大于结束时间!请确认!' })
return
}
if(row.workTime == null){
var timeDiff = new Date(row.endTime).getTime() - new Date(row.beginTime).getTime();
//
row.workTime = timeDiff / (1000 * 60 * 60);
row.maxTime = row.workTime;
}
if (row.workTime == null
) {
uni.showToast({ icon: 'none', title: '已做时间不能为空!请确认!' })