Browse Source

Mes PDA 工序质检单

master
gaojs 6 months ago
parent
commit
5a417735d3
  1. 6
      src/api/mes/workScheduling/index.ts
  2. 8
      src/pages.json
  3. 267
      src/pages/mes/workScheduling/qaForm.vue
  4. 14
      src/pages/mes/workScheduling/reportWorkQualityInspection.vue

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

@ -37,7 +37,6 @@ export function getWorkSchedulingInfo(number) {
} }
export function getWorkSchedulingDetail(number) { export function getWorkSchedulingDetail(number) {
//return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number)
return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number) return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number)
} }
@ -60,6 +59,11 @@ export function getEquipmentInfoList(params) {
export function updateWorkSchedulingInfo(params) { export function updateWorkSchedulingInfo(params) {
return http.post('/mes/complete-inspect/update', params) return http.post('/mes/complete-inspect/update', params)
} }
export function getQaFormPage(params) {
return http.get('/mes/work-scheduling-qaform/page', {params})
}
export interface getConfigProcessWorkerVO { export interface getConfigProcessWorkerVO {
planDayCode: string planDayCode: string
processCode: string processCode: string

8
src/pages.json

@ -1949,6 +1949,12 @@
"navigationBarTitleText": "报工质检", "navigationBarTitleText": "报工质检",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{
"path": "pages/mes/workScheduling/qaForm",
"style": {
"navigationBarTitleText": "报工质检",
"enablePullDownRefresh": true
}
},{ },{
"path": "pages/mes/workScheduling/processReportPeopleCheck", "path": "pages/mes/workScheduling/processReportPeopleCheck",
"style": { "style": {
@ -1961,7 +1967,7 @@
"navigationBarTitleText": "工序报工", "navigationBarTitleText": "工序报工",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},, },
{ {
"path": "pages/mes/productOffline/index", "path": "pages/mes/productOffline/index",
"style": { "style": {

267
src/pages/mes/workScheduling/qaForm.vue

@ -0,0 +1,267 @@
<template>
<view class="container">
<view class="list">
<view>
<u-search :show-action="true" v-model="searchValue" action-text="搜索" input-align="left" height="65"
border-color=#5599FF @search="searchTable()">
</u-search>
<u-tabs :list="list1" :is-scroll="true" active-color="#5599FF" v-model="current" @change="tabsChange"></u-tabs>
</view>
<view class="item" v-for="(item, index) in list" :key="index" @click="openDetail(item)">
<view class="title">
<view class="title-txt">
{{item.qaFormNo}}
</view>
<view class="time">
{{`${$time.formatDate(item.createTime)}`}}
</view>
</view>
<view class="dec">
<view>质检单名称</view><view>{{ item.qaFormName }}</view>
</view>
<view class="dec">
<view>日计划单号</view><view>{{ item.planMasterCode }}</view>
</view>
<view class="dec">
<view>任务工单号</view><view>{{ item.schedulingCode }}</view>
</view>
<view class="dec">
<view>工序编码</view><view>{{ item.nodeCode }}</view>
</view>
<view class="dec">
<view>质检时间</view><view>{{`${$time.formatDate(item.qaTime)}`}}</view>
</view>
<view class="dec">
<view>质检数量</view><view>{{ item.qaCount}}</view>
</view>
<view class="dec">
<view>合格数量</view><view>{{ item.qaCountPassed}}</view>
</view>
<view class="dec">
<view>不合格数量</view><view>{{ item.qaCountNotpassed}}</view>
</view>
<view class="dec">
<view>合格率</view><view>{{ item.qaPassRate}}</view>
</view>
<view class="dec">
<view>状态</view>
<view>
<u-tag text="已质检" v-if="item.status==1" bg-color='rgba(255,255,255,0)' color='#fe8463'
border-color='#fe8463' type="primary" shape='circle'/>
</view>
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" />
</view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
</template>
<script setup lang="ts">
import {
onLoad,
onShow,
onReachBottom
} from '@dcloudio/uni-app'
import {
ref,
getCurrentInstance
} from 'vue'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
const list1 = ref([
{
name: '全部',
},
{
name: '未质检',
},
{
name: '已质检',
}
])
//
const {proxy} = getCurrentInstance()
const current = ref(0)
const status = ref('loadmore') //
const falg = ref('')
const list = ref([])
const searchValue = ref('')
const ss = ref()
const params = ref({
pageNo: 1,
pageSize: 10,
status: '',
flag: null
})
async function getViewList() {
if (status.value == 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
await workSchedulingListApi.getQaFormPage(params.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
params.value.pageNo++
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
proxy.$modal.closeLoading()
})
falg.value = 'view'
}
const tabParams = ref({
pageNo: 1,
pageSize: 10,
status: '',
flag: null
})
async function getTabsList() {
if (status.value == 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
await workSchedulingListApi.getQaFormPage(tabParams.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
tabParams.value.pageNo++
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
proxy.$modal.closeLoading()
})
falg.value = 'tab'
}
//
onShow(() => {
tabParams.value.pageNo = 1
tabParams.value.status = ''
list.value = []
getTabsList()
})
//
onReachBottom(() => {
if (falg.value == 'tab') {
status.value = 'loading'
getTabsList()
}
if (falg.value == 'view') {
status.value = 'loading'
getViewList()
}
})
//
function openDetail(item, index) {
}
//
function tabsChange(index) {
current.value = index
tabParams.value.pageNo = 1
if (index == '0') {
tabParams.value.status = ''
}else if(index == '1'){
tabParams.value.status = '-1'
}else if(index == '2'){
tabParams.value.status = '1'
}
list.value = []
status.value = 'loading'
getTabsList()
}
const searchTableParams = ref({
planNoDay: '',
flag: null
})
async function searchTable() {
list.value = []
searchTableParams.value.planNoDay = this.searchValue
await workSchedulingListApi.getQaFormPage(searchTableParams.value).then((res) => {
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
}
})
}
</script>
<style lang="scss" scoped>
.container{
background: #f5f5f5;
min-height: 100vh;
}
.list {
background: #f5f5f5;
margin-top: 20rpx;
.item {
padding: 30rpx 30rpx 0px 30rpx;
margin-top: 20rpx;
background: white;
position: relative;
.title {
display: flex;
align-items: center;
padding-bottom: 20rpx;
.title-txt {
color: #409eff;
font-weight: bold;
font-size: 36rpx;
width: 0px;
flex: 1;
word-wrap: break-word;
}
.time {
color: #919191;
}
}
.dec {
padding-bottom: 20rpx;
display: flex;
align-items: center;
view {
&:nth-child(1){
width: 200rpx;;
}
&:nth-child(2){
color: #999999;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
.last {
padding-bottom: 30rpx;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #E4E4E4;
padding: 20rpx 0px;
height: 90rpx;
}
}
}
</style>

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

@ -304,16 +304,20 @@ function submitQaForm(){
proxy.$modal.alert("合格数量请输入正确的数字"); proxy.$modal.alert("合格数量请输入正确的数字");
return return
} }
if(form.value.qaCount > planCount.value){ if(parseInt(form.value.qaCount) > parseInt(planCount.value)){
proxy.$modal.alert("检查数量不能大于计划数量"); proxy.$modal.alert("检查数量不能大于计划数量");
return return
} }
if(form.value.qaCountPassed > planCount.value){ if(parseInt(form.value.qaCountPassed) > parseInt(planCount.value)){
proxy.$modal.alert("合格数量不能大于计划数量"); proxy.$modal.alert("合格数量不能大于计划数量");
return return
} }
if(form.value.qaCountPassed > form.value.qaCount){ if(parseInt(form.value.qaCountPassed) > parseInt(planCount.value)){
proxy.$modal.alert("合格数量不能大于检测数量数量"); proxy.$modal.alert("合格数量不能大于计划数量");
return
}
if(parseInt(form.value.qaCountPassed) > parseInt(form.value.qaCount)){
proxy.$modal.alert("合格数量不能大于检测数量");
return return
} }
@ -323,6 +327,8 @@ function submitQaForm(){
loading.value = true loading.value = true
// //
form.value.qaStatus = '1' form.value.qaStatus = '1'
//
form.value.status = '1'
qaFormApi.create(form.value).then((res) => { qaFormApi.create(form.value).then((res) => {
proxy.$modal.closeLoading() proxy.$modal.closeLoading()
if (res.data) { if (res.data) {

Loading…
Cancel
Save