187 lines
5.3 KiB
Vue
187 lines
5.3 KiB
Vue
<template>
|
|
<div class="AuditOperationBox">
|
|
<el-form
|
|
ref="examineForm"
|
|
:model="examineForm"
|
|
:rules="examineFormRules"
|
|
size="medium"
|
|
class="label-input-form prc-content-border">
|
|
<!-- <el-row :gutter="24">-->
|
|
<!-- <el-col :span="9">-->
|
|
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
|
|
<!-- label-width="132px" class="add-form-item"-->
|
|
<!-- :class="{'form-item-disabled': formdisableflag}">-->
|
|
<!-- <el-date-picker-->
|
|
<!-- v-model="examineForm.date"-->
|
|
<!-- type="date"-->
|
|
<!-- placeholder="选择赋权时间">-->
|
|
<!-- </el-date-picker>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
|
|
<template slot="label">审批意见:</template>
|
|
<el-input :disabled="formdisableflag" :maxlength='1000'
|
|
v-model="examineForm.approvalOpinion"
|
|
placeholder="请输入审批意见"
|
|
:autosize="{ minRows: 2, maxRows: 4}"
|
|
type="textarea"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<process-footer
|
|
v-if="!isDisable"
|
|
showCancel
|
|
:show-transfer="isShowTran"
|
|
:show-agree="isAgree"
|
|
:show-no-agree="isNoAgree"
|
|
:btyLoading="isBty"
|
|
:tyLoading="isTy"
|
|
@transfer="handleTransfer"
|
|
@submit="handleSubmit"
|
|
></process-footer>
|
|
<!-- <el-row :gutter="24">-->
|
|
<!-- <el-col :span="24">-->
|
|
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
|
|
<!-- :class="{'form-item-disabled': formdisableflag}">-->
|
|
<!-- <el-button-->
|
|
<!-- size="small"-->
|
|
<!-- class="form-upload-btn"-->
|
|
<!-- icon="el-icon-upload"-->
|
|
<!-- @click="clickButtonToUpload('approvalFile')"-->
|
|
<!-- >-->
|
|
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
|
|
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
|
|
<!-- </el-button>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import processFooter from '@/components/ProcessFooter'
|
|
|
|
export default {
|
|
name: 'AuditOperation',
|
|
components:{
|
|
processFooter,
|
|
|
|
},
|
|
props: {
|
|
isDisable:{
|
|
type:Boolean,
|
|
default:false
|
|
},
|
|
examine:{
|
|
type:Object
|
|
},
|
|
taskId:{
|
|
type:String,
|
|
default:''
|
|
},
|
|
prcId:{
|
|
type:String,
|
|
default:''
|
|
},
|
|
prcType:{
|
|
type:Number,
|
|
default:''
|
|
}
|
|
},
|
|
|
|
data () {
|
|
return {
|
|
isBty:false,
|
|
isTy:false,
|
|
isNoAgree: true,
|
|
isAgree: true,
|
|
visibleTree: false,
|
|
isSubmit: false,
|
|
tranLoading: false,
|
|
isShowTran: true,
|
|
isShowSubmit: true,
|
|
examineForm: {
|
|
planReasonFile: '',
|
|
oldName: '',
|
|
flag: '1',
|
|
approvalOpinion: ''
|
|
},
|
|
examineFormRules: {
|
|
flag: [
|
|
{ required: true, message: '审核结果不能为空', trigger: 'change' }
|
|
],
|
|
approvalOpinion: [
|
|
{ type: 'string', max: 500, message: '审批意见不能超过500个字符', trigger: 'blur' }
|
|
]
|
|
},
|
|
formdisableflag: false
|
|
|
|
}
|
|
},
|
|
created () {
|
|
// 判断穿过来的query里的参数 是不是查看
|
|
if (this.isDisable) {
|
|
this.examineForm = this.examine
|
|
this.formdisableflag = true
|
|
}
|
|
},
|
|
methods: {
|
|
handleTransfer(){
|
|
debugger
|
|
this.$emit('handleTransfer')
|
|
},
|
|
handleSubmit(type) {
|
|
debugger
|
|
if(type=='n'){
|
|
// 校验原因是否填写
|
|
this.examineForm.flag=2
|
|
if(this.examineForm.approvalOpinion==''){
|
|
this.$message.warning("请您填写原因")
|
|
return
|
|
}
|
|
}else{
|
|
this.examineForm.flag=1
|
|
}
|
|
this.$emit('handleSubmit')
|
|
|
|
// if (this.$refs.operationRef.submit()) {
|
|
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
|
|
|
|
},
|
|
/** 在提交表单的校验 通过继续执行 */
|
|
submit () {
|
|
let v
|
|
this.$refs.examineForm.validate((valid) => {
|
|
v=valid
|
|
if (valid) {
|
|
|
|
return true
|
|
} else {
|
|
this.$message.warning('请检查表单是否填写正确')
|
|
return false
|
|
}
|
|
})
|
|
return v
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.AssignButton {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.AssignButton:hover {
|
|
cursor: pointer;
|
|
}
|
|
</style>
|