Commit 0b30b8ee authored by 何远江's avatar 何远江

优化

parent 2583d394
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<StickyNavBar> <StickyNavBar>
<NavBar title="发货下架"></NavBar> <NavBar title="发货下架"></NavBar>
<view class="btn"> <view class="btn">
<uni-easyinput class="boxSelect" prefixIcon="search" v-model="lgort" placeholder="请扫描目标仓位"></uni-easyinput>
<uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus" <uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus"
placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput> placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput>
</view> </view>
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
data() { data() {
return { return {
wxparams: "", wxparams: "",
lgort: '',
isDisabled: false, isDisabled: false,
isFocus: false, isFocus: false,
goodsList: [], goodsList: [],
...@@ -108,10 +110,13 @@ ...@@ -108,10 +110,13 @@
if (!this.goodsList.length) { if (!this.goodsList.length) {
return this.$u.toast('请扫描需要下架的箱条码/外箱码') return this.$u.toast('请扫描需要下架的箱条码/外箱码')
} }
const DATUM = parseTime(new Date(), '{y}{m}{d}'), if (!this.lgort) {
UNAME = this.vuex_user.nickName, return this.$u.toast('请选择目标仓位')
UZEIT = parseTime(new Date(), '{h}{i}{s}'); }
const arr = this.goodsList const arr = this.goodsList.map((item) => {
item.LGORT = this.lgort
return item
})
this.$u.api.sapApi this.$u.api.sapApi
.sapCasePlnr2(arr) .sapCasePlnr2(arr)
.then((res) => { .then((res) => {
......
import deepMerge from "../function/deepMerge"; import deepMerge from "../function/deepMerge";
import validate from "../function/test"; import validate from "../function/test";
import store from '@/store/index.js'
class Request { class Request {
// 设置全局默认配置 // 设置全局默认配置
setConfig(customConfig) { setConfig(customConfig) {
...@@ -75,22 +76,33 @@ class Request { ...@@ -75,22 +76,33 @@ class Request {
} }
} }
// 处理sap接口 // 处理sap接口
let url= this.config.baseUrl let url = this.config.baseUrl
if(options.url.indexOf('sap') > -1){ if (options.url.indexOf('sap') > -1) {
// console.log('sap') // #ifdef APP-PLUS
url = 'http://192.168.3.109:8000' url = 'http://192.168.3.109:8000'
// #endif
options.header = { options.header = {
...options.header, ...options.header,
'content-type': 'application/json;charset=UTF-8', 'content-type': 'application/json;charset=UTF-8',
'Authorization':'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng==', 'Authorization': 'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng==',
}
// 设置公共参数
if (Object.prototype.toString.call(options.data) != '[object Array]') {
options.data = {
...options.data,
werks: store.state.vuex_user_factory
} }
}else if(options.url.indexOf('apiPda') > -1){ }
} else if (options.url.indexOf('apiPda') > -1) {
options.header = { options.header = {
...options.header, ...options.header,
'content-type': 'application/json;charset=UTF-8', 'content-type': 'application/json;charset=UTF-8',
} }
url = 'http://192.168.3.91:8100' url = 'http://192.168.3.91:8100'
}else{ } else {
// console.log('mobile') // console.log('mobile')
url = 'http://192.168.3.91:8100' url = 'http://192.168.3.91:8100'
} }
...@@ -110,7 +122,7 @@ class Request { ...@@ -110,7 +122,7 @@ class Request {
this.config.timer = null; this.config.timer = null;
}, this.config.loadingTime); }, this.config.loadingTime);
} }
console.log('请求参数',options) console.log('请求参数', options)
uni.request(options); uni.request(options);
}) })
// .catch(res => { // .catch(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment