lalala 6 gadi atpakaļ
vecāks
revīzija
385e3f1a3e

+ 1 - 0
mobile-code/src/admin/member/detail.vue

@@ -290,6 +290,7 @@ export default {
 				userId: this.data.id,
 				...this.rechargeForm
 			}).then(res => {
+				this._getUserDet()
 				this.$msg('充值成功!')
 				this.modalCancel()
 			})

+ 16 - 15
mobile-code/src/admin/staff/add.vue

@@ -48,7 +48,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">登陆密码</div>
-					<input v-model="form.password" placeholder-class="phcolor" class="tui-input" name="password" placeholder="请输入" maxlength="50" type="text" />
+					<input v-model="form.password" placeholder-class="phcolor" class="tui-input" name="password" placeholder="请输入" maxlength="50" type="password" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell remark-wrap" :hover="false">
 					<div class="tui-title">备注信息</div>
@@ -107,6 +107,17 @@
 		onLoad() {
 			// this.init()
 		},
+		onShow() {
+			if (this.option.id) {
+				uni.setNavigationBarTitle({
+					title: `修改员工`
+				})
+			} else {
+				uni.setNavigationBarTitle({
+					title: `添加员工`
+				})
+			}
+		},
 		methods: {
 			init() {
 				let data = uni.getStorageSync('addStaffData')
@@ -123,16 +134,6 @@
 					this.form.userId = memberData.id
 				}
 
-				if (this.option.id) {
-					uni.setNavigationBarTitle({
-						title: `修改员工`
-					})
-				} else {
-					uni.setNavigationBarTitle({
-						title: `添加员工`
-					})
-				}
-
 				if (data) return false
 
 				this._getRoleList().then(res => {
@@ -152,13 +153,13 @@
 				getDet({ id: this.option.id }).then(res => {
 					if (this.$util.isEmpty(res.data)) return
 					Object.keys(this.form).forEach((i, index) => {
-						if (i != 'password') {
-							this.form[i] = res.data[i]
-						}
+						// if (i != 'password') {
+						this.form[i] = res.data[i]
+						// }
 					})
 					this.roleSelData = this.roleList.filter(e => this.form.roleId == e.id)[0]
 
-					if (this.form.userId) {
+					if (this.form.userId && this.form.userId != '0') {
 						this._getMemberDet()
 					}
 				})