Просмотр исходного кода

Merge branch 'master' into 绿色

# Conflicts:
#	pages/login/modules/account.js
xiaohaizhao 3 недель назад
Родитель
Сommit
f4d6a455c0

+ 9 - 1
components/record/index.js

@@ -10,6 +10,10 @@ Component({
         ownerid: {
             type: String
         },
+        hideAudit: {
+            type: Boolean,
+            value: false
+        },
     },
     data: {
         content: {
@@ -41,11 +45,15 @@ Component({
                     title: res.data,
                     icon: "none"
                 });
+                let data = res.data;
+                if (this.data.hideAudit) {
+                    data = data.filter(item => !/审核|审批/.test(item.action));
+                }
                 this.setData({
                     "content.pageNumber": res.pageNumber + 1,
                     "content.pageTotal": res.pageTotal,
                     "content.total": res.total,
-                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+                    list: res.pageNumber == 1 ? data : this.data.list.concat(data)
                 })
             })
         },

+ 1 - 1
components/record/index.wxml

@@ -1,4 +1,4 @@
-<view class="head">
+<view class="head" wx:if="{{!hideAudit}}">
     <view class="count">
         <text wx:if="{{language['总共']}}">{{language['总共']}}:{{content.total}}</text>
         <text wx:else>总共{{content.total}}个</text>

+ 1 - 1
packageA/deliveryConfirmation/detail.wxml

@@ -41,7 +41,7 @@
 </view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<product slot='产品明细' id='Product' />
-	<record slot='操作记录' id='record' ownertable='st_stockbill' ownerid='{{st_stockbillid}}' />
+	<record slot='操作记录' id='record' ownertable='st_stockbill' ownerid='{{st_stockbillid}}' hideAudit="{{true}}" />
 </Yl_FunTabs>
 <view class="footer">
 	<van-button custom-class='but' bindtap="ConfirmReceiptOfGoods">{{detail.isreceiver == 0 ? '收货确认' : '收货反确认'}}</van-button>

+ 1 - 1
packageA/writeOff/detail.wxml

@@ -30,7 +30,7 @@
 <view style="height: 10rpx;"></view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Product slot='产品明细' privacyFieldC='{{privacyFieldC}}' id='Product' sys_enterpriseid='{{detail.sys_enterpriseid}}' disabled="{{detail.status!='新建'}}" />
-	<record slot='操作记录' id='record' ownertable='sa_tpartreimbursement' ownerid='{{sa_tpartreimbursementid}}' />
+	<record slot='操作记录' id='record' ownertable='sa_tpartreimbursement' ownerid='{{sa_tpartreimbursementid}}' hideAudit="{{true}}" />
 </Yl_FunTabs>
 <view class="footer" wx:if="{{detail.status=='新建'}}">
 	<view></view>

+ 31 - 20
pages/login/modules/account.js

@@ -88,6 +88,17 @@ Component({
 				const s = _Http.baseUrl == "https://crm.meida.com:16691" ? await _Http.OldLogin(`?username=${this.data.accountno}&password=${encodeURIComponent(this.data.password)}`) : {
 					success: false
 				};
+				if (s.success == false) {
+					wx.showModal({
+						title: '提示',
+						content: s.msg,
+						showCancel: false,
+					})
+					getCurrentPages()[0].setData({
+						loading: false
+					})
+				}
+				if (s.success == false) return;
 				let res = s.success == true ? await _Http.SSO({
 					"accountno": s.data.userinfo.username,
 					"password": s.data.cookie.split("=")[1],
@@ -99,7 +110,7 @@ Component({
 					"imagecaptcha": this.data.imagecaptcha || '',
 					"systemclient": "wechatsaletool"
 				});
-				if (res.remindchangepassword) return wx.showModal({
+				if (res.remindchangepassword && _Http.ENV === 'release') return wx.showModal({
 					title: '提示',
 					content: '当前密码为系统初始化密码,请修改后重新登录',
 					showCancel: false,
@@ -141,25 +152,25 @@ Component({
 					"imagecaptcha": this.data.imagecaptcha || '',
 					"systemclient": "wechatsaletool"
 				});
-				// if (res.remindchangepassword) return wx.showModal({
-				// 	title: '提示',
-				// 	content: '当前密码为系统初始化密码,请修改后重新登录',
-				// 	showCancel: false,
-				// 	confirmText: "前去修改",
-				// 	complete: () => {
-				// 		wx.navigateTo({
-				// 			url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
-				// 		})
-				// 		_Http.claerPassword = function () {
-				// 			this.setData({
-				// 				password: ""
-				// 			})
-				// 		}.bind(this);
-				// 		getCurrentPages()[0].setData({
-				// 			loading: false
-				// 		})
-				// 	}
-				// })
+				if (res.remindchangepassword && _Http.ENV === 'release') return wx.showModal({
+					title: '提示',
+					content: '当前密码为系统初始化密码,请修改后重新登录',
+					showCancel: false,
+					confirmText: "前去修改",
+					complete: () => {
+						wx.navigateTo({
+							url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
+						})
+						_Http.claerPassword = function () {
+							this.setData({
+								password: ""
+							})
+						}.bind(this);
+						getCurrentPages()[0].setData({
+							loading: false
+						})
+					}
+				})
 				getCurrentPages()[0].setData({
 					loading: false
 				})