|
@@ -1,23 +1,25 @@
|
|
|
<template>
|
|
|
- <view class="uni-column container" >
|
|
|
+ <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 class="title-container uni-row">
|
|
|
+ <view class="title-container uni-row" style="justify-content: flex-start;">
|
|
|
<view class="title uni-row">
|
|
|
- <text class="label">批次号:</text>
|
|
|
+ <text class="label">批次号:</text>
|
|
|
<text class="label code">{{ item['productionPlanNo'] }}</text>
|
|
|
</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'] == 0" 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 type="default" class="tag finished"><text class="label">已完成</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<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>
|
|
@@ -41,7 +43,7 @@
|
|
|
<view class="status-btn uni-row">
|
|
|
<view v-if="item['status'] == 1" class=" uni-row">
|
|
|
<!-- <button class="turnover-tag" size="mini" @click="handleShowTurnoverApplication(null)">周转申请</button> -->
|
|
|
- <button class="reporting-tag" size="mini" @click="handleToreportingForWork" >去报工</button>
|
|
|
+ <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button>
|
|
|
</view>
|
|
|
<view v-else-if="item['status'] == 2" class=" uni-row">
|
|
|
<button class="turnover-tag" size="mini">取消周转</button>
|
|
@@ -50,68 +52,77 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view class="bottom uni-row">
|
|
|
- <button class="start-batch-btn" @click="handleShowLotDialog(listData)">开始新批次</button>
|
|
|
+ <button class="start-batch-btn" type="primary" @click="handleShowLotDialog(listData)">开始新批次</button>
|
|
|
</view>
|
|
|
- <dialog-lot ref="lotDialog"/>
|
|
|
+ <dialog-lot ref="lotDialog" />
|
|
|
<dialog-turnoverApplication ref="turnoverApplicationDialog" />
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { reactive, ref } from 'vue'
|
|
|
- import { onLoad, onReady } from '@dcloudio/uni-app'
|
|
|
- import { getDayWorkList } from '@/api/business/dayWork.js'
|
|
|
-
|
|
|
+ import {
|
|
|
+ reactive,
|
|
|
+ ref
|
|
|
+ } from 'vue'
|
|
|
+ import {
|
|
|
+ onLoad,
|
|
|
+ onReady
|
|
|
+ } from '@dcloudio/uni-app'
|
|
|
+ import {
|
|
|
+ getDayWorkList
|
|
|
+ } from '@/api/business/dayWork.js'
|
|
|
+
|
|
|
const turnoverApplicationDialog = ref(null)
|
|
|
const lotDialog = ref(null)
|
|
|
const listData = ref([])
|
|
|
const bizDayworkObj = ref({})
|
|
|
-
|
|
|
+ const curSubPlan = ref({})
|
|
|
+
|
|
|
onLoad((options) => {
|
|
|
- init(options.id);
|
|
|
- })
|
|
|
+ curSubPlan.value = JSON.parse(options.currentSubPlan);
|
|
|
+ console.log(curSubPlan.value)
|
|
|
+ init(curSubPlan.value.id);
|
|
|
+ })
|
|
|
const handleShowTurnoverApplication = (data) => {
|
|
|
let _data = data ?? {}
|
|
|
// 调用子组件中的方法
|
|
|
turnoverApplicationDialog.value.open(_data)
|
|
|
}
|
|
|
const handleShowLotDialog = (data) => {
|
|
|
- // if(data){
|
|
|
+ // if (data) {
|
|
|
// lotDialog.value.open(data)
|
|
|
- // }else{
|
|
|
+ // } else {
|
|
|
uni.navigateTo({
|
|
|
- url:"/pages/addNewBatch/index"
|
|
|
+ url: "/pages/addNewBatch/index?currentSubPlan=" + JSON.stringify(curSubPlan.value)
|
|
|
})
|
|
|
// }
|
|
|
// let _data = data ?? {}
|
|
|
// 调用子组件中的方法
|
|
|
}
|
|
|
- function init(id){
|
|
|
+
|
|
|
+ function init(id) {
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|
|
|
let reqData = {};
|
|
|
reqData.productionPlanDetailSubDetailId = id;
|
|
|
- console.log(reqData)
|
|
|
+ // console.log(reqData)
|
|
|
getDayWorkList(reqData).then(res => {
|
|
|
listData.value = res.rows;
|
|
|
uni.hideLoading();
|
|
|
- })
|
|
|
+ })
|
|
|
}
|
|
|
- function handleToreportingForWork(){
|
|
|
+
|
|
|
+ function handleToreportingForWork() {
|
|
|
+ console.log(curSubPlan.value)
|
|
|
uni.navigateTo({
|
|
|
- url:"/pages/reportingForWork/index"
|
|
|
+ url: "/pages/reportingForWork/index?currentSubPlan=" + JSON.stringify(curSubPlan.value)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-</script>
|
|
|
+</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .container {
|
|
|
- height: 100%;
|
|
|
- background-color: #f5f5f5;
|
|
|
- }
|
|
|
.scroll-container {
|
|
|
width: 92%;
|
|
|
margin: 24rpx auto 0 auto;
|
|
@@ -125,8 +136,9 @@
|
|
|
padding-bottom: 24rpx;
|
|
|
margin-bottom: 24rpx;
|
|
|
border-radius: 10rpx;
|
|
|
+
|
|
|
.title-container {
|
|
|
- justify-content: flex-start;
|
|
|
+
|
|
|
margin-top: 8rpx;
|
|
|
margin-bottom: 16rpx;
|
|
|
|
|
@@ -225,7 +237,7 @@
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
- height: 80rpx;
|
|
|
+ height: 100rpx;
|
|
|
border-top: 1px solid #999999;
|
|
|
padding: 16rpx 32rpx;
|
|
|
align-items: center;
|
|
@@ -233,10 +245,8 @@
|
|
|
|
|
|
.start-batch-btn {
|
|
|
flex: 1;
|
|
|
- background-color: #1684fc;
|
|
|
- height: 100%;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
+ height: 80rpx;
|
|
|
+ padding-top: 10 rpx;
|
|
|
border-radius: 8rpx;
|
|
|
color: #FFFFFF;
|
|
|
font-size: 28rpx;
|