提交 #10

Merged
zcx merged 1 commits from dev-zcx into master 2 years ago
  1. 7
      src/api/system/employee.js
  2. 33
      src/views/system/employee/index.vue
  3. 126
      src/views/zs/officeSign/components/OfiiceSignDialogForm.vue
  4. 6
      src/views/zs/sign/components/SignFormDialog.vue

@ -38,5 +38,12 @@ export default {
url: '/system/employee/getEmployees', url: '/system/employee/getEmployees',
method: 'get' method: 'get'
}); });
},
getOffice(userId) {
return request({
url: '/system/employee/office/' + userId,
method: 'get'
});
} }
}; };

@ -165,24 +165,31 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属报名点">
<el-select v-model="form.officeId" placeholder="请选择">
<el-option v-for="dict in officeOptions" :key="dict.officeId" :label="dict.officeName" :value="dict.officeId" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="小程序权限"> <el-form-item label="小程序权限">
<el-radio-group v-model="form.hasStudent"> <el-radio-group v-model="form.hasStudent">
<el-radio :label="true">开通</el-radio> <el-radio :label="true">开通</el-radio>
<el-radio :label="false">关闭</el-radio> <el-radio :label="false">关闭</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="管理系统权限"> <el-form-item label="管理系统权限">
<el-radio-group v-model="form.hasSys"> <el-radio-group v-model="form.hasSys">
<el-radio :label="true">开通</el-radio> <el-radio :label="true">开通</el-radio>
<el-radio :label="false">关闭</el-radio> <el-radio :label="false">关闭</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> --> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -203,6 +210,7 @@
<script> <script>
import empAPi from '@/api/system/employee'; import empAPi from '@/api/system/employee';
import { listOffice } from "@/api/zs/office";
import { deptTreeSelect } from '@/api/system/dept'; import { deptTreeSelect } from '@/api/system/dept';
import { getRoleOptions } from '@/api/system/role'; import { getRoleOptions } from '@/api/system/role';
import { resetUserPwd } from '@/api/system/user'; import { resetUserPwd } from '@/api/system/user';
@ -296,7 +304,8 @@ export default {
] ]
}, },
userOptions: [], userOptions: [],
areaOptions: [] areaOptions: [],
officeOptions: []
}; };
}, },
watch: { watch: {
@ -331,6 +340,7 @@ export default {
// }) // })
} }
}); });
this.getOffices();
}, },
methods: { methods: {
/** 查询用户列表 */ /** 查询用户列表 */
@ -407,7 +417,8 @@ export default {
checkin: true, checkin: true,
areaList: [], areaList: [],
weight: undefined, weight: undefined,
count: true count: true,
officeId: undefined
}; };
this.resetForm('form'); this.resetForm('form');
}, },
@ -468,7 +479,15 @@ export default {
} }
} }
}); });
},
//
getOffices() {
listOffice().then(resp => {
if (resp.code == 200) {
this.officeOptions = resp.rows
} }
})
},
} }
}; };
</script> </script>

@ -1,11 +1,13 @@
<template> <template>
<el-dialog title="报名点信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog" style> <el-dialog title="报名点信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog" style>
<div> <div>
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dialogFormSubmit()" :disabled="type == 2 || dialogForm.checkState==1 || dialogForm.checkState==2"> <el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dialogFormSubmit()" :disabled="type == 2 || dialogForm.checkState==1 || dialogForm.checkState==2">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名点" prop="officeId"> <el-form-item label="报名点" prop="officeId">
<el-input v-model="dialogForm.officeId" placeholder="请输入报名点ID" /> <el-select v-model="dialogForm.officeId" filterable placeholder="请选择" value-key="schoolId" clearable size="mini" @change="officeChange">
<el-option v-for="(dict, index) in officeOptions" :key="index" :label="dict.officeName" :value="dict.officeId" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -29,7 +31,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="线索来源" prop="source"> <el-form-item label="线索来源" prop="source">
<el-select v-model="dialogForm.source" placeholder="请选择" clearable size="small" :disabled="modalForm.clueId != undefined"> <el-select v-model="dialogForm.source" placeholder="请选择" clearable size="small">
<el-option v-for="(dict, index) in sourceOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" /> <el-option v-for="(dict, index) in sourceOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -60,14 +62,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名班型" prop="signClass"> <el-form-item label="报名班型" prop="signClass">
<el-select v-model="dialogForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange"> <el-select v-model="dialogForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small">
<el-option v-for="(dict, index) in classTypeOptions" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" /> <el-option v-for="(dict, index) in classTypeOptions" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名价格" prop="signPrice"> <el-form-item label="报名价格" prop="signPrice">
<el-input v-model="dialogForm.signPrice" placeholder="请输入报名价格" /> <el-input v-model="dialogForm.signPrice" placeholder="请输入报名价格" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -75,30 +77,30 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="培训费" prop="trainFee"> <el-form-item label="培训费" prop="trainFee">
<el-input v-model="dialogForm.trainFee" placeholder="请输入培训费" /> <el-input v-model="dialogForm.trainFee" placeholder="请输入培训费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="考试费" prop="examFee"> <el-form-item label="考试费" prop="examFee">
<el-input v-model="dialogForm.examFee" placeholder="请输入考试费" /> <el-input v-model="dialogForm.examFee" placeholder="请输入考试费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学杂费" prop="learningFee"> <el-form-item label="学杂费" prop="learningFee">
<el-input v-model="dialogForm.learningFee" placeholder="请输入学杂费" /> <el-input v-model="dialogForm.learningFee" placeholder="请输入学杂费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="体检费" prop="physicalExamFee"> <el-form-item label="体检费" prop="physicalExamFee">
<el-input v-model="dialogForm.physicalExamFee" placeholder="请输入体检费" /> <el-input v-model="dialogForm.physicalExamFee" placeholder="请输入体检费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="额外支出项目" prop="extraPayType"> <el-form-item label="额外支出项目" prop="extraPayTypes">
<el-select v-model="dialogForm.extraPayTypes" filterable multiple placeholder="请选择" clearable size="small"> <el-select v-model="dialogForm.extraPayTypes" filterable multiple placeholder="请选择" clearable size="small">
<el-option v-for="(dict, index) in extraPayTypeOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" /> <el-option v-for="(dict, index) in extraPayTypeOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
@ -106,7 +108,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="额外支出金额" prop="extraPay"> <el-form-item label="额外支出金额" prop="extraPay">
<el-input v-model="dialogForm.extraPay" placeholder="请输入额外支出金额" /> <el-input v-model="dialogForm.extraPay" placeholder="请输入额外支出金额" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -118,10 +120,11 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="利润" prop="profit"> <el-form-item label="利润" prop="profit">
<el-input v-model="dialogForm.profit" placeholder="请输入利润" /> <el-input v-model="dialogForm.profit" placeholder="请输入利润" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="收款账户" prop="collectionAccount1"> <el-form-item label="收款账户" prop="collectionAccount1">
@ -138,12 +141,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入账金额" prop="entryMoney1"> <el-form-item label="入账金额" prop="entryMoney1">
<el-input v-model="dialogForm.entryMoney1" placeholder="请输入入账金额" /> <el-input v-model="dialogForm.entryMoney1" placeholder="请输入入账金额" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="手续费" prop="commission1"> <el-form-item label="手续费" prop="commission1">
<el-input v-model="dialogForm.commission1" placeholder="请输入手续费" /> <el-input v-model="dialogForm.commission1" placeholder="请输入手续费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -163,15 +166,16 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入账金额2" prop="entryMoney2"> <el-form-item label="入账金额2" prop="entryMoney2">
<el-input v-model="dialogForm.entryMoney2" placeholder="请输入入账金额" /> <el-input v-model="dialogForm.entryMoney2" placeholder="请输入入账金额" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="手续费2" prop="commission2"> <el-form-item label="手续费2" prop="commission2">
<el-input v-model="dialogForm.commission2" placeholder="请输入手续费" /> <el-input v-model="dialogForm.commission2" placeholder="请输入手续费" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="送审日期" prop="submissionTime"> <el-form-item label="送审日期" prop="submissionTime">
@ -180,15 +184,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学员状态" prop="commission2"> <el-form-item label="学员状态" prop="stuStatus">
<el-input v-model="dialogForm.commission2" placeholder="请输入手续费" /> <el-input v-model="dialogForm.stuStatus" placeholder="请输入手续费" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="归属人员" prop="followUserList"> <el-form-item label="归属人员" prop="followUserList">
<el-select v-model="modalForm.followUserList" multiple placeholder="请选择" clearable size="small" :disabled="modalForm.clueId != undefined"> <el-select v-model="dialogForm.followUserList" multiple placeholder="请选择" clearable size="small">
<el-option v-for="(dict, index) in userOptions" :key="index" :label="dict.name" :value="dict.id" /> <el-option v-for="(dict, index) in userOptions" :key="index" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -215,6 +219,7 @@
</template> </template>
<script> <script>
import { listOffice } from "@/api/zs/office";
import { addSign, updateSign, checkSign } from "@/api/zs/officeSign"; import { addSign, updateSign, checkSign } from "@/api/zs/officeSign";
import schoolAPi from '@/api/sch/school' import schoolAPi from '@/api/sch/school'
import empApi from '@/api/system/employee' import empApi from '@/api/system/employee'
@ -230,8 +235,32 @@ export default {
canSubmit: true, canSubmit: true,
dialogForm: {}, dialogForm: {},
dataRule: { dataRule: {
officeName: [{ required: true, message: '报名点名称不能为空', trigger: 'blur' }], officeId: [{ required: true, message: '报名点不能为空', trigger: 'blur,change' }],
schoolList: [{ required: true, message: '推送驾校不能为空', trigger: 'blur' }] name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
idcard: [{ required: true, message: '身份证号不能为空', trigger: 'blur' }],
phone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }],
source: [{ required: true, message: '线索来源不能为空', trigger: 'blur, change' }],
signType: [{ required: true, message: '报名类别不能为空', trigger: 'blur,change' }],
dealDate: [{ required: true, message: '报名日期不能为空', trigger: 'blur,change' }],
signSchool: [{ required: true, message: '报名驾校不能为空', trigger: 'blur,change' }],
signPlace: [{ required: true, message: '报名场地不能为空', trigger: 'blur,change' }],
signClass: [{ required: true, message: '报名班型不能为空', trigger: 'blur,change' }],
signPrice: [{ required: true, message: '报名价格不能为空', trigger: 'blur' }],
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }],
trainFee: [{ required: true, message: '培训费不能为空', trigger: 'blur' }],
examFee: [{ required: true, message: '考试费不能为空', trigger: 'blur' }],
learningFee: [{ required: true, message: '学杂费不能为空', trigger: 'blur' }],
physicalExamFee: [{ required: true, message: '体检费不能为空', trigger: 'blur' }],
extraPayTypes: [{ required: true, message: '额外支付项目不能为空', trigger: 'blur' }],
extraPay: [{ required: true, message: '额外支付金额不能为空', trigger: 'blur' }],
extraPayWay: [{ required: true, message: '支付方式不能为空', trigger: 'blur' }],
collectionAccount1: [{ required: true, message: '收款账号不能为空', trigger: 'blur' }],
entryTime1: [{ required: true, message: '入账时间不能为空', trigger: 'blur' }],
entryMoney1: [{ required: true, message: '入账金额不能为空', trigger: 'blur' }],
commission1: [{ required: true, message: '手续费不能为空', trigger: 'blur' }],
submissionTime: [{ required: true, message: '送审时间不能为空', trigger: 'blur, change' }],
stuStatus: [{ required: true, message: '学员状态不能为空', trigger: 'blur,change' }],
followUserList: [{ required: true, message: '归属人员不能为空', trigger: 'blur,change' }],
}, },
officeOptions: [], officeOptions: [],
schoolOptions: [], schoolOptions: [],
@ -240,7 +269,9 @@ export default {
userOptions: [], userOptions: [],
sourceOptions: [], sourceOptions: [],
extraPayTypeOptions: [], extraPayTypeOptions: [],
type: 1 officeOptions: [],
type: 1,
schoolIdList: []
}; };
}, },
methods: { methods: {
@ -267,6 +298,7 @@ export default {
initData() { initData() {
this.getSchools(); this.getSchools();
this.getEmployee(); this.getEmployee();
this.getOffices();
//线 //线
this.getDicts('dm_source').then((response) => { this.getDicts('dm_source').then((response) => {
this.sourceOptions = response.data this.sourceOptions = response.data
@ -280,7 +312,6 @@ export default {
this.dialogForm = { this.dialogForm = {
officeSignId: null, officeSignId: null,
officeId: null, officeId: null,
clueId: null,
name: null, name: null,
idcard: null, idcard: null,
phone: null, phone: null,
@ -312,9 +343,13 @@ export default {
submissionTime: null, submissionTime: null,
stuStatus: "0", stuStatus: "0",
collectionAccount1: null, collectionAccount1: null,
entryTime: null, entryTime1: null,
entryMoney: null, entryMoney1: null,
commission: null, commission1: null,
collectionAccount2: null,
entryTime2: null,
entryMoney2: null,
commission2: null,
extraPayType: null, extraPayType: null,
extraPay: null, extraPay: null,
extraPayWay: null extraPayWay: null
@ -393,6 +428,7 @@ export default {
} }
) )
}, },
//
getEmployee() { getEmployee() {
empApi.getEmployee().then((resp) => { empApi.getEmployee().then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
@ -400,6 +436,44 @@ export default {
} }
}) })
}, },
//
getOffices() {
listOffice().then(resp => {
if (resp.code == 200) {
this.officeOptions = resp.rows
}
})
},
//
getUserOfficeInfo() {
let userId = localStorage.getItem('userId');
empApi.getOffice().then((resp) => {
if (resp.code == 200) {
this.userOptions = resp.data
}
})
},
officeChange() {
},
//change
schoolChange(e) {
this.$set(this.dialogForm, 'signPlace', undefined)
this.$set(this.dialogForm, 'signClass', undefined)
this.classTypeOptions = []
this.getPlaces(e)
},
//change
placeChange() {
this.$set(this.dialogForm, 'signClass', undefined)
this.classTypeOptions = []
if (this.dialogForm.signPlace) {
const place = this.placeOptions.find(
(item) => item.placeId === this.dialogForm.signPlace
)
this.getClassTypes(this.dialogForm.signSchool, this.dialogForm.signPlace)
}
},
} }
}; };
</script> </script>

@ -50,14 +50,14 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名驾校" prop="signSchool"> <el-form-item label="报名驾校" prop="signSchool">
<el-select v-model="modalForm.signSchool" filterable placeholder="请选择" value-key="schoolId" clearable size="small" @change="schoolChange"> <el-select v-model="modalForm.signSchool" filterable placeholder="请选择" value-key="schoolId" clearable size="small" @change="schoolChange">
<el-option v-for="(dict, index) in schoolOptions" :key="index" :label="dict.schoolName" :value="dict.schoolId" /> <el-option v-for="(dict, index) in schoolOptions.filter(item =>item.schoolId === form.signSchool)" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名场地" prop="signPlace"> <el-form-item label="报名场地" prop="signPlace">
<el-select v-model="modalForm.signPlace" filterable placeholder="请选择" clearable value-key="placeId" size="small" @change="placeChange"> <el-select v-model="modalForm.signPlace" filterable placeholder="请选择" clearable value-key="placeId" size="small" @change="placeChange">
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" /> <el-option v-for="(dict, index) in placeOptions.filter(item =>item.schoolId === form.signSchool)" :key="index" :label="dict.name" :value="dict.placeId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -67,7 +67,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名班型" prop="signClass"> <el-form-item label="报名班型" prop="signClass">
<el-select v-model="modalForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange"> <el-select v-model="modalForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange">
<el-option v-for="(dict, index) in classTypeOptions" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" /> <el-option v-for="(dict, index) in classTypeOptions.filter(item =>((!item.placeId && item.schoolId === form.signSchool) || item.placeId === form.signPlace))" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>

Loading…
Cancel
Save