|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
|
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
|
- <view v-for="(item, index) in listData" :key="index" class="list-item" @click="handleToreportingForWork">
|
|
|
+ <view v-for="(item, index) in listData" :key="index" class="list-item" @click="handleToreportingForWork(item)">
|
|
|
<view class="title-container uni-row" style="justify-content: flex-start;">
|
|
|
<view class="title uni-row">
|
|
|
<text class="label">批次号:</text>
|
|
@@ -19,7 +19,7 @@
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">箱号</text>
|
|
|
<text class="label right">{{ item['caseNumber'] }}</text>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">总工时</text>
|
|
|
<text class="label right">{{ item['totalWorkingHours']}}h</text>
|
|
@@ -42,7 +42,8 @@
|
|
|
</view>
|
|
|
<view class="status-btn uni-row">
|
|
|
<view v-if="item['status'] == 1" class=" uni-row">
|
|
|
- <button class="turnover-tag" size="mini" @click.stop="handleShowTurnoverApplication(null)">周转申请</button>
|
|
|
+ <button class="turnover-tag" size="mini"
|
|
|
+ @click.stop="handleShowTurnoverApplication(null)">周转申请</button>
|
|
|
<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
|
</view>
|
|
|
<view v-else-if="item['status'] == 2" class=" uni-row">
|
|
@@ -72,6 +73,9 @@
|
|
|
import {
|
|
|
getDayWorkList
|
|
|
} from '@/api/business/dayWork.js'
|
|
|
+ import {
|
|
|
+ store
|
|
|
+ } from '@/store/index.js'
|
|
|
|
|
|
const turnoverApplicationDialog = ref(null)
|
|
|
const lotDialog = ref(null)
|
|
@@ -79,21 +83,22 @@
|
|
|
const bizDayworkObj = ref({})
|
|
|
const curSubPlan = ref({})
|
|
|
|
|
|
- onLoad((options) => {
|
|
|
- curSubPlan.value = JSON.parse(options?.currentSubPlan || {});
|
|
|
+ onLoad(() => {
|
|
|
+ let encodeData = encodeURIComponent(store.planSubDetails);
|
|
|
+ curSubPlan.value = JSON.parse(decodeURIComponent(encodeData));
|
|
|
console.log(curSubPlan.value)
|
|
|
- init(curSubPlan.value.id);
|
|
|
- uni.$on('batchReporting-addBatch',() =>{
|
|
|
+ init(curSubPlan.value.id);
|
|
|
+ uni.$on('batchReporting-addBatch', () => {
|
|
|
init(curSubPlan.value.id);
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
const handleShowTurnoverApplication = (data) => {
|
|
|
let _data = data ?? {}
|
|
|
// 调用子组件中的方法
|
|
|
turnoverApplicationDialog.value.open(_data)
|
|
|
- }
|
|
|
+ }
|
|
|
const handleShowLotDialog = (data) => {
|
|
|
if (data.length > 0) {
|
|
|
lotDialog.value.open(data)
|
|
@@ -113,16 +118,16 @@
|
|
|
// console.log(reqData)
|
|
|
getDayWorkList(reqData).then(res => {
|
|
|
console.log(reqData)
|
|
|
- console.log(res)
|
|
|
listData.value = res.rows;
|
|
|
+ console.log(res)
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function handleToreportingForWork() {
|
|
|
- console.log(curSubPlan.value)
|
|
|
+ function handleToreportingForWork(item) {
|
|
|
+ store.dayworkInfo = JSON.stringify(item)
|
|
|
uni.navigateTo({
|
|
|
- url: "/pages/reportingForWork/index?currentSubPlan=" + JSON.stringify(curSubPlan.value)
|
|
|
+ url: "/pages/reportingForWork/index?"
|
|
|
})
|
|
|
}
|
|
|
</script>
|