Browse Source

MES——> PDA日任务工序完成

master
gaojs 7 months ago
parent
commit
c1fa08972e
  1. 12
      src/api/mes/workScheduling/index.ts
  2. 69
      src/pages/mes/workScheduling/workScheduling.vue
  3. 203
      src/pages/mes/workScheduling/workSchedulingDetail.vue

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

@ -32,6 +32,10 @@ export function getWorkSchedulingPage(params) {
return http.get('/mes/workScheduling/page', {params})
}
export function getWorkSchedulingPDAPage(params) {
return http.get('/mes/workScheduling/PDA-page', {params})
}
export function getWorkSchedulingInfo(number) {
return http.get('/mes/workScheduling/get?id=' + number)
}
@ -44,8 +48,12 @@ export function getWorkSchedulingPDF(number) {
return http.get('/mes/workScheduling/get-PDF?planMasterCode=' + number)
}
export function getWorkSchedulingDetail(number) {
return http.get('/mes/work-scheduling-detail/get-info?schedulingCode=' + number)
export function getWorkSchedulingDetail(params) {
return http.post('/mes/work-scheduling-detail/get-info', params)
}
export function getWorkSchedulingProcessFinished(number) {
return http.get('/mes/work-scheduling-detail/processFinished?id=' + number)
}
export function getBomInfo(params) {

69
src/pages/mes/workScheduling/workScheduling.vue

@ -10,7 +10,7 @@
@change="tabsChange" :is-scroll="false">
</u-subsection> -->
</view>
<view class="item" v-for="(item, index) in list" :key="index" @click="openDetail(item)">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="title">
<view class="title-txt">
{{item.schedulingCode}}
@ -56,6 +56,16 @@
border-color='#fe8463' type="primary" shape='circle'/>
</view>
</view>
<view>
<u-collapse ref="collapse" open="false">
<u-collapse-item title="当前工序" >
<view class="content">
<text class="text">{{ item.workingNode }}</text>
<u-button type="success" size="mini" v-if="item.status==1" @click="nodeCodeFinish(item)" class="btn1" style="background-color:#3366FF">完成</u-button>
</view>
</u-collapse-item>
</u-collapse>
</view>
<view v-if="item.status==-1" >
<u-button type="primary" @click="openInspectItem(item)">齐套检查</u-button>
</view>
@ -71,6 +81,7 @@
</view>
<view>
<u-button type="success" size="mini" @click="SOP(item)" class="btn" style="background-color:#888888">SOP</u-button>
<u-button type="success" size="mini" @click="openDetail(item)" class="btn" style="background-color:#888888">明细</u-button>
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
@ -115,6 +126,9 @@ const list1 = ref([
{
name: '待质检',
},
{
name: '已完工',
},
{
name: '已完成',
},
@ -132,7 +146,7 @@ const status = ref('loadmore') //是否显示没有更多了
const falg = ref('')
const list = ref([])
const searchValue = ref('')
const ss = ref()
const nodeCodes = ref([])
const params = ref({
@ -146,7 +160,7 @@ async function getViewList() {
if (status.value == 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
await workSchedulingListApi.getWorkSchedulingPage(params.value).then((res) => {
await workSchedulingListApi.getWorkSchedulingPDAPage(params.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
@ -172,7 +186,7 @@ async function getTabsList() {
if (status.value == 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
await workSchedulingListApi.getWorkSchedulingPage(tabParams.value).then((res) => {
await workSchedulingListApi.getWorkSchedulingPDAPage(tabParams.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
@ -209,6 +223,34 @@ onReachBottom(() => {
}
})
//
// function getNodeCodes(item){
// console.log(item.schedulingCode)
// workSchedulingListApi.getWorkSchedulingDetail(item.schedulingCode).then((res) => {
// console.log(res.data);
// nodeCodes.value = []
// nodeCodes.value = res.data
// console.log(nodeCodes.value);
// }).catch(() => {
// })
// }
//
function nodeCodeFinish(item){
console.log(item.remark)
proxy.$modal.loading('加载中')
workSchedulingListApi.getWorkSchedulingProcessFinished(item.remark).then((res) => {
proxy.$modal.showToast('成功')
console.log(res.data)
tabsChange(3);
proxy.$modal.closeLoading()
}).catch(() => {
proxy.$modal.showToast('失败')
proxy.$modal.closeLoading()
})
}
//
function openDetail(item, index) {
proxy.$tab.navigateTo(`/pages/mes/workScheduling/workSchedulingDetail?obj=${JSON.stringify(item)}`)
@ -261,14 +303,16 @@ function tabsChange(index) {
}else if(index == '5'){
tabParams.value.status = '3'
}else if(index == '6'){
tabParams.value.status = '4'
tabParams.value.status = '6'
}else if(index == '7'){
tabParams.value.status = '9'
tabParams.value.status = '6'
}else if(index == '8'){
tabParams.value.status = '5'
tabParams.value.status = '6'
}else if(index == '9'){
tabParams.value.status = '-3'
tabParams.value.status = '9'
}else if(index == '10'){
tabParams.value.status = '-3'
}else if(index == '11'){
tabParams.value.status = '-2'
} else {
tabParams.value.status = index
@ -286,7 +330,7 @@ const searchTableParams = ref({
async function searchTable() {
list.value = []
searchTableParams.value.planNoDay = this.searchValue
await workSchedulingListApi.getWorkSchedulingPage(searchTableParams.value).then((res) => {
await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => {
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
}
@ -447,4 +491,11 @@ function SOP(item){
font-size: 17px
}
.btn1{
margin-left: 8px;
width: 35px;
height:20px;
font-size: 10px
}
</style>

203
src/pages/mes/workScheduling/workSchedulingDetail.vue

@ -1,103 +1,98 @@
<template>
<!-- 详情 -->
<view class="detail-container">
<!-- <view>
<u-subsection :list="tabsList" v-model="current" @change="tabsChange"></u-subsection>
</view> -->
<view class="item" v-for="(item, index) in list" :key="index" @click="openDetail(item)">
<view class="info">
<view class="title">
<view>生产工序任务明细</view>
</view>
<view class="dec">
<view class="dec-item">
<view>工单号</view>
<view>{{ item.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>状态</view>
<view>{{ item.status }}</view>
</view>
<view class="dec-item">
<view>工序编号</view>
<view>{{ item.nodeCode }}</view>
</view>
<view class="dec-item">
<view>工位验证编码组</view>
<view>{{ item.workstationValidate }}</view>
</view>
<view class="dec-item">
<view>设备验证编码组</view>
<view>{{ item.deviceValidate }}</view>
</view>
<view class="dec-item">
<view>人员验证组</view>
<view>{{ item.personValidate }}</view>
</view>
<view class="dec-item">
<view>物料验证组</view>
<view>{{ item.materialValidate }}</view>
</view>
<view class="dec-item">
<view>计划数量</view>
<view>{{ item.planCount }}</view>
</view>
<view class="dec-item">
<view>报工人编号</view>
<view>{{ item.reportPerson }}</view>
</view>
<view class="dec-item">
<view>领取人工号</view>
<view>{{ item.receivePerson }}</view>
</view>
<view class="dec-item">
<view>报工数量</view>
<view>{{ item.reportCount }}</view>
</view>
<view class="dec-item">
<view>报工类型</view>
<view>{{ item.reportType }}</view>
</view>
<view class="dec-item">
<view>合格数量</view>
<view>{{ item.qualifiedCount }}</view>
</view>
<view class="dec-item">
<view>不合格数量</view>
<view>{{ item.unqualifiedCount }}</view>
</view><view class="dec-item">
<view>领取工位</view>
<view>{{ item.receiveWorkstation }}</view>
</view>
<view class="dec-item">
<view>工作设备编码</view>
<view>{{ item.receiveDevice }}</view>
</view>
<view class="dec-item">
<view>报工质检状态</view>
<view>{{ item.qaStatus }}</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>创建时间</view>
<view>{{ `${$time.formatDate(item.createTime)}` }}</view>
</view>
</view>
<view v-if="item.qaStatus!=1" >
<u-button type="primary" @click="openQualityInspect(item)">报工质检</u-button>
</view>
<view v-if="item.qaStatus==1" >
<u-button type="primary" @click="openQualityInspect(item)">报工</u-button>
</view>
<view class="title">
<view>生产工序任务明细</view>
</view>
<view class="dec">
<view class="dec-item">
<view>工单号</view>
<view>{{ data.schedulingCode }}</view>
</view>
<view class="dec-item">
<view>状态</view>
<view>{{ data.status }}</view>
</view>
<view class="dec-item">
<view>工序编号</view>
<view>{{ data.nodeCode }}</view>
</view>
<view class="dec-item">
<view>工位验证编码组</view>
<view>{{ data.workstationValidate }}</view>
</view>
<view class="dec-item">
<view>设备验证编码组</view>
<view>{{ data.deviceValidate }}</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>计划数量</view>
<view>{{ data.planCount }}</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>报工数量</view>
<view>{{ data.reportCount }}</view>
</view>
<view class="dec-item">
<view>报工类型</view>
<view>{{ data.reportType }}</view>
</view>
<view class="dec-item">
<view>合格数量</view>
<view>{{ data.qualifiedCount }}</view>
</view>
<view class="dec-item">
<view>不合格数量</view>
<view>{{ data.unqualifiedCount }}</view>
</view><view class="dec-item">
<view>领取工位</view>
<view>{{ data.receiveWorkstation }}</view>
</view>
<view class="dec-item">
<view>工作设备编码</view>
<view>{{ data.receiveDevice }}</view>
</view>
<view class="dec-item">
<view>报工质检状态</view>
<view>{{ data.qaStatus }}</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>创建时间</view>
<view>{{ `${$time.formatDate(data.createTime)}` }}</view>
</view>
</view>
<view v-if="data.qaStatus!=1" >
<u-button type="primary" @click="openQualityInspect(data)">报工质检</u-button>
</view>
<view v-if="data.qaStatus==1" >
<u-button type="primary" @click="openQualityInspect(data)">报工</u-button>
</view>
</view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
</template>
@ -119,25 +114,28 @@ const {proxy} = getCurrentInstance()
const number = ref('')
const data = ref({})
const loading = ref(false)
const from = ref()//13
const type = ref()
const list = ref([])
const tabsList = ref([{name:'工单明细'},{name:'工序任务'}])
const current = ref(0)
const schedulingId = ref('')
const params = ref({
schedulingCode: '',
nodeCode: ''
})
function getWorkSchedulingDetail() {
list.value = []
proxy.$modal.loading('加载中')
workSchedulingListApi.getWorkSchedulingDetail(number.value).then((res) => {
workSchedulingListApi.getWorkSchedulingDetail(params.value).then((res) => {
proxy.$modal.closeLoading()
data.value = res.data
if (res.data.length > 0) {
list.value = list.value.concat(res.data)
}
// if (res.data.length > 0) {
// list.value = list.value.concat(res.data)
// }
}).catch(() => {
proxy.$modal.closeLoading()
})
@ -159,6 +157,9 @@ onLoad((option) => {
if (option.obj) {
number.value = JSON.parse(option.obj).schedulingCode
schedulingId.value = JSON.parse(option.obj).id
params.value.schedulingCode = JSON.parse(option.obj).schedulingCode
params.value.nodeCode = JSON.parse(option.obj).workingNode
}
})
onShow(() => {

Loading…
Cancel
Save