|
@@ -20,6 +20,7 @@
|
|
|
<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
|
|
|
<text>否</text> -->
|
|
|
</view>
|
|
|
+
|
|
|
<view class="scroll-container" style="padding-bottom: 150rpx">
|
|
|
<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
|
|
|
<text>暂无批次</text>
|
|
@@ -77,7 +78,8 @@
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">下道工序</text>
|
|
|
- <view class="label right uni-row">{{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}
|
|
|
+ <view class="label right uni-row">
|
|
|
+ {{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}
|
|
|
(<view style="color: #1684fc;" @click.stop="handleClickProcessList(item)"> 工艺列表
|
|
|
</view>)
|
|
|
</view>
|
|
@@ -140,6 +142,7 @@
|
|
|
import {
|
|
|
normalizeProps,
|
|
|
reactive,
|
|
|
+ onMounted,
|
|
|
ref
|
|
|
} from 'vue'
|
|
|
import {
|
|
@@ -166,7 +169,9 @@
|
|
|
import {
|
|
|
toHHmmss
|
|
|
} from '@/utils/common.js'
|
|
|
-
|
|
|
+ import {
|
|
|
+ onPullDownRefresh
|
|
|
+ } from "@dcloudio/uni-app"
|
|
|
|
|
|
const turnoverApplicationDialog = ref(null)
|
|
|
const selectProduction = ref(null)
|
|
@@ -175,6 +180,7 @@
|
|
|
const curPlan = ref(null)
|
|
|
const bizDayworkObj = ref({})
|
|
|
const bottomStatus = ref(false) // 底部按钮显示
|
|
|
+ const paging = ref();
|
|
|
const reqParam = ref(null);
|
|
|
const normalStatus = ref(true)
|
|
|
const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态
|
|
@@ -185,6 +191,8 @@
|
|
|
const curProcessAfte = ref([])
|
|
|
const showRight = ref(null) // 抽屉
|
|
|
|
|
|
+
|
|
|
+
|
|
|
onLoad(() => {
|
|
|
curPlan.value = store.planDetails;
|
|
|
normalStatus.value = true;
|
|
@@ -206,12 +214,59 @@
|
|
|
}
|
|
|
})
|
|
|
console.log(wasteRecyclingList.value.length)
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ // 页面下拉刷新操作
|
|
|
+ onPullDownRefresh(() => {
|
|
|
+ let reqData = {
|
|
|
+ productionPlanDetailId: store.planDetails.id,
|
|
|
+ deptId: store.curDeptDetails.deptId,
|
|
|
+ keywords: keywords.value
|
|
|
+ };
|
|
|
+ // console.log(normalStatus.value)
|
|
|
+
|
|
|
+ getDayWorkList(reqData).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ tempList.value = res.data
|
|
|
+ if (normalStatus.value) {
|
|
|
+ listData.value = res.data.filter(item => {
|
|
|
+ return item.isWasteRecycling == 0 && item.isAmend == 0;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ listData.value = res.data.filter(item => {
|
|
|
+ return item.isWasteRecycling == 1 || item.isAmend == 1;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ for (let i = 0; i < listData.value.length; i++) {
|
|
|
+ if (listData.value[i].prevProcess) {
|
|
|
+ let sum = 0;
|
|
|
+ for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
|
|
|
+ if (listData.value[i].dayworkItemList[j].processId == listData.value[i]
|
|
|
+ .prevProcess
|
|
|
+ .id && (listData.value[i].dayworkItemList[j].status == 2 || listData.value[
|
|
|
+ i]
|
|
|
+ .dayworkItemList[j].status == 3)) {
|
|
|
+ sum += listData.value[i].dayworkItemList[j].qualifiedNum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ listData.value[i].processQualifiedNum = sum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
+
|
|
|
onShow(() => {
|
|
|
reflush();
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
|
|
|
+ ;
|
|
|
+
|
|
|
function reflush() {
|
|
|
init(store.planDetails.id);
|
|
|
}
|
|
@@ -239,12 +294,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- // .catch(err => {
|
|
|
- // uri.showToast({
|
|
|
- // icon: "fail",
|
|
|
- // title: "网络请求失败。"
|
|
|
- // })
|
|
|
- // })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function handleStartNewBatch() {
|
|
@@ -282,8 +332,10 @@
|
|
|
if (listData.value[i].prevProcess) {
|
|
|
let sum = 0;
|
|
|
for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
|
|
|
- if (listData.value[i].dayworkItemList[j].processId == listData.value[i].prevProcess
|
|
|
- .id && (listData.value[i].dayworkItemList[j].status == 2 || listData.value[i]
|
|
|
+ if (listData.value[i].dayworkItemList[j].processId == listData.value[i]
|
|
|
+ .prevProcess
|
|
|
+ .id && (listData.value[i].dayworkItemList[j].status == 2 || listData
|
|
|
+ .value[i]
|
|
|
.dayworkItemList[j].status == 3)) {
|
|
|
sum += listData.value[i].dayworkItemList[j].qualifiedNum;
|
|
|
}
|
|
@@ -292,6 +344,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
}
|