|
@@ -9,12 +9,12 @@
|
|
<span>{{ schoolName }}</span>
|
|
<span>{{ schoolName }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="status-bar status-bar--warning">
|
|
<div class="status-bar status-bar--warning">
|
|
- <span>等待我处理</span>
|
|
|
|
|
|
+ <span>{{ approveStatusMap }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- TODO: 配置审核通过/撤销/拒绝 -->
|
|
<!-- TODO: 配置审核通过/撤销/拒绝 -->
|
|
<div class="float-status">
|
|
<div class="float-status">
|
|
-
|
|
|
|
|
|
+ 审核状态标识:{{ dataDetail && dataDetail.status }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -34,14 +34,22 @@
|
|
<!-- @Description 流程化 用到的地方很多 -->
|
|
<!-- @Description 流程化 用到的地方很多 -->
|
|
<!-- ApproveFlowPath -->
|
|
<!-- ApproveFlowPath -->
|
|
<div class="approve-flow-path-box">
|
|
<div class="approve-flow-path-box">
|
|
- <approve-flow-path />
|
|
|
|
|
|
+ <approve-flow-path
|
|
|
|
+ :approve-list="approveList"
|
|
|
|
+ :copys="approveCopyList"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- operate. 操作台 -->
|
|
<!-- operate. 操作台 -->
|
|
<!-- 集成 提醒, 修改, 下载, 拒绝,同意 5种 -->
|
|
<!-- 集成 提醒, 修改, 下载, 拒绝,同意 5种 -->
|
|
<div class="approve-control">
|
|
<div class="approve-control">
|
|
- <approve-control />
|
|
|
|
|
|
+ <approve-control
|
|
|
|
+ :id="id"
|
|
|
|
+ :module="module"
|
|
|
|
+ :flag="pageType"
|
|
|
|
+ :flag-state="dataDetailStatus"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -68,6 +76,8 @@ import ApproveControl from './components/ApproveControl.vue'
|
|
|
|
|
|
import * as ApproveInfoApi from '@/api/approveinfo'
|
|
import * as ApproveInfoApi from '@/api/approveinfo'
|
|
|
|
|
|
|
|
+import { mapState } from 'vuex'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'ExamineDetail',
|
|
name: 'ExamineDetail',
|
|
components: {
|
|
components: {
|
|
@@ -75,12 +85,26 @@ export default {
|
|
ApproveFlowPath,
|
|
ApproveFlowPath,
|
|
ApproveControl
|
|
ApproveControl
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState('enum', [
|
|
|
|
+ 'evectionTypeList',
|
|
|
|
+ ]),
|
|
|
|
+ approveStatusMap () {
|
|
|
|
+ if (!this.dataDetail) return ''
|
|
|
|
+ let status = this.dataDetail.status
|
|
|
|
+ return this.$store.getters['enum/getApproveFlowPathEnum'](status)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ dataDetail: null,
|
|
isAndroid: checkPlatform() === 'android',
|
|
isAndroid: checkPlatform() === 'android',
|
|
isiOS: checkPlatform() === 'iOS',
|
|
isiOS: checkPlatform() === 'iOS',
|
|
|
|
+
|
|
|
|
+ // TODO: 标识标题、学校名称如何获取
|
|
title: '刘辉提交的申请单',
|
|
title: '刘辉提交的申请单',
|
|
schoolName: '深圳市第二特殊教育学校',
|
|
schoolName: '深圳市第二特殊教育学校',
|
|
|
|
+
|
|
datalist: [
|
|
datalist: [
|
|
{
|
|
{
|
|
title: '审批编号',
|
|
title: '审批编号',
|
|
@@ -173,7 +197,13 @@ export default {
|
|
|
|
|
|
pageType: '', // 页面类型 info and approve
|
|
pageType: '', // 页面类型 info and approve
|
|
apiFunc: null, // 接口函数
|
|
apiFunc: null, // 接口函数
|
|
- id: '',
|
|
|
|
|
|
+ id: '', // NOTE: 当前页面的(申请/审核)id
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ approveList: [],
|
|
|
|
+ approveCopyList: [],
|
|
|
|
+ dataDetailStatus: -1,
|
|
|
|
+ module: undefined,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
@@ -202,10 +232,9 @@ export default {
|
|
// NOTE: 页面初始化的模块
|
|
// NOTE: 页面初始化的模块
|
|
__init__ () {
|
|
__init__ () {
|
|
let { id, type } = this.$route.query
|
|
let { id, type } = this.$route.query
|
|
- // type [info, approve]
|
|
|
|
- console.log('orderNo>>', id, type);
|
|
|
|
this.id = id
|
|
this.id = id
|
|
this.pageType = type
|
|
this.pageType = type
|
|
|
|
+
|
|
// TODO: 请求接口&整合数据给予`datalist`字段
|
|
// TODO: 请求接口&整合数据给予`datalist`字段
|
|
this.apiFunc = type === 'info' ? ApproveInfoApi.getDetail : () => {}
|
|
this.apiFunc = type === 'info' ? ApproveInfoApi.getDetail : () => {}
|
|
|
|
|
|
@@ -222,9 +251,14 @@ export default {
|
|
}
|
|
}
|
|
const res = await this.apiFunc(params)
|
|
const res = await this.apiFunc(params)
|
|
if (res.code === 1) {
|
|
if (res.code === 1) {
|
|
- // const { module_info } = res.data
|
|
|
|
- this.datalist = this.formatModuleInfoData(res.data)
|
|
|
|
|
|
+ this.dataDetail = res.data
|
|
console.log(res.data);
|
|
console.log(res.data);
|
|
|
|
+ const { status, module, approve, approve_copy } = res.data
|
|
|
|
+ this.module = module
|
|
|
|
+ this.dataDetailStatus = status
|
|
|
|
+ this.approveList = approve
|
|
|
|
+ this.approveCopyList = approve_copy
|
|
|
|
+ this.datalist = await this.formatModuleInfoData(res.data)
|
|
|
|
|
|
}
|
|
}
|
|
} catch (e) {
|
|
} catch (e) {
|
|
@@ -238,10 +272,15 @@ export default {
|
|
this.$router.push('/approve')
|
|
this.$router.push('/approve')
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
// NOTE: 渲染`module_info`字段函数; 让其更好的渲染
|
|
// NOTE: 渲染`module_info`字段函数; 让其更好的渲染
|
|
- formatModuleInfoData (data) {
|
|
|
|
|
|
+ async formatModuleInfoData (data) {
|
|
const { module, order_no, module_info, department_data } = data
|
|
const { module, order_no, module_info, department_data } = data
|
|
|
|
+ let evectionTypeMap = this.evectionTypeList
|
|
|
|
+ if (module === 5 && evectionTypeMap) {
|
|
|
|
+ let vops = evectionTypeMap.filter(option => (option.id === module_info.type))[0]
|
|
|
|
+ module_info.type_text = vops.name
|
|
|
|
+ }
|
|
|
|
+
|
|
let temporaryList = [
|
|
let temporaryList = [
|
|
{
|
|
{
|
|
title: '审批编号',
|
|
title: '审批编号',
|
|
@@ -268,22 +307,25 @@ export default {
|
|
{ title: '同行人员', value: data.peer_user.map(user => (user.name)).join('、') },
|
|
{ title: '同行人员', value: data.peer_user.map(user => (user.name)).join('、') },
|
|
{ title: '出差开始时间', value: module_info.start_time },
|
|
{ title: '出差开始时间', value: module_info.start_time },
|
|
{ title: '出差结束时间', value: module_info.end_time },
|
|
{ title: '出差结束时间', value: module_info.end_time },
|
|
- { title: '附件材料',
|
|
|
|
|
|
+
|
|
|
|
+ module_info.document_text.length ? { title: '附件材料',
|
|
type: 'files',
|
|
type: 'files',
|
|
value: module_info.document_text
|
|
value: module_info.document_text
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ } : undefined,
|
|
|
|
+
|
|
|
|
+ module_info.images_text.length ? {
|
|
type: 'images',
|
|
type: 'images',
|
|
title: '图片',
|
|
title: '图片',
|
|
value: module_info.images_text
|
|
value: module_info.images_text
|
|
- },
|
|
|
|
|
|
+ } : undefined,
|
|
|
|
+
|
|
{
|
|
{
|
|
title: '类型',
|
|
title: '类型',
|
|
- value: module_info.type
|
|
|
|
|
|
+ value: module_info.type_text
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '是否跨关内关外',
|
|
title: '是否跨关内关外',
|
|
- value: module_info.is_who
|
|
|
|
|
|
+ value: module_info.is_who ? '是' : '否'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: module_info.is_who ? '预算金额' : '备注',
|
|
title: module_info.is_who ? '预算金额' : '备注',
|
|
@@ -292,8 +334,10 @@ export default {
|
|
])
|
|
])
|
|
break
|
|
break
|
|
}
|
|
}
|
|
-
|
|
|
|
- return temporaryList
|
|
|
|
|
|
+ // NOTE: 过滤undefined的数组值
|
|
|
|
+ temporaryList = temporaryList.filter(row => row)
|
|
|
|
+ console.log('%c Render Temporary List >>>', 'background: blue; color: #fff', temporaryList.filter(row => row));
|
|
|
|
+ return Promise.resolve(temporaryList)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeDestroy () {
|
|
beforeDestroy () {
|
|
@@ -301,7 +345,8 @@ export default {
|
|
// 安卓移除回调
|
|
// 安卓移除回调
|
|
dd.off('leftBtnClick', this.handleBackEvent)
|
|
dd.off('leftBtnClick', this.handleBackEvent)
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|