|
@@ -48,7 +48,7 @@
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title required">登陆密码</div>
|
|
<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>
|
|
|
<tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
<tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
|
<div class="tui-title">备注信息</div>
|
|
<div class="tui-title">备注信息</div>
|
|
@@ -107,6 +107,17 @@
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
// this.init()
|
|
// this.init()
|
|
|
},
|
|
},
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ if (this.option.id) {
|
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
|
+ title: `修改员工`
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
|
+ title: `添加员工`
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
init() {
|
|
init() {
|
|
|
let data = uni.getStorageSync('addStaffData')
|
|
let data = uni.getStorageSync('addStaffData')
|
|
@@ -123,16 +134,6 @@
|
|
|
this.form.userId = memberData.id
|
|
this.form.userId = memberData.id
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (this.option.id) {
|
|
|
|
|
- uni.setNavigationBarTitle({
|
|
|
|
|
- title: `修改员工`
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- uni.setNavigationBarTitle({
|
|
|
|
|
- title: `添加员工`
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if (data) return false
|
|
if (data) return false
|
|
|
|
|
|
|
|
this._getRoleList().then(res => {
|
|
this._getRoleList().then(res => {
|
|
@@ -152,13 +153,13 @@
|
|
|
getDet({ id: this.option.id }).then(res => {
|
|
getDet({ id: this.option.id }).then(res => {
|
|
|
if (this.$util.isEmpty(res.data)) return
|
|
if (this.$util.isEmpty(res.data)) return
|
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
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]
|
|
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()
|
|
this._getMemberDet()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|