wangaifang 4 weeks ago
commit e874a4c19a

@ -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,

@ -169,6 +169,14 @@ export default {
params
})
},
//库位查询
queryLoadNoByOrder(params) {
return request({
url: '/warehouse/fast/record/queryLoadNoByOrder',
method: 'GET',
params
})
},
//录入箱规新增
orderSpecInsert(params) {
return request({

@ -21,14 +21,19 @@
</template>
</u-input>
</u-form-item>
<view style="display: flex;">
<u-form-item label="库位号">
<view v-show="locationLabel">{{locationLabel}}</view>
<u-icon name="close" v-show="locationLabel" @click="clearValue" size="15" color="#BFBFBF"
style="margin-right: 80rpx;margin-left: 50rpx;"></u-icon>
<view @tap="show = true">请选择</view>
</u-form-item>
<u-picker @cancel="show = false" :show="show" :columns="columns" keyName="optionText"
@confirm="pickerConfirm"></u-picker>
@confirm="pickerConfirm" ></u-picker>
<u-icon name="scan" @click="openScan" size="25" color="#BFBFBF"
style="margin-right: 80rpx;margin-left: 50rpx;"></u-icon>
</view>
<button type="primary" class="btn" @tap="submitData"></button>
</u-form>
</view>
@ -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()
},

@ -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: {

@ -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'
})

@ -54,6 +54,14 @@
<view class="label">销售</view>
<view class="value">{{ruleForm.salesman}}</view>
</view>
<view class="basInfo">
<view class="label">出库人员</view>
<view class="value">{{ruleForm.outboundMan}}</view>
</view>
<view class="basInfo">
<view class="label">入仓操作人</view>
<view class="value">{{ruleForm.inboundPerson}}</view>
</view>
<view class="basInfo">
<view class="label">下单时间</view>
<view class="value">{{ruleForm.orderTime}}</view>

@ -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 || '提交失败,请重试。',
});
});
}
}

@ -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)
}
},

@ -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"
// })
// }
})
})
}

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

@ -7,15 +7,20 @@
<view class="entry-info">
<view style="margin-bottom: 30rpx;font-size: 16px;font-weight: 600;">请录入</view>
<u-form labelPosition="left" labelWidth="90px" :model="ruleForm" :rules="rules" ref="ruleFormRef">
<view style="margin-top: 10px;">
<view style="margin-top: 10px;">
<u-search :customStyle="{backgroundColor: '#F5F5F5'}" @clickIcon="input" @search="input"
@scanIcon="getLocationScanData" @change="input" @focus="show = true" @blur="blurData" clearable
placeholder="请输入库位号" v-model="location" shape="round" :showAction="false">
</u-search>
</view>
<view style="margin-top: 10px;word-wrap: break-word;">
配载单号<text>{{loadNo}}</text>
</view>
<fuzzy-list label-name="optionText" value-name="optionValue" align="center" no-data="" :show="show"
:list="list" :custom-style="{ fontSize: '30rpx' }" @select="select"></fuzzy-list>
<u-form-item label="库位号" style="margin-top: 10px;">
<u-form-item label="库位号" style="margin-top: 10px;">
<view style="display: flex;flex-wrap: wrap;width: 60%;">
<view v-for="(item,index) in ruleForm.locationList" style="display: flex;align-items: center;">
<view v-show="ruleForm.locationList.length">{{item}}</view>
@ -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`
})
})
}

@ -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'
})

@ -3,6 +3,7 @@ import Vuex from 'vuex'
const state = {
token: '',
userInfo: {},
getAllTokenInfo:{},
askExamNum: 0
}
export default state
Loading…
Cancel
Save