|
@@ -64,7 +64,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
-
|
|
|
+
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
|
|
|
<el-col v-bind="grid">
|
|
|
<el-form-item label="性别:">
|
|
@@ -343,13 +343,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择用户:" required>
|
|
|
<el-input v-model.trim="associationForm.user.nickname" class="selWidth" @focus="modalPicTap"></el-input>
|
|
|
-
|
|
|
+
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="真实姓名" required>
|
|
|
<!-- <el-input v-model.trim="associationForm.realName" class="selWidth"></el-input> -->
|
|
|
<el-select v-model="associationForm.realName" placeholder="真实姓名">
|
|
|
- <el-option v-for="item in userList" :key="item.name" :label="item.name" :value="item.name" ></el-option>
|
|
|
+ <el-option v-for="(item,index) in userList" :key="item.name" :label="item.name" :value="index" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -407,7 +407,7 @@
|
|
|
></el-input-number>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handlePointClose">取 消</el-button>
|
|
@@ -461,16 +461,16 @@
|
|
|
>
|
|
|
<el-form-item label="填写部门" required>
|
|
|
<el-select v-model="associationForm.department" placeholder="填写部门" @change="getNameList">
|
|
|
- <el-option v-for="(item,index) in bmList" :key="item.name" :label="item.name" :value="index" ></el-option>
|
|
|
+ <el-option v-for="(item,index) in bmList" :key="index" :label="item.name" :value="index" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择用户:" required>
|
|
|
<el-input v-model.trim="accountInfo.nickname" disabled class="selWidth"></el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="真实姓名" required>
|
|
|
<el-select v-model="associationForm.realName" placeholder="真实姓名">
|
|
|
- <el-option v-for="item in userList" :key="item.name" :label="item.name" :value="item.name" ></el-option>
|
|
|
+ <el-option v-for="(item,index) in userList" :key="index" :label="item.name" :value="index" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -490,13 +490,13 @@
|
|
|
>
|
|
|
<el-form-item label="选择部门" required>
|
|
|
<el-select v-model="departData.department" placeholder="选择部门">
|
|
|
- <el-option v-for="item in bmList" :key="item.name" :label="item.name" :value="item.name" ></el-option>
|
|
|
+ <el-option v-for="(item,index) in bmList" :key="item.id" :label="item.name" :value="index" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="选择用户:" required>
|
|
|
<el-input v-model.trim="accountInfo.nickname" disabled class="selWidth"></el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="真实姓名" required>
|
|
|
<el-select v-model="associationForm.realName" placeholder="真实姓名">
|
|
|
<el-option v-for="item in userList" :key="item.name" :label="item.name" :value="item.id" ></el-option>
|
|
@@ -535,9 +535,9 @@
|
|
|
<detail-user ref="userDetailFrom"></detail-user>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script>
|
|
|
-
|
|
|
+
|
|
|
import {
|
|
|
enterpriseList,
|
|
|
tagAllListApi,
|
|
@@ -586,12 +586,12 @@
|
|
|
data() {
|
|
|
return {
|
|
|
registerTypeList: [
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
value: 'routine',
|
|
|
label: '小程序',
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
value: 'iosWx',
|
|
|
label: '微信ios',
|
|
@@ -769,7 +769,8 @@
|
|
|
enterpriseId: that.userInfo.id,
|
|
|
nickname: that.associationForm.user.nickname,
|
|
|
phone: that.associationForm.user.phone,
|
|
|
- realName: that.associationForm.realName,
|
|
|
+ organizationDepartmentUserId: that.userList[that.associationForm.realName].id,
|
|
|
+ realName: that.userList[that.associationForm.realName].name,
|
|
|
userId: that.associationForm.user.id,
|
|
|
}
|
|
|
associationAccount(data).then((res) => {
|
|
@@ -841,6 +842,7 @@
|
|
|
}
|
|
|
otganizatonDepartmentList(data).then((res) => {
|
|
|
this.bmList = res
|
|
|
+ console.log('此时分类:'+this.associationForm.department)
|
|
|
if(this.associationForm.department) {
|
|
|
let data = {
|
|
|
id: this.associationForm.department,
|
|
@@ -848,13 +850,18 @@
|
|
|
}
|
|
|
otganizatonDepartmentUserList(data).then((res) => {
|
|
|
this.userList = res
|
|
|
+ this.bmList.forEach((value,index) =>{
|
|
|
+ if (value['id'] === this.associationForm.department) {
|
|
|
+ this.associationForm.department = index;
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getNameList() {
|
|
|
let data = {
|
|
|
- id: this.bmList[this.associationForm.department].name,
|
|
|
+ id: this.bmList[this.associationForm.department].id,
|
|
|
organizationId: this.userInfo.organizationId
|
|
|
}
|
|
|
otganizatonDepartmentUserList(data).then((res) => {
|
|
@@ -923,7 +930,8 @@
|
|
|
account: this.departData.account,
|
|
|
availableLineOfCredit: this.departData.availableLineOfCredit,
|
|
|
createTime: this.departData.createTime,
|
|
|
- department: this.departData.department,
|
|
|
+ department: this.bmList[this.departData.department].name,
|
|
|
+ departId: this.bmList[this.departData.department].id,
|
|
|
enterpriseName: this.departData.enterpriseName,
|
|
|
id: this.departData.id,
|
|
|
isAuthentication: this.departData.isAuthentication,
|
|
@@ -963,18 +971,21 @@
|
|
|
this.$message.error('请选择子账号')
|
|
|
return
|
|
|
}
|
|
|
- this.editVisible = true
|
|
|
- this.associationForm.department = this.accountInfo.department
|
|
|
+ this.associationForm.department = this.accountInfo.departmentId
|
|
|
this.associationForm.realName = this.accountInfo.realName
|
|
|
|
|
|
this.getbmList()
|
|
|
+ this.editVisible = true
|
|
|
},
|
|
|
editAssociation() {
|
|
|
console.log(this.associationForm);
|
|
|
+ console.log(this.bmList);
|
|
|
let data = {
|
|
|
id: this.accountInfo.id,
|
|
|
- realName: this.associationForm.realName,
|
|
|
- department: this.bmList[this.associationForm.department].name
|
|
|
+ organizationDepartmentUserId: this.userList[this.associationForm.realName].id,
|
|
|
+ realName: this.userList[this.associationForm.realName].name,
|
|
|
+ department: this.bmList[this.associationForm.department].name,
|
|
|
+ departmentId: this.bmList[this.associationForm.department].id
|
|
|
}
|
|
|
updataBypassAccount2(data).then((res) => {
|
|
|
this.$message.success('修改成功')
|
|
@@ -1033,8 +1044,8 @@
|
|
|
}).catch((res) => {
|
|
|
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
that.storeVisible = false
|
|
|
// that.shop = {}
|
|
|
},
|
|
@@ -1332,7 +1343,7 @@
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style scoped lang="scss">
|
|
|
.red {
|
|
|
color: #ed4014;
|
|
@@ -1425,4 +1436,3 @@
|
|
|
color: #fff !important;
|
|
|
}
|
|
|
</style>
|
|
|
-
|