Browse Source

Mes PDA 工序质检单更新

master
gaojs 7 months ago
parent
commit
657fc50acd
  1. 2
      src/api/mes/workScheduling/index.ts
  2. 12
      src/pages.json
  3. 418
      src/pages/mes/workScheduling/reportWorkQualityInspection.vue
  4. 22
      src/pages/mes/workScheduling/workScheduling.vue
  5. 121
      src/pages/mes/workScheduling/workSchedulingDetail.vue

2
src/api/mes/workScheduling/index.ts

@ -34,7 +34,7 @@ export function getWorkSchedulingPage(params) {
export function getWorkSchedulingDetail(number) { export function getWorkSchedulingDetail(number) {
//return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number) //return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number)
return http.get('/mes/work-scheduling/get?id=' + number) return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number)
} }
export function getBomInfo(params) { export function getBomInfo(params) {

12
src/pages.json

@ -1909,6 +1909,12 @@
} }
},{ },{
"path": "pages/mes/workScheduling/workScheduling", "path": "pages/mes/workScheduling/workScheduling",
"style": {
"navigationBarTitleText": "生产任务查询",
"enablePullDownRefresh": true
}
},{
"path": "pages/mes/workScheduling/workSchedulingDetail",
"style": { "style": {
"navigationBarTitleText": "生产任务查询明细", "navigationBarTitleText": "生产任务查询明细",
"enablePullDownRefresh": true "enablePullDownRefresh": true
@ -1937,6 +1943,12 @@
"navigationBarTitleText": "齐套检查——检查项", "navigationBarTitleText": "齐套检查——检查项",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{
"path": "pages/mes/workScheduling/reportWorkQualityInspection",
"style": {
"navigationBarTitleText": "报工质检",
"enablePullDownRefresh": true
}
},{ },{
"path": "pages/mes/workOrder/processReport", "path": "pages/mes/workOrder/processReport",
"style": { "style": {

418
src/pages/mes/workScheduling/reportWorkQualityInspection.vue

@ -0,0 +1,418 @@
<template>
<!-- 详情 -->
<view class="detail-container">
<view>
<u-subsection :list="tabsList" v-model="current" @change="tabsChange"></u-subsection>
</view>
<u-form :model="form">
<view class="info">
<view v-if="current == '0'">
<view class="title">
<view>检验质检单</view>
</view>
<view>
<u-form-item label="检验单编号" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入检验单编号"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="检验单名称" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入检验单名称"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="检验类型" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入检验类型"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="检验时间" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入检验时间"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="备注" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入备注"/>
</view>
</u-form-item>
</view>
<view class="title">
<view>检测信息</view>
</view>
<view>
<u-form-item label="检测数量" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入检测数量"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="合格数量" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入合格数量"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="不合格数量" prop="batchNo">
<view>
<u-input v-model="form.batchNo" disabled placeholder="自动生成"/>
</view>
</u-form-item>
</view>
<view>
<u-form-item label="合格率" prop="batchNo">
<view>
<u-input v-model="form.batchNo" disabled placeholder="自动生成"/>
</view>
</u-form-item>
</view>
</view>
<view v-if="current == '1'">
<view class="title">
<view>报工信息</view>
</view>
<view>
<view class="dec-item">
<view>报工人员</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>报工数量</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>报工时间</view>
<view>{{ data.schedulingCode }}</view>
</view>
</view>
</view>
<view v-if="current == '2'">
<view class="title">
<view>任务信息</view>
</view>
<view>
<view class="dec-item">
<view>任务编号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>任务名称</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>站点名称</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>工艺路线</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>工序名称</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>工序编号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>班组</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>任务负责人</view>
<view>{{ data.schedulingCode }}</view>
</view>
</view>
</view>
<view v-if="current == '3'">
<view class="title">
<view>工单信息</view>
</view>
<view>
<view class="dec-item">
<view>工单编号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>工单名称</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>产品名称</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>产品编号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>规格型号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>产品类型</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>单位</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>BOM</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view>
<u-form-item label="批次号" prop="batchNo">
<view>
<u-input v-model="form.batchNo" placeholder="请输入批次号"/>
</view>
</u-form-item>
</view>
</view>
</view>
</view>
<view >
<u-button type="primary" @click="openQualityInspect()">提交</u-button>
</view>
</u-form>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</template>
<script setup lang="ts">
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
ref,
getCurrentInstance
} from 'vue'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
const {proxy} = getCurrentInstance()
const number = ref('')
const data = ref({})
const loading = ref(false)
const tabsList = ref([{name:'质检信息'},{name:'报工信息'},{name:'任务信息'},{name:'工单信息'}])
const current = ref(0)
const form = ref({
batchNo: ''
})
function getWorkSchedulingDetail() {
workSchedulingListApi.getWorkSchedulingDetail(number.value).then((res) => {
console.log(number.value)
data.value = res.data
}).catch(() => {
})
}
onLoad((option) => {
console.log(JSON.parse(option.obj).schedulingCode)
if (option.obj) {
number.value = JSON.parse(option.obj).schedulingCode
}
})
onShow(() => {
//getWorkSchedulingDetail()
})
</script>
<style lang="scss" scoped>
.detail-container {
min-height: 100vh;
background: white;
}
.line {
background: #f5f5f5;
height: 20rpx;
}
.info {
background: white;
}
.tab {
border-bottom: 1px solid #e4e4e4;
}
.title {
display: flex;
align-items: center;
padding: 20rpx 30rpx;
border-bottom: 1px solid #e4e4e4;
view {
&:nth-child(1) {
flex: 1;
border-left: 10rpx solid #409eff;
padding-left: 20rpx;
font-weight: bold;
}
}
}
.dec {
padding: 30rpx;
.dec-item {
padding-bottom: 30rpx;
display: flex;
view {
&:nth-child(1) {
width: 240rpx;
}
&:nth-child(2) {
color: #888888;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
}
.dec2 {
padding: 10rpx 30rpx;
display: flex;
view {
&:nth-child(1) {
width: 180rpx;
}
&:nth-child(2) {
color: #888888;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
.items {
border-radius: 12rpx;
background: #F5F5F5;
padding-bottom: 20rpx;
.items-name {
padding: 20rpx;
border-bottom: 1px solid #dedede;
}
.items-dec {
padding: 0px 20rpx;
margin-top: 20rpx;
}
}
.list {
padding: 20rpx;
.item {
display: flex;
margin-bottom: 20rpx;
.item-box {
border-radius: 12rpx;
border: 1px solid #dedede;
border-radius: 12rpx;
flex: 1;
width: 0rpx;
}
.spare-title {
padding: 20rpx 30rpx;
border-bottom: 1px solid #e4e4e4;
display: flex;
.title-txt {
color: #409eff;
font-size: 30rpx;
font-weight: bold;
flex: 1;
}
}
.dec {
color: #9c9c9c;
padding: 0rpx 30rpx 20rpx;
}
}
}
.add-btn {
display: flex;
justify-content: flex-start;
align-items: center;
}
.footer {
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
z-index: 22;
}
.btns {
display: flex;
button {
flex: 1;
}
.sure {
background: #409eff;
color: white;
border-radius: 0px;
&::after {
border: 1px solid #409eff;
border-radius: 0px;
}
}
.reset {
background: #F5F5F5;
border-radius: 0px;
&::after {
border-radius: 0px;
}
}
}
</style>

22
src/pages/mes/workScheduling/workScheduling.vue

@ -206,7 +206,7 @@ onReachBottom(() => {
// //
function openDetail(item, index) { function openDetail(item, index) {
proxy.$tab.navigateTo(`/pages/mes/workScheduling/detail?id=${item.id}`) proxy.$tab.navigateTo(`/pages/mes/workScheduling/workSchedulingDetail?schedulingCode=${item.schedulingCode}`)
} }
//Bom //Bom
@ -225,6 +225,26 @@ function tabsChange(index) {
tabParams.value.pageNo = 1 tabParams.value.pageNo = 1
if (index == '0') { if (index == '0') {
tabParams.value.status = '' tabParams.value.status = ''
}else if(index == '1'){
tabParams.value.status = '-1'
}else if(index == '2'){
tabParams.value.status = '0'
}else if(index == '3'){
tabParams.value.status = '1'
}else if(index == '4'){
tabParams.value.status = '2'
}else if(index == '5'){
tabParams.value.status = '3'
}else if(index == '6'){
tabParams.value.status = '4'
}else if(index == '7'){
tabParams.value.status = '9'
}else if(index == '8'){
tabParams.value.status = '5'
}else if(index == '9'){
tabParams.value.status = '-3'
}else if(index == '10'){
tabParams.value.status = '-2'
} else { } else {
tabParams.value.status = index tabParams.value.status = index
} }

121
src/pages/mes/workScheduling/detail.vue → src/pages/mes/workScheduling/workSchedulingDetail.vue

@ -1,83 +1,93 @@
<template> <template>
<!-- 详情 --> <!-- 详情 -->
<view class="detail-container"> <view class="detail-container">
<!-- <view>
<u-subsection :list="tabsList" v-model="current" @change="tabsChange"></u-subsection>
</view> -->
<view class="info"> <view class="info">
<view class="title"> <view class="title">
<view>日计划明细</view> <view>生产工序任务明细</view>
</view> </view>
<view class="dec"> <view class="dec">
<view class="dec-item"> <view class="dec-item">
<view>日计划单号</view> <view>工单号</view>
<view>{{ data.planNoDay }}</view> <view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>产品批次码</view>
<view>{{ data.batchCode }}</view>
</view>
<view class="dec-item">
<view>月计划单号</view>
<view>{{ data.planNoMonth }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>状态</view> <view>状态</view>
<view>{{ data.status }}</view> <view>{{ data.status }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>产品编号</view> <view>工序编号</view>
<view>{{ data.productCode }}</view> <view>{{ data.nodeCode }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>车间编码</view> <view>工位验证编码组</view>
<view>{{ data.workroomCode }}</view> <view>{{ data.workstationValidate }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>产线编码</view> <view>设备验证编码组</view>
<view>{{ data.lineCode }}</view> <view>{{ data.deviceValidate }}</view>
</view> </view>
<view class="dec-item">
<view>人员验证组</view>
<view>{{ data.personValidate }}</view>
</view>
<view class="dec-item">
<view>物料验证组</view>
<view>{{ data.materialValidate }}</view>
</view>
<view class="dec-item"> <view class="dec-item">
<view>计划数量</view> <view>计划数量</view>
<view>{{ data.planCount }}</view> <view>{{ data.planCount }}</view>
</view> </view>
<view class="dec-item">
<view>报工人编号</view>
<view>{{ data.reportPerson }}</view>
</view>
<view class="dec-item">
<view>领取人工号</view>
<view>{{ data.receivePerson }}</view>
</view>
<view class="dec-item"> <view class="dec-item">
<view>工艺路线编码</view> <view>报工数量</view>
<view>{{ data.processrouteCode }}</view> <view>{{ data.reportCount }}</view>
</view>
<view class="dec-item">
<view>允许临时工艺</view>
<view>{{ data.tempProcessroute }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>BOM版本</view> <view>报工类型</view>
<view>{{ data.standardBom }}</view> <view>{{ data.reportType }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>工单模式</view> <view>合格数量</view>
<view>{{ data.workMode }}</view> <view>{{ data.qualifiedCount }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>计划日期</view> <view>不合格数量</view>
<view>{{ `${$time.formatDate(data.planDate)}` }}</view> <view>{{ data.unqualifiedCount }}</view>
</view><view class="dec-item">
<view>领取工位</view>
<view>{{ data.receiveWorkstation }}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>开始时间</view> <view>工作设备编码</view>
<view>{{ `${$time.formatDate(data.startTime)}` }}</view> <view>{{ data.receiveDevice }}</view>
</view> </view>
<!-- </view><view class="dec-item">
<view>紧前工序编码</view>
<view>{{ data.preNodeCode }}</view>
</view>
<view class="dec-item">
<view>紧后工序编码</view>
<view>{{ data.nextNodeCode }}</view>
</view> -->
<view class="dec-item"> <view class="dec-item">
<view>结束时间</view> <view>创建时间</view>
<view>{{ `${$time.formatDate(data.endTime)}` }}</view> <view>{{ `${$time.formatDate(data.createTime)}` }}</view>
</view> </view>
<view class="dec-item">
<view>齐套检查-Bom</view>
<view>{{ data.bomInspect }}</view>
</view>
</view> </view>
</view> <view >
<view class="footer" v-if="from == 3"> <u-button type="primary" @click="openQualityInspect()">报工质检</u-button>
<view class="btns"> </view>
<button class="reset" @click="reject">驳回</button>
<button class="sure" @click="agree" :loading='loading' :disabled='loading'>通过</button>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
@ -92,7 +102,8 @@ import {
ref, ref,
getCurrentInstance getCurrentInstance
} from 'vue' } from 'vue'
import * as orderDayPlanListApi from '@/api/mes/orderDay/index.ts'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
const {proxy} = getCurrentInstance() const {proxy} = getCurrentInstance()
const number = ref('') const number = ref('')
@ -101,8 +112,13 @@ const loading = ref(false)
const from = ref()//13 const from = ref()//13
const type = ref() const type = ref()
function getSparePartsApplicationDetail() { const tabsList = ref([{name:'工单明细'},{name:'工序任务'}])
orderDayPlanListApi.getOrderDayPlanDetail(number.value).then((res) => { const current = ref(0)
function getWorkSchedulingDetail() {
workSchedulingListApi.getWorkSchedulingDetail(number.value).then((res) => {
console.log(number.value) console.log(number.value)
data.value = res.data data.value = res.data
}).catch(() => { }).catch(() => {
@ -110,15 +126,20 @@ function getSparePartsApplicationDetail() {
} }
function openQualityInspect() {
proxy.$tab.navigateTo(`/pages/mes/workScheduling/reportWorkQualityInspection?obj=${JSON.stringify(data.value)}`)
}
onLoad((option) => { onLoad((option) => {
if (option.type) type.value = option.type if (option.type) type.value = option.type
if (option.from) from.value = option.from if (option.from) from.value = option.from
if (option.id) { if (option.schedulingCode) {
number.value = option.id number.value = option.schedulingCode
} }
}) })
onShow(() => { onShow(() => {
getSparePartsApplicationDetail() getWorkSchedulingDetail()
}) })
</script> </script>
Loading…
Cancel
Save