|
@@ -19,8 +19,8 @@
|
|
<text>暂无批次</text>
|
|
<text>暂无批次</text>
|
|
</view>
|
|
</view>
|
|
<!-- 批次列表 -->
|
|
<!-- 批次列表 -->
|
|
- <view v-else v-for="(item, index) in listData" :key="index" class="list-item"
|
|
|
|
- @click="handleToreportingForWork(item)">
|
|
|
|
|
|
+ <view v-else v-for="(item, index) in listData" :key="index" class="list-item" @click="checkStatus(item)">
|
|
|
|
+ <!-- @click="handleToreportingForWork(item)" -->
|
|
<view class="title-container uni-row" style="justify-content: flex-start;">
|
|
<view class="title-container uni-row" style="justify-content: flex-start;">
|
|
<view class="title uni-row">
|
|
<view class="title uni-row">
|
|
<text class="label">批次号:</text>
|
|
<text class="label">批次号:</text>
|
|
@@ -90,8 +90,9 @@
|
|
<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
|
|
<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="status-btn uni-row">
|
|
<view class="status-btn uni-row">
|
|
- <view v-if="item.dayworkItemList[0].status == 0" class=" uni-row">
|
|
|
|
- <button class="reporting-tag" size="mini" @click.stop="startReport(item)">开始报工</button>
|
|
|
|
|
|
+ <view v-if="item.dayworkItemList[0].status < 3" class=" uni-row">
|
|
|
|
+ <button class="reporting-tag" size="mini"
|
|
|
|
+ @click.stop="handleToreportingForWork(item)">开始报工</button>
|
|
<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
</view>
|
|
</view>
|
|
<view v-if="item['status'] == 2" class=" uni-row">
|
|
<view v-if="item['status'] == 2" class=" uni-row">
|
|
@@ -352,10 +353,18 @@
|
|
init(store.planDetails.id);
|
|
init(store.planDetails.id);
|
|
}
|
|
}
|
|
|
|
|
|
- function handleToreportingForWork(item) {
|
|
|
|
- if (item.dayworkItemList[0].status == 0) {
|
|
|
|
|
|
+ function checkStatus(item) {
|
|
|
|
+ if (item.dayworkItemList[0].status < 3) {
|
|
return
|
|
return
|
|
|
|
+ } else {
|
|
|
|
+ handleToreportingForWork(item)
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function handleToreportingForWork(item) {
|
|
|
|
+ // if (item.dayworkItemList[0].status == 0) {
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
uni.$once("formBack", () => handleSearch())
|
|
uni.$once("formBack", () => handleSearch())
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/pages/sorting/form",
|
|
url: "/pages/sorting/form",
|