diff --git a/api/api.js b/api/api.js
index 93e85b0..cca3f7d 100644
--- a/api/api.js
+++ b/api/api.js
@@ -156,16 +156,10 @@ export function userEditApi(config) { // 用户编辑
data: config
})
}
-export function qjAddApi(config) { // 请假
- return https({
- url: '/cxcqxjzg/cxcQxjZg/add',
- method: 'post',
- data: config
- })
-}
+
export function qjQueryByIdApi(config) { // 请假流程
return https({
- url: '/cxcqxjzg/cxcQxjZg/queryById',
+ url: '/CxcQxj/cxcQxj/queryById',
method: 'get',
data: config
})
diff --git a/api/pages.js b/api/pages.js
new file mode 100644
index 0000000..3b0353c
--- /dev/null
+++ b/api/pages.js
@@ -0,0 +1,21 @@
+import {
+ https
+} from '@/utils/http.js';
+
+export function qjAddApi(config) { // 发起请假流程申请
+ return https({
+ url: '/CxcQxj/cxcQxj/add',
+ method: 'post',
+ data: config
+ })
+}
+
+export function queryZwmcAndExaApi(username) { // 根据username获取职位名称和审批领导列表
+ return https({
+ url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
+ method: 'get',
+ data: {
+ username
+ }
+ })
+}
\ No newline at end of file
diff --git a/bpm/leaveApplication/index.vue b/bpm/leaveApplication/index.vue
index 7c8f883..8b29ee9 100644
--- a/bpm/leaveApplication/index.vue
+++ b/bpm/leaveApplication/index.vue
@@ -127,7 +127,7 @@
}
const extActFlowData = (dataId) => {
extActFlowDataApi({
- flowCode: "dev_cxc_qxj_zg_001",
+ flowCode: "dev_cxc_qxj",
dataId: props.dataId
}).then((res) => {
if (res.success) {
diff --git a/pages/leave/application.vue b/pages/leave/application.vue
index 4e74082..92602de 100644
--- a/pages/leave/application.vue
+++ b/pages/leave/application.vue
@@ -25,7 +25,6 @@
-
@@ -42,7 +41,7 @@
- 结束时间:
+ 截止时间:
@@ -52,6 +51,19 @@
+
+
+
+ 审批领导:
+
+
+
+ {{typeIndex!=null?typeArr[typeIndex].realname:'请选择'}}
+
+
+
+
+
请假地点:
@@ -67,27 +79,6 @@
-
提交
@@ -102,10 +93,13 @@
getCurrentInstance
} from 'vue';
import {
- qjAddApi,
startMutilProcessApi,
- getCategoryItemsApi
+ getCategoryItemsApi,
} from '@/api/api.js';
+ import {
+ qjAddApi,
+ queryZwmcAndExaApi
+ } from '@/api/pages.js';
import {
queryDepByCode
} from '@/api/depart.js'
@@ -141,6 +135,13 @@
const chooseEnd = (e) => {
endTime.value = e.detail.value
}
+ /**审批领导*/
+ const typeArr = ref([])
+ const typeIndex = ref(null)
+ /**判断是否显示审批领导字段*/
+ const ifShow = ref(true)
+ /**职位层级*/
+ const zwcj = ref('')
/**请假地点*/
const address = ref('')
/**请假事由*/
@@ -155,17 +156,23 @@
if (!type.value) return proxy.$toast('请选择请假类型')
if (!beginTime.value) return proxy.$toast('请选择开始时间')
if (!endTime.value) return proxy.$toast('请选择结束时间')
+ if (zwcj.value != '单位专家' && zwcj.value != '正职' && zwcj.value != '高级主管') {
+ if (typeIndex.value == null) { //副职、员工需要选择审批领导
+ return proxy.$toast('请选择审批领导')
+ }
+ }
if (!address.value.trim()) return proxy.$toast('请输入请假地点')
if (!reason.value.trim()) return proxy.$toast('请输入请假事由')
qjAddApi({
username: store.userinfo.username,
- realname: store.userinfo.realname,
phone: phone.value,
type: type.value,
begintime: beginTime.value,
endtime: endTime.value,
+ examineleader: typeArr.value[typeIndex.value].username,
address: address.value,
- reason: reason.value
+ reason: reason.value,
+ zwcj: zwcj.value,
}).then((res) => {
if (res.success) {
startMutilProcess(res.message)
@@ -176,9 +183,9 @@
}
const startMutilProcess = (id) => {
startMutilProcessApi({
- flowCode: "dev_cxc_qxj_zg_001",
+ flowCode: "dev_cxc_qxj",
id,
- formUrl: "modules/zgqxj/modules/CxcZgqxjBpmModel",
+ formUrl: "modules/qxj/modules/CxcQxjBpmModel",
formUrlMobile: "leaveApplication" //对应main.js里全局注册createApp()里的 app.component('leaveApplication',index)
}).then((res) => {
if (res.success) {
@@ -195,7 +202,6 @@
getCategoryItemsApi('1838487445813645313').then((res) => { //请假类型
if (res.success) {
dataSource.value = res.result
- console.log('--', res.result)
}
})
@@ -205,6 +211,21 @@
}
})
+ queryZwmcAndExaApi(store.userinfo.username).then((res) => { //本人职位及审批领导列表
+ if (res.success) {
+ typeArr.value = res.result.list
+ zwcj.value = res.result.zwmc
+ if (zwcj.value == '单位专家' || zwcj.value == '正职' || zwcj.value == '高级主管') {
+ ifShow.value = false;
+ }
+ } else {
+ proxy.$toast(res.message);
+ }
+ })
+ }
+
+ const bindType = (e) => {
+ typeIndex.value = e.detail.value
}
diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js
index 9ae1f66..48af8cd 100644
--- a/unpackage/dist/dev/app-plus/app-service.js
+++ b/unpackage/dist/dev/app-plus/app-service.js
@@ -6314,16 +6314,9 @@ This will fail in production.`);
data: config
});
}
- function qjAddApi(config) {
- return https({
- url: "/cxcqxjzg/cxcQxjZg/add",
- method: "post",
- data: config
- });
- }
function qjQueryByIdApi(config) {
return https({
- url: "/cxcqxjzg/cxcQxjZg/queryById",
+ url: "/CxcQxj/cxcQxj/queryById",
method: "get",
data: config
});
@@ -9889,6 +9882,22 @@ This will fail in production.`);
}
};
const PagesMeetingDetail = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-ee2c785f"], ["__file", "D:/projects/cxc-szcx-uniapp/pages/meeting/detail.vue"]]);
+ function qjAddApi(config) {
+ return https({
+ url: "/CxcQxj/cxcQxj/add",
+ method: "post",
+ data: config
+ });
+ }
+ function queryZwmcAndExaApi(username) {
+ return https({
+ url: "/CxcQxj/cxcQxj/queryZwmcByUsername",
+ method: "get",
+ data: {
+ username
+ }
+ });
+ }
function queryDepByCode(code) {
return https({
url: "/sys/sysDepart/queryDepNameByDepCode",
@@ -11401,6 +11410,10 @@ This will fail in production.`);
const chooseEnd = (e2) => {
endTime.value = e2.detail.value;
};
+ const typeArr = vue.ref([]);
+ const typeIndex = vue.ref(null);
+ const ifShow = vue.ref(true);
+ const zwcj = vue.ref("");
const address = vue.ref("");
const reason = vue.ref("");
onLoad(() => {
@@ -11415,19 +11428,25 @@ This will fail in production.`);
return proxy.$toast("请选择开始时间");
if (!endTime.value)
return proxy.$toast("请选择结束时间");
+ if (zwcj.value != "单位专家" && zwcj.value != "正职" && zwcj.value != "高级主管") {
+ if (typeIndex.value == null) {
+ return proxy.$toast("请选择审批领导");
+ }
+ }
if (!address.value.trim())
return proxy.$toast("请输入请假地点");
if (!reason.value.trim())
return proxy.$toast("请输入请假事由");
qjAddApi({
username: store.userinfo.username,
- realname: store.userinfo.realname,
phone: phone.value,
type: type.value,
begintime: beginTime.value,
endtime: endTime.value,
+ examineleader: typeArr.value[typeIndex.value].username,
address: address.value,
- reason: reason.value
+ reason: reason.value,
+ zwcj: zwcj.value
}).then((res) => {
if (res.success) {
startMutilProcess(res.message);
@@ -11438,9 +11457,9 @@ This will fail in production.`);
};
const startMutilProcess = (id) => {
startMutilProcessApi({
- flowCode: "dev_cxc_qxj_zg_001",
+ flowCode: "dev_cxc_qxj",
id,
- formUrl: "modules/zgqxj/modules/CxcZgqxjBpmModel",
+ formUrl: "modules/qxj/modules/CxcQxjBpmModel",
formUrlMobile: "leaveApplication"
//对应main.js里全局注册createApp()里的 app.component('leaveApplication',index)
}).then((res) => {
@@ -11451,14 +11470,13 @@ This will fail in production.`);
}, 2e3);
}
}).catch((err) => {
- formatAppLog("log", "at pages/leave/application.vue:191", err);
+ formatAppLog("log", "at pages/leave/application.vue:198", err);
});
};
const loadData = () => {
getCategoryItemsApi("1838487445813645313").then((res) => {
if (res.success) {
dataSource.value = res.result;
- formatAppLog("log", "at pages/leave/application.vue:198", "--", res.result);
}
});
queryDepByCode(store.userinfo.orgCode).then((res) => {
@@ -11466,6 +11484,20 @@ This will fail in production.`);
depart.value = res.result;
}
});
+ queryZwmcAndExaApi(store.userinfo.username).then((res) => {
+ if (res.success) {
+ typeArr.value = res.result.list;
+ zwcj.value = res.result.zwmc;
+ if (zwcj.value == "单位专家" || zwcj.value == "正职" || zwcj.value == "高级主管") {
+ ifShow.value = false;
+ }
+ } else {
+ proxy.$toast(res.message);
+ }
+ });
+ };
+ const bindType = (e2) => {
+ typeIndex.value = e2.detail.value;
};
return (_ctx, _cache) => {
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
@@ -11561,7 +11593,7 @@ This will fail in production.`);
value: endTime.value
}, [
vue.createElementVNode("view", { class: "f-row aic jcb box" }, [
- vue.createElementVNode("view", { class: "title" }, " 结束时间: "),
+ vue.createElementVNode("view", { class: "title" }, " 截止时间: "),
vue.createElementVNode("view", { class: "f-row aic" }, [
vue.createElementVNode(
"view",
@@ -11579,6 +11611,32 @@ This will fail in production.`);
])
])
], 40, ["value"]),
+ ifShow.value ? (vue.openBlock(), vue.createElementBlock("picker", {
+ key: 0,
+ onChange: bindType,
+ value: typeIndex.value,
+ range: typeArr.value,
+ "range-key": "realname"
+ }, [
+ vue.createElementVNode("view", { class: "f-row aic jcb box" }, [
+ vue.createElementVNode("view", { class: "title" }, " 审批领导: "),
+ vue.createElementVNode("view", { class: "f-row aic" }, [
+ vue.createElementVNode(
+ "view",
+ {
+ class: vue.normalizeClass([{ "choose": typeIndex.value == null }, { "choosed": typeIndex.value != null }])
+ },
+ vue.toDisplayString(typeIndex.value != null ? typeArr.value[typeIndex.value].realname : "请选择"),
+ 3
+ /* TEXT, CLASS */
+ ),
+ vue.createVNode(_component_uni_icons, {
+ type: "bottom",
+ color: "#333333"
+ })
+ ])
+ ])
+ ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [
vue.createElementVNode("view", { class: "title" }, " 请假地点: "),
vue.withDirectives(vue.createElementVNode(
@@ -11615,7 +11673,6 @@ This will fail in production.`);
[vue.vModelText, reason.value]
])
]),
- vue.createCommentVNode(' \r\n \r\n 审批流程:\r\n \r\n \r\n \r\n \r\n 发起人\r\n \r\n \r\n \r\n \r\n 部门领导\r\n \r\n \r\n \r\n \r\n 人事部门\r\n \r\n \r\n '),
vue.createElementVNode("view", { class: "btn f-col aic" }, [
vue.createElementVNode("view", { onClick: qjAdd }, " 提交 ")
])
@@ -17664,7 +17721,7 @@ ${i3}
};
const extActFlowData = (dataId) => {
extActFlowDataApi({
- flowCode: "dev_cxc_qxj_zg_001",
+ flowCode: "dev_cxc_qxj",
dataId: props.dataId
}).then((res) => {
if (res.success) {