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