diff --git a/bpm/leaveApplication/index.vue b/bpm/leaveApplication/index.vue
index 13171c6..a9c86a6 100644
--- a/bpm/leaveApplication/index.vue
+++ b/bpm/leaveApplication/index.vue
@@ -54,9 +54,15 @@
- 请假地点:
+ 出发地:
- {{info.address}}
+ {{info.departure}}
+
+
+
+ 目的地:
+
+ {{info.destination}}
@@ -64,7 +70,7 @@
{{info.reason}}
-
+
附件:
@@ -121,6 +127,7 @@
},
})
const imageValue = ref([])
+ const ifShowFj = ref(false)
const imageStyles = {
width: 64,
height: 64,
@@ -139,22 +146,24 @@
}).then((res) => {
if (res.success) {
info.value = res.result.records[0]
-
// 构造 imageValue 数组
- imageValue.value = info.value.path.split(',').map(path => {
- const name = path.split('/').pop(); // 获取文件名
- const extname = name.split('.').pop(); // 获取文件扩展名并转换为大写
- return {
- name,
- extname,
- url: imgUrl(path)
- };
- });
+ if (info.value.path) {
+ ifShowFj.value = true;
+ imageValue.value = info.value.path.split(',').map(path => {
+ const name = path.split('/').pop(); // 获取文件名
+ const extname = name.split('.').pop(); // 获取文件扩展名并转换为大写
+ return {
+ name,
+ extname,
+ url: imgUrl(path)
+ };
+ });
+ }
}
})
}
-
+
/**审批步骤*/
const extActFlowData = () => {
extActFlowDataApi({
diff --git a/pages/leave/application.vue b/pages/leave/application.vue
index 0f6e77b..feae25b 100644
--- a/pages/leave/application.vue
+++ b/pages/leave/application.vue
@@ -66,9 +66,15 @@
- 请假地点:
+ 出发地:
-
+
+
+
+
+ 目的地:
+
+
@@ -80,7 +86,7 @@
上传附件:
-
+
@@ -147,8 +153,10 @@
const ifShow = ref(true)
/**职位层级*/
const zwcj = ref('')
- /**请假地点*/
- const address = ref('')
+ /**出发地*/
+ const departure = ref('')
+ /**目的地*/
+ const destination = ref('')
/**请假事由*/
const reason = ref('')
/**附件路径*/
@@ -166,6 +174,7 @@
}
onLoad(() => {
loadData()
+ getTomorrowDate()
})
const select = (e) => {
@@ -196,7 +205,8 @@
return proxy.$toast('请选择审批领导')
}
}
- if (!address.value.trim()) return proxy.$toast('请输入请假地点')
+ if (!departure.value.trim()) return proxy.$toast('请输入出发地')
+ if (!destination.value.trim()) return proxy.$toast('请输入目的地')
if (!reason.value.trim()) return proxy.$toast('请输入请假事由')
qjAddApi({
username: store.userinfo.username,
@@ -205,7 +215,8 @@
begintime: beginTime.value,
endtime: endTime.value,
examineleader: typeArr.value[typeIndex.value].username,
- address: address.value,
+ departure: departure.value,
+ destination: destination.value,
reason: reason.value,
zwmc: zwcj.value,
path: path.value.toString()
@@ -264,6 +275,17 @@
const bindType = (e) => {
typeIndex.value = e.detail.value
}
+
+ const getTomorrowDate = () => {
+ let today = new Date();
+ let tomorrow = new Date(today);
+ tomorrow.setDate(today.getDate() + 1);
+ // 格式化日期为 yyyy-mm-dd
+ let year = tomorrow.getFullYear();
+ let month = String(tomorrow.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1
+ let day = String(tomorrow.getDate()).padStart(2, '0');
+ beginTime.value = year + '-' + month + '-' + day;
+ }
\ No newline at end of file
diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js
index 3eb2240..e08bad8 100644
--- a/unpackage/dist/dev/app-plus/app-service.js
+++ b/unpackage/dist/dev/app-plus/app-service.js
@@ -7523,6 +7523,23 @@ This will fail in production.`);
}
});
};
+ const loginout = () => {
+ uni.showModal({
+ title: "退出登录",
+ content: "您确认要退出登录吗?",
+ success(res) {
+ if (res.confirm) {
+ uni.removeStorageSync("token");
+ uni.removeStorageSync("user");
+ uni.removeStorageSync("role");
+ uni.removeStorageSync("logintime");
+ uni.reLaunch({
+ url: "/pages/login/login"
+ });
+ }
+ }
+ });
+ };
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock(
"view",
@@ -7708,7 +7725,11 @@ This will fail in production.`);
128
/* KEYED_FRAGMENT */
))
- ])
+ ]),
+ vue.createElementVNode("view", {
+ class: "btn",
+ onClick: loginout
+ }, " 退出登录 ")
],
2
/* CLASS */
@@ -15580,7 +15601,8 @@ ${i3}
const typeIndex = vue.ref(null);
const ifShow = vue.ref(true);
const zwcj = vue.ref("");
- const address = vue.ref("");
+ const departure = vue.ref("");
+ const destination = vue.ref("");
const reason = vue.ref("");
const path = vue.ref([]);
const baseUrl2 = "https://36.112.48.190/jeecg-boot/sys/common/upload/";
@@ -15596,6 +15618,7 @@ ${i3}
};
onLoad(() => {
loadData();
+ getTomorrowDate();
});
const select = (e2) => {
e2.tempFilePaths;
@@ -15628,8 +15651,10 @@ ${i3}
return proxy.$toast("请选择审批领导");
}
}
- if (!address.value.trim())
- return proxy.$toast("请输入请假地点");
+ if (!departure.value.trim())
+ return proxy.$toast("请输入出发地");
+ if (!destination.value.trim())
+ return proxy.$toast("请输入目的地");
if (!reason.value.trim())
return proxy.$toast("请输入请假事由");
qjAddApi({
@@ -15639,7 +15664,8 @@ ${i3}
begintime: beginTime.value,
endtime: endTime.value,
examineleader: typeArr.value[typeIndex.value].username,
- address: address.value,
+ departure: departure.value,
+ destination: destination.value,
reason: reason.value,
zwmc: zwcj.value,
path: path.value.toString()
@@ -15666,7 +15692,7 @@ ${i3}
}, 2e3);
}
}).catch((err) => {
- formatAppLog("log", "at pages/leave/application.vue:235", err);
+ formatAppLog("log", "at pages/leave/application.vue:246", err);
});
};
const loadData = () => {
@@ -15695,6 +15721,15 @@ ${i3}
const bindType = (e2) => {
typeIndex.value = e2.detail.value;
};
+ const getTomorrowDate = () => {
+ let today = /* @__PURE__ */ new Date();
+ let tomorrow = new Date(today);
+ tomorrow.setDate(today.getDate() + 1);
+ let year = tomorrow.getFullYear();
+ let month = String(tomorrow.getMonth() + 1).padStart(2, "0");
+ let day = String(tomorrow.getDate()).padStart(2, "0");
+ beginTime.value = year + "-" + month + "-" + day;
+ };
return (_ctx, _cache) => {
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
const _component_uni_file_picker = resolveEasycom(vue.resolveDynamicComponent("uni-file-picker"), __easycom_0$2);
@@ -15835,11 +15870,11 @@ ${i3}
])
], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [
- vue.createElementVNode("view", { class: "title" }, " 请假地点: "),
+ vue.createElementVNode("view", { class: "title" }, " 出发地: "),
vue.withDirectives(vue.createElementVNode(
"input",
{
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => address.value = $event),
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => departure.value = $event),
placeholder: "请输入",
"nplaceholder-style": "font-size: 28rpx;color: #999999;"
},
@@ -15847,7 +15882,23 @@ ${i3}
512
/* NEED_PATCH */
), [
- [vue.vModelText, address.value]
+ [vue.vModelText, departure.value]
+ ])
+ ]),
+ vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [
+ vue.createElementVNode("view", { class: "title" }, " 目的地: "),
+ vue.withDirectives(vue.createElementVNode(
+ "input",
+ {
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => destination.value = $event),
+ placeholder: "请输入",
+ "nplaceholder-style": "font-size: 28rpx;color: #999999;"
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vModelText, destination.value]
])
]),
vue.createElementVNode("view", { class: "f-row aic jcb input_box" }, [
@@ -15855,7 +15906,7 @@ ${i3}
vue.withDirectives(vue.createElementVNode(
"input",
{
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => reason.value = $event),
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => reason.value = $event),
placeholder: "请输入",
"placeholder-style": "font-size: 28rpx;color: #999999;"
},
@@ -16025,11 +16076,11 @@ ${i3}
});
}
}).catch((err) => {
- formatAppLog("log", "at pages/useredit/useredit.vue:97", err);
+ formatAppLog("log", "at pages/useredit/useredit.vue:94", err);
});
},
fail(err) {
- formatAppLog("log", "at pages/useredit/useredit.vue:101", "图片上传出错", err);
+ formatAppLog("log", "at pages/useredit/useredit.vue:98", "图片上传出错", err);
}
});
}
@@ -16040,23 +16091,6 @@ ${i3}
realname: "",
phone: ""
});
- const loginout = () => {
- uni.showModal({
- title: "退出登录",
- content: "您确认要退出登录吗?",
- success(res) {
- if (res.confirm) {
- uni.removeStorageSync("token");
- uni.removeStorageSync("user");
- uni.removeStorageSync("role");
- uni.removeStorageSync("logintime");
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }
- }
- });
- };
onLoad(() => {
uni.setNavigationBarColor({
frontColor: "#ffffff",
@@ -16169,11 +16203,7 @@ ${i3}
2
/* CLASS */
),
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: loginout
- }, " 退出登录 ")
+ vue.createElementVNode("view", { class: "line" })
],
64
/* STABLE_FRAGMENT */
@@ -18768,6 +18798,7 @@ ${i3}
setup(__props) {
const props = __props;
const imageValue = vue.ref([]);
+ const ifShowFj = vue.ref(false);
const imageStyles = {
width: 64,
height: 64,
@@ -18785,15 +18816,18 @@ ${i3}
}).then((res) => {
if (res.success) {
info.value = res.result.records[0];
- imageValue.value = info.value.path.split(",").map((path) => {
- const name = path.split("/").pop();
- const extname = name.split(".").pop();
- return {
- name,
- extname,
- url: imgUrl(path)
- };
- });
+ if (info.value.path) {
+ ifShowFj.value = true;
+ imageValue.value = info.value.path.split(",").map((path) => {
+ const name = path.split("/").pop();
+ const extname = name.split(".").pop();
+ return {
+ name,
+ extname,
+ url: imgUrl(path)
+ };
+ });
+ }
}
});
};
@@ -18911,11 +18945,21 @@ ${i3}
)
]),
vue.createElementVNode("view", { class: "info f-row aic jcb" }, [
- vue.createElementVNode("view", null, " 请假地点: "),
+ vue.createElementVNode("view", null, " 出发地: "),
vue.createElementVNode(
"text",
null,
- vue.toDisplayString(info.value.address),
+ vue.toDisplayString(info.value.departure),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "info f-row aic jcb" }, [
+ vue.createElementVNode("view", null, " 目的地: "),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(info.value.destination),
1
/* TEXT */
)
@@ -18930,14 +18974,17 @@ ${i3}
/* TEXT */
)
]),
- vue.createElementVNode("view", { class: "info f-row aic jcb" }, [
+ ifShowFj.value ? (vue.openBlock(), vue.createElementBlock("view", {
+ key: 0,
+ class: "info f-row aic jcb"
+ }, [
vue.createElementVNode("view", null, " 附件: "),
vue.createVNode(_component_uni_file_picker, {
modelValue: imageValue.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imageValue.value = $event),
"image-styles": imageStyles
}, null, 8, ["modelValue"])
- ])
+ ])) : vue.createCommentVNode("v-if", true)
])
]),
vue.createElementVNode("view", { class: "f-col aic" }, [
diff --git a/unpackage/dist/dev/app-plus/pages/tab/my.css b/unpackage/dist/dev/app-plus/pages/tab/my.css
index 8b381bb..90468ad 100644
--- a/unpackage/dist/dev/app-plus/pages/tab/my.css
+++ b/unpackage/dist/dev/app-plus/pages/tab/my.css
@@ -23,6 +23,14 @@
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
+.btn[data-v-2086c871] {
+ position: fixed;
+ left: 50%;
+ transform: translateX(-50%);
+ text-align: center;
+ font-size: 1rem;
+ color: #DB4B31;
+}
.operate[data-v-2086c871] {
padding: 0 0.9375rem;
transform: translateY(-0.3125rem);
diff --git a/unpackage/dist/dev/app-plus/pages/useredit/useredit.css b/unpackage/dist/dev/app-plus/pages/useredit/useredit.css
index 02d0025..9192a5b 100644
--- a/unpackage/dist/dev/app-plus/pages/useredit/useredit.css
+++ b/unpackage/dist/dev/app-plus/pages/useredit/useredit.css
@@ -604,10 +604,4 @@ uni-button[data-v-503dd57f]::after {
.line[data-v-503dd57f] {
height: 0.3125rem;
background: #F8F8F8;
-}
-.btn[data-v-503dd57f] {
- margin-top: 1.25rem;
- text-align: center;
- font-size: 1rem;
- color: #DB4B31;
}
\ No newline at end of file