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

dev
qiuhongwu 5 months ago
parent f05babbd28
commit 21d3ffe89b

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

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

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

Loading…
Cancel
Save