修改请假页面
This commit is contained in:
parent
b2664417e3
commit
a252f9b88b
@ -54,9 +54,15 @@
|
||||
</view>
|
||||
<view class="info f-row aic jcb">
|
||||
<view>
|
||||
请假地点:
|
||||
出发地:
|
||||
</view>
|
||||
<text>{{info.address}}</text>
|
||||
<text>{{info.departure}}</text>
|
||||
</view>
|
||||
<view class="info f-row aic jcb">
|
||||
<view>
|
||||
目的地:
|
||||
</view>
|
||||
<text>{{info.destination}}</text>
|
||||
</view>
|
||||
<view class="info f-row aic jcb">
|
||||
<view>
|
||||
@ -64,7 +70,7 @@
|
||||
</view>
|
||||
<text>{{info.reason}}</text>
|
||||
</view>
|
||||
<view class="info f-row aic jcb">
|
||||
<view class="info f-row aic jcb" v-if="ifShowFj">
|
||||
<view>
|
||||
附件:
|
||||
</view>
|
||||
@ -121,6 +127,7 @@
|
||||
},
|
||||
})
|
||||
const imageValue = ref([])
|
||||
const ifShowFj = ref(false)
|
||||
const imageStyles = {
|
||||
width: 64,
|
||||
height: 64,
|
||||
@ -139,17 +146,19 @@
|
||||
}).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)
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -66,9 +66,15 @@
|
||||
</picker>
|
||||
<view class="f-row aic jcb input_box">
|
||||
<view class="title">
|
||||
请假地点:
|
||||
出发地:
|
||||
</view>
|
||||
<input v-model="address" placeholder="请输入" nplaceholder-style="font-size: 28rpx;color: #999999;" />
|
||||
<input v-model="departure" placeholder="请输入" nplaceholder-style="font-size: 28rpx;color: #999999;" />
|
||||
</view>
|
||||
<view class="f-row aic jcb input_box">
|
||||
<view class="title">
|
||||
目的地:
|
||||
</view>
|
||||
<input v-model="destination" placeholder="请输入" nplaceholder-style="font-size: 28rpx;color: #999999;" />
|
||||
</view>
|
||||
<view class="f-row aic jcb input_box">
|
||||
<view class="title">
|
||||
@ -80,7 +86,7 @@
|
||||
<view class="title">
|
||||
上传附件:
|
||||
</view>
|
||||
<uni-file-picker @select="select" :image-styles="imageStyles"/>
|
||||
<uni-file-picker @select="select" :image-styles="imageStyles" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -3,9 +3,7 @@
|
||||
<view class="nav">
|
||||
<view class="user f-row aic">
|
||||
<view class="avatar">
|
||||
<image @click="toProfile('/pages/useredit/useredit')"
|
||||
:src="imgUrl(store.userinfo.avatar)"
|
||||
mode="">
|
||||
<image @click="toProfile('/pages/useredit/useredit')" :src="imgUrl(store.userinfo.avatar)" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="f-row aic jcb right">
|
||||
@ -22,14 +20,14 @@
|
||||
<view class="shezhi">
|
||||
<image @click="scan" style="width: 50rpx;height: 50rpx;margin-right: 20rpx;"
|
||||
src="../../static/tab/scan.png"></image>
|
||||
<!-- <image src="../../static/my/shezhi.png" mode="" @click="toProfile('/pages/useredit/useredit')">
|
||||
<!-- <image src="../../static/my/shezhi.png" mode="" @click="toProfile('/pages/useredit/useredit')">
|
||||
</image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-col aic">
|
||||
<view class="msg f-row aic jca">
|
||||
<!-- <view class="box f-col aic" @click="jump('/pages/task/todotask')">
|
||||
<!-- <view class="box f-col aic" @click="jump('/pages/task/todotask')">
|
||||
<view class="num">
|
||||
{{todoNum}}
|
||||
</view>
|
||||
@ -75,6 +73,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="loginout">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -159,6 +160,24 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// onShow(() => {
|
||||
// taskList()
|
||||
// })
|
||||
@ -177,6 +196,15 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #DB4B31;
|
||||
}
|
||||
|
||||
.operate {
|
||||
padding: 0 30rpx;
|
||||
transform: translateY(-10rpx);
|
||||
|
@ -31,9 +31,6 @@
|
||||
<view class="line">
|
||||
|
||||
</view>
|
||||
<view class="btn" @click="loginout">
|
||||
退出登录
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -111,24 +108,6 @@
|
||||
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",
|
||||
@ -200,10 +179,4 @@
|
||||
background: #F8F8F8;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 40rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #DB4B31;
|
||||
}
|
||||
</style>
|
141
unpackage/dist/dev/app-plus/app-service.js
vendored
141
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -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" }, [
|
||||
|
8
unpackage/dist/dev/app-plus/pages/tab/my.css
vendored
8
unpackage/dist/dev/app-plus/pages/tab/my.css
vendored
@ -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);
|
||||
|
@ -605,9 +605,3 @@ uni-button[data-v-503dd57f]::after {
|
||||
height: 0.3125rem;
|
||||
background: #F8F8F8;
|
||||
}
|
||||
.btn[data-v-503dd57f] {
|
||||
margin-top: 1.25rem;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
color: #DB4B31;
|
||||
}
|
Loading…
Reference in New Issue
Block a user