|
@@ -10,11 +10,11 @@
|
|
|
</view>
|
|
|
<view class=" uni-row" style="margin-left: 16rpx;">
|
|
|
<view v-if="item['status'] == 1" class="tag"><text class="label">进行中</text></view>
|
|
|
- <!-- <view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">周转中</text>
|
|
|
- </view> -->
|
|
|
+ <view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">周转中</text>
|
|
|
+ </view>
|
|
|
<view v-else-if="item['status'] == 0" class="tag turnover "><text class="label">未开始</text>
|
|
|
</view>
|
|
|
- <view v-else-if="item['status'] == 2" type="default" class="tag finished"><text
|
|
|
+ <view v-else-if="item['status'] == 3" type="default" class="tag finished"><text
|
|
|
class="label">已完成</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -32,7 +32,8 @@
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">上道工序</text>
|
|
|
- <text class="label right">{{ item.prevProcess.length > 0 ? item.prevProcess[item.prevProcess.length - 1].processAlias : '无'}}</text>
|
|
|
+ <text
|
|
|
+ class="label right">{{ item.prevProcess.length > 0 ? item.prevProcess[item.prevProcess.length - 1].processAlias : '无'}}</text>
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">当前工序</text>
|
|
@@ -40,7 +41,8 @@
|
|
|
</view>
|
|
|
<view class="item-info uni-row">
|
|
|
<text class="label">下道工序</text>
|
|
|
- <text class="label right">{{ item.nextProcess.length > 0 ? item.nextProcess[0].processAlias : null }}</text>
|
|
|
+ <text
|
|
|
+ class="label right">{{ item.nextProcess.length > 0 ? item.nextProcess[0].processAlias : null }}</text>
|
|
|
</view>
|
|
|
<view class="status-btn uni-row">
|
|
|
<view v-if="item['status'] == 1" class=" uni-row">
|
|
@@ -48,7 +50,7 @@
|
|
|
@click.stop="handleShowTurnoverApplication(item)">周转申请</button>
|
|
|
<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
|
</view>
|
|
|
- <view v-else-if="item['status'] == 1" class=" uni-row">
|
|
|
+ <view v-else-if="item['status'] == 2" class=" uni-row">
|
|
|
<button class="turnover-tag" size="mini">取消周转</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -82,14 +84,17 @@
|
|
|
onReady
|
|
|
} from '@dcloudio/uni-app'
|
|
|
import {
|
|
|
- getDayWorkList
|
|
|
+ getDayWorkList,
|
|
|
+ showDaywork,
|
|
|
+ showDayworkSave
|
|
|
} from '@/api/business/dayWork.js'
|
|
|
+ // import {
|
|
|
+ // getDayWorkItemList
|
|
|
+ // } from '@/api/business/dayWorkItem.js'
|
|
|
import {
|
|
|
store
|
|
|
} from '@/store/index.js'
|
|
|
- import {
|
|
|
- showDaywork,showDayworkSave
|
|
|
- } from '@/api/business/dayWork.js'
|
|
|
+
|
|
|
|
|
|
const turnoverApplicationDialog = ref(null)
|
|
|
const lotDialog = ref(null)
|
|
@@ -99,9 +104,9 @@
|
|
|
const processInfo = ref([]) // 员工工序信息
|
|
|
const bottomStatus = ref(0) // 底部按钮显示
|
|
|
const reqParam = ref(null);
|
|
|
+ const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态
|
|
|
|
|
|
onLoad(() => {
|
|
|
- // let encodeData = encodeURIComponent(store.planSubDetails);
|
|
|
curSubPlan.value = store.planSubDetails || {
|
|
|
processSequence: []
|
|
|
};
|
|
@@ -155,12 +160,27 @@
|
|
|
// 设置下道序
|
|
|
for (let i = 0; i < listData.value.length; i++) {
|
|
|
for (let j = 0; j < listData.value[i].processSequence.length; j++) {
|
|
|
- if(listData.value[i].currentProcess.processCode === listData.value[i].processSequence[j].processCode){
|
|
|
- listData.value[i].nextProcess = (j + 1) < listData.value[i].processSequence.length ? listData.value[i].processSequence.slice(j + 1) : [];
|
|
|
+ if (listData.value[i].currentProcess.processCode === listData.value[i].processSequence[j]
|
|
|
+ .processCode) {
|
|
|
+ listData.value[i].nextProcess = (j + 1) < listData.value[i].processSequence.length ?
|
|
|
+ listData.value[i].processSequence.slice(j + 1) : [];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
console.log(listData.value)
|
|
|
+ // if (res.rows.length > 0) {
|
|
|
+ // for (let i = 0; i < listData.value.length; i++) {
|
|
|
+ // getDayWorkItemList({
|
|
|
+ // dayworkId: listData.value[i].id,
|
|
|
+ // userId: store.userInfo.userId
|
|
|
+ // }).then(response => {
|
|
|
+ // if (response.code == 200) {
|
|
|
+ // curDayworkItem.value = response.rows[0]
|
|
|
+ // console.log(res)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
}
|
|
@@ -189,16 +209,16 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- function handleAddDaywork(data){
|
|
|
+
|
|
|
+ function handleAddDaywork(data) {
|
|
|
for (let i = 0; i < listData.value.length; i++) {
|
|
|
if (Object.entries(listData.value[i]).toString() === Object.entries(data).toString()) {
|
|
|
uni.showToast({
|
|
|
icon: "error",
|
|
|
- title: "该批次已存在"
|
|
|
+ title: "该批次已存在"
|
|
|
})
|
|
|
console.log("该批次已存在")
|
|
|
- return;
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
listData.value.push(data);
|
|
@@ -210,8 +230,8 @@
|
|
|
init(curSubPlan.value.id);
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- function handleDoIt(){
|
|
|
+
|
|
|
+ function handleDoIt() {
|
|
|
handleAddDaywork(reqParam.value);
|
|
|
}
|
|
|
</script>
|
|
@@ -340,7 +360,7 @@
|
|
|
.start-batch-btn {
|
|
|
flex: 1;
|
|
|
height: 80rpx;
|
|
|
- padding-top: 10 rpx;
|
|
|
+ // padding-top: 20 rpx;
|
|
|
border-radius: 8rpx;
|
|
|
color: #FFFFFF;
|
|
|
font-size: 28rpx;
|