|
@@ -89,7 +89,7 @@
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
>
|
|
|
- <a-select v-decorator="['applyVerifyUserId', { rules: [{required: true, message: '审批主管不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select v-decorator="['applyVerifyUserId']" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
v-for="({realName,userId}) in verifyUserList"
|
|
|
:key="userId"
|
|
@@ -131,6 +131,20 @@
|
|
|
v-decorator="['fee']" />
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
+ <row-item>
|
|
|
+ <a-form-item
|
|
|
+ label="实际费用"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.labelCol"
|
|
|
+ >
|
|
|
+ <a-input-number
|
|
|
+ style="width: 100%"
|
|
|
+ :min="0"
|
|
|
+ :formatter="BaseTool.Amount.formatter"
|
|
|
+ :parser="BaseTool.Amount.parser"
|
|
|
+ v-decorator="['actualFee']" />
|
|
|
+ </a-form-item>
|
|
|
+ </row-item>
|
|
|
</row-list>
|
|
|
<row-list :col="1">
|
|
|
<row-item>
|
|
@@ -146,6 +160,44 @@
|
|
|
</row-item>
|
|
|
</row-list>
|
|
|
<row-list :col="1">
|
|
|
+ <row-item>
|
|
|
+ <a-form-item
|
|
|
+ label="相关图片"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
+ >
|
|
|
+ <a-upload
|
|
|
+ :action="uploadUrl"
|
|
|
+ :multiple="true"
|
|
|
+ list-type="picture"
|
|
|
+ :file-list="defaultRepairFileList"
|
|
|
+ @change="handleRepairFileChange"
|
|
|
+ accept="image/*"
|
|
|
+ :headers="headers"
|
|
|
+ >
|
|
|
+ <a-button> <a-icon type="upload" /> 上传图片 </a-button>
|
|
|
+ </a-upload>
|
|
|
+ </a-form-item>
|
|
|
+ </row-item>
|
|
|
+ <row-item>
|
|
|
+ <a-form-item
|
|
|
+ label="相关文件"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol2"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol2"
|
|
|
+ >
|
|
|
+ <a-upload
|
|
|
+ :action="uploadUrl"
|
|
|
+ :multiple="true"
|
|
|
+ :file-list="defaultFileList"
|
|
|
+ @change="handleFileChange"
|
|
|
+ :headers="headers"
|
|
|
+ >
|
|
|
+ <a-button> <a-icon type="upload" /> 上传文件 </a-button>
|
|
|
+ </a-upload>
|
|
|
+ </a-form-item>
|
|
|
+ </row-item>
|
|
|
+ </row-list>
|
|
|
+ <!-- <row-list :col="1">
|
|
|
<row-item>
|
|
|
<a-form-item
|
|
|
label="申请原因"
|
|
@@ -170,7 +222,7 @@
|
|
|
v-decorator="['remark']"/>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
- </row-list>
|
|
|
+ </row-list> -->
|
|
|
</a-form>
|
|
|
<template slot="footer">
|
|
|
<a-popconfirm title="确认要提交?" @confirm="save()">
|
|
@@ -186,7 +238,9 @@ import { addPreparation, updatePreparation } from '@/api/preparation/preparation
|
|
|
import { queryUserByRoleSelfDeptName } from '@/api/upms/user'
|
|
|
import { getDeptTreePreparation } from '@/api/upms/dept'
|
|
|
import { queryBuilding } from '@/api/preparation/building'
|
|
|
-
|
|
|
+import { uploadUrl } from '@/api/upms/file'
|
|
|
+import Vue from 'vue'
|
|
|
+import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
export default {
|
|
|
name: 'BasePreparation',
|
|
|
data () {
|
|
@@ -199,7 +253,16 @@ export default {
|
|
|
verifyUserList: [],
|
|
|
executeDeptList: {},
|
|
|
saveTitle: null,
|
|
|
- companyList: []
|
|
|
+ companyList: [],
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
|
|
|
+ },
|
|
|
+ uploadUrl: uploadUrl,
|
|
|
+ defaultRepairFileList: [],
|
|
|
+ repairFileList: [], // 维修图片,
|
|
|
+ defaultFileList: [], // 维修文件
|
|
|
+ fileList: [],
|
|
|
+ userList: []
|
|
|
// 下拉框map
|
|
|
}
|
|
|
},
|
|
@@ -228,6 +291,26 @@ export default {
|
|
|
this.executeDeptList = res.data
|
|
|
})
|
|
|
},
|
|
|
+ handleFileChange (info) {
|
|
|
+ this.defaultFileList = info.fileList
|
|
|
+ this.fileList = this.setFileList(info, 19)
|
|
|
+ },
|
|
|
+ handleRepairFileChange (info) {
|
|
|
+ this.defaultRepairFileList = info.fileList
|
|
|
+ this.repairFileList = this.setFileList(info, 12)
|
|
|
+ },
|
|
|
+ setFileList (info, type) {
|
|
|
+ const file = info.file
|
|
|
+ const fileList = info.fileList
|
|
|
+ if (file.status === 'done') {
|
|
|
+ return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
|
|
|
+ } else if (file.status === 'removed') {
|
|
|
+ return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
|
|
|
+ } else if (file.status === 'error') {
|
|
|
+ this.$message.error('上传失败')
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ },
|
|
|
base (record, companyList) {
|
|
|
this.visible = true
|
|
|
this.companyList = companyList
|
|
@@ -270,7 +353,8 @@ export default {
|
|
|
'applyReason',
|
|
|
'parentPositionId',
|
|
|
'applyVerifyUserId',
|
|
|
- 'receiveDept'
|
|
|
+ 'receiveDept',
|
|
|
+ 'actualFee'
|
|
|
])))
|
|
|
})
|
|
|
},
|
|
@@ -289,6 +373,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// 日期处理
|
|
|
+ values.imageList = this.repairFileList
|
|
|
+ values.fileList = this.fileList // 维修文件
|
|
|
values.applyTime = this.BaseTool.Date.formatter(values.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
|
|
|
values.limitHours = this.BaseTool.Date.formatter(values.limitHours, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|