生产报工 包装报工新增规格型号字段

dev
qiuhongwu 5 months ago
parent f05babbd28
commit 21d3ffe89b

@ -106,6 +106,7 @@ const handleList = ()=> {
</view>
<view class="code label">产品编码: {{ item.projectSubCode }}</view>
<view class="name label">产品名称: {{ item.projectSubName }}</view>
<view class="name label">规格/型号: {{ item.spec }}</view>
<view class="item-row">
<view class="procedureName label">报工工序: {{ item.procedureName }}</view>
<view class="code label">报工数量: {{ item.amount }}</view>

@ -74,6 +74,7 @@ const onRefresherrefresh = async () => {
<view class="time label">报工时间: {{ item.createTime }}</view>
<view class="code label">产品编码: {{ item.projectSubCode }}</view>
<view class="name label">产品名称: {{ item.projectSubName }}</view>
<view class="name label">规格/型号: {{ item.spec }}</view>
<view class="item-row">
<view class="procedureName label">报工工序: {{ item.procedureName }}</view>
<view class="code label">报工数量: {{ item.amount }}</view>

@ -30,7 +30,7 @@ const queryParams: Required<any> = {
owner: userId, //
procedureStatusList: props.orderState, //
dispatchType: 'PRODUCTION', //
isReport: 1, //
isReport: 1 //
}
const dataList = ref([])
const getListData = async () => {
@ -110,8 +110,7 @@ const onRefresherrefresh = async () => {
<view class="title"></view>
<input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" />
</view> -->
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered" @refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id" @click="handleDetail(item)">
<view class="hd">
<view class="num">派工单</view>
@ -119,7 +118,8 @@ const onRefresherrefresh = async () => {
</view>
<view class="md">
<view class="product-item">生产订单号{{ item.projectCode }}</view>
<view class="product-item">产品编码/名称{{ item.projectSubCode || '' }} {{' ' + item.projectSubName }}</view>
<view class="product-item">产品编码/名称{{ item.projectSubCode || '' }} {{ ' ' + item.projectSubName }}</view>
<view class="product-item">规格/型号{{ item.spec}} </view>
<view class="product-row">
<view class="row-item">
<view class="label">生产车间: {{ item.workshopName }}</view>
@ -168,7 +168,7 @@ const onRefresherrefresh = async () => {
margin: 30rpx auto;
.uni-input {
border: 1px solid #D1D6DB;
border: 1px solid #d1d6db;
height: 60rpx;
line-height: 60rpx;
padding: 4rpx 10rpx;
@ -193,7 +193,7 @@ const onRefresherrefresh = async () => {
.statusLabel {
font-size: 24rpx;
color: #737D88;
color: #737d88;
}
}
@ -202,20 +202,20 @@ const onRefresherrefresh = async () => {
padding: 10rpx;
min-height: 100rpx;
font-size: 28rpx;
border-top: 2rpx solid #F2F2F2;
border-top: 2rpx solid #f2f2f2;
.product-item {
margin: 20rpx 0;
display: flex;
align-items: center;
color: #737D88
color: #737d88;
}
.product-row {
margin: 20rpx 0;
display: flex;
flex-direction: row;
justify-content: space-between;
color: #737D88;
color: #737d88;
.row-item {
flex: 1;
.label {
@ -223,13 +223,12 @@ const onRefresherrefresh = async () => {
}
.val {
color: #1D2129;
color: #1d2129;
&.high-color {
color: #00B42A
color: #00b42a;
}
}
}
}
}
@ -242,7 +241,7 @@ const onRefresherrefresh = async () => {
padding: 10rpx 30rpx;
border-radius: 10rpx;
font-size: 24rpx;
background: linear-gradient(149deg, #2DACE6 4%, #356899 98%);
background: linear-gradient(149deg, #2dace6 4%, #356899 98%);
color: #fff;
}
@ -386,14 +385,14 @@ const onRefresherrefresh = async () => {
}
.secondary {
color: #3775F6;
border-color: #3775F6;
color: #3775f6;
border-color: #3775f6;
}
.primary {
color: #fff;
background-color: #3775F6;
border-color: #3775F6;
background-color: #3775f6;
border-color: #3775f6;
}
}
@ -404,4 +403,5 @@ const onRefresherrefresh = async () => {
padding: 20rpx 0;
}
}
</style>import type { stringify } from 'querystring';
</style>
import type { stringify } from 'querystring';

@ -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;
}
}

Loading…
Cancel
Save