|
@@ -19,8 +19,8 @@
|
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
|
>
|
|
|
<a-form-model-item label="经销商名称" prop="tenantSn">
|
|
|
- <custList ref="custList" v-if="!itemId" id="dealerAccountEdit-tenantSn" @change="custChange"></custList>
|
|
|
- <span v-else>{{ detailData.org.name }}</span>
|
|
|
+ <custList ref="custList" v-if="itemId==''" id="dealerAccountEdit-tenantSn" @change="custChange"></custList>
|
|
|
+ <span v-else>{{ detailData ? (detailData.org ? detailData.org.name : '--') : '--' }}</span>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="管理员姓名" prop="name">
|
|
|
<a-input
|
|
@@ -43,11 +43,10 @@
|
|
|
id="dealerAccountEdit-loginName"
|
|
|
:maxLength="50"
|
|
|
v-model.trim="form.loginName"
|
|
|
- :disabled="itemId"
|
|
|
placeholder="请输入管理员账号,字母/数字(最多50个字符)"
|
|
|
allowClear />
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="管理员密码" prop="password" v-if="!itemId">
|
|
|
+ <a-form-model-item label="管理员密码" :prop="itemId=='' ? 'password' : ''" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
|
|
|
<a-input
|
|
|
id="dealerAccountEdit-password"
|
|
|
:maxLength="50"
|
|
@@ -155,7 +154,10 @@ export default {
|
|
|
this.form.phone = this.detailData.phone || ''
|
|
|
this.form.loginName = this.detailData.loginName || ''
|
|
|
this.form.password = this.detailData.password || ''
|
|
|
- this.form.org.childUserMaxNum = this.detailData.org.childUserMaxNum || ''
|
|
|
+ const childUserMaxNum = this.detailData ? (this.detailData.org ? (this.detailData.org.childUserMaxNum ? this.detailData.org.childUserMaxNum : '') : '') : ''
|
|
|
+ this.form.org.childUserMaxNum = childUserMaxNum
|
|
|
+ // const orgName = this.detailData ? (this.detailData.org ? (this.detailData.org.name ? this.detailData.org.name : undefined) : undefined) : undefined
|
|
|
+ // this.$refs.custList.handleChange({ key: this.detailData.tenantSn || undefined, label: orgName })
|
|
|
} else {
|
|
|
this.detailData = null
|
|
|
this.$refs.ruleForm.resetFields()
|
|
@@ -172,6 +174,7 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
this.form.tenantSn = ''
|
|
|
this.form.name = ''
|
|
|
this.form.phone = ''
|
|
@@ -192,21 +195,7 @@ export default {
|
|
|
<style lang="less">
|
|
|
.dealerAccountEdit-modal{
|
|
|
.ant-modal-body {
|
|
|
- padding: 40px 40px 24px;
|
|
|
- }
|
|
|
- .upload{
|
|
|
- width: 100%!important;
|
|
|
- }
|
|
|
- // 商品图片描述
|
|
|
- .upload-desc{
|
|
|
- font-size: 12px;
|
|
|
- color: #808695;
|
|
|
- }
|
|
|
- // 文本编辑器 工具栏样式换行
|
|
|
- .dealerAccountEdit-editor{
|
|
|
- .w-e-toolbar{
|
|
|
- flex-wrap: wrap;
|
|
|
- }
|
|
|
+ padding: 40px 40px 24px;
|
|
|
}
|
|
|
.btn-cont {
|
|
|
text-align: center;
|