Commit ee3dbc54 by LJM

bug

parent 627a2326
......@@ -94,12 +94,15 @@
::v-deep .uni-drawer__content {
width: 85% !important;
height: 100%;
box-sizing: border-box;
}
.uni-drawer-picking {
width: 100%;
background-color: #ffffff;
padding: 22rpx 22rpx 0 22rpx;
padding: 22rpx 22rpx 10rpx 22rpx;
box-sizing: border-box;
.title {
position: relative;
.iconfont {
......@@ -243,11 +246,7 @@
margin-bottom: 17rpx;
}
.btn {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 99;
margin: 0 auto;
.btn1 {
width: 100%;
height: 75rpx;
......
......@@ -17,7 +17,7 @@
<text class="label row rowCenter verCenter">密码</text>
<input class="uni-input" password placeholder="请输入账号密码" placeholder-style="color:#919399" v-model="passwd" />
</view>
<view class="btn row rowCenter verCenter" @click="submit()">登录</view>
<button class="btn row rowCenter verCenter" @click="submit()" :disabled="disabled">登录</button>
<text class="copyright">© 深圳市猎芯科技有限公司</text>
</view>
</template>
......@@ -32,7 +32,8 @@ export default {
index: 0,
array: ['深圳市猎芯科技有限公司', '深贸电子有限公司'],
name: '',
passwd: ''
passwd: '',
disabled: false
};
},
onLoad() {
......@@ -54,6 +55,7 @@ export default {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
this.disabled = false;
},
/**
* 组织切换
......@@ -61,7 +63,18 @@ export default {
changeOrgId() {
this.request(API.changeOrgId, 'POST', { org_id: Number(this.index) + 1 }, false).then(res => {
if (res.code === 0) {
this.disabled = false;
uni.showToast({
title: '登录成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/index'
});
}, 2000);
} else {
this.disabled = true;
uni.showModal({
title: '提示',
content: res.msg,
......@@ -98,16 +111,8 @@ export default {
uni.setStorageSync('oa_skey', res.data.skey);
uni.setStorageSync('oa_user_id', res.data.userId);
uni.setStorageSync('company_id', Number(this.index) + 1);
//调用选用组织
this.changeOrgId();
uni.showToast({
title: '登录成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/index'
});
}, 2000);
} else {
uni.showModal({
title: '提示',
......
......@@ -70,7 +70,8 @@
</view>
<!-- 打快递单弹窗 -->
<uni-drawer ref="showRight" mode="right">
<view class="uni-drawer-picking" v-if="detail.stock_out_info">
<view class="uni-drawer-picking" v-if="detail.stock_out_info" style="height: 100%;">
<scroll-view scroll-y="true" style="height: 100%;overflow-y: scroll;">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer(1)"></text>
<text class="text">打快递单</text>
......@@ -228,6 +229,7 @@
</view>
</view>
<view class="btn row verCenter bothSide"><view class="btn1 row rowCenter verCenter" style="width: 100%;" @click="updateDeliveryInfo(detail.stock_out_info.stock_out_id)">保存</view></view>
</scroll-view>
</view>
</uni-drawer>
</view>
......@@ -244,7 +246,7 @@ export default {
input_flag: false,
flag: false,
page: 1,
limit: 10000,
limit: 30,
list: [],
index: 0,
real_shipping_type_index: -1,
......@@ -258,6 +260,7 @@ export default {
searchParams: {
stock_out_sn: ''
},
hasMoreData: true, //是否分页加载
formParams: {
real_shipping_type: '', //交货方式
real_shipping_id: '', //物流公司
......@@ -274,6 +277,13 @@ export default {
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
......@@ -377,7 +387,12 @@ export default {
getData() {
this.request(API.getToPrintList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
if (res.code === 0) {
this.list = res.data.list;
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
......
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