diff --git a/api/request.js b/api/request.js
index a92bc12..d727da1 100644
--- a/api/request.js
+++ b/api/request.js
@@ -3,8 +3,10 @@
// 伟旭
// 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"
+// let baseUrl = "http://56carrier.com:80/v1"
+let baseUrl = "http://192.168.12.44:9100/v1"
import store from '../store/index'
// import baseUrl from './config.js'
@@ -15,13 +17,24 @@ export default (options) => {
method: options.method || 'GET',
header: {
'Content-Type': options.contentType || 'application/json; charset=utf-8;',
- 'Authorization':(store.state.token&& `Bearer ` + store.state.token) || ''
+ 'Authorization':(uni.getStorageSync('token'))&& `Bearer ` + uni.getStorageSync('token') || ''
},
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/api/storge.js b/api/storge.js
index 5ab5246..a62c4f0 100644
--- a/api/storge.js
+++ b/api/storge.js
@@ -169,6 +169,14 @@ export default {
params
})
},
+ //库位查询
+ queryLoadNoByOrder(params) {
+ return request({
+ url: '/warehouse/fast/record/queryLoadNoByOrder',
+ method: 'GET',
+ params
+ })
+ },
//录入箱规新增
orderSpecInsert(params) {
return request({
diff --git a/pages/initiateInventoryCount/index.vue b/pages/initiateInventoryCount/index.vue
index cd82871..0cdbca4 100644
--- a/pages/initiateInventoryCount/index.vue
+++ b/pages/initiateInventoryCount/index.vue
@@ -21,14 +21,19 @@
+
{{locationLabel}}
请选择
+
+ @confirm="pickerConfirm" >
+
+
@@ -44,25 +49,30 @@
stopScan
} from "@/libs/scan.js"
export default {
- onShow() {
- initScan(this.scanSuccess);
- startScan();
+ onLoad(options) {
Api.storge.queryByDictCode({
dictCode: "warehouse_location",
type: "3",
+ "pageNum": 1,
+ "pageSize": 3000,
searchKey: "",
sqlText: "",
placeholder: {
- "#warehouseId": store.state.userInfo.branchId
+ "#warehouseId": uni.getStorageSync("getAllTokenInfo").agentBranchId
}
}).then(res => {
-
+
if (res?.data?.records) {
this.columns = [res.data.records]
}
-
+
})
},
+ onShow() {
+ initScan(this.scanSuccess);
+ startScan();
+
+ },
onHide() {
stopScan();
@@ -134,6 +144,17 @@
})
},
+ openScan(){
+ uni.scanCode({
+ success: (res) => {
+ if (res.result) {
+ this.locationLabel = res.result.trim()
+ }
+ },
+ fail: (err) => {
+ }
+ });
+ },
submitData() {
this.queryData()
},
diff --git a/pages/login/index.vue b/pages/login/index.vue
index f544d27..2304d0b 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -106,7 +106,13 @@
},
};
},
- mounted() {},
+ mounted() {
+ const accountInfo = uni.getStorageSync('accountInfo');
+ if (accountInfo) {
+ this.ruleForm.key = accountInfo.username || "";
+ this.ruleForm.type = accountInfo.password || "";
+ }
+ },
methods: {
// 获取短信验证码
getSmsCode(type) {
@@ -169,7 +175,18 @@
key: 'token',
data: res.access_token
})
-
+ uni.setStorage({
+ key: 'getAllTokenInfo',
+ data: res
+ })
+ // 仓库那边需求记住账号密码
+ uni.setStorage({
+ key: 'accountInfo',
+ data: {
+ username:this.ruleForm.key,
+ password: this.ruleForm.type
+ }
+ })
uni.setStorage({
key: 'userInfo',
data: {
diff --git a/pages/my/index.vue b/pages/my/index.vue
index d98a0ca..b5cc03e 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -116,19 +116,21 @@
url: href
})
} else {
- this.logout()
- }
+ // this.logout()
+ }
},
// 退出
- logout () {
- uni.showModal({
+ logout () {
+ uni.showModal({
title: '提示',
content: '确定要退出吗?',
success: (res) => {
if (res.confirm) {
this.$store.commit('GET_TOKEN', '')
this.$store.commit('GET_USER_INFO', {})
- uni.clearStorage()
+ uni.removeStorageSync('token');
+ uni.removeStorageSync('userInfo');
+ // uni.clearStorage()
uni.reLaunch({
url: '/pages/login/index'
})
diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue
index 4d6a812..2bfb819 100644
--- a/pages/order/orderDetail.vue
+++ b/pages/order/orderDetail.vue
@@ -54,6 +54,14 @@
销售
{{ruleForm.salesman}}
+
+ 出库人员
+ {{ruleForm.outboundMan}}
+
+
+ 入仓操作人
+ {{ruleForm.inboundPerson}}
+
下单时间
{{ruleForm.orderTime}}
diff --git a/pages/outBound/superviseLoadingDetail.vue b/pages/outBound/superviseLoadingDetail.vue
index 524d92c..ae23bb5 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({
@@ -222,6 +222,10 @@
.then(({ data }) => {
// 接口成功返回数据,更新 boxNoOrderList
this.boxNoOrderList = data.verifyOrder;
+ this.$refs.uToast.show({
+ type: 'success',
+ message: data.msg,
+ })
console.log(this.boxNoOrderList,this.ruleForm, 'this.boxNoOrderList');
})
.catch((err) => {
@@ -281,28 +285,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/outBound/superviseOrderDetail.vue b/pages/outBound/superviseOrderDetail.vue
index f8741b2..58e3ae0 100644
--- a/pages/outBound/superviseOrderDetail.vue
+++ b/pages/outBound/superviseOrderDetail.vue
@@ -61,6 +61,7 @@
location: "",
number: "",
userId: "",
+ outNo: "",
boxNo: ""
},
orderNoForm: {
@@ -97,6 +98,7 @@
if (op.orderNo) {
this.ruleForm.orderNo = op.orderNo
this.outNo = op.outNo
+ this.ruleForm.outNo = op.outNo
this.queryData(false)
}
},
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..a4cea38 100644
--- a/pages/outStock/location.vue
+++ b/pages/outStock/location.vue
@@ -7,15 +7,20 @@
请录入
-
+
+
+
+ 配载单号:{{loadNo}}
+
-
+
+
{{item}}
@@ -75,12 +80,14 @@
list: [],
selectData: null,
selected: false,
+ loadNo:""
}
},
methods: {
input(val) {
this.show = true
+ this.getLoadList(val)
debounce(this.getList, 500);
},
blurData() {
@@ -107,6 +114,16 @@
console.log(this.list, 'this.list');
})
},
+ getLoadList(val) {
+ console.log('库位号',val)
+ Api.storge.queryLoadNoByOrder({
+ busNo: val,
+ }).then(({
+ data
+ }) => {
+ this.loadNo = data
+ })
+ },
async scanSuccess(code) {
this.pickerConfirm(code.trim())
},
@@ -155,7 +172,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..e6ec4cc 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
@@ -281,7 +281,9 @@
if (res.confirm) {
this.$store.commit('GET_TOKEN', '')
this.$store.commit('GET_USER_INFO', {})
- uni.clearStorage()
+ uni.removeStorageSync('token');
+ uni.removeStorageSync('userInfo');
+ // uni.clearStorage()
uni.reLaunch({
url: '/pages/login/index'
})
diff --git a/store/state.js b/store/state.js
index ecdfc80..40efeee 100644
--- a/store/state.js
+++ b/store/state.js
@@ -3,6 +3,7 @@ import Vuex from 'vuex'
const state = {
token: '',
userInfo: {},
+ getAllTokenInfo:{},
askExamNum: 0
}
export default state
\ No newline at end of file