请假单位判断修改
This commit is contained in:
parent
8dd460b322
commit
512a83984b
2
env/.env
vendored
2
env/.env
vendored
@ -1,4 +1,4 @@
|
|||||||
VITE_APP_TITLE = '数智产销测试'
|
VITE_APP_TITLE = '数智产销'
|
||||||
VITE_APP_PORT = 9000
|
VITE_APP_PORT = 9000
|
||||||
|
|
||||||
VITE_UNI_APPID = '__UNI__9F097F0'
|
VITE_UNI_APPID = '__UNI__9F097F0'
|
||||||
|
@ -32,4 +32,11 @@ export function queryMyDeptTreeListApi(config : object) { // 部门
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function queryDepNameRealApi() { // 获取单位 优先借用单位、储备单位
|
||||||
|
return http({
|
||||||
|
url: '/sys/sysDepart/queryDepNameReal',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "数智产销测试",
|
"name": "数智产销",
|
||||||
"appid": "__UNI__9F097F0",
|
"appid": "__UNI__9F097F0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "2.1.0",
|
"versionName": "2.1.0",
|
||||||
|
@ -11,12 +11,9 @@
|
|||||||
<PageLayout navTitle="请假申请">
|
<PageLayout navTitle="请假申请">
|
||||||
<wd-form ref="form" :model="model">
|
<wd-form ref="form" :model="model">
|
||||||
<wd-cell-group border>
|
<wd-cell-group border>
|
||||||
<wd-input label="职工姓名" prop="username" v-model="userStore.userInfo.realname" readonly
|
<wd-input label="职工姓名" prop="username" v-model="userStore.userInfo.realname" readonly/>
|
||||||
:rules="[{ required: true, message: '请输入职工姓名' }]" />
|
<wd-input label="工作单位" prop="sysOrgCode" v-model="depart.name" readonly/>
|
||||||
<wd-input label="工作单位" prop="sysOrgCode" v-model="userStore.userInfo.department" readonly
|
<wd-input label="联系方式" prop="phone" v-model="model.phone" readonly/>
|
||||||
:rules="[{ required: true, message: '请输入工作单位' }]" />
|
|
||||||
<wd-input label="联系方式" prop="phone" v-model="model.phone" readonly
|
|
||||||
:rules="[{ required: true, message: '请输入联系方式' }]" />
|
|
||||||
<wd-col-picker label="请假类型" prop="type" v-model="model.type" :columns="typeData" @confirm="queryMinDate"
|
<wd-col-picker label="请假类型" prop="type" v-model="model.type" :columns="typeData" @confirm="queryMinDate"
|
||||||
:column-change="columnChange" :display-format="displayFormat" :rules="[{
|
:column-change="columnChange" :display-format="displayFormat" :rules="[{
|
||||||
validator: (val) => validateType(val),
|
validator: (val) => validateType(val),
|
||||||
@ -60,6 +57,9 @@
|
|||||||
import {
|
import {
|
||||||
getCategoryItemsApi
|
getCategoryItemsApi
|
||||||
} from '@/api/system'
|
} from '@/api/system'
|
||||||
|
import {
|
||||||
|
queryDepNameRealApi
|
||||||
|
} from '@/api/system/department'
|
||||||
import {
|
import {
|
||||||
queryZwmcAndExaApi,
|
queryZwmcAndExaApi,
|
||||||
addApi,
|
addApi,
|
||||||
@ -80,6 +80,7 @@
|
|||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
const depart = ref({})
|
||||||
const model = reactive({
|
const model = reactive({
|
||||||
contractNumber: userStore.userInfo.workNo,
|
contractNumber: userStore.userInfo.workNo,
|
||||||
sysOrgCode: userStore.userInfo.orgCode,
|
sysOrgCode: userStore.userInfo.orgCode,
|
||||||
@ -166,6 +167,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const submitData = {
|
const submitData = {
|
||||||
...model,
|
...model,
|
||||||
|
sysOrgCode: depart.value.code,
|
||||||
type: model.type[model.type.length - 1], // 取最后一级
|
type: model.type[model.type.length - 1], // 取最后一级
|
||||||
begintime: formatDate(model.begintime),
|
begintime: formatDate(model.begintime),
|
||||||
endtime: formatDate(model.endtime),
|
endtime: formatDate(model.endtime),
|
||||||
@ -182,6 +184,7 @@
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
console.log('*---',submitData)
|
||||||
addApi(submitData).then(res => {
|
addApi(submitData).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
startMutilProcess(res.message)
|
startMutilProcess(res.message)
|
||||||
@ -328,10 +331,10 @@
|
|||||||
minEndtime.value = model.begintime
|
minEndtime.value = model.begintime
|
||||||
}
|
}
|
||||||
|
|
||||||
const getHrList = () => {
|
const getHrList = (code) => {
|
||||||
queryUserByOrgRoleApi({
|
queryUserByOrgRoleApi({
|
||||||
roleId: '1554379432313397250',
|
roleId: '1554379432313397250',
|
||||||
orgCode: userStore.userInfo.orgCode
|
orgCode: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.result.length == 0) {
|
if (res.result.length == 0) {
|
||||||
toast.warning('请切换工作单位!')
|
toast.warning('请切换工作单位!')
|
||||||
@ -350,11 +353,21 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const queryDepName = () => {
|
||||||
|
queryDepNameRealApi().then(res => {
|
||||||
|
depart.value = res
|
||||||
|
/*获取劳资员*/
|
||||||
|
getHrList(depart.value.code)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
/*获取请假类别*/
|
/*获取请假类别*/
|
||||||
getTypeList()
|
getTypeList()
|
||||||
/*获取审批领导*/
|
/*获取审批领导*/
|
||||||
getZwmcAndExa()
|
getZwmcAndExa()
|
||||||
|
/*获取工作单位*/
|
||||||
|
queryDepName()
|
||||||
/*获取劳资员*/
|
/*获取劳资员*/
|
||||||
getHrList()
|
getHrList()
|
||||||
/*获取*/
|
/*获取*/
|
||||||
|
@ -105,9 +105,9 @@
|
|||||||
let pw = Base64.encode(encodeURIComponent(password.value))
|
let pw = Base64.encode(encodeURIComponent(password.value))
|
||||||
loading.value = true
|
loading.value = true
|
||||||
/*生产环境 begin */
|
/*生产环境 begin */
|
||||||
loginApi({ username: un, password: pw })
|
// loginApi({ username: un, password: pw })
|
||||||
/*开发环境 begin */
|
/*开发环境 begin */
|
||||||
// loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
||||||
.then((res : any) => {
|
.then((res : any) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const { result } = res
|
const { result } = res
|
||||||
|
Loading…
Reference in New Issue
Block a user