|
@@ -120,6 +120,8 @@
|
|
|
<el-date-picker v-model="viewForm.expireTime" type="date" value-format="yyyy-MM-dd" placeholder="选择过期时间" style="width:100%" />
|
|
<el-date-picker v-model="viewForm.expireTime" type="date" value-format="yyyy-MM-dd" placeholder="选择过期时间" style="width:100%" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="归属代理" prop="proxyId">
|
|
<el-form-item label="归属代理" prop="proxyId">
|
|
|
<el-select v-model="viewForm.proxyId" placeholder="请选择代理" clearable filterable style="width:100%">
|
|
<el-select v-model="viewForm.proxyId" placeholder="请选择代理" clearable filterable style="width:100%">
|
|
@@ -128,22 +130,24 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="租户状态">
|
|
|
|
|
- <el-switch v-model="viewForm.statusBool" active-text="正常" inactive-text="禁用"
|
|
|
|
|
- :active-value="1" :inactive-value="0" />
|
|
|
|
|
|
|
+ <el-form-item label="公司数量" prop="companyNum">
|
|
|
|
|
+ <el-input-number v-model="viewForm.companyNum" :min="1" :precision="0" controls-position="right" style="width:100%" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公司数量" prop="companyNum">
|
|
|
|
|
- <el-input-number v-model="viewForm.companyNum" :min="1" :precision="0" controls-position="right" style="width:100%" />
|
|
|
|
|
|
|
+ <el-form-item label="租户状态">
|
|
|
|
|
+ <el-switch v-model="viewForm.statusBool" active-text="正常" inactive-text="禁用"
|
|
|
|
|
+ :active-value="1" :inactive-value="0" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item prop="accountNum">
|
|
|
|
|
- <span slot="label" class="tenant-form-label" title="公司员工账户总数量">员工账户数</span>
|
|
|
|
|
- <el-input-number v-model="viewForm.accountNum" :min="1" :precision="0" controls-position="right" style="width:100%" />
|
|
|
|
|
|
|
+ <el-form-item label="员工账户数">
|
|
|
|
|
+ <span>{{ viewForm.accountNum || 0 }}</span>
|
|
|
|
|
+ <span class="tenant-balance-hint">(仅展示,不可编辑)</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="租户余额" class="tenant-balance-item">
|
|
<el-form-item label="租户余额" class="tenant-balance-item">
|
|
|
<span style="color:#1890ff;font-weight:bold">¥{{ viewForm.balance || '0.00' }}</span>
|
|
<span style="color:#1890ff;font-weight:bold">¥{{ viewForm.balance || '0.00' }}</span>
|
|
@@ -182,6 +186,8 @@
|
|
|
<el-input v-model="addDialog.form.manager" placeholder="请输入商务负责人" />
|
|
<el-input v-model="addDialog.form.manager" placeholder="请输入商务负责人" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="管理员账号" prop="userName">
|
|
<el-form-item label="管理员账号" prop="userName">
|
|
|
<el-input v-model="addDialog.form.userName" placeholder="请输入管理员账号" />
|
|
<el-input v-model="addDialog.form.userName" placeholder="请输入管理员账号" />
|
|
@@ -194,6 +200,8 @@
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="16">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
|
<el-date-picker v-model="addDialog.form.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间" style="width:100%" />
|
|
<el-date-picker v-model="addDialog.form.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间" style="width:100%" />
|
|
@@ -217,9 +225,9 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item prop="accountNum">
|
|
|
|
|
- <span slot="label" class="tenant-form-label" title="公司员工账户总数量">员工账户数</span>
|
|
|
|
|
- <el-input-number v-model="addDialog.form.accountNum" :min="1" :precision="0" controls-position="right" style="width:100%" />
|
|
|
|
|
|
|
+ <el-form-item label="员工账户数">
|
|
|
|
|
+ <span>0</span>
|
|
|
|
|
+ <span class="tenant-balance-hint">(新增租户默认为0)</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -230,7 +238,6 @@
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
@@ -424,8 +431,7 @@ export default {
|
|
|
editRules: {
|
|
editRules: {
|
|
|
tenantName: [{ required: true, message: '请输入租户名称', trigger: 'blur' }],
|
|
tenantName: [{ required: true, message: '请输入租户名称', trigger: 'blur' }],
|
|
|
contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
|
contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
|
|
- companyNum: [{ required: true, message: '请输入公司数量', trigger: 'blur' }],
|
|
|
|
|
- accountNum: [{ required: true, message: '请输入员工账户数', trigger: 'blur' }]
|
|
|
|
|
|
|
+ companyNum: [{ required: true, message: '请输入公司数量', trigger: 'blur' }]
|
|
|
},
|
|
},
|
|
|
// 新增租户弹窗
|
|
// 新增租户弹窗
|
|
|
addDialog: {
|
|
addDialog: {
|
|
@@ -442,15 +448,14 @@ export default {
|
|
|
expireTime: null,
|
|
expireTime: null,
|
|
|
status: 1,
|
|
status: 1,
|
|
|
companyNum: 1,
|
|
companyNum: 1,
|
|
|
- accountNum: 1
|
|
|
|
|
|
|
+ accountNum: 0
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
tenantName: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
tenantName: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
|
contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
|
contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
|
|
userName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }],
|
|
userName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }],
|
|
|
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
|
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
|
|
- companyNum: [{ required: true, message: '请输入公司数量', trigger: 'blur' }],
|
|
|
|
|
- accountNum: [{ required: true, message: '请输入员工账户数', trigger: 'blur' }]
|
|
|
|
|
|
|
+ companyNum: [{ required: true, message: '请输入公司数量', trigger: 'blur' }]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 充值/扣款弹窗
|
|
// 充值/扣款弹窗
|
|
@@ -531,7 +536,7 @@ export default {
|
|
|
expireTime: null,
|
|
expireTime: null,
|
|
|
status: 1,
|
|
status: 1,
|
|
|
companyNum: 1,
|
|
companyNum: 1,
|
|
|
- accountNum: 1
|
|
|
|
|
|
|
+ accountNum: 0
|
|
|
}
|
|
}
|
|
|
this.addDialog.visible = true
|
|
this.addDialog.visible = true
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -584,7 +589,7 @@ export default {
|
|
|
this.$set(this.viewForm, 'companyNum', 1)
|
|
this.$set(this.viewForm, 'companyNum', 1)
|
|
|
}
|
|
}
|
|
|
if (this.viewForm.accountNum == null) {
|
|
if (this.viewForm.accountNum == null) {
|
|
|
- this.$set(this.viewForm, 'accountNum', 1)
|
|
|
|
|
|
|
+ this.$set(this.viewForm, 'accountNum', 0)
|
|
|
}
|
|
}
|
|
|
// 为 el-switch 提供 number 类型的 status
|
|
// 为 el-switch 提供 number 类型的 status
|
|
|
this.$set(this.viewForm, 'statusBool', this.viewForm.status)
|
|
this.$set(this.viewForm, 'statusBool', this.viewForm.status)
|
|
@@ -609,8 +614,7 @@ export default {
|
|
|
expireTime: this.viewForm.expireTime,
|
|
expireTime: this.viewForm.expireTime,
|
|
|
status: this.viewForm.statusBool,
|
|
status: this.viewForm.statusBool,
|
|
|
proxyId: this.viewForm.proxyId,
|
|
proxyId: this.viewForm.proxyId,
|
|
|
- companyNum: this.viewForm.companyNum,
|
|
|
|
|
- accountNum: this.viewForm.accountNum
|
|
|
|
|
|
|
+ companyNum: this.viewForm.companyNum
|
|
|
}
|
|
}
|
|
|
updateTenant(data).then(() => {
|
|
updateTenant(data).then(() => {
|
|
|
this.$message.success('保存成功')
|
|
this.$message.success('保存成功')
|
|
@@ -1064,6 +1068,17 @@ export default {
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
|
}
|
|
}
|
|
|
|
|
+.tenant-dialog-form ::v-deep .el-divider {
|
|
|
|
|
+ margin: 0 0 16px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.tenant-dialog-form ::v-deep .el-divider:not(:first-child) {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+.tenant-dialog-form ::v-deep .el-divider__text {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #409EFF;
|
|
|
|
|
+}
|
|
|
.tenant-dialog-form ::v-deep .el-form-item {
|
|
.tenant-dialog-form ::v-deep .el-form-item {
|
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
}
|
|
}
|