|
@@ -32,6 +32,9 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<HcTable :column="tableColumn" :datas="tableData" :loading="tableLoading">
|
|
|
+ <template #tripDesc="{row}">
|
|
|
+ <span class="text-blue text-hover" @click="rowClick(row)">{{row.tripDesc}}</span>
|
|
|
+ </template>
|
|
|
<template #action="{row, index}">
|
|
|
<el-button hc-btn type="primary" size="small">撤销</el-button>
|
|
|
</template>
|
|
@@ -43,7 +46,7 @@
|
|
|
<HcDialog bgColor="#ffffff" widths="62rem" isToBody :show="importModal" title="草稿箱" @close="importModalClose" isTable >
|
|
|
<el-alert title="3个月内未更新的草稿将被自动删除" type="warning" show-icon/>
|
|
|
<div class="table_box">
|
|
|
- <HcTable :column="drafttableColumn" :datas="drafttableData" ui="hc-test-drop-table" isRowDrop isSort @row-drop="rowDropTap" @row-sort="rowSortTap">
|
|
|
+ <HcTable :column="drafttableColumn" :datas="drafttableData" ui="hc-test-drop-table" isRowDrop isSort @row-drop="rowDropTap" @row-sort="rowSortTap" :loading="draftLoad">
|
|
|
<template #action="{row, index}">
|
|
|
<el-button hc-btn type="primary" size="small" @click="editinfoClick(row)">继续编辑</el-button>
|
|
|
<el-button hc-btn type="primary" size="small">删除</el-button>
|
|
@@ -62,21 +65,22 @@ import 'dayjs/locale/zh-cn'
|
|
|
import {useRouter} from 'vue-router'
|
|
|
import {getTokenHeader} from "~src/api/request/header";
|
|
|
import businessApi from '~api/attendance/business-trip.js';
|
|
|
+import {getArrValue} from "js-fast-way"
|
|
|
const router = useRouter()
|
|
|
onMounted(()=>{
|
|
|
getTableData()
|
|
|
})
|
|
|
|
|
|
const tableColumn = [
|
|
|
- {key: 'name', name: '出差事由'},
|
|
|
- {key: 'key2', name: '关联项目'},
|
|
|
- {key: 'key4', name: '实际出勤天数'},
|
|
|
- {key: 'key5', name: '出差天数'},
|
|
|
- {key: 'key6', name: '同行人'},
|
|
|
- {key: 'key7', name: '审批结果'},
|
|
|
- {key: 'key8', name: '审批状态'},
|
|
|
- {key: 'key9', name: '创建人'},
|
|
|
- {key: 'key10', name: '创建时间'},
|
|
|
+ {key: 'tripDesc', name: '出差事由'},
|
|
|
+ {key: 'projectName', name: '关联项目'},
|
|
|
+ {key: 'duration', name: '实际出勤天数'},
|
|
|
+ {key: 'durationAll', name: '出差天数'},
|
|
|
+ {key: 'fellowTravelerUserNames', name: '同行人'},
|
|
|
+ {key: 'approvalResultName', name: '审批结果'},
|
|
|
+ {key: 'approvalStatusName ', name: '审批状态'},
|
|
|
+ {key: 'createName', name: '创建人'},
|
|
|
+ {key: 'createTime', name: '创建时间'},
|
|
|
{key: 'action', name: '操作' }
|
|
|
|
|
|
|
|
@@ -87,7 +91,7 @@ const tableData = ref([
|
|
|
{name: '名称3', }
|
|
|
])
|
|
|
const searchForm = ref({
|
|
|
- name: '',
|
|
|
+
|
|
|
current: 1, size: 20, total: 0
|
|
|
})
|
|
|
const peopleoption=ref([
|
|
@@ -133,8 +137,8 @@ const importModalClose=()=>{
|
|
|
importModal.value=false
|
|
|
}
|
|
|
const drafttableColumn = [
|
|
|
- {key: 'name', name: '标题'},
|
|
|
- {key: 'text', name: '更新时间'},
|
|
|
+ {key: 'title', name: '标题'},
|
|
|
+ {key: 'updateTime', name: '更新时间'},
|
|
|
{key: 'action', name: '操作',widths:120},
|
|
|
]
|
|
|
const drafttableData = ref([
|
|
@@ -143,7 +147,19 @@ const drafttableData = ref([
|
|
|
|
|
|
|
|
|
])
|
|
|
-
|
|
|
+const draftLoad=ref(false)
|
|
|
+const getdraftTableData = async() => {
|
|
|
+ draftLoad.value = true
|
|
|
+ const {error, code, data} = await businessApi.getDraftList()
|
|
|
+ draftLoad.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ drafttableData.value = getArrValue(data)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ drafttableData.value = []
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
// 行拖拽
|
|
|
const rowDropTap = (rows) => {
|
|
|
tableData.value = rows
|
|
@@ -156,6 +172,7 @@ const rowSortTap = (rows) => {
|
|
|
|
|
|
const toImportTempClick=()=>{
|
|
|
importModal.value=true
|
|
|
+ getdraftTableData()
|
|
|
|
|
|
}
|
|
|
//编辑出差申请
|
|
@@ -172,10 +189,21 @@ const editinfoClick=(row)=>{
|
|
|
router.push({
|
|
|
name: 'attendance-business-trip-info',
|
|
|
query: {
|
|
|
+ id: row.id,
|
|
|
type: 'edit'
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+//查看
|
|
|
+const rowClick = (row) => {
|
|
|
+ router.push({
|
|
|
+ name: 'attendance-business-trip-info',
|
|
|
+ query: {
|
|
|
+ id: row.id,
|
|
|
+ type: 'view'
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
</style>
|