|
|
|
@ -7,7 +7,7 @@ import { getTaskRepotPageAPI, getTaskDetailAPI, postOperateAPI } from '@/service
|
|
|
|
|
const popup = ref<UniHelper.UniPopupInstance>()
|
|
|
|
|
const userStore = useLoginStore()
|
|
|
|
|
const dictInfo = userStore?.dictInfo || []
|
|
|
|
|
const unitDictData = dictInfo.filter(e => e.dictType == 'biz_material_unit') || []
|
|
|
|
|
const unitDictData = dictInfo.filter((e) => e.dictType == 'biz_material_unit') || []
|
|
|
|
|
const userId = userStore.userInfo.userId
|
|
|
|
|
|
|
|
|
|
const isShowStart = computed(() => {
|
|
|
|
@ -51,7 +51,7 @@ const getData = async () => {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
integerpageSize: 5,
|
|
|
|
|
owner: userId,
|
|
|
|
|
dispatchDetailId: detailInfo.value.id,
|
|
|
|
|
dispatchDetailId: detailInfo.value.id
|
|
|
|
|
}
|
|
|
|
|
const data = await getTaskRepotPageAPI(params)
|
|
|
|
|
data.list.forEach((e) => {
|
|
|
|
@ -72,7 +72,7 @@ const getDetailData = async (id) => {
|
|
|
|
|
// 发送请求
|
|
|
|
|
// isLoading.value = true
|
|
|
|
|
const params = {
|
|
|
|
|
id,
|
|
|
|
|
id
|
|
|
|
|
}
|
|
|
|
|
const data = await getTaskDetailAPI(params)
|
|
|
|
|
data.startTime = formatDate(data.startTime, 'YYYY-MM-DD')
|
|
|
|
@ -106,16 +106,16 @@ const handleComplate = async () => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
const params = {
|
|
|
|
|
id: detailInfo.value?.id,
|
|
|
|
|
active: 'FINISH',
|
|
|
|
|
active: 'FINISH'
|
|
|
|
|
}
|
|
|
|
|
const data = await postOperateAPI(params)
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url,
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -129,14 +129,19 @@ const handleOk = async (active) => {
|
|
|
|
|
id: detailInfo.value?.id,
|
|
|
|
|
active: 'SUBMIT',
|
|
|
|
|
amount: amount.value,
|
|
|
|
|
workTime: workTime.value,
|
|
|
|
|
workTime: workTime.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const data = await postOperateAPI(params)
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url,
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 开始生产
|
|
|
|
|
const handleStart = async () => {
|
|
|
|
@ -146,13 +151,13 @@ const handleStart = async () => {
|
|
|
|
|
isLoading.value = true
|
|
|
|
|
const params = {
|
|
|
|
|
id: detailInfo.value.id,
|
|
|
|
|
active: 'START',
|
|
|
|
|
active: 'START'
|
|
|
|
|
}
|
|
|
|
|
const data = await postOperateAPI(params)
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url,
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 结束生产
|
|
|
|
@ -163,13 +168,13 @@ const handleStop = async () => {
|
|
|
|
|
isLoading.value = true
|
|
|
|
|
const params = {
|
|
|
|
|
id: detailInfo.value?.id,
|
|
|
|
|
active: 'END',
|
|
|
|
|
active: 'END'
|
|
|
|
|
}
|
|
|
|
|
const data = await postOperateAPI(params)
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url,
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
popup.value?.open()
|
|
|
|
|
}
|
|
|
|
@ -181,10 +186,9 @@ const handleStop = async () => {
|
|
|
|
|
<view class="module-info">
|
|
|
|
|
<view class="product-item product-name">生产订单号:{{ detailInfo.projectCode }}</view>
|
|
|
|
|
<image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill"></image>
|
|
|
|
|
<view :class="[detailInfo.procedureStatus == 2 ? 'had' : 'unhad', 'product-status']">{{
|
|
|
|
|
detailInfo.procedureStatus == 2 ? '已完成' : '未完成' }}</view>
|
|
|
|
|
<view class="product-item">产品编码/名称:{{ detailInfo.projectSubCode || '' }} {{ ' ' + detailInfo.projectSubName }}
|
|
|
|
|
</view>
|
|
|
|
|
<view :class="[detailInfo.procedureStatus == 2 ? 'had' : 'unhad', 'product-status']">{{ detailInfo.procedureStatus == 2 ? '已完成' : '未完成' }}</view>
|
|
|
|
|
<view class="product-item">产品编码/名称:{{ detailInfo.projectSubCode || '' }} {{ ' ' + detailInfo.projectSubName }} </view>
|
|
|
|
|
<view class="product-item">规格/型号:{{ detailInfo.spec }} </view>
|
|
|
|
|
<view class="product-row">
|
|
|
|
|
<view class="row-item">
|
|
|
|
|
<view class="label">生产车间: {{ detailInfo.workshopName }}</view>
|
|
|
|
@ -214,8 +218,7 @@ const handleStop = async () => {
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="product-item">预计生产日期:{{ detailInfo.startTime }} ~ {{ detailInfo.endTime }}</view>
|
|
|
|
|
<view class="finish" v-if="isShowStart && detailInfo.procedureStatus !== 2 && detailInfo.totalWorkTime"
|
|
|
|
|
@click="handleComplate">
|
|
|
|
|
<view class="finish" v-if="isShowStart && detailInfo.procedureStatus !== 2 && detailInfo.totalWorkTime" @click="handleComplate">
|
|
|
|
|
<image class="complate-img" src="/static/images/productionReport-detail-complate.png" mode="scaleToFill" />
|
|
|
|
|
生产完成
|
|
|
|
|
</view>
|
|
|
|
@ -224,9 +227,7 @@ const handleStop = async () => {
|
|
|
|
|
<view class="module-list">
|
|
|
|
|
<view class="module-title">历史报工明细</view>
|
|
|
|
|
<view class="history-list">
|
|
|
|
|
<view class="no-data" v-if="!historyList.length">
|
|
|
|
|
无数据...
|
|
|
|
|
</view>
|
|
|
|
|
<view class="no-data" v-if="!historyList.length"> 无数据... </view>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<view class="item" v-for="(item, index) in historyList" :key="item.id">
|
|
|
|
|
<view class="product-item">生产开始时间:{{ item.startTimeStr }}</view>
|
|
|
|
@ -243,11 +244,9 @@ const handleStop = async () => {
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="tip-index">
|
|
|
|
|
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit">
|
|
|
|
|
</image>
|
|
|
|
|
<view class="text">{{historyList.length - index}}</view>
|
|
|
|
|
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit"> </image>
|
|
|
|
|
<view class="text">{{ historyList.length - index }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</view>
|
|
|
|
@ -294,7 +293,7 @@ const handleStop = async () => {
|
|
|
|
|
padding-bottom: 200rpx;
|
|
|
|
|
|
|
|
|
|
.module {
|
|
|
|
|
background: linear-gradient(178deg, #356899 7%, #356899 57%, #F4F6F9 94%);
|
|
|
|
|
background: linear-gradient(178deg, #356899 7%, #356899 57%, #f4f6f9 94%);
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
|
|
|
|
.module-info {
|
|
|
|
@ -302,8 +301,8 @@ const handleStop = async () => {
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
min-height: 100rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
border-bottom: 2rpx solid #F2F2F2;
|
|
|
|
|
background: linear-gradient(215deg, #C7D3E5 8%, rgba(222, 228, 236, 0) 13%), linear-gradient(162deg, #FFFFFF 25%, #E4EFFD 106%);
|
|
|
|
|
border-bottom: 2rpx solid #f2f2f2;
|
|
|
|
|
background: linear-gradient(215deg, #c7d3e5 8%, rgba(222, 228, 236, 0) 13%), linear-gradient(162deg, #ffffff 25%, #e4effd 106%);
|
|
|
|
|
position: relative;
|
|
|
|
|
border-top-right-radius: 100rpx;
|
|
|
|
|
|
|
|
|
@ -316,18 +315,17 @@ const handleStop = async () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.product-status {
|
|
|
|
|
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 8rpx 12rpx;
|
|
|
|
|
&.had {
|
|
|
|
|
background: #E8FFEA;
|
|
|
|
|
color: #00B42A;
|
|
|
|
|
background: #e8ffea;
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
}
|
|
|
|
|
&.unhad {
|
|
|
|
|
background: #FFF7E8;
|
|
|
|
|
color: #FF7D00;
|
|
|
|
|
background: #fff7e8;
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -335,7 +333,7 @@ const handleStop = async () => {
|
|
|
|
|
margin: 20rpx 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #737D88
|
|
|
|
|
color: #737d88;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.product-row {
|
|
|
|
@ -343,7 +341,7 @@ const handleStop = async () => {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: #737D88;
|
|
|
|
|
color: #737d88;
|
|
|
|
|
|
|
|
|
|
.row-item {
|
|
|
|
|
flex: 1;
|
|
|
|
@ -353,20 +351,19 @@ const handleStop = async () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.val {
|
|
|
|
|
color: #1D2129;
|
|
|
|
|
color: #1d2129;
|
|
|
|
|
|
|
|
|
|
&.high-color {
|
|
|
|
|
color: #00B42A
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.finish {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 40rpx;
|
|
|
|
|
bottom: 30rpx;
|
|
|
|
|
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
|
|
|
|
background: linear-gradient(142deg, #feb34a 14%, #fe9b12 83%);
|
|
|
|
|
color: #fff;
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
@ -381,7 +378,6 @@ const handleStop = async () => {
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -390,7 +386,7 @@ const handleStop = async () => {
|
|
|
|
|
// box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12);
|
|
|
|
|
|
|
|
|
|
.module-title {
|
|
|
|
|
color: #0D0D26;
|
|
|
|
|
color: #0d0d26;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
margin: 20rpx 0;
|
|
|
|
|
font-weight: 500;
|
|
|
|
@ -406,18 +402,18 @@ const handleStop = async () => {
|
|
|
|
|
|
|
|
|
|
.item {
|
|
|
|
|
margin: 10rpx 0;
|
|
|
|
|
background: #EAEEF4;
|
|
|
|
|
background: #eaeef4;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
color: #737D88;
|
|
|
|
|
color: #737d88;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
.product-item {
|
|
|
|
|
margin: 10rpx 0;
|
|
|
|
|
.hight-color {
|
|
|
|
|
color: #00B42A;
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.product-row {
|
|
|
|
@ -425,7 +421,7 @@ const handleStop = async () => {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: #737D88;
|
|
|
|
|
color: #737d88;
|
|
|
|
|
|
|
|
|
|
.row-item {
|
|
|
|
|
flex: 1;
|
|
|
|
@ -434,19 +430,18 @@ const handleStop = async () => {
|
|
|
|
|
.label {
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
&.high-color {
|
|
|
|
|
color: #00B42A
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.val {
|
|
|
|
|
color: #1D2129;
|
|
|
|
|
color: #1d2129;
|
|
|
|
|
|
|
|
|
|
&.high-color {
|
|
|
|
|
color: #00B42A
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.tip-index {
|
|
|
|
|
position: absolute;
|
|
|
|
@ -490,7 +485,7 @@ const handleStop = async () => {
|
|
|
|
|
bottom: 0rpx;
|
|
|
|
|
border-radius: 18rpx;
|
|
|
|
|
padding: 30rpx 30rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
width: 100vw;
|
|
|
|
|
box-shadow: 0px -4px 10px 0px rgba(121, 153, 183, 0.2);
|
|
|
|
@ -509,15 +504,15 @@ const handleStop = async () => {
|
|
|
|
|
border-radius: 24rpx;
|
|
|
|
|
|
|
|
|
|
&.start {
|
|
|
|
|
background: linear-gradient(157deg, #2EACE6 -3%, #356899 90%);
|
|
|
|
|
background: linear-gradient(157deg, #2eace6 -3%, #356899 90%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.stop {
|
|
|
|
|
background: linear-gradient(167deg, #FEA97B -2%, #F75E40 87%);
|
|
|
|
|
background: linear-gradient(167deg, #fea97b -2%, #f75e40 87%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.finish {
|
|
|
|
|
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
|
|
|
|
background: linear-gradient(142deg, #feb34a 14%, #fe9b12 83%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -559,14 +554,14 @@ const handleStop = async () => {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin: 20rpx 0;
|
|
|
|
|
color: #737D88;
|
|
|
|
|
color: #737d88;
|
|
|
|
|
width: 94%;
|
|
|
|
|
|
|
|
|
|
.label {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
width: 260rpx;
|
|
|
|
|
.star {
|
|
|
|
|
color: red
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -589,7 +584,7 @@ const handleStop = async () => {
|
|
|
|
|
width: 300rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
padding: 14rpx 0;
|
|
|
|
|
background-color: #3C8AF7;
|
|
|
|
|
background-color: #3c8af7;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|