1
This commit is contained in:
parent
767c647d4a
commit
646c801665
10
api/api.js
10
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
|
||||
})
|
||||
|
21
api/pages.js
Normal file
21
api/pages.js
Normal file
@ -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
|
||||
}
|
||||
})
|
||||
}
|
@ -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) {
|
||||
|
@ -25,7 +25,6 @@
|
||||
</view>
|
||||
<tree-select :dataSource="dataSource" v-model="type" dataValue="name" />
|
||||
</view>
|
||||
|
||||
<picker mode="date" fields="day" @change="chooseStart" :value="beginTime">
|
||||
<view class="f-row aic jcb box">
|
||||
<view class="title">
|
||||
@ -42,7 +41,7 @@
|
||||
<picker mode="date" fields="day" @change="chooseEnd" :value="endTime">
|
||||
<view class="f-row aic jcb box">
|
||||
<view class="title">
|
||||
结束时间:
|
||||
截止时间:
|
||||
</view>
|
||||
<view class="f-row aic">
|
||||
<view :class="[{'choose':!endTime},{'choosed':endTime}]">
|
||||
@ -52,6 +51,19 @@
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<picker @change="bindType" :value="typeIndex" :range="typeArr" range-key="realname" v-if="ifShow">
|
||||
<view class="f-row aic jcb box">
|
||||
<view class="title">
|
||||
审批领导:
|
||||
</view>
|
||||
<view class="f-row aic">
|
||||
<view :class="[{'choose':typeIndex==null},{'choosed':typeIndex!=null}]">
|
||||
{{typeIndex!=null?typeArr[typeIndex].realname:'请选择'}}
|
||||
</view>
|
||||
<uni-icons type="bottom" color="#333333"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="f-row aic jcb input_box">
|
||||
<view class="title">
|
||||
请假地点:
|
||||
@ -67,27 +79,6 @@
|
||||
<textarea v-model="reason" placeholder="请输入请假事由" placeholder-style="font-size: 28rpx;color: #999999;"
|
||||
cols="30" rows="10"></textarea>
|
||||
</view>
|
||||
<!-- <view class="progress_box">
|
||||
<view class="title">
|
||||
审批流程:
|
||||
</view>
|
||||
<view class="progress f-row aic">
|
||||
<view class="f-col aic ">
|
||||
<image class="avatar" src="" mode=""></image>
|
||||
<text>发起人</text>
|
||||
</view>
|
||||
<image class="line" src="../../static/line.png" mode=""></image>
|
||||
<view class="f-col aic">
|
||||
<image class="avatar" src="" mode=""></image>
|
||||
<text>部门领导</text>
|
||||
</view>
|
||||
<image class="line" src="../../static/line.png" mode=""></image>
|
||||
<view class="f-col aic">
|
||||
<image class="avatar" src="" mode=""></image>
|
||||
<text>人事部门</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btn f-col aic">
|
||||
<view @click="qjAdd">
|
||||
提交
|
||||
@ -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
|
||||
}
|
||||
</script>
|
||||
|
||||
|
91
unpackage/dist/dev/app-plus/app-service.js
vendored
91
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -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(' <view class="progress_box">\r\n <view class="title">\r\n 审批流程:\r\n </view>\r\n <view class="progress f-row aic">\r\n <view class="f-col aic ">\r\n <image class="avatar" src="" mode=""></image>\r\n <text>发起人</text>\r\n </view>\r\n <image class="line" src="../../static/line.png" mode=""></image>\r\n <view class="f-col aic">\r\n <image class="avatar" src="" mode=""></image>\r\n <text>部门领导</text>\r\n </view>\r\n <image class="line" src="../../static/line.png" mode=""></image>\r\n <view class="f-col aic">\r\n <image class="avatar" src="" mode=""></image>\r\n <text>人事部门</text>\r\n </view>\r\n </view>\r\n </view> '),
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user