质检计算等问题
This commit is contained in:
parent
1a5e45fb4d
commit
fb84e7b6af
@ -328,16 +328,16 @@
|
|||||||
|
|
||||||
//算时间和数量
|
//算时间和数量
|
||||||
//算时间
|
//算时间
|
||||||
var lastIndex = historyList.value.length - 1;
|
// var lastIndex = historyList.value.length - 1;
|
||||||
var lastItem = historyList.value[lastIndex];
|
var lastItem = historyList.value[0];
|
||||||
console.log(historyList.value)
|
var www = new Date();
|
||||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
workTime.value = Math.floor(Math.abs(lastItem.createTime - www.getTime()) / (1000 * 60 * 60)).toString();
|
||||||
//算数量
|
//算数量
|
||||||
if (historyList.value.length == 1) {
|
if (historyList.value.length == 1) {
|
||||||
amount.value = detailInfo.value.amount;
|
amount.value = detailInfo.value.amount;
|
||||||
} else {
|
} else {
|
||||||
var beforeAmount = 0;
|
var beforeAmount = 0;
|
||||||
for (var i = 0; i < historyList.value.length - 1; i++) {
|
for (var i = 1; i < historyList.value.length ; i++) {
|
||||||
beforeAmount += historyList.value[i].amount
|
beforeAmount += historyList.value[i].amount
|
||||||
}
|
}
|
||||||
var finalamount = detailInfo.value.amount - beforeAmount
|
var finalamount = detailInfo.value.amount - beforeAmount
|
||||||
|
@ -281,7 +281,7 @@
|
|||||||
@click="handleComplate">
|
@click="handleComplate">
|
||||||
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
|
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
|
||||||
mode="scaleToFill" />
|
mode="scaleToFill" />
|
||||||
质检结束
|
生产结束
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
// const url = `/pages/pgMaster/pgMaster-detail?id=${detailInfo.value.id}`
|
// const url = `/pages/unqualifiedNotification/unqualifiedNotification`
|
||||||
// uni.redirectTo({
|
// uni.redirectTo({
|
||||||
// url,
|
// url,
|
||||||
// })
|
// })
|
||||||
@ -207,7 +207,20 @@
|
|||||||
const audit = () => {
|
const audit = () => {
|
||||||
popup.value.open()
|
popup.value.open()
|
||||||
}
|
}
|
||||||
|
const cancel = () => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // 返回的页面数,这里1表示返回上一页
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const getSuger = (val) => {
|
||||||
|
if (val == 1) {
|
||||||
|
return '返修'
|
||||||
|
} else if (val == 2) {
|
||||||
|
return '让步接收'
|
||||||
|
} else if (val == 3) {
|
||||||
|
return '报废'
|
||||||
|
}
|
||||||
|
}
|
||||||
const detailId = ref()
|
const detailId = ref()
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
@ -225,7 +238,11 @@
|
|||||||
<view class="product-item">子项目:{{ detailInfo.projectSubCode || '' }}
|
<view class="product-item">子项目:{{ detailInfo.projectSubCode || '' }}
|
||||||
{{' ' + detailInfo.projectSubName }}
|
{{' ' + detailInfo.projectSubName }}
|
||||||
</view>
|
</view>
|
||||||
<view class="product-item">通知日期:{{detailInfo.createTime}}</view>
|
<view class="product-item">通知日期:{{formatDate(detailInfo.createTime, 'YYYY-MM-DD HH:mm')}}</view>
|
||||||
|
<view class="product-item" v-if="detailInfo.notificationStatus === 3">
|
||||||
|
审核日期:{{formatDate(detailInfo.auditTime, 'YYYY-MM-DD HH:mm')}}</view>
|
||||||
|
<view class="product-item" v-if="detailInfo.notificationStatus === 3">
|
||||||
|
审核意见:{{getSuger(detailInfo.auditOpinion)}}</view>
|
||||||
<view class="product-row" v-if="detailInfo.typeName == '过程检'">
|
<view class="product-row" v-if="detailInfo.typeName == '过程检'">
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="label">零件名称:<text class="blue">{{ detailInfo.materialName }}</text></view>
|
<view class="label">零件名称:<text class="blue">{{ detailInfo.materialName }}</text></view>
|
||||||
@ -268,7 +285,11 @@
|
|||||||
<view class="product-row">
|
<view class="product-row">
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="label">是否复检:</view>
|
<view class="label">是否复检:</view>
|
||||||
<view class="val high-color">{{ detailInfo.isRepre == 0 ?'否':'是' }}</view>
|
<view class="val high-color">{{ detailInfo.isRepre == 1 ?'否':'是' }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="row-item">
|
||||||
|
<view class="label">是否合格:</view>
|
||||||
|
<view class="val high-color">{{ detailInfo.isQua == 0?'合格':'不合格' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -300,21 +321,14 @@
|
|||||||
<view class="text">审核信息</view>
|
<view class="text">审核信息</view>
|
||||||
<!-- <view class="close" @click="handleClose">X</view> -->
|
<!-- <view class="close" @click="handleClose">X</view> -->
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" style="height: 100%;">
|
<view class="formHeight">
|
||||||
|
<uni-forms ref="formRef" :label-width="100">
|
||||||
<view class="cont">
|
<uni-forms-item class="auditSelect" label="审核意见" required name="type">
|
||||||
|
<uni-data-select style="width: 60%;" v-model="detailInfo.auditOpinion" :localdata="range"></uni-data-select>
|
||||||
<view class="item">
|
</uni-forms-item>
|
||||||
<view class="label"><span class="star">*</span>审核意见:</view>
|
</uni-forms>
|
||||||
<uni-data-select
|
|
||||||
v-model="detailInfo.auditOpinion"
|
|
||||||
:localdata="range"
|
|
||||||
|
|
||||||
></uni-data-select>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<view class="ok" @click="handleOk">确定</view>
|
<view class="ok" @click="handleOk">确定</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</template>
|
</template>
|
||||||
@ -322,10 +336,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.auditSelect{
|
||||||
|
margin-top: 10%;
|
||||||
|
margin-left: 10%;
|
||||||
|
}
|
||||||
|
.formHeight{
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
// 订单列表
|
// 订单列表
|
||||||
.data-detail {
|
.data-detail {
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
|
|
||||||
.statusLabelzf {
|
.statusLabelzf {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -340,6 +362,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@ -565,9 +588,11 @@
|
|||||||
width: 272rpx;
|
width: 272rpx;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
|
|
||||||
&.info {
|
&.info {
|
||||||
background: linear-gradient(157deg, #A9A9A9 -3%, #A9A9A9 90%);
|
background: linear-gradient(157deg, #A9A9A9 -3%, #A9A9A9 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.start {
|
&.start {
|
||||||
background: linear-gradient(157deg, #2EACE6 -3%, #356899 90%);
|
background: linear-gradient(157deg, #2EACE6 -3%, #356899 90%);
|
||||||
}
|
}
|
||||||
@ -575,9 +600,11 @@
|
|||||||
&.stop {
|
&.stop {
|
||||||
background: linear-gradient(167deg, #FEA97B -2%, #F75E40 87%);
|
background: linear-gradient(167deg, #FEA97B -2%, #F75E40 87%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.danger {
|
&.danger {
|
||||||
background: linear-gradient(167deg, #C00000 -2%, #E80000 87%);
|
background: linear-gradient(167deg, #C00000 -2%, #E80000 87%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.finish {
|
&.finish {
|
||||||
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
||||||
}
|
}
|
||||||
|
@ -304,15 +304,14 @@
|
|||||||
const handleStop = async () => {
|
const handleStop = async () => {
|
||||||
// var lastIndex = historyList.value.length-1;
|
// var lastIndex = historyList.value.length-1;
|
||||||
var lastItem = historyList.value[0];
|
var lastItem = historyList.value[0];
|
||||||
console.log(historyList.value)
|
var nowDate = new Date();
|
||||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
workTime.value = Math.floor(Math.abs(lastItem.createTime - nowDate.getTime()) / (1000 * 60 * 60)).toString();
|
||||||
//算数量
|
//算数量
|
||||||
if (historyList.value.length == 1) {
|
if (historyList.value.length == 1) {
|
||||||
amount.value = detailInfo.value.amount;
|
amount.value = detailInfo.value.amount;
|
||||||
} else {
|
} else {
|
||||||
var beforeAmount = 0;
|
var beforeAmount = 0;
|
||||||
for (var i = historyList.value.length - 1; i > 0; i--) {
|
for (var i = 1; i < historyList.value.length ; i++) {
|
||||||
console.log(historyList.value[i])
|
|
||||||
beforeAmount += historyList.value[i].amount
|
beforeAmount += historyList.value[i].amount
|
||||||
}
|
}
|
||||||
var finalamount = detailInfo.value.amount - beforeAmount
|
var finalamount = detailInfo.value.amount - beforeAmount
|
||||||
@ -397,7 +396,7 @@
|
|||||||
icon: 'none', // 显示纯文本时icon设为none
|
icon: 'none', // 显示纯文本时icon设为none
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
await initPage()
|
// await initPage()
|
||||||
const pages = getCurrentPages(); // 获取当前页面栈
|
const pages = getCurrentPages(); // 获取当前页面栈
|
||||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user