main
yangtingting 24 hours ago
parent dc1e50fe8a
commit ca5549f059

@ -3,6 +3,7 @@
// 伟旭 // 伟旭
// let baseUrl = "http://192.168.200.97:9100/v1" // let baseUrl = "http://192.168.200.97:9100/v1"
// let baseUrl = "http://47.119.160.181:9082/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://47.119.163.201:81/v1/v1"
let baseUrl = "http://56carrier.com:80/v1" let baseUrl = "http://56carrier.com:80/v1"
@ -20,8 +21,19 @@ export default (options) => {
data: options.params, data: options.params,
success: res => { success: res => {
const data = res.data const data = res.data
console.log(res.data,'res.data')
if( data.code === 200){ if( data.code === 200){
resolve(data) 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 { } else {
uni.showToast({ uni.showToast({
title: data.message, title: data.message,

@ -116,7 +116,7 @@
url: href url: href
}) })
} else { } else {
this.logout() // this.logout()
} }
}, },
// 退 // 退

@ -191,7 +191,7 @@
async scanSuccess(code) { async scanSuccess(code) {
// //
this.ruleForm.busNo = code.trim() this.ruleForm.busNo = code.trim()
this.handleContainerNoChange(false) this.handleContainerNoChange(true)
}, },
getScanData() { getScanData() {
uni.scanCode({ uni.scanCode({
@ -281,28 +281,39 @@
}) })
}, },
submitData() { submitData() {
if (this.unVerifyList.length) { // if (this.unVerifyList.length) {
this.$refs.uToast.show({ // this.$refs.uToast.show({
type: 'warning', // type: 'warning',
message: "请监装完所有订单号", // message: "",
}) // })
return // return
} // }
this.ruleForm.isSubmit = true this.ruleForm.isSubmit = true
Api.storge.verify(this.ruleForm).then(res => { Api.storge.verify(this.ruleForm).then(res => {
if (res?.data?.outStatus == "1") { if (res?.data?.outStatus == "1") {
uni.navigateTo({ uni.navigateTo({
url: `/pages/outBound/superviseLoadingImg?id=${this.orderNoForm.outId}` 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 || '提交失败,请重试。',
});
});
} }
} }

@ -91,16 +91,20 @@
this.$refs.ruleFormRef.validate().then(valid => { this.$refs.ruleFormRef.validate().then(valid => {
Api.storge.unload(this.ruleForm).then(res => { Api.storge.unload(this.ruleForm).then(res => {
if (res?.data && Array.isArray(res?.data?.orderNos)) { this.$refs.uToast.show({
uni.navigateTo({ type: 'success',
url: `/pages/outStock/dischargeDetail?data=${JSON.stringify({...res.data,orderNo:this.ruleForm.orderNo})}` message: "提交卸货成功",
}) })
} else { // if (res?.data && Array.isArray(res?.data?.orderNos)) {
this.ruleForm.orderNo = "" // uni.navigateTo({
uni.navigateTo({ // url: `/pages/outStock/dischargeDetail?data=${JSON.stringify({...res.data,orderNo:this.ruleForm.orderNo})}`
url: "/pages/outStock/recordingVolume?name=discharge" // })
}) // } else {
} // this.ruleForm.orderNo = ""
// uni.navigateTo({
// url: "/pages/outStock/recordingVolume?name=discharge"
// })
// }
}) })
}) })
} }

@ -11,7 +11,7 @@
@scanIcon="getScanData" clearable placeholder="请输入订单号" v-model="ruleForm.orderNo" shape="round" @scanIcon="getScanData" clearable placeholder="请输入订单号" v-model="ruleForm.orderNo" shape="round"
:showAction="false"> :showAction="false">
</u-search> </u-search>
<button type="primary" class="btn" @tap="submitData"></button> <button type="primary" class="btn" @tap="submitData"></button>
</u-form> </u-form>
</view> </view>
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>

@ -155,7 +155,9 @@
message: "提交入库成功", message: "提交入库成功",
}) })
this.ruleForm.locationList = [] this.ruleForm.locationList = []
uni.navigateTo({
url: `/pages/outStock/forkliftWarehousing`
})
}) })
} }

@ -150,10 +150,10 @@
name: '卸货', name: '卸货',
type: 1 type: 1
}, },
{ // {
name: '录入材积', // name: '',
type: 3 // type: 3
}, // },
{ {
name: '打板', name: '打板',
type: 2 type: 2

Loading…
Cancel
Save