|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
|
<div class="type6-container">
|
|
|
- <c-input title="呈批类型" :required="true" v-model="type" />
|
|
|
+ <div class="btn-container" @click="handleNavRightBack">
|
|
|
+ <div class="btn-span">我的呈批</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <c-select title="呈批类型" :required="true" v-model="type" :list="offerList" pickerValueKey="name" pickerValueId="id" />
|
|
|
|
|
|
<c-input title="发文字号" :required="true" v-model="word_size" />
|
|
|
|
|
@@ -16,13 +20,11 @@
|
|
|
<c-files v-model="document" />
|
|
|
|
|
|
<c-flow-path :approve="approvePeople" :copy="copyPeople" :isAllowCopy="isCopy" />
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
-
|
|
|
<script>
|
|
|
+
|
|
|
/**
|
|
|
* @description 呈批申请页面
|
|
|
*/
|
|
@@ -30,46 +32,72 @@
|
|
|
import indexMixin from '../indexMixins'
|
|
|
import { postCreateInfo } from '@/api/approveinfo'
|
|
|
import { editApprove } from '@/api/approve'
|
|
|
-
|
|
|
+import { settingNavigationRight, settingNavigationTitle } from '@/utils/dingtalk';
|
|
|
|
|
|
export default {
|
|
|
name: 'IndexType2',
|
|
|
mixins: [
|
|
|
indexMixin
|
|
|
],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- postApi: null,
|
|
|
- degreeList: this.$store.state.enum.degreeList,
|
|
|
-
|
|
|
- // formData start
|
|
|
- way: 'create', // create/update/edit
|
|
|
- id: '',
|
|
|
- module: 2,
|
|
|
- reason: '', // 申请标题
|
|
|
- type: '', // 呈批类型
|
|
|
- desc: '', // 缓急程度
|
|
|
- document: [], // 附件
|
|
|
- remark: '', // 申请内容
|
|
|
- word_size: '', // 发文字号
|
|
|
- number: '', // 印制份数
|
|
|
-
|
|
|
- approve_user: [],
|
|
|
- copy_user: []
|
|
|
- // formData end
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
+ data: () => ({
|
|
|
+ postApi: null,
|
|
|
+ degreeList: [],
|
|
|
+ offerList: [],
|
|
|
+
|
|
|
+ // formData start
|
|
|
+ way: 'create', // create/update/edit
|
|
|
+ id: '',
|
|
|
+ module: 2,
|
|
|
+ reason: '', // 申请标题
|
|
|
+ type: '', // 呈批类型
|
|
|
+ desc: '', // 缓急程度
|
|
|
+ remark: '', // 申请内容
|
|
|
+ word_size: '', // 发文字号
|
|
|
+ number: '', // 印制份数
|
|
|
+ document: [], // 附件
|
|
|
+
|
|
|
+ approve_user: [],
|
|
|
+ copy_user: []
|
|
|
+ // formData end
|
|
|
+ }),
|
|
|
created() {
|
|
|
+ // SetList
|
|
|
+ this.degreeList = this.$store.state.enum.degreeList
|
|
|
+ this.offerList = this.$store.state.enum.offerTypeList
|
|
|
+
|
|
|
this.getCommonFlowPathData()
|
|
|
+
|
|
|
this.postApi = this.flag === 'approve' ? editApprove : postCreateInfo
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
+
|
|
|
+ // NOTE: 设置标题等
|
|
|
+ navigationSetting() {
|
|
|
+ settingNavigationTitle({
|
|
|
+ title: '出差申请'
|
|
|
+ })
|
|
|
+ settingNavigationRight({
|
|
|
+ show: true,
|
|
|
+ control: true,
|
|
|
+ text: '我的出差',
|
|
|
+ callback: this.handleNavRightBack
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleNavRightBack(result) {
|
|
|
+ console.log('result', result);
|
|
|
+ this.$router.push({
|
|
|
+ name: 'ApplyState',
|
|
|
+ query: {
|
|
|
+ type: this.module,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取编辑数据
|
|
|
handleFormatEditData(data) {
|
|
|
console.log('%c edit data type6 >>>', 'background: blue; color: #fff', data);
|
|
|
},
|
|
|
+
|
|
|
/**
|
|
|
* @description 提交数据默认函数
|
|
|
*/
|
|
@@ -81,6 +109,7 @@ export default {
|
|
|
console.log('execute handleSubmitData', formData);
|
|
|
this.__post__(formData)
|
|
|
},
|
|
|
+
|
|
|
__format_data__() {
|
|
|
let templateObj = {
|
|
|
way: this.way,
|
|
@@ -91,17 +120,12 @@ export default {
|
|
|
remark: this.remark,
|
|
|
word_size: this.word_size,
|
|
|
number: this.number,
|
|
|
-
|
|
|
approve_user: this.approvePeople.map(user => (user.userid || user.emplId)).join(','),
|
|
|
copy_user: this.copyPeople.map(user => (user.userid || user.emplId)).join(',')
|
|
|
}
|
|
|
|
|
|
- let images = this.images
|
|
|
- if (Array.isArray(images) && images.length) {
|
|
|
- templateObj.images = images.map(image => image.url).join(',')
|
|
|
- }
|
|
|
-
|
|
|
let documents = this.document
|
|
|
+
|
|
|
if (Array.isArray(documents) && documents.length) {
|
|
|
templateObj.document = documents.map(document => document.url).join(',')
|
|
|
}
|
|
@@ -109,6 +133,7 @@ export default {
|
|
|
if (this.id) templateObj.id = this.id
|
|
|
return templateObj
|
|
|
},
|
|
|
+
|
|
|
validate(data) {
|
|
|
let mapTxt = {
|
|
|
'type': '呈批类型',
|
|
@@ -144,4 +169,4 @@ export default {
|
|
|
},
|
|
|
}
|
|
|
|
|
|
-</script>
|
|
|
+</script>
|