Commit 2d08aaa2 authored by 张毅辰's avatar 张毅辰

工作流(组织审批提交)

parent cb8d766a
......@@ -68,8 +68,8 @@ export default {
},
deptTree: [
{
deptName: '部门1',
deptId: 1
deptName: '铸造部',
deptId: 103
},
{
deptName: '部门2',
......
......@@ -28,10 +28,10 @@
<ul>
<li v-for="(item,index) in myApprovalList" :key="index" class="my_approval_li">
<uni-swipe-action-item :right-options="options" @click="bindClick($event,item.eventId)" @change="swipeChange($event, index)">
<view class="my_approval_item" @click="toNav(item.businessId, item.nodeId)">
<view class="my_approval_item" @click="toNav(item.businessId, item.nodeId, item)">
<h3 class="my_approval_title">
<text>[{{item.businessTypeName}}]--{{item.createUserName}}</text>
<text class="approval_title_right">{{item.status === '10' ? '待审批' :item.status === '2' ? '已审批':item.status === '5' ? '驳回' : ''}}</text>
<text class="approval_title_right">{{item.status === '10' ? '待审批' :item.status === '5' ? '驳回' : item.status === '3' ? '驳回' : item.status === '2' ? '已通过' : ''}}</text>
</h3>
<view class="my_approval_info">
......@@ -85,20 +85,35 @@ export default{
]
}
},
created() {
onLoad() {
this.getDocumentList()
},
created() {
},
methods:{
/** 详情页跳转*/
toNav(id, nodeId) {
uni.navigateTo({
url: `/pages/flow/work?businessId=${id}&nodeId=${nodeId}&type=see`,
success:(res) =>{
},
fail:(err) =>{
console.log(err)
toNav(id, nodeId, item) {
if (item.status === '3') {
if (item.businessType === '1001') {
uni.navigateTo({
url: `/pages/classes/classesInfo?businessId=${item.businessDocumentId}`,
success:(res) =>{
},
fail:(err) =>{
console.log(err)
}
});
}
});
} else {
uni.navigateTo({
url: `/pages/flow/work?businessId=${id}&nodeId=${nodeId}&type=see`,
success:(res) =>{
},
fail:(err) =>{
console.log(err)
}
});
}
},
/** 查询单据列表*/
getDocumentList() {
......
<template>
<view style="padding: 10px;">
<ClassForm v-if="processType === '1001'" :newBusinessDocument="newBusinessDocument" :oldBusinessDocument="oldBusinessDocument"></ClassForm>
<OrganizationForm v-if="processType === '0003'" :newBusinessDocument="newBusinessDocument" :oldBusinessDocument="oldBusinessDocument"></OrganizationForm>
</view>
</template>
<script>
import ClassForm from './form/ClassForm.vue'
import OrganizationForm from './form/OrganizationForm.vue'
export default {
name: "BusinessDocument",
......
<template>
<view>
<uni-forms :modelValue="{}" label-width="120" border label-align="left">
<view v-for="(item, index) in dataList" :key="index" class="show_form">
<view class="show_form_border">
<uni-forms-item :label="item.label" :name="item.key">
<view class="show_form_info">
<view>
{{ item.newData || '-' }}
</view>
<view v-show="item.showFlag" style="color: red;">
{{ item.oldData || '-' }}
</view>
</view>
</uni-forms-item>
<!-- <uni-forms-item :label="' '" :name="item.key" v-if="item.showFlag">-->
<!-- <view class="show_form_info" style="color: red;">-->
<!-- {{ item.oldData || '-' }}-->
<!-- </view>-->
<!-- </uni-forms-item>-->
</view>
</view>
</uni-forms>
</view>
</template>
<script>
export default {
name: "OrganizationForm",
props: {
newBusinessDocument: {
type: Object,
default: () => {
return {}
}
},
oldBusinessDocument: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
dataList: []
}
},
created() {
this.initData()
},
methods: {
initData() {
const list = [
{
label: '组织名称',
key: 'deptName'
},
{
label: '组织简称',
key: 'deptShortName'
},
{
label: '组织Id',
key: 'businessId'
},
{
label: '上游组织',
key: 'parentId'
},
{
label: '上游组织Id',
key: 'parentId'
},
{
label: '组织层级',
key: 'deptLevelName'
},
{
label: '对应管理层级层级',
key: 'managerLevelName'
},
{
label: '权重',
key: 'weight'
},
{
label: '状态',
key: 'flag'
},
{
label: '备注',
key: 'remarks'
},
]
list.forEach(item => {
this.dataList.push({
showFlag: this.oldBusinessDocument[item.key] !== this.newBusinessDocument[item.key],
label: item.label,
key: item.key,
oldData: this.oldBusinessDocument[item.key],
newData: this.newBusinessDocument[item.key]
})
})
console.log(this.dataList)
},
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<view class="container my-flow-work">
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar left-icon="left" left-text="返回" :title="basicDataForm.processType" @clickLeft="goBack" />
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar :title="basicDataForm.processType" />
<view style="width:100%;position:fixed;top:60px;">
<ul>
<li class="my_approval_li">
......@@ -126,7 +126,11 @@ export default {
{
type: '1001',
api: '/wx/aeclassesinfo/flow'
}
},
{
type: '0003',
api: '/organization/wxProcessDept'
},
]
}
},
......
<template>
<view class="normal-login-container">
<view class="logo-content align-center justify-center flex">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
</image>
<text class="title">移动端登录</text>
</view>
<view class="login-form-content">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment