From ca5549f059ecf5bddf3e8a1063531017336adaa3 Mon Sep 17 00:00:00 2001 From: yangtingting <13725314483@163.com> Date: Sat, 23 Nov 2024 12:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request.js | 12 +++++++ pages/my/index.vue | 8 ++--- pages/outBound/superviseLoadingDetail.vue | 43 ++++++++++++++--------- pages/outStock/discharge.vue | 24 +++++++------ pages/outStock/forkliftWarehousing.vue | 2 +- pages/outStock/location.vue | 6 ++-- pages/wMSSystem/index.vue | 8 ++--- 7 files changed, 66 insertions(+), 37 deletions(-) diff --git a/api/request.js b/api/request.js index a92bc12..8925c92 100644 --- a/api/request.js +++ b/api/request.js @@ -3,6 +3,7 @@ // 伟旭 // let baseUrl = "http://192.168.200.97:9100/v1" // let baseUrl = "http://47.119.160.181:9082/v1" +// let baseUrl = "http://192.168.12.36:8080/v1" // let baseUrl = "http://47.119.163.201:81/v1/v1" let baseUrl = "http://56carrier.com:80/v1" @@ -20,8 +21,19 @@ export default (options) => { data: options.params, success: res => { const data = res.data + console.log(res.data,'res.data') if( data.code === 200){ resolve(data) + } else if(data.code === 401){ + uni.showToast({ + title: data.message, + icon: 'none' + }) + uni.clearStorage() + uni.reLaunch({ + url: '/pages/login/index' + }) + // reject(data.msg) } else { uni.showToast({ title: data.message, diff --git a/pages/my/index.vue b/pages/my/index.vue index d98a0ca..8891e92 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -116,12 +116,12 @@ url: href }) } else { - this.logout() - } + // this.logout() + } }, // 退出 - logout () { - uni.showModal({ + logout () { + uni.showModal({ title: '提示', content: '确定要退出吗?', success: (res) => { diff --git a/pages/outBound/superviseLoadingDetail.vue b/pages/outBound/superviseLoadingDetail.vue index 524d92c..0130775 100644 --- a/pages/outBound/superviseLoadingDetail.vue +++ b/pages/outBound/superviseLoadingDetail.vue @@ -191,7 +191,7 @@ async scanSuccess(code) { // 下面就是写取到结果后的事情 this.ruleForm.busNo = code.trim() - this.handleContainerNoChange(false) + this.handleContainerNoChange(true) }, getScanData() { uni.scanCode({ @@ -281,28 +281,39 @@ }) }, submitData() { - if (this.unVerifyList.length) { - this.$refs.uToast.show({ - type: 'warning', - message: "请监装完所有订单号", - }) - return - } + // if (this.unVerifyList.length) { + // this.$refs.uToast.show({ + // type: 'warning', + // message: "请监装完所有订单号", + // }) + // return + // } this.ruleForm.isSubmit = true Api.storge.verify(this.ruleForm).then(res => { if (res?.data?.outStatus == "1") { uni.navigateTo({ url: `/pages/outBound/superviseLoadingImg?id=${this.orderNoForm.outId}` }) - } else { - Object.assign(this.orderNoForm, res.data) - this.ruleForm.orderNos = [] - this.unVerifyList = res?.data?.unVerify || [] - if (res?.data?.verifyed && Array.isArray(res?.data?.verifyed)) { - this.tabList[1].badge.value = res?.data?.verifyed.length - } + } + else { + // Object.assign(this.orderNoForm, res.data) + // this.ruleForm.orderNos = [] + // this.unVerifyList = res?.data?.unVerify || [] + // if (res?.data?.verifyed && Array.isArray(res?.data?.verifyed)) { + // this.tabList[1].badge.value = res?.data?.verifyed.length + // } + this.$refs.uToast.show({ + type: 'warning', + message: "请监装完所有订单号", + }) } - }) + }) .catch(err => { + // Display an error message using the toast component if the API call fails + this.$refs.uToast.show({ + type: 'error', + message: err.message || '提交失败,请重试。', + }); + }); } } diff --git a/pages/outStock/discharge.vue b/pages/outStock/discharge.vue index ebe5233..633b308 100644 --- a/pages/outStock/discharge.vue +++ b/pages/outStock/discharge.vue @@ -91,16 +91,20 @@ this.$refs.ruleFormRef.validate().then(valid => { Api.storge.unload(this.ruleForm).then(res => { - if (res?.data && Array.isArray(res?.data?.orderNos)) { - uni.navigateTo({ - url: `/pages/outStock/dischargeDetail?data=${JSON.stringify({...res.data,orderNo:this.ruleForm.orderNo})}` - }) - } else { - this.ruleForm.orderNo = "" - uni.navigateTo({ - url: "/pages/outStock/recordingVolume?name=discharge" - }) - } + this.$refs.uToast.show({ + type: 'success', + message: "提交卸货成功", + }) + // if (res?.data && Array.isArray(res?.data?.orderNos)) { + // uni.navigateTo({ + // url: `/pages/outStock/dischargeDetail?data=${JSON.stringify({...res.data,orderNo:this.ruleForm.orderNo})}` + // }) + // } else { + // this.ruleForm.orderNo = "" + // uni.navigateTo({ + // url: "/pages/outStock/recordingVolume?name=discharge" + // }) + // } }) }) } diff --git a/pages/outStock/forkliftWarehousing.vue b/pages/outStock/forkliftWarehousing.vue index f7e9038..6f763ab 100644 --- a/pages/outStock/forkliftWarehousing.vue +++ b/pages/outStock/forkliftWarehousing.vue @@ -11,7 +11,7 @@ @scanIcon="getScanData" clearable placeholder="请输入订单号" v-model="ruleForm.orderNo" shape="round" :showAction="false"> - + diff --git a/pages/outStock/location.vue b/pages/outStock/location.vue index 8909716..28bebb3 100644 --- a/pages/outStock/location.vue +++ b/pages/outStock/location.vue @@ -15,7 +15,7 @@ - + {{item}} @@ -155,7 +155,9 @@ message: "提交入库成功", }) this.ruleForm.locationList = [] - + uni.navigateTo({ + url: `/pages/outStock/forkliftWarehousing` + }) }) } diff --git a/pages/wMSSystem/index.vue b/pages/wMSSystem/index.vue index 747e162..95c1c5e 100644 --- a/pages/wMSSystem/index.vue +++ b/pages/wMSSystem/index.vue @@ -150,10 +150,10 @@ name: '卸货', type: 1 }, - { - name: '录入材积', - type: 3 - }, + // { + // name: '录入材积', + // type: 3 + // }, { name: '打板', type: 2