|
@@ -8,6 +8,7 @@
|
|
:refresherThreshold="44"
|
|
:refresherThreshold="44"
|
|
:refresherBackground="'#f5f6f7'"
|
|
:refresherBackground="'#f5f6f7'"
|
|
:data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
:data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
|
|
+ style="height:calc(100vh - 110px)"
|
|
>
|
|
>
|
|
<template #default>
|
|
<template #default>
|
|
<view class="centerOne">
|
|
<view class="centerOne">
|
|
@@ -142,87 +143,45 @@
|
|
:minDate="Number(new Date())"
|
|
:minDate="Number(new Date())"
|
|
:maxDate="Number(new Date('2027'))"
|
|
:maxDate="Number(new Date('2027'))"
|
|
></u-datetime-picker>
|
|
></u-datetime-picker>
|
|
- <view class="app-button">
|
|
|
|
- <u-button type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
|
|
|
|
- </view>
|
|
|
|
- <view class="menu-list m0" style="margin-bottom:50px;">
|
|
|
|
- <view class="list-cell" style="color: #666666; line-height: 25px; width: auto;margin-top:10px;flex:none">
|
|
|
|
- <view class="content-area-top">
|
|
|
|
- <view style="width:100%;font-weight:bold;color:#333333;font-size:16px;">流程</view>
|
|
|
|
- <!-- <view class="stepBar">
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="left">
|
|
|
|
- <image class="icon" src="@/static/images/oa/user.png"></image>
|
|
|
|
- <image class="status" src="@/static/images/oa/pass2.png"></image>
|
|
|
|
- <div>
|
|
|
|
- <view class="title">
|
|
|
|
- 发起申请
|
|
|
|
- </view>
|
|
|
|
- <view class="name">
|
|
|
|
- {{ state.detail.createBy }}
|
|
|
|
- </view>
|
|
|
|
- </div>
|
|
|
|
- </view>
|
|
|
|
- <view class="right">
|
|
|
|
- {{ state.detail.createTime?.split("T")[0] + " " + state.detail.createTime?.split("T")[1]}}
|
|
|
|
- </view>
|
|
|
|
- <view class="line sucess">
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="item" v-for="(item, index) in nodeList" :key="index">
|
|
|
|
- <view class="left">
|
|
|
|
- <image class="icon" src="@/static/images/oa/user.png" v-if="item.nodeType == 1"></image>
|
|
|
|
- <image class="icon" src="@/static/images/oa/Ccto.png" v-if="item.nodeType == 2"></image>
|
|
|
|
- <div>
|
|
|
|
- <view class="title">
|
|
|
|
- {{ item.nodeType == 1 ? '审批人' : item.nodeType == 2 ? `抄送${item.appointApprover.indexOf(",") && item.appointApprover.split(",").length>1 ? `(${item.appointApprover.split(",").length}人)` : "人"}` : "" }}
|
|
|
|
- </view>
|
|
|
|
- <view class="name" v-if="item.nodeType == 1">
|
|
|
|
- {{ proxy.$common.mapping("nickName", "userId", item.appointApprover, state.userData) }}
|
|
|
|
- </view>
|
|
|
|
- <view class="name" v-if="item.nodeType == 2 && item.appointApprover.indexOf(',') && item.appointApprover.split(',').length == 1">
|
|
|
|
- {{ proxy.$common.mapping("nickName", "userId", item.appointApprover, state.userData) }}
|
|
|
|
- </view>
|
|
|
|
- <view class="name" v-if="item.nodeType == 2 && item.appointApprover.indexOf(',') && item.appointApprover.split(',').length > 1">
|
|
|
|
- 抄送人
|
|
|
|
- </view>
|
|
|
|
- </div>
|
|
|
|
- </view>
|
|
|
|
- <view class="right">
|
|
|
|
- </view>
|
|
|
|
- <view class="center" v-if="item.nodeType == 2 && item.appointApprover.indexOf(',') && item.appointApprover.split(',').length > 1">
|
|
|
|
- <view class="content-area-header mb10 text-center" style="display: inline-block" v-for="(approver, index2) in item.appointApprover.split(',')" :key="index2">
|
|
|
|
- <img v-if='proxy.$common.mapping("avatar", "userId", approver, state.userData)' class="content-area-header-avatarImg mlr5" :src='proxy.$common.mapping("avatar", "userId", approver, state.userData)' style="display: block; width: 40px; height: 40px" />
|
|
|
|
- <u-avatar
|
|
|
|
- class="content-area-header-avatar mlr5"
|
|
|
|
- :text='proxy.$common.mapping("nickName", "userId", approver, state.userData).length > 2 ? proxy.$common.mapping("nickName", "userId", approver, state.userData).slice(1, 3) : proxy.$common.mapping("nickName", "userId", approver, state.userData)'
|
|
|
|
- shape="square"
|
|
|
|
- size="40"
|
|
|
|
- fontSize="12"
|
|
|
|
- color="#ffffff"
|
|
|
|
- :bgColor="proxy.$settingStore.themeColor.color"
|
|
|
|
- ></u-avatar>
|
|
|
|
- <u-text :text='proxy.$common.mapping("nickName", "userId", approver, state.userData)' color="#000000" size="14" align="center"></u-text>
|
|
|
|
|
|
+ <view class="list-cell" style="color: #666666; line-height: 25px; width: auto;">
|
|
|
|
+ <view class="content-area-top">
|
|
|
|
+ <view style="width:100%;font-weight:bold;color:#333333;font-size:16px;margin-bottom:20px">流程</view>
|
|
|
|
+ <view class="stepBar">
|
|
|
|
+ <view class="item" v-for="(item, index) in nodeList" :key="index">
|
|
|
|
+ <view class="left">
|
|
|
|
+ <view class="yuan"></view>
|
|
|
|
+ <div>
|
|
|
|
+ <view class="title">
|
|
|
|
+ {{ item.nodeName }}
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="name">
|
|
|
|
+ {{ item.appointApprover.split(',').length }}人{{ item.nodeName }}
|
|
|
|
+ </view>
|
|
|
|
+ </div>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="right">
|
|
|
|
+ <view class="content-area-header mb10 text-center" style="display: inline-block" v-for="(item2, index2) in ccTo[index]" :key="index2">
|
|
|
|
+ <img v-if='item2.avatar' class="content-area-header-avatarImg mlr5" :src='item2.avatar' style="display: block; width: 40px; height: 40px" />
|
|
|
|
+ <u-avatar
|
|
|
|
+ class="content-area-header-avatar mlr5"
|
|
|
|
+ :text='item2.userName.length > 2 ? item2.userName.slice(1, 3) : item2.userName'
|
|
|
|
+ shape="square"
|
|
|
|
+ size="40"
|
|
|
|
+ fontSize="12"
|
|
|
|
+ color="#ffffff"
|
|
|
|
+ :bgColor="proxy.$settingStore.themeColor.color"
|
|
|
|
+ ></u-avatar>
|
|
|
|
+ <u-text :text='item2.userName' color="#000000" size="14" align="center" class="userName"></u-text>
|
|
</view>
|
|
</view>
|
|
- <view class="line gray" v-if="item.nodeType == 1">
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
- </view> -->
|
|
|
|
|
|
+ <view class="line gray" v-if="index < nodeList.length -1">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="fixedBottom" v-if="state.queryType == 2">
|
|
|
|
- <img src="@/static/images/oa/loading.png" alt="">
|
|
|
|
- <span>再次提交</span>
|
|
|
|
- </view>
|
|
|
|
- <view class="fixedBottom" v-if="state.detail.docStatus === '2' || state.detail.docStatus === '3' ">
|
|
|
|
- <img src="@/static/images/oa/loading.png" alt="">
|
|
|
|
- <span>再次提交</span>
|
|
|
|
- </view>
|
|
|
|
- <view class="approval" v-if="state.queryType == 1">
|
|
|
|
- <button class="refuse" @click="handle('refuse',2)">拒绝</button>
|
|
|
|
- <button class="pass" @click="handle('pass',2)">同意</button>
|
|
|
|
- </view> -->
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="app-button">
|
|
|
|
+ <u-button type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
</oa-scroll>
|
|
</oa-scroll>
|
|
@@ -249,12 +208,10 @@ import {
|
|
} from "@/api/business/mhxf/unitInfoCollection";
|
|
} from "@/api/business/mhxf/unitInfoCollection";
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
-import { useStores, commonStores } from "@/store/modules/index";
|
|
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
import {
|
|
import {
|
|
getOaFormDefinition,
|
|
getOaFormDefinition,
|
|
- addQjDocument,
|
|
|
|
- updateQjDocument,
|
|
|
|
|
|
+ addOaDocument,
|
|
} from "@/api/oa/approval/index.js";
|
|
} from "@/api/oa/approval/index.js";
|
|
/*----------------------------------公共变量-----------------------------------*/
|
|
/*----------------------------------公共变量-----------------------------------*/
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -266,6 +223,7 @@ const props = defineProps({
|
|
default: Object,
|
|
default: Object,
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+console.log(props.data)
|
|
const actionTitle = ref(null);
|
|
const actionTitle = ref(null);
|
|
const actionsList = ref([]);
|
|
const actionsList = ref([]);
|
|
const actionDefaultIndex = ref(0);
|
|
const actionDefaultIndex = ref(0);
|
|
@@ -302,12 +260,22 @@ const state = reactive({
|
|
],
|
|
],
|
|
reason: [{ required: true, message: "请假事由不能为空", trigger: "blur" }],
|
|
reason: [{ required: true, message: "请假事由不能为空", trigger: "blur" }],
|
|
},
|
|
},
|
|
|
|
+ userData:[],
|
|
|
|
+ ccTo:[]
|
|
});
|
|
});
|
|
|
|
|
|
-const { form, rules } = toRefs(state);
|
|
|
|
|
|
+const { form, rules, userData, ccTo} = toRefs(state);
|
|
|
|
+const nodeList = ref([]);
|
|
|
|
+state.userData = props.data.userData
|
|
|
|
+
|
|
|
|
+nodeList.value = props.data.nodeList
|
|
|
|
+state.ccTo = props.data.ccTo
|
|
|
|
+console.log(state.ccTo,1)
|
|
|
|
|
|
form.value.formSign = props.data.form.formSign
|
|
form.value.formSign = props.data.form.formSign
|
|
form.value.formId = props.data.form.id
|
|
form.value.formId = props.data.form.id
|
|
|
|
+
|
|
|
|
+console.log(props.data.form)
|
|
/**
|
|
/**
|
|
* @图片上传成功回调
|
|
* @图片上传成功回调
|
|
*/
|
|
*/
|
|
@@ -326,27 +294,54 @@ function uploadDeleteChange(e) {
|
|
* @api提交
|
|
* @api提交
|
|
*/
|
|
*/
|
|
function handleSubmit(value) {
|
|
function handleSubmit(value) {
|
|
- console.log(form.value)
|
|
|
|
uForm.value
|
|
uForm.value
|
|
.validate()
|
|
.validate()
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- // proxy.$modal.msg("校验通过");
|
|
|
|
- addQjDocument({
|
|
|
|
- formId: form.value.formId,
|
|
|
|
- formSign: form.value.formSign,
|
|
|
|
- type: form.value.type,
|
|
|
|
- startTime: form.value.startTime,
|
|
|
|
- endTime: form.value.endTime,
|
|
|
|
- duration: Number(form.value.duration),
|
|
|
|
- reason: form.value.reason,
|
|
|
|
- docStatus: 1,
|
|
|
|
- image: form.value.image
|
|
|
|
- }).then((res) => {
|
|
|
|
- proxy.$modal.msgSuccess("表单提交成功");
|
|
|
|
- uni.switchTab({
|
|
|
|
- url: `/pages/business/oa/toDo/index`
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
|
|
+ if(form.value.docNo){
|
|
|
|
+ updateDocument({
|
|
|
|
+ docNo: form.value.docNo,
|
|
|
|
+ id: form.value.id,
|
|
|
|
+ formId: form.value.formId,
|
|
|
|
+ formSign: form.value.formSign,
|
|
|
|
+ type: form.value.type,
|
|
|
|
+ startTime: form.value.startTime,
|
|
|
|
+ endTime: form.value.endTime,
|
|
|
|
+ duration: Number(form.value.duration),
|
|
|
|
+ reason: form.value.reason,
|
|
|
|
+ docStatus: 1,
|
|
|
|
+ image: form.value.image
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ proxy.$modal.msgSuccess("表单修改成功");
|
|
|
|
+ if(getCurrentPages().length > 1){
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }else{
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url: `/pages/business/oa/approval/index`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ addOaDocument({
|
|
|
|
+ formId: form.value.formId,
|
|
|
|
+ formSign: form.value.formSign,
|
|
|
|
+ type: form.value.type,
|
|
|
|
+ startTime: form.value.startTime,
|
|
|
|
+ endTime: form.value.endTime,
|
|
|
|
+ duration: Number(form.value.duration),
|
|
|
|
+ reason: form.value.reason,
|
|
|
|
+ docStatus: 1,
|
|
|
|
+ image: form.value.image
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ proxy.$modal.msgSuccess("表单提交成功");
|
|
|
|
+ if(getCurrentPages().length > 1){
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }else{
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url: `/pages/business/oa/approval/index`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch((errors) => {
|
|
.catch((errors) => {
|
|
proxy.$modal.msg("校验失败");
|
|
proxy.$modal.msg("校验失败");
|
|
@@ -400,7 +395,9 @@ function timeSubmit(data) {
|
|
showTime.value = false;
|
|
showTime.value = false;
|
|
}
|
|
}
|
|
|
|
|
|
-onLoad((options) => {});
|
|
|
|
|
|
+onLoad((options) => {
|
|
|
|
+
|
|
|
|
+});
|
|
|
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
//调用系统主题颜色
|
|
//调用系统主题颜色
|
|
@@ -431,4 +428,59 @@ onShow(() => {
|
|
border-radius: 10px !important;
|
|
border-radius: 10px !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.stepBar{
|
|
|
|
+ margin-top:-20px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ width:100%;
|
|
|
|
+ position: relative;
|
|
|
|
+ .item{
|
|
|
|
+ margin-top:10%;
|
|
|
|
+ .left{
|
|
|
|
+ width:100%;
|
|
|
|
+ position: relative;
|
|
|
|
+ .yuan{
|
|
|
|
+ width:10px;
|
|
|
|
+ height:10px;
|
|
|
|
+ margin-top:10px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ float: left;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ background: #999;
|
|
|
|
+ }
|
|
|
|
+ >div{
|
|
|
|
+ width:80%;
|
|
|
|
+ margin-left:20px;
|
|
|
|
+ vertical-align: top;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ .title{
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ .name{
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ color: #999;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .line{
|
|
|
|
+ height:39.5%;
|
|
|
|
+ width:1px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:24px;
|
|
|
|
+ left:5px;
|
|
|
|
+ background: #999;
|
|
|
|
+ }
|
|
|
|
+ .right{
|
|
|
|
+ width:calc(100% - 100px);
|
|
|
|
+ margin-left:100px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .userName{
|
|
|
|
+ white-space: nowrap; /* 确保文本在一行内显示 */
|
|
|
|
+ overflow: hidden; /* 超出容器部分隐藏 */
|
|
|
|
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
|
+ width: 50px !important; /* 定义容器宽度 */
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|