Commit 90e6400b by LJM

移动端--支持新组织登录:粤丰实、工品

parent 0711bc63
...@@ -295,6 +295,12 @@ ...@@ -295,6 +295,12 @@
} else if (company_id == 3) { } else if (company_id == 3) {
this.warehouse_arr = [{ name: '华云现货仓', value: '11' }]; this.warehouse_arr = [{ name: '华云现货仓', value: '11' }];
this.formParams.warehouse_id = 11; this.formParams.warehouse_id = 11;
} else if (company_id == 9) {
this.warehouse_arr = [{ name: '粤丰实-现货仓', value: '12' }];
this.formParams.warehouse_id = 12;
} else if (company_id == 10) {
this.warehouse_arr = [{ name: '工品-现货仓', value: '13' }];
this.formParams.warehouse_id = 13;
} }
}, },
methods: { methods: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="index"> <view class="index">
<view class="head row bothSide"> <view class="head row bothSide">
<view class="column"> <view class="column">
<text class="t1">{{ company_id == 1 ? '深圳市猎芯科技有限公司' : company_id == 3 ? '深圳华云数智工业科技有限公司' : '深贸电子有限公司' }}</text> <text class="t1">{{org_name}}</text>
<view class="row verCenter" v-if="info.user_info"> <view class="row verCenter" v-if="info.user_info">
<text class="iconfont icon-juxing"></text> <text class="iconfont icon-juxing"></text>
<text class="t2">{{ info.user_info.name }}</text> <text class="t2">{{ info.user_info.name }}</text>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
export default { export default {
data() { data() {
return { return {
company_id: 1, org_name: '',
info: {} info: {}
}; };
}, },
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
this.getData(); this.getData();
}, },
onShow() { onShow() {
this.company_id = uni.getStorageSync('company_id') || 1; this.org_name = uni.getStorageSync('org_name');
}, },
methods: { methods: {
getData() { getData() {
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
uni.removeStorageSync('oa_skey'); uni.removeStorageSync('oa_skey');
uni.removeStorageSync('oa_user_id'); uni.removeStorageSync('oa_user_id');
uni.removeStorageSync('company_id'); uni.removeStorageSync('company_id');
uni.removeStorageSync('org_name');
uni.removeStorageSync('oa_user_email'); uni.removeStorageSync('oa_user_email');
uni.redirectTo({ uni.redirectTo({
url: '/pages/mine/login' url: '/pages/mine/login'
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<image src="/static/WMS@2x.png" mode="aspectFill"></image> <image src="/static/WMS@2x.png" mode="aspectFill"></image>
</view> </view>
<view class="company row rowCenter verCenter"> <view class="company row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array"> <picker @change="bindPickerChange" :value="index" :range="array" range-key="name">
<view class="row verCenter"> <view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view> <view class="uni-input">{{ array[index].name }}</view>
<view class="uni-arrow"></view> <view class="uni-arrow"></view>
</view> </view>
</picker> </picker>
...@@ -42,9 +42,16 @@ ...@@ -42,9 +42,16 @@
data() { data() {
return { return {
index: 0, index: 0,
array: ['深圳市猎芯科技有限公司', '深贸电子有限公司', '深圳华云数智工业科技有限公司'], array: [
{ name: '深圳市猎芯科技有限公司', value: 1 },
{ name: '深贸电子有限公司', value: 2 },
{ name: '深圳华云数智工业科技有限公司', value: 3 },
{ name: '深圳市粤丰实工业有限公司', value: 9 },
{ name: '深圳工品数字科技有限公司', value: 10 }
],
name: '', name: '',
passwd: '', passwd: '',
org_id: 1,
disabled: false, disabled: false,
isFirst: true, isFirst: true,
online_version: '', //线上后台版本 online_version: '', //线上后台版本
...@@ -56,6 +63,7 @@ ...@@ -56,6 +63,7 @@
uni.removeStorageSync('oa_skey'); uni.removeStorageSync('oa_skey');
uni.removeStorageSync('oa_user_id'); uni.removeStorageSync('oa_user_id');
uni.removeStorageSync('company_id'); uni.removeStorageSync('company_id');
uni.removeStorageSync('org_name');
uni.removeStorageSync('oa_user_email'); uni.removeStorageSync('oa_user_email');
//记住密码 //记住密码
...@@ -79,6 +87,7 @@ ...@@ -79,6 +87,7 @@
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value; this.index = e.detail.value;
this.org_id = this.array[e.detail.value].value;
this.disabled = false; this.disabled = false;
}, },
/** /**
...@@ -176,7 +185,7 @@ ...@@ -176,7 +185,7 @@
* 组织切换 * 组织切换
*/ */
changeOrgId() { changeOrgId() {
this.request(API.changeOrgId, 'POST', { org_id: Number(this.index) + 1 }, false).then(res => { this.request(API.changeOrgId, 'POST', { org_id: this.org_id }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.disabled = false; this.disabled = false;
uni.setStorageSync('img_upload_url', res.data.img_upload_url); uni.setStorageSync('img_upload_url', res.data.img_upload_url);
...@@ -226,7 +235,8 @@ ...@@ -226,7 +235,8 @@
if (res.retcode === 0) { if (res.retcode === 0) {
uni.setStorageSync('oa_skey', res.data.skey); uni.setStorageSync('oa_skey', res.data.skey);
uni.setStorageSync('oa_user_id', res.data.userId); uni.setStorageSync('oa_user_id', res.data.userId);
uni.setStorageSync('company_id', Number(this.index) + 1); uni.setStorageSync('company_id', this.org_id);
uni.setStorageSync('org_name', this.array[this.index].name);
//必须调用选用组织 //必须调用选用组织
this.changeOrgId(); this.changeOrgId();
} else { } else {
......
...@@ -173,6 +173,12 @@ ...@@ -173,6 +173,12 @@
} else if (company_id == 3) { } else if (company_id == 3) {
this.warehouse_arr = [{ name: '华云现货仓', value: '11' }]; this.warehouse_arr = [{ name: '华云现货仓', value: '11' }];
this.formParams.warehouse_id = 11; this.formParams.warehouse_id = 11;
} else if (company_id == 9) {
this.warehouse_arr = [{ name: '粤丰实-现货仓', value: '12' }];
this.formParams.warehouse_id = 12;
} else if (company_id == 10) {
this.warehouse_arr = [{ name: '工品-现货仓', value: '13' }];
this.formParams.warehouse_id = 13;
} }
}, },
methods: { methods: {
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统 const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统 const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统 const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统 const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统 // const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统 // const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = { const API = {
......
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 sign in to comment