|
@@ -29,7 +29,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
- <el-form-item prop="deptId" label="所属团队" v-if="operationForm.typeAttr!='6'">
|
|
|
|
|
|
|
+ <el-form-item prop="organizationId" label="所属团队" v-if="operationForm.typeAttr!='6'">
|
|
|
<el-select v-model="operationForm.organizationId" placeholder="请选择所属团队" @change="deptChange">
|
|
<el-select v-model="operationForm.organizationId" placeholder="请选择所属团队" @change="deptChange">
|
|
|
<el-option v-for="item in teamList" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
|
<el-option v-for="item in teamList" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -463,10 +463,12 @@ import { ElMessage } from "element-plus";
|
|
|
|
|
|
|
|
interface OperationFormProps extends AddOperation {
|
|
interface OperationFormProps extends AddOperation {
|
|
|
organization: string
|
|
organization: string
|
|
|
|
|
+ organizationId: string,
|
|
|
leaderNumber: string,
|
|
leaderNumber: string,
|
|
|
referrerNumber: string,
|
|
referrerNumber: string,
|
|
|
address?: string[],
|
|
address?: string[],
|
|
|
- id?: string
|
|
|
|
|
|
|
+ id?: string,
|
|
|
|
|
+ // [key: string]: any;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let emits = defineEmits(['closeDialog'])
|
|
let emits = defineEmits(['closeDialog'])
|
|
@@ -476,48 +478,47 @@ const OperationFormRef = ref<FormInstance>()
|
|
|
let operationForm = ref<OperationFormProps>({
|
|
let operationForm = ref<OperationFormProps>({
|
|
|
typeAttr: '',
|
|
typeAttr: '',
|
|
|
deptId: '',
|
|
deptId: '',
|
|
|
- organizationId: '',
|
|
|
|
|
name: '',
|
|
name: '',
|
|
|
mobile: '',
|
|
mobile: '',
|
|
|
identity: '',
|
|
identity: '',
|
|
|
identityTimeStart: '',
|
|
identityTimeStart: '',
|
|
|
identityTimeEnd: '',
|
|
identityTimeEnd: '',
|
|
|
leaderId: '',
|
|
leaderId: '',
|
|
|
- leaderNumber: '',
|
|
|
|
|
referrerId: '',
|
|
referrerId: '',
|
|
|
|
|
+ sex: '',
|
|
|
|
|
+ birthday: '',
|
|
|
|
|
+ nations: '',
|
|
|
|
|
+ koseki: '',
|
|
|
|
|
+ maritalStatus: '',
|
|
|
|
|
+ politicsStatus: '',
|
|
|
|
|
+ health: '',
|
|
|
|
|
+ province: '',
|
|
|
|
|
+ city: '',
|
|
|
|
|
+ district: '',
|
|
|
|
|
+ liveAddress: '',
|
|
|
|
|
+ postalCode: '',
|
|
|
|
|
+ education: '',
|
|
|
|
|
+ graduationTime: '',
|
|
|
|
|
+ school: '',
|
|
|
|
|
+ isComputer: '',
|
|
|
|
|
+ emergencyContactName: '',
|
|
|
|
|
+ emergencyContactTel: '',
|
|
|
|
|
+ salary: '',
|
|
|
|
|
+ salaryLevel: '',
|
|
|
|
|
+ bankCardId: '',
|
|
|
|
|
+ bankName: '',
|
|
|
|
|
+ sfz1: '',
|
|
|
|
|
+ sfz2: '',
|
|
|
|
|
+ qualification: '',
|
|
|
|
|
+ contract: '',
|
|
|
|
|
+ applicant: '',
|
|
|
|
|
+ salaryTable: '',
|
|
|
|
|
+ leaveTable: '',
|
|
|
|
|
+ organizationId: '',
|
|
|
|
|
+ organization: '',
|
|
|
|
|
+ leaderNumber: '',
|
|
|
referrerNumber: '',
|
|
referrerNumber: '',
|
|
|
-
|
|
|
|
|
- sex: null,
|
|
|
|
|
- birthday: null,
|
|
|
|
|
- nations: null,
|
|
|
|
|
- koseki: null,
|
|
|
|
|
- maritalStatus: null,
|
|
|
|
|
- politicsStatus: null,
|
|
|
|
|
- health: null,
|
|
|
|
|
- province: null,
|
|
|
|
|
- city: null,
|
|
|
|
|
- district: null,
|
|
|
|
|
address: [],
|
|
address: [],
|
|
|
- liveAddress: null,
|
|
|
|
|
- postalCode: null,
|
|
|
|
|
- education: null,
|
|
|
|
|
- graduationTime: null,
|
|
|
|
|
- school: null,
|
|
|
|
|
- isComputer: null,
|
|
|
|
|
- emergencyContactName: null,
|
|
|
|
|
- emergencyContactTel: null,
|
|
|
|
|
- salary: null,
|
|
|
|
|
- salaryLevel: null,
|
|
|
|
|
- bankCardId: null,
|
|
|
|
|
- bankName: null,
|
|
|
|
|
-
|
|
|
|
|
- sfz1: null,
|
|
|
|
|
- sfz2: null,
|
|
|
|
|
- qualification: null,
|
|
|
|
|
- contract: null,
|
|
|
|
|
- applicant: null,
|
|
|
|
|
- salaryTable: null,
|
|
|
|
|
- leaveTable: null
|
|
|
|
|
})
|
|
})
|
|
|
// 机构数据渲染格式
|
|
// 机构数据渲染格式
|
|
|
const cascaderProps = {
|
|
const cascaderProps = {
|
|
@@ -530,7 +531,7 @@ const operationRules = ref<FormRules>({
|
|
|
typeAttr: [
|
|
typeAttr: [
|
|
|
{ required: true, trigger: "change", message: "请选择业务员类型" }
|
|
{ required: true, trigger: "change", message: "请选择业务员类型" }
|
|
|
],
|
|
],
|
|
|
- deptId: [
|
|
|
|
|
|
|
+ organizationId: [
|
|
|
{ required: true, trigger: "change", message: "请选择所属团队" }
|
|
{ required: true, trigger: "change", message: "请选择所属团队" }
|
|
|
],
|
|
],
|
|
|
name: [
|
|
name: [
|
|
@@ -637,10 +638,10 @@ const disabledDateEnd = (time: Date) => {
|
|
|
// 编辑时初始化数据
|
|
// 编辑时初始化数据
|
|
|
// 编辑的id
|
|
// 编辑的id
|
|
|
let editId = ref('')
|
|
let editId = ref('')
|
|
|
-const initEditData = (id) => {
|
|
|
|
|
- if(id) {
|
|
|
|
|
|
|
+const initEditData = (id, ids) => {
|
|
|
|
|
+ if(ids) {
|
|
|
editId.value = id
|
|
editId.value = id
|
|
|
- api.operationApi.operationDetail(id).then(res => {
|
|
|
|
|
|
|
+ api.operationApi.operationDetail(ids).then(res => {
|
|
|
if(res?.code == 200) {
|
|
if(res?.code == 200) {
|
|
|
let formData = res.data
|
|
let formData = res.data
|
|
|
initTeamData(formData?.typeAttr==='5'?'1':formData?.typeAttr==='8'?'2':formData?.typeAttr==='7'?'3':'')
|
|
initTeamData(formData?.typeAttr==='5'?'1':formData?.typeAttr==='8'?'2':formData?.typeAttr==='7'?'3':'')
|
|
@@ -1094,6 +1095,7 @@ const typeAttrChange = async (e) => {
|
|
|
operationForm.value.leaderNumber = ''
|
|
operationForm.value.leaderNumber = ''
|
|
|
operationForm.value.referrerId = ''
|
|
operationForm.value.referrerId = ''
|
|
|
operationForm.value.referrerNumber = ''
|
|
operationForm.value.referrerNumber = ''
|
|
|
|
|
+ operationForm.value.organizationId = ''
|
|
|
if(e != '6') {
|
|
if(e != '6') {
|
|
|
initTeamData(e==='5'?'1':e==='8'?'2':e==='7'?'3':'')
|
|
initTeamData(e==='5'?'1':e==='8'?'2':e==='7'?'3':'')
|
|
|
} else {
|
|
} else {
|
|
@@ -1112,6 +1114,7 @@ const deptChange = (e) => {
|
|
|
// 机构切换
|
|
// 机构切换
|
|
|
const deptIdChange = (e) => {
|
|
const deptIdChange = (e) => {
|
|
|
if(e) {
|
|
if(e) {
|
|
|
|
|
+ operationForm.value.deptId = e[e.length - 1]
|
|
|
getUser(e[e.length - 1])
|
|
getUser(e[e.length - 1])
|
|
|
getRecommend(e[e.length - 1])
|
|
getRecommend(e[e.length - 1])
|
|
|
}
|
|
}
|
|
@@ -1160,7 +1163,8 @@ onMounted(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
- initEditData
|
|
|
|
|
|
|
+ initEditData,
|
|
|
|
|
+ operationForm
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|