From f4fb2a56e757dbecc1e048ec390bbad339ae83e8 Mon Sep 17 00:00:00 2001 From: TengXF <302828528@qq.com> Date: Tue, 28 May 2024 10:46:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20update=20=E5=8F=AB=E6=96=99=E8=A1=A5?= =?UTF-8?q?=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workScheduling/index.ts | 7 +- .../mes/workScheduling/workScheduling.vue | 110 ++++++++---------- 2 files changed, 54 insertions(+), 63 deletions(-) diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts index 885f3d5..3e4e79f 100644 --- a/src/api/mes/workScheduling/index.ts +++ b/src/api/mes/workScheduling/index.ts @@ -105,7 +105,12 @@ export function callBasicItemForm(params) { //领料 export function receiveBasicItem(data) { - return http.post('/mes/item-request-main/receiveBasicItem', data) + return http.post('/mes/item-request-main/receiveBasicItem', data) +} + +//领料 +export function receiveItem(data) { + return http.post('/mes/item-request-main/receiveItem', data) } //补料 diff --git a/src/pages/mes/workScheduling/workScheduling.vue b/src/pages/mes/workScheduling/workScheduling.vue index 1f65a7f..1138fdf 100644 --- a/src/pages/mes/workScheduling/workScheduling.vue +++ b/src/pages/mes/workScheduling/workScheduling.vue @@ -78,7 +78,9 @@ border-color='#fe8463' type="primary" shape='circle' /> - + @@ -102,7 +104,7 @@ 步骤 编码 - 操作 + 操作 @@ -126,6 +128,9 @@ 已报工 + + 待领料 + @@ -143,6 +148,8 @@ @click="callBasicItem(item)" class="btn">叫料 补料 + 领料 完工 { proxy.$modal.closeLoading() }) - falg.value = 'view' + flag.value = 'view' } function getTabsList() { @@ -271,7 +278,7 @@ }).catch(() => { proxy.$modal.closeLoading() }) - falg.value = 'tab' + flag.value = 'tab' } //查询待领料数据 @@ -291,7 +298,7 @@ }).catch(() => { proxy.$modal.closeLoading() }) - falg.value = 'request' + flag.value = 'request' } //离线登记处理 @@ -307,7 +314,7 @@ //首次进页面触发 onShow(() => { - falg.value == 'tab' + flag.value == 'tab' status.value = 'loading' tabParams.value.flagDo = '' current.value = 0 @@ -319,17 +326,17 @@ }) //滑动到底部展示 onReachBottom(() => { - if (falg.value == 'tab') { + if (flag.value == 'tab') { status.value = 'loading' getTabsList() } - if (falg.value == 'view') { + if (flag.value == 'view') { status.value = 'loading' getViewList() } - if (falg.value == 'request') { + if (flag.value == 'request') { status.value = 'loading' getRequestList() } @@ -395,7 +402,7 @@ tabParams.value.flagDo = ''; current.value = index; tabParams.value.pageNo = 1; - falg.value == 'tab' + flag.value == 'tab' switch (index) { case 0: tabParams.value.status = ''; @@ -411,7 +418,7 @@ tabParams.value.status = '1'; break; case 4: - falg.value == 'request' + flag.value = 'request' list.value = []; status.value = 'loading'; tabParams.value.status = '0'; @@ -450,42 +457,19 @@ processCode: 'QD_CY_01' }) - async function searchTable() { - // tabParams.value.planMasterCode = searchValue.value + function searchTable() { list.value = [] tabParams.value.pageNo = 1 - getTabsList() - // list.value = [] - // searchTableParams.value.planNoDay = this.searchValue - // console.log(searchTableParams.value) - // await workSchedulingListApi.getWorkSchedulingPDAPage(searchTableParams.value).then((res) => { - // if (res.data.list.length > 0) { - // list.value = list.value.concat(res.data.list) - // } - // }) + if(flag.value == 'request'){ + getRequestList() + } + if(flag.value == 'tab'){ + getTabsList(); + } } // 完工处理->验证 function finished(item) { submitFinish(item) - // console.log(item) - // nodeInfo.value.planDayCode = item.planMasterCode - // nodeInfo.value.processCode = item.workingNode - // workSchedulingListApi.getNodePosition(nodeInfo.value).then((res) => { - // proxy.$modal.closeLoading() - // if (res.data != null && res.data == "end") { - // proxy.$modal.confirm('确定提交完工吗?').then(() => { - // submitFinish(item) - // }) - // } else { - // _toast("当前不是最后工序,不允许完工") - // // proxy.$modal.loading("当前不是最后工序,不允许完工") - // // setTimeout(() => { - // // proxy.$modal.closeLoading() - // // }, 1000) - // } - // }).catch(() => { - // proxy.$modal.closeLoading() - // }) } // 完工处理->提交 function submitFinish(item) { @@ -518,29 +502,9 @@ } const objString = JSON.stringify(getParams); proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitReport?obj=${encodeURIComponent(objString)}`) - // proxy.$modal.loading("加载中") - // await workSchedulingApi.getConfigProcessWorker({ - // planDayCode: item.planMasterCode, - // processCode: item.workingNode, - // schedulingCode: item.schedulingCode - // }).then((res) => { - // uni.setStorageSync("isLeader", res.data.leader) - // if (res.data.persons.length == 0) { - // _toast("没有可以报工项") - // return - // } - // uni.setStorageSync("processReportList", res.data.persons) - // uni.redirectTo({ - // url: res.data.leader ? "/pages/mes/workScheduling/processReportPeopleCheck" : "/pages/mes/workScheduling/processReportForm" - // }) - // }).finally(() => { - // proxy.$modal.closeLoading() - // }) } //待质检页面跳转 function waitCheck(item){ - // console.log(item) - // proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${JSON.stringify(item)}`) const getParams = { planNoDay:item.planNoDay, nodeCode:item.nodeCode, @@ -550,6 +514,28 @@ const objString = JSON.stringify(getParams); proxy.$tab.navigateTo(`/pages/mes/workScheduling/waitQuality?obj=${encodeURIComponent(objString)}`) } + + //切换tab页面,跳转待配料 + function goReceiveItem(item){ + proxy.$modal.confirm('确定提交领料吗').then(() => { + proxy.$modal.loading('处理中') + workSchedulingListApi.receiveItem(item).then((res) => { + proxy.$modal.closeLoading() + if (res.data) { + // status.value = 'loadmore' + tabParams.value.status = '1' + tabParams.value.pageNo = 1 + list.value = [] + getTabsList(); + } else { + + } + }).catch(() => { + proxy.$modal.closeLoading() + }) + proxy.$modal.closeLoading() + }) + } // 叫料 function callBasicItem(item) {