|
@@ -37,10 +37,10 @@
|
|
|
<text class="label">箱号</text>
|
|
|
<text class="label right">{{ item['carrierName'] }}</text>
|
|
|
</view>
|
|
|
- <view class="item-info uni-row">
|
|
|
+ <!-- <view class="item-info uni-row">
|
|
|
<text class="label">总工时</text>
|
|
|
<text class="label right">{{ item['totalWorkingHours']}}</text>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">投入数</text>
|
|
|
<text
|
|
@@ -48,19 +48,18 @@
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">上道工序</text>
|
|
|
- <text
|
|
|
- class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
|
|
|
+ <text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">当前工序</text>
|
|
|
- <text class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
|
|
|
- </view>
|
|
|
-<!-- <view class="item-info uni-row">
|
|
|
- <text class="label">下道工序</text>
|
|
|
<text
|
|
|
- class="label right">{{item.prevProcess && item.nextProcess.length > 0 ? item.nextProcess[0].processAlias : null }}</text>
|
|
|
- </view> -->
|
|
|
- <!-- <view class="item-info uni-row">
|
|
|
+ class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item-info uni-row">
|
|
|
+ <text class="label">下道工序</text>
|
|
|
+ <text class="label right">{{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}</text>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="item-info uni-row">
|
|
|
<text class="label">设备</text>
|
|
|
<text class="label right">{{ curPlan['equipmentName'] }}</text>
|
|
|
</view> -->
|
|
@@ -75,7 +74,8 @@
|
|
|
<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
|
</view>
|
|
|
<view v-else-if="item['status'] == 3" class=" uni-row">
|
|
|
- <button class="turnover-tag" size="mini" @click.stop="handleCancelTurnover(item)">取消周转</button>
|
|
|
+ <button class="turnover-tag" size="mini" @click.stop="handleCancelTurnover(item)"
|
|
|
+ style="background-color: rgba(255, 85, 85, 1);">取消周转</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -83,7 +83,7 @@
|
|
|
<view v-if="bottomStatus" class="bottom uni-row">
|
|
|
<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
|
|
|
</view>
|
|
|
-<!-- <view v-else-if="bottomStatus == 1" class="bottom uni-row">
|
|
|
+ <!-- <view v-else-if="bottomStatus == 1" class="bottom uni-row">
|
|
|
<button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
|
|
|
</view>
|
|
|
<view v-else="bottomStatus == 2" class="bottom uni-row">
|
|
@@ -138,20 +138,22 @@
|
|
|
console.log(curPlan.value)
|
|
|
if (store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId) {
|
|
|
bottomStatus.value = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
bottomStatus.value = false;
|
|
|
}
|
|
|
console.log(bottomStatus.value)
|
|
|
|
|
|
init(store.planDetails.id);
|
|
|
- uni.$once('batchReporting-addBatch', () => {
|
|
|
+ uni.$on('batchReporting-addBatch', () => {
|
|
|
init(store.planDetails.id);
|
|
|
})
|
|
|
uni.$on('dayworkItemUpdate', reflush)
|
|
|
+ uni.$on('bathReportingReflush', reflush)
|
|
|
})
|
|
|
|
|
|
onUnload(() => {
|
|
|
- // uni.$off('dayworkItemUpdate', reflush)
|
|
|
+ uni.$off('dayworkItemUpdate', reflush);
|
|
|
+ uni.$off('bathReportingReflush', reflush);
|
|
|
})
|
|
|
|
|
|
function reflush() {
|
|
@@ -177,26 +179,26 @@
|
|
|
let reqData = {
|
|
|
productionPlanDetailId: id,
|
|
|
deptId: store.curDeptDetails.deptId,
|
|
|
- keywords:keywords.value
|
|
|
+ keywords: keywords.value
|
|
|
};
|
|
|
|
|
|
getDayWorkList(reqData).then(res => {
|
|
|
listData.value = res.data;
|
|
|
|
|
|
// 计算总工时
|
|
|
- for (let i = 0; i < listData.value.length; i++) {
|
|
|
- listData.value[i].totalWorkingHours = 0;
|
|
|
- if (listData.value[i].dayworkItemList) {
|
|
|
- for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
|
|
|
- if (listData.value[i].dayworkItemList[j].status == 2 || listData.value[i].dayworkItemList[
|
|
|
- j].status == 3) {
|
|
|
- listData.value[i].totalWorkingHours += Number(listData.value[i].dayworkItemList[j]
|
|
|
- .workingHours);
|
|
|
- }
|
|
|
- }
|
|
|
- listData.value[i].totalWorkingHours = toHHmmss(listData.value[i].totalWorkingHours);
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (let i = 0; i < listData.value.length; i++) {
|
|
|
+ // listData.value[i].totalWorkingHours = 0;
|
|
|
+ // if (listData.value[i].dayworkItemList) {
|
|
|
+ // for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
|
|
|
+ // if (listData.value[i].dayworkItemList[j].status == 2 || listData.value[i].dayworkItemList[
|
|
|
+ // j].status == 3) {
|
|
|
+ // listData.value[i].totalWorkingHours += Number(listData.value[i].dayworkItemList[j]
|
|
|
+ // .workingHours);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // listData.value[i].totalWorkingHours = toHHmmss(listData.value[i].totalWorkingHours);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
console.log(listData.value)
|
|
|
uni.hideLoading();
|
|
@@ -251,7 +253,7 @@
|
|
|
}
|
|
|
showDayworkSave(reqParam).then(res => {
|
|
|
console.log(res)
|
|
|
- init(curSubPlan.value.id);
|
|
|
+ init(store.planDetails.id);
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -260,7 +262,7 @@
|
|
|
}
|
|
|
|
|
|
function handleDoTurnoverAfter() {
|
|
|
- init();
|
|
|
+ init(store.planDetails.id);
|
|
|
}
|
|
|
|
|
|
function handleCancelTurnover(data) {
|
|
@@ -271,7 +273,7 @@
|
|
|
title: "取消成功",
|
|
|
duration: 2000
|
|
|
})
|
|
|
- init(curSubPlan.value.id);
|
|
|
+ init(store.planDetails.id);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
icon: "fail",
|