审批流程显示方式更新,多个视图页面及组件修改。

This commit is contained in:
zmj 2024-05-29 23:45:53 +08:00
parent 27713a1295
commit fd5e054f8b
6 changed files with 50 additions and 59 deletions

View File

@ -146,7 +146,6 @@ let props = defineProps({
}) })
let fromValue=ref({}) let fromValue=ref({})
const getFormValue=()=>{ const getFormValue=()=>{
if(props.typeName=='请假')fromValue.value=qja; if(props.typeName=='请假')fromValue.value=qja;
@ -171,30 +170,8 @@ const getFormValue=()=>{
if(props.typeName=='转岗')fromValue.value=zga; if(props.typeName=='转岗')fromValue.value=zga;
if(props.typeName=='招聘需求')fromValue.value=zpxqa; if(props.typeName=='招聘需求')fromValue.value=zpxqa;
if(props.typeName=='通用审批')fromValue.value=tyspa; if(props.typeName=='通用审批')fromValue.value=tyspa;
console.log(fromValue.value)
} }
getFormValue() getFormValue()
const emit = defineEmits(['close', 'reEdit']) const emit = defineEmits(['close', 'reEdit'])
const popupRef = shallowRef<InstanceType<typeof Popup>>() const popupRef = shallowRef<InstanceType<typeof Popup>>()
@ -308,7 +285,7 @@ const showTextarea = () => {
// //
const reEdit = () => { const reEdit = () => {
emit('reEdit', { extends: formData.extends, flow_info: formData.flow_info }) emit('reEdit', { extends: formData.extends,typeName:props.typeName,cate:formData.flow_info.flow_cate })
} }
defineExpose({ defineExpose({

View File

@ -113,7 +113,7 @@ const setFormData = async (data: Record<any, any>) => {
// //
const setExtend = async (data: Record<any, any>) => { const setExtend = async (data: Record<any, any>) => {
extend.value = data formData.extends=data
}; };

View File

@ -1,19 +1,22 @@
<template> <template>
<div class="flex content"> <div class="flex content">
<el-card style="flex:1" class="mr-5 left"> <el-card style="flex:2" class="mr-5 left">
<template #header> <template #header>
审批新申请 审批新申请
</template> </template>
<div v-for="(item, index) in lists.filter(e => e.children.length > 0)" :key="index" class="tit"> <div v-for="(item, index) in lists.filter(e => e.children.length > 0)" :key="index" class="tit">
{{ item.name }} {{ item.name }}
<div class="tit-content"> <div class="tit-content">
<div v-for="(e, i) in item.children" :key="i" class="tit-li" @click="handleEdit(e.id, e.title)">{{ <div v-for="(e, i) in item.children" :key="i" class="tit-li" @click="handleEdit(e.id, e.title)">
e.title }} <!-- <el-icon :size="30">
<Share />
</el-icon> -->
<p> {{ e.title }}</p>
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card style="flex:4"> <el-card style="flex:8">
<template #header> <template #header>
审批列表 审批列表
</template> </template>
@ -55,13 +58,13 @@
</div> </div>
</el-card> </el-card>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" :type="type" @close="showEdit = false" /> <edit-popup v-if="showEdit" ref="editRef" @success="getLists" :type="type" @close="showEdit = false" />
<div v-if="showDetail"> <div v-if="showDetail">
<detailPopup ref="detailRef" @reEdit="reEdit" @success="showDetail = false, getLists()" <detailPopup ref="detailRef" @reEdit="reEdit" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" :typeName="typeName" /> @close="showDetail = false, getLists()" :typeName="typeName" />
</div> </div>
</div> </div>
</template> </template>
@ -74,18 +77,6 @@ import EditPopup from './edit.vue'
import detailPopup from './detail.vue' import detailPopup from './detail.vue'
import { apiOaFlowTypeDetail } from '@/api/oa_flow_type' import { apiOaFlowTypeDetail } from '@/api/oa_flow_type'
const editRef = shallowRef<InstanceType<typeof EditPopup>>() const editRef = shallowRef<InstanceType<typeof EditPopup>>()
// //
const showEdit = ref(false) const showEdit = ref(false)
@ -127,7 +118,7 @@ const handDetail = async (row: any, data = {}) => {
const reEdit = async (data) => { const reEdit = async (data) => {
showDetail.value = false showDetail.value = false
await nextTick() await nextTick()
handleEdit(data?.flow_info?.flow_cate, '', data.extends) handleEdit(data.cate, data.typeName, data.extends)
} }
// //
@ -184,9 +175,9 @@ getTypeList()
flex-wrap: wrap; flex-wrap: wrap;
.tit-li { .tit-li {
min-width: 60px; // min-width: 60px;
padding: 0 5px; // padding: 0 5px;
// width: 60px; width: 60px;
background: #FF8F4A; background: #FF8F4A;
color: white; color: white;
text-align: center; text-align: center;

View File

@ -93,7 +93,9 @@
<span style="float:right"> <span style="float:right">
<el-button type="primary" @click="submit">保存到账记录</el-button> <el-button type="primary" @click="submit">保存到账记录</el-button>
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
<el-button @click="showDialog = true">全部到账</el-button> <el-button @click="showDialog = true" v-if='formData.is_cash==1'>剩余部分全到账</el-button>
<el-button @click="showDialog = true" v-else>全部到账</el-button>
<el-button @click="fdz" v-if='formData.is_cash==1'>全部反到账</el-button>
</span> </span>
</div> </div>
@ -173,7 +175,10 @@ const handDel = (i) => {
detail.value.splice(i, 1) detail.value.splice(i, 1)
} }
const submit = async () => { const submit = async () => {
await apiInvlicevAdd({ invoice_id: formData.id, detail: detail.value }) if(detail.value.length){
await apiInvlicevAdd({ invoice_id: formData.id, detail: detail.value })
}
emit("success"); emit("success");
} }
@ -189,16 +194,24 @@ const reset = () => {
} }
const allSubmits = async () => { const allSubmits = async () => {
let data= { invoice_id: formData.id, detail: [{ amount:formData.amount, enter_time: times.value, remarks: '' }]}
if(formData.is_cash==1){
detail.value.push({ amount:(+formData.amount) - (+formData.enter_amount), enter_time: times.value, remarks: '' })
data.detail=detail.value
}
await apiInvlicevAdd( await apiInvlicevAdd(
{ {
invoice_id: formData.id, detail: [{ amount: formData.amount, enter_time: times.value, remarks: '' }] ...data
} }
) )
emit("success"); emit("success");
} }
const fdz=()=>{
// console.log()
alert("饭到账")
}
// //

View File

@ -21,7 +21,7 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never"> <el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['works.bgsp.oa_flow_type/add']" type="primary" @click="handleAdd"> <!-- <el-button v-perms="['works.bgsp.oa_flow_type/add']" type="primary" @click="handleAdd">
<template #icon> <template #icon>
<icon name="el-icon-Plus" /> <icon name="el-icon-Plus" />
</template> </template>
@ -30,7 +30,7 @@
<el-button v-perms="['works.bgsp.oa_flow_type/delete']" :disabled="!selectData.length" <el-button v-perms="['works.bgsp.oa_flow_type/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)"> @click="handleDelete(selectData)">
删除 删除
</el-button> </el-button> -->
<div class="mt-4"> <div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table :data="pager.lists" @selection-change="handleSelectionChange">
@ -38,6 +38,9 @@
<el-table-column label="所属分类" prop="type_text" show-overflow-tooltip /> <el-table-column label="所属分类" prop="type_text" show-overflow-tooltip />
<el-table-column label="审批名称" prop="title" show-overflow-tooltip /> <el-table-column label="审批名称" prop="title" show-overflow-tooltip />
<el-table-column label="审批标识" prop="name" show-overflow-tooltip /> <el-table-column label="审批标识" prop="name" show-overflow-tooltip />
<el-table-column label="创建时间" prop="update_time" show-overflow-tooltip />
<el-table-column label="图标" prop="icon" show-overflow-tooltip> <el-table-column label="图标" prop="icon" show-overflow-tooltip>
<!-- <template #default="{ row, $index }"> <!-- <template #default="{ row, $index }">
<el-icon :size="20" :id="'test' + $index"> <el-icon :size="20" :id="'test' + $index">

View File

@ -17,14 +17,21 @@
<el-table-column label="消息主题" prop="title" show-overflow-tooltip /> <el-table-column label="消息主题" prop="title" show-overflow-tooltip />
<el-table-column label="消息内容" prop="content" show-overflow-tooltip /> <el-table-column label="消息内容" prop="content" show-overflow-tooltip />
<el-table-column label="是否已读" prop="is_read" show-overflow-tooltip /> <el-table-column label="是否已读" prop="is_read" show-overflow-tooltip />
<el-table-column label="阅读时间" prop="read_time" show-overflow-tooltip /> <el-table-column label="阅读时间" prop="read_time" show-overflow-tooltip >
<template #default="{ row }">
{{timeFormat(row.read_time,'yyyy-mm-dd hh:MM')}}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip /> <el-table-column label="创建时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button v-perms="['works.oa_message/edit']" type="primary" link @click="handleEdit(row)"> <el-button type="primary" link @click="handleEdit(row)">
详情 详情
</el-button> </el-button>
<el-button v-perms="['works.oa_message/delete']" type="danger" link <el-button type="danger" link
@click="handleDelete(row.id)"> @click="handleDelete(row.id)">
删除 删除
</el-button> </el-button>