wangaifang 4 weeks ago
commit e874a4c19a

@ -3,8 +3,10 @@
// 伟旭 // 伟旭
// 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"
let baseUrl = "http://192.168.12.44:9100/v1"
import store from '../store/index' import store from '../store/index'
// import baseUrl from './config.js' // import baseUrl from './config.js'
@ -15,13 +17,24 @@ export default (options) => {
method: options.method || 'GET', method: options.method || 'GET',
header: { header: {
'Content-Type': options.contentType || 'application/json; charset=utf-8;', '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, 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,

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

@ -21,14 +21,19 @@
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<view style="display: flex;">
<u-form-item label="库位号"> <u-form-item label="库位号">
<view v-show="locationLabel">{{locationLabel}}</view> <view v-show="locationLabel">{{locationLabel}}</view>
<u-icon name="close" v-show="locationLabel" @click="clearValue" size="15" color="#BFBFBF" <u-icon name="close" v-show="locationLabel" @click="clearValue" size="15" color="#BFBFBF"
style="margin-right: 80rpx;margin-left: 50rpx;"></u-icon> style="margin-right: 80rpx;margin-left: 50rpx;"></u-icon>
<view @tap="show = true">请选择</view> <view @tap="show = true">请选择</view>
</u-form-item> </u-form-item>
<u-picker @cancel="show = false" :show="show" :columns="columns" keyName="optionText" <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> <button type="primary" class="btn" @tap="submitData"></button>
</u-form> </u-form>
</view> </view>
@ -44,16 +49,16 @@
stopScan stopScan
} from "@/libs/scan.js" } from "@/libs/scan.js"
export default { export default {
onShow() { onLoad(options) {
initScan(this.scanSuccess);
startScan();
Api.storge.queryByDictCode({ Api.storge.queryByDictCode({
dictCode: "warehouse_location", dictCode: "warehouse_location",
type: "3", type: "3",
"pageNum": 1,
"pageSize": 3000,
searchKey: "", searchKey: "",
sqlText: "", sqlText: "",
placeholder: { placeholder: {
"#warehouseId": store.state.userInfo.branchId "#warehouseId": uni.getStorageSync("getAllTokenInfo").agentBranchId
} }
}).then(res => { }).then(res => {
@ -63,6 +68,11 @@
}) })
}, },
onShow() {
initScan(this.scanSuccess);
startScan();
},
onHide() { onHide() {
stopScan(); stopScan();
@ -134,6 +144,17 @@
}) })
}, },
openScan(){
uni.scanCode({
success: (res) => {
if (res.result) {
this.locationLabel = res.result.trim()
}
},
fail: (err) => {
}
});
},
submitData() { submitData() {
this.queryData() 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: { methods: {
// //
getSmsCode(type) { getSmsCode(type) {
@ -169,7 +175,18 @@
key: 'token', key: 'token',
data: res.access_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({ uni.setStorage({
key: 'userInfo', key: 'userInfo',
data: { data: {

@ -116,7 +116,7 @@
url: href url: href
}) })
} else { } else {
this.logout() // this.logout()
} }
}, },
// 退 // 退
@ -128,7 +128,9 @@
if (res.confirm) { if (res.confirm) {
this.$store.commit('GET_TOKEN', '') this.$store.commit('GET_TOKEN', '')
this.$store.commit('GET_USER_INFO', {}) this.$store.commit('GET_USER_INFO', {})
uni.clearStorage() uni.removeStorageSync('token');
uni.removeStorageSync('userInfo');
// uni.clearStorage()
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/index' url: '/pages/login/index'
}) })

@ -54,6 +54,14 @@
<view class="label">销售</view> <view class="label">销售</view>
<view class="value">{{ruleForm.salesman}}</view> <view class="value">{{ruleForm.salesman}}</view>
</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="basInfo">
<view class="label">下单时间</view> <view class="label">下单时间</view>
<view class="value">{{ruleForm.orderTime}}</view> <view class="value">{{ruleForm.orderTime}}</view>

@ -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({
@ -222,6 +222,10 @@
.then(({ data }) => { .then(({ data }) => {
// boxNoOrderList // boxNoOrderList
this.boxNoOrderList = data.verifyOrder; this.boxNoOrderList = data.verifyOrder;
this.$refs.uToast.show({
type: 'success',
message: data.msg,
})
console.log(this.boxNoOrderList,this.ruleForm, 'this.boxNoOrderList'); console.log(this.boxNoOrderList,this.ruleForm, 'this.boxNoOrderList');
}) })
.catch((err) => { .catch((err) => {
@ -281,28 +285,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 || '提交失败,请重试。',
});
});
} }
} }

@ -61,6 +61,7 @@
location: "", location: "",
number: "", number: "",
userId: "", userId: "",
outNo: "",
boxNo: "" boxNo: ""
}, },
orderNoForm: { orderNoForm: {
@ -97,6 +98,7 @@
if (op.orderNo) { if (op.orderNo) {
this.ruleForm.orderNo = op.orderNo this.ruleForm.orderNo = op.orderNo
this.outNo = op.outNo this.outNo = op.outNo
this.ruleForm.outNo = op.outNo
this.queryData(false) this.queryData(false)
} }
}, },

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

@ -7,15 +7,20 @@
<view class="entry-info"> <view class="entry-info">
<view style="margin-bottom: 30rpx;font-size: 16px;font-weight: 600;">请录入</view> <view style="margin-bottom: 30rpx;font-size: 16px;font-weight: 600;">请录入</view>
<u-form labelPosition="left" labelWidth="90px" :model="ruleForm" :rules="rules" ref="ruleFormRef"> <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" <u-search :customStyle="{backgroundColor: '#F5F5F5'}" @clickIcon="input" @search="input"
@scanIcon="getLocationScanData" @change="input" @focus="show = true" @blur="blurData" clearable @scanIcon="getLocationScanData" @change="input" @focus="show = true" @blur="blurData" clearable
placeholder="请输入库位号" v-model="location" shape="round" :showAction="false"> placeholder="请输入库位号" v-model="location" shape="round" :showAction="false">
</u-search> </u-search>
</view> </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" <fuzzy-list label-name="optionText" value-name="optionValue" align="center" no-data="" :show="show"
:list="list" :custom-style="{ fontSize: '30rpx' }" @select="select"></fuzzy-list> :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 style="display: flex;flex-wrap: wrap;width: 60%;">
<view v-for="(item,index) in ruleForm.locationList" style="display: flex;align-items: center;"> <view v-for="(item,index) in ruleForm.locationList" style="display: flex;align-items: center;">
<view v-show="ruleForm.locationList.length">{{item}}</view> <view v-show="ruleForm.locationList.length">{{item}}</view>
@ -75,12 +80,14 @@
list: [], list: [],
selectData: null, selectData: null,
selected: false, selected: false,
loadNo:""
} }
}, },
methods: { methods: {
input(val) { input(val) {
this.show = true this.show = true
this.getLoadList(val)
debounce(this.getList, 500); debounce(this.getList, 500);
}, },
blurData() { blurData() {
@ -107,6 +114,16 @@
console.log(this.list, 'this.list'); console.log(this.list, 'this.list');
}) })
}, },
getLoadList(val) {
console.log('库位号',val)
Api.storge.queryLoadNoByOrder({
busNo: val,
}).then(({
data
}) => {
this.loadNo = data
})
},
async scanSuccess(code) { async scanSuccess(code) {
this.pickerConfirm(code.trim()) this.pickerConfirm(code.trim())
}, },
@ -155,7 +172,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
@ -281,7 +281,9 @@
if (res.confirm) { if (res.confirm) {
this.$store.commit('GET_TOKEN', '') this.$store.commit('GET_TOKEN', '')
this.$store.commit('GET_USER_INFO', {}) this.$store.commit('GET_USER_INFO', {})
uni.clearStorage() uni.removeStorageSync('token');
uni.removeStorageSync('userInfo');
// uni.clearStorage()
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/index' url: '/pages/login/index'
}) })

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