|
@@ -1,117 +0,0 @@
|
|
|
-<template>
|
|
|
- <el-dialog
|
|
|
- title="审批"
|
|
|
- width="70%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :visible.sync="visible">
|
|
|
- <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
|
|
|
- <el-row class="my-row">
|
|
|
- <el-form-item label="处理意见" prop="remark">
|
|
|
- <el-input type="textarea" v-model="dataForm.remark" placeholder="处理意见"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row class="my-row">
|
|
|
- <upload-component :display="display" :title="'审批附件'" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dataFormSubmit(2)">不同意</el-button>
|
|
|
- <el-button type="primary" @click="dataFormSubmit(1)">同意</el-button>
|
|
|
- <el-button type="danger" @click="dataFormSubmit(3)">驳回</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- // import { getcoCode, getReviewType, getreDetail } from '@/api/cus'
|
|
|
- import UploadComponent from '../common/upload-component'
|
|
|
- export default {
|
|
|
- name: 'notice-add-or-update',
|
|
|
- components: {UploadComponent},
|
|
|
- data () {
|
|
|
- return {
|
|
|
- visible: false,
|
|
|
- dictType: 'material_type',
|
|
|
- options: [],
|
|
|
- options1: [],
|
|
|
- dataList: [],
|
|
|
- fileList: [],
|
|
|
- id: 0,
|
|
|
- dataForm: {
|
|
|
- notes: '',
|
|
|
- attachList: [],
|
|
|
- busiId: ''
|
|
|
- },
|
|
|
- dataRule: {
|
|
|
- remark: [{ required: true, message: '处理意见不能为空', trigger: 'blur' }]
|
|
|
- },
|
|
|
- display: false
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async init (id, disabled) {
|
|
|
- this.visible = true
|
|
|
- this.id = id || 0
|
|
|
- this.dataForm = {
|
|
|
- notes: '',
|
|
|
- attachList: [],
|
|
|
- busiId: ''
|
|
|
- }
|
|
|
- this.dataForm.busiId = id
|
|
|
- },
|
|
|
- uploadSuccess (fileList) {
|
|
|
- this.fileList = fileList
|
|
|
- },
|
|
|
- // 表单提交
|
|
|
- dataFormSubmit (val) {
|
|
|
- this.$refs['dataForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- // 添加附件
|
|
|
- let fList = this.fileList
|
|
|
- if (fList.length > 0) {
|
|
|
- this.dataForm.attachList = []
|
|
|
- for (let i = 0; i < fList.length; i++) {
|
|
|
- this.dataForm.attachList.push({
|
|
|
- fileName: fList[i].name,
|
|
|
- url: fList[i].url
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- this.$http({
|
|
|
- url: this.$http.adornUrl(`/biz-service/business/approval`),
|
|
|
- method: 'post',
|
|
|
- data: this.$http.adornData({...this.dataForm, approvalType: val})
|
|
|
- }).then(({data}) => {
|
|
|
- if (data && data.code === '200') {
|
|
|
- this.$message({
|
|
|
- message: '操作成功',
|
|
|
- type: 'success',
|
|
|
- duration: 1500,
|
|
|
- onClose: () => {
|
|
|
- this.visible = false
|
|
|
- this.$emit('refreshDataList')
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message.error(data.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- validateField (type) {
|
|
|
- this.$refs.dataForm.validateField(type)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped>
|
|
|
-.my-line{
|
|
|
- border-bottom: 1px solid #c0c4cc;
|
|
|
- margin-bottom: 10px;
|
|
|
-}
|
|
|
-.title{
|
|
|
- padding: 10px 0 ;
|
|
|
-}
|
|
|
-</style>
|