From c1fa08972e809eb82ba0464d27ebca7d70d61290 Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Fri, 10 May 2024 11:46:37 +0800 Subject: [PATCH] =?UTF-8?q?MES=E2=80=94=E2=80=94>=20PDA=E6=97=A5=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=B7=A5=E5=BA=8F=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workScheduling/index.ts | 12 +- .../mes/workScheduling/workScheduling.vue | 69 +++++- .../workScheduling/workSchedulingDetail.vue | 203 +++++++++--------- 3 files changed, 172 insertions(+), 112 deletions(-) diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts index 32f7f7e..7fc1b78 100644 --- a/src/api/mes/workScheduling/index.ts +++ b/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) { diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue index 8f9e77f..ef55800 100644 --- a/src/pages/mes/workScheduling/workScheduling.vue +++ b/src/pages/mes/workScheduling/workScheduling.vue @@ -10,7 +10,7 @@ @change="tabsChange" :is-scroll="false"> --> - + {{item.schedulingCode}} @@ -56,6 +56,16 @@ border-color='#fe8463' type="primary" shape='circle'/> + + + + + {{ item.workingNode }} + 完成 + + + + 齐套检查 @@ -71,6 +81,7 @@ SOP + 明细 @@ -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 + + } \ No newline at end of file diff --git a/src/pages/mes/workScheduling/workSchedulingDetail.vue b/src/pages/mes/workScheduling/workSchedulingDetail.vue index 4d29c13..8323a3e 100644 --- a/src/pages/mes/workScheduling/workSchedulingDetail.vue +++ b/src/pages/mes/workScheduling/workSchedulingDetail.vue @@ -1,103 +1,98 @@ @@ -119,25 +114,28 @@ const {proxy} = getCurrentInstance() const number = ref('') const data = ref({}) const loading = ref(false) -const from = ref()//1从我的进入3从审核进入 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(() => {