|
|
@@ -29,12 +29,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item :prop="$route.query.id ? '' : 'password'" label="登录密码">
|
|
|
- <el-input :disabled="$route.query.id ? true : false" type="password" v-model="operationForm.password"
|
|
|
+ <el-form-item :prop="$route.query.id && route.query.type == 'edit' ? '' : 'password'" label="登录密码">
|
|
|
+ <el-input :disabled="$route.query.id && route.query.type == 'edit' ? true : false" type="password" v-model="operationForm.password"
|
|
|
placeholder="请填写登录密码"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12" v-if="!route.query.id">
|
|
|
+ <el-col :span="12" v-if="!route.query.id || route.query.type == 'add'">
|
|
|
<el-form-item prop="isAddSalesman" label="同时添加为业务员">
|
|
|
<el-select v-model="operationForm.isAddSalesman">
|
|
|
<el-option label="是" value="1" key="1"></el-option>
|
|
|
@@ -549,6 +549,47 @@ const info = ref<institutionData>({
|
|
|
name: "",
|
|
|
system: "",
|
|
|
});
|
|
|
+// 添加/编辑业务员表单
|
|
|
+let operationForm = ref<OperationFormProps>({
|
|
|
+ deptId: "",
|
|
|
+ name: "",
|
|
|
+ mobile: "",
|
|
|
+ identity: "",
|
|
|
+ identityTimeStart: "",
|
|
|
+ identityTimeEnd: "",
|
|
|
+ leaderId: "",
|
|
|
+ leaderNumber: "",
|
|
|
+ referrerId: "",
|
|
|
+ referrerNumber: "",
|
|
|
+ roleIds: [],
|
|
|
+ password: "",
|
|
|
+ sex: "",
|
|
|
+ birthday: "",
|
|
|
+ nations: "",
|
|
|
+ koseki: "",
|
|
|
+ maritalStatus: "",
|
|
|
+ politicsStatus: "",
|
|
|
+ health: "",
|
|
|
+ province: "",
|
|
|
+ city: "",
|
|
|
+ district: "",
|
|
|
+ address: [],
|
|
|
+ liveAddress: "",
|
|
|
+ postalCode: "",
|
|
|
+ education: "",
|
|
|
+ graduationTime: "",
|
|
|
+ school: "",
|
|
|
+ isComputer: "",
|
|
|
+ emergencyContactName: "",
|
|
|
+ emergencyContactTel: "",
|
|
|
+ salary: "",
|
|
|
+ salaryLevel: "",
|
|
|
+ bankCardId: "",
|
|
|
+ bankName: "",
|
|
|
+ isAddSalesman: '',
|
|
|
+ typeAttr: '',
|
|
|
+ organizationId: ''
|
|
|
+});
|
|
|
//
|
|
|
const route = useRoute();
|
|
|
const router = useRouter()
|
|
|
@@ -567,7 +608,7 @@ onMounted(async () => {
|
|
|
// }
|
|
|
tableData.value = [...res.data];
|
|
|
});
|
|
|
- if (route.query.id)
|
|
|
+ if (route.query.id && route.query.type == "edit")
|
|
|
api.userApi
|
|
|
.getUserInfo({
|
|
|
id: route.query.id || "",
|
|
|
@@ -621,7 +662,9 @@ onMounted(async () => {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
+if (route.query.type == "add") {
|
|
|
+ operationForm.value.deptId = route.query.id || ""
|
|
|
+}
|
|
|
// 证件有效期始限制条件
|
|
|
const disabledDateStart = (time: Date) => {
|
|
|
return time.getTime() > Date.now() - 8.64e7
|
|
|
@@ -667,47 +710,7 @@ interface OperationFormProps extends memberType {
|
|
|
let emits = defineEmits(["closeDialog"]);
|
|
|
|
|
|
const OperationFormRef = ref<FormInstance>();
|
|
|
-// 添加/编辑业务员表单
|
|
|
-let operationForm = ref<OperationFormProps>({
|
|
|
- deptId: "",
|
|
|
- name: "",
|
|
|
- mobile: "",
|
|
|
- identity: "",
|
|
|
- identityTimeStart: "",
|
|
|
- identityTimeEnd: "",
|
|
|
- leaderId: "",
|
|
|
- leaderNumber: "",
|
|
|
- referrerId: "",
|
|
|
- referrerNumber: "",
|
|
|
- roleIds: [],
|
|
|
- password: "",
|
|
|
- sex: "",
|
|
|
- birthday: "",
|
|
|
- nations: "",
|
|
|
- koseki: "",
|
|
|
- maritalStatus: "",
|
|
|
- politicsStatus: "",
|
|
|
- health: "",
|
|
|
- province: "",
|
|
|
- city: "",
|
|
|
- district: "",
|
|
|
- address: [],
|
|
|
- liveAddress: "",
|
|
|
- postalCode: "",
|
|
|
- education: "",
|
|
|
- graduationTime: "",
|
|
|
- school: "",
|
|
|
- isComputer: "",
|
|
|
- emergencyContactName: "",
|
|
|
- emergencyContactTel: "",
|
|
|
- salary: "",
|
|
|
- salaryLevel: "",
|
|
|
- bankCardId: "",
|
|
|
- bankName: "",
|
|
|
- isAddSalesman: '',
|
|
|
- typeAttr: '',
|
|
|
- organizationId: ''
|
|
|
-});
|
|
|
+
|
|
|
// 添加/编辑业务员表单校验
|
|
|
const operationRules = ref<FormRules>({
|
|
|
name: [{ required: true, trigger: "blur", message: "请填写姓名" }],
|