integrated_traffic_uniapp/pages/basics/basic-info/resignation.vue

187 lines
5.0 KiB
Vue
Raw Normal View History

2024-03-22 15:08:55 +08:00
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">离职申请</block>
</cu-custom>
<scroll-view scroll-y="false" >
<view class="form">
<view class="cu-form-group">
<view class="title">服务公司</view>
<input v-model="form.CORP_NAME" disabled placeholder="请输入服务公司" name="input" style="color:#cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title">所在部门</view>
<input v-model="form.DEPARTMENT_NAME" disabled placeholder="请输入所在部门" name="input" style="color:#cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title">任职岗位</view>
<input v-model="form.POST_NAME" disabled placeholder="请输入任职岗位" name="input" style="color:#cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title">申请描述</view>
<textarea v-model="form.APPLY_CONTENT" maxlength="200" placeholder="请输入描述(选填)"></textarea>
</view>
</view>
<view class="cu-bar btn-group" style="margin-top: 30upx;">
<button class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(confirm)"></button>
<!-- <button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goback)"></button>-->
</view>
</scroll-view>
</view>
</template>
<script>
import {basePath, loginUser} from "../../../common/tool";
export default {
data() {
return {
noClick: true,
form:{
}
}
},
onShow() {
this.getData()
},
methods: {
getData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/user/getPractitionerEmploymentCorp',
method: 'POST',
dataType: 'json',
header:{
'Content-type':'application/x-www-form-urlencoded'
},
data: {
USER_ID:loginUser.USER_ID,
ISDELETE: '0',
APPLY_STATUS: '1',
},
success: (res) => {
if (res.data.pd) {
uni.hideLoading();
_this.form = res.data.pd;
}
}
});
},
//跳转事件
confirm(e) {
var that = this
uni.showModal({
title: '温馨提示',
content: '确定要提交申请吗?',
cancelColor: "#000000",
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
uni.request({
url: basePath+'/app/user/setPractitionerResignationByUser',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
...that.form,
NAME: loginUser.NAME
},
success: (res) => {
uni.hideLoading();
if ("success" == res.data.result) {
uni.showToast({
icon:'none',
title: '申请提交成功',
duration: 1500
});
that.goback()
}else{
uni.hideLoading();
uni.showToast({
icon:'none',
title: '系统错误',
duration: 2000
});
}
}
});
} else {
uni.hideLoading();
}
}
})
},
goback(){
var pages = getCurrentPages(); // 获取当前页面栈
var prePage = pages[pages.length - 2]; // 上二级页面
prePage.$vm.initflag = true; // A 页面 init方法 为true
uni.navigateBack({delta: 1});
uni.hideLoading();
},
}
}
</script>
<style>
page{
background-color: #f3f2f2;
}
.prevent {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
overflow: hidden;
}
.cu-form-title{
padding: 20upx 0;
}
.cu-form-textarea{
background-color: #ffffff;
padding: 1upx 30upx 20upx;
min-height: 100upx;
}
.cu-form-textarea textarea {
height: 4.6em;
width: 100%;
line-height: 1.2em;
flex: 1;
font-size: 28upx;
padding: 0;
}
.selected{
display: flex;
align-items: center;
height: 100upx;
}
.selected .radio{
transform:scale(0.8);
margin-right: 10upx;
}
.group{
display: flex;
align-items: center;
}
.cu-form-group .title{
font-size: 28upx;
font-weight: bold;
}
.cu-bar .action:first-child {
font-size: 28upx;
}
.cu-form-group .picker{
color: #808080;
}
.picker-tree{
color: #808080;
}
</style>