|
@@ -10,7 +10,7 @@
|
|
<view class="menu-list m0" style="margin-bottom:50px;">
|
|
<view class="menu-list m0" style="margin-bottom:50px;">
|
|
<view class="list-cell" style="color: #666666; line-height: 25px; width: auto; ">
|
|
<view class="list-cell" style="color: #666666; line-height: 25px; width: auto; ">
|
|
<view class="content-area-top menu-item">
|
|
<view class="content-area-top menu-item">
|
|
- <view class="content-area-top-name" >{{ state.detail.createBy + '提交的' + proxy.$common.mapping("formName", "formSign", state.detail.docNo.split("-")[0], state.formList) }} </view>
|
|
|
|
|
|
+ <view class="content-area-top-name" >{{ state?.detail?.createBy + '提交的' + state?.detail?.formName }} </view>
|
|
</view>
|
|
</view>
|
|
<view class="content-area-row_wrap menu-item">
|
|
<view class="content-area-row_wrap menu-item">
|
|
<img class="typeIcon" src="@/static/images/oa/pass.png" v-if="state.detail.docStatus === '2' "/>
|
|
<img class="typeIcon" src="@/static/images/oa/pass.png" v-if="state.detail.docStatus === '2' "/>
|
|
@@ -25,30 +25,94 @@
|
|
<view class="content-area-row_wrap-view gray black">{{ state.detail.deptName }}</view>
|
|
<view class="content-area-row_wrap-view gray black">{{ state.detail.deptName }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="list-cell" style="color: #666666; line-height: 25px; width: auto;margin-top:10px;">
|
|
|
|
- <view class="content-area-top menu-item">
|
|
|
|
- 流程
|
|
|
|
|
|
+ <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%;">流程</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">
|
|
|
|
+ <!-- 2021-08-01 10:30:00 -->
|
|
|
|
+ </view>
|
|
|
|
+ <view class="center" v-if="item.nodeType == 2 && item.appointApprover.indexOf(',') && item.appointApprover.split(',').length > 1">
|
|
|
|
+ <view class="content-area-header mt20 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>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="line gray" v-if="item.nodeType == 1">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="fixedBottom" v-if="state.detail.docStatus === '2' || state.detail.docStatus === '3' ">
|
|
|
|
|
|
+ <!-- <view class="fixedBottom" v-if="state.detail.docStatus === '2' || state.detail.docStatus === '3' ">
|
|
<img src="@/static/images/oa/loading.png" alt="">
|
|
<img src="@/static/images/oa/loading.png" alt="">
|
|
<span>再次提交</span>
|
|
<span>再次提交</span>
|
|
</view>
|
|
</view>
|
|
<view class="fixedBottom" v-if="state.detail.docStatus === '2' || state.detail.docStatus === '3' ">
|
|
<view class="fixedBottom" v-if="state.detail.docStatus === '2' || state.detail.docStatus === '3' ">
|
|
<img src="@/static/images/oa/loading.png" alt="">
|
|
<img src="@/static/images/oa/loading.png" alt="">
|
|
<span>再次提交</span>
|
|
<span>再次提交</span>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="approval">
|
|
|
|
+ <button class="refuse" @click="handle('refuse',2)">拒绝</button>
|
|
|
|
+ <button class="pass" @click="handle('pass',2)">同意</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script setup>
|
|
<script setup>
|
|
/*----------------------------------依赖引入-----------------------------------*/
|
|
/*----------------------------------依赖引入-----------------------------------*/
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watchEffect } from "vue";
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watchEffect } from "vue";
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
-import { getToDoPageList } from "@/api/oa/todo/index.js";
|
|
|
|
-import { getFormName, getDocumentDetails } from "@/api/oa/approval/index.js";
|
|
|
|
-import { listDept } from "@/api/system/user";
|
|
|
|
|
|
+import { getToDoPageList, approve } from "@/api/oa/todo/index.js";
|
|
|
|
+import { getFormName, getDocumentDetails,getOaFormDefinition } from "@/api/oa/approval/index.js";
|
|
|
|
+import { listDept, UserList } from "@/api/system/user";
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
@@ -64,15 +128,32 @@ const state = reactive({
|
|
pageSize:5,
|
|
pageSize:5,
|
|
},
|
|
},
|
|
detail:{},//详情数据
|
|
detail:{},//详情数据
|
|
|
|
+ userData:[],//用户列表
|
|
|
|
+ nodeList:[],//节点列表
|
|
});
|
|
});
|
|
|
|
|
|
-const { queryParams, detail,formList } = toRefs(state);
|
|
|
|
|
|
+const { queryParams, detail,formList, userData, nodeList } = toRefs(state);
|
|
/**
|
|
/**
|
|
* @页面初始化
|
|
* @页面初始化
|
|
*/
|
|
*/
|
|
function init() {
|
|
function init() {
|
|
getDetail();
|
|
getDetail();
|
|
}
|
|
}
|
|
|
|
+/**
|
|
|
|
+ * 表单审核
|
|
|
|
+ * @param type
|
|
|
|
+ * @param status
|
|
|
|
+ */
|
|
|
|
+function handle(type) {
|
|
|
|
+ if(type == "pass" || type == "refuse"){
|
|
|
|
+ approve({id:state.detail.id,approvalStatus:type == "pass"? 2:3}).then(() => {
|
|
|
|
+ proxy.$modal.msgSuccess("操作成功");
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: `/pages/business/oa/toDo/index`
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
/**
|
|
/**
|
|
* @列表查询
|
|
* @列表查询
|
|
@@ -80,20 +161,32 @@ function init() {
|
|
*/
|
|
*/
|
|
function getDetail(type) {
|
|
function getDetail(type) {
|
|
state.loading = true;
|
|
state.loading = true;
|
|
- getFormName().then((res) => {
|
|
|
|
- state.formList = res.data;
|
|
|
|
|
|
+ // getFormName().then((res1) => {
|
|
|
|
+ // state.formList = res1.data;
|
|
getDocumentDetails(state.queryParams)
|
|
getDocumentDetails(state.queryParams)
|
|
.then((requset) => {
|
|
.then((requset) => {
|
|
state.detail = requset.data;
|
|
state.detail = requset.data;
|
|
listDept({id:state.detail.deptId}).then((res2) => {
|
|
listDept({id:state.detail.deptId}).then((res2) => {
|
|
state.detail.deptName = res2.data[0].deptName
|
|
state.detail.deptName = res2.data[0].deptName
|
|
})
|
|
})
|
|
|
|
+ UserList({ pageNum: "1", pageSize: "10000" }).then((res3) => {
|
|
|
|
+ state.userData = res3.data.rows;
|
|
|
|
+ getOaFormDefinition( {formSign:state.queryParams?.docNo?.split("-")[0]}).then((res4)=>{
|
|
|
|
+ if(res4.data.length){
|
|
|
|
+ var info = res4.data[0]
|
|
|
|
+ state.nodeList = JSON.parse(info.flowInfo).node
|
|
|
|
+ console.log(state.nodeList)
|
|
|
|
+ state.detail.formName = info.formName
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
state.loading = false;
|
|
state.loading = false;
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
state.loading = false;
|
|
state.loading = false;
|
|
});
|
|
});
|
|
- })
|
|
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -232,5 +325,117 @@ onLoad((options) => {
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .stepBar{
|
|
|
|
+ margin-top:-20px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ .item{
|
|
|
|
+ position: relative;
|
|
|
|
+ margin-top:10%;
|
|
|
|
+ .left,.right{
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width:50%;
|
|
|
|
+ }
|
|
|
|
+ .left{
|
|
|
|
+ position: relative;
|
|
|
|
+ .icon{
|
|
|
|
+ width:40px;
|
|
|
|
+ height:40px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ float: left;
|
|
|
|
+ }
|
|
|
|
+ .status{
|
|
|
|
+ width:16px;
|
|
|
|
+ height:16px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ left:28px;
|
|
|
|
+ bottom:-2px;
|
|
|
|
+ }
|
|
|
|
+ >div{
|
|
|
|
+ width:80%;
|
|
|
|
+ margin-left:50px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ .title{
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ .name{
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ color: #999;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .right{
|
|
|
|
+ vertical-align: top;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ color:#909399;
|
|
|
|
+ }
|
|
|
|
+ .line{
|
|
|
|
+ height:40px;
|
|
|
|
+ width:1px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:40px;
|
|
|
|
+ left:18px;
|
|
|
|
+ }
|
|
|
|
+ .line.sucess{
|
|
|
|
+ background: #67c23a;
|
|
|
|
+ }
|
|
|
|
+ .line.gray{
|
|
|
|
+ background: #999;
|
|
|
|
+ }
|
|
|
|
+ .center{
|
|
|
|
+ width:40%;
|
|
|
|
+ margin-left:35px;
|
|
|
|
+ background: red;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .content-area {
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 15px 20px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
|
-</style>
|
|
|
|
|
|
+ &-header {
|
|
|
|
+ &-avatar {
|
|
|
|
+ margin: auto 0;
|
|
|
|
+ }
|
|
|
|
+ &-avatarImg {
|
|
|
|
+ width: 35px;
|
|
|
|
+ height: 35px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &-title {
|
|
|
|
+ margin: 0 0 15px 0;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #000000;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &-center {
|
|
|
|
+ line-height: 25px;
|
|
|
|
+ &-top {
|
|
|
|
+ color: #000000;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .approval{
|
|
|
|
+ margin-top:10px;
|
|
|
|
+ button{
|
|
|
|
+ width:calc(50% - 15px);
|
|
|
|
+ height:50px;
|
|
|
|
+ margin-left:10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ border-radius: 16px !important;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ button.pass{
|
|
|
|
+ background: #2A98FF;
|
|
|
|
+ color:#fff;
|
|
|
|
+ }
|
|
|
|
+ button.refuse{
|
|
|
|
+ border:1px solid #CFCFCF;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|