[update] 企业管理变更--审核
This commit is contained in:
@@ -61,15 +61,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleAudit(record.id)" v-if="record.dataSource===2 && record.status===2">确认</a>
|
||||||
<a @click="handleDelete(record.id)">删除</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
<a @click="handleAudit(record.id)">审核</a>
|
<a @click="handleDelete(record.id)">删除</a>
|
||||||
<!-- v-if="record.dataSource===2 && record.status===2"-->
|
</span>
|
||||||
</span>
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<business-management-module ref="modalForm" @ok="modalFormOk"></business-management-module>
|
<business-management-module ref="modalForm" @ok="modalFormOk"></business-management-module>
|
||||||
<business-aduit-module ref="aduitForm"></business-aduit-module>
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -80,11 +78,11 @@ import JEllipsis from '@comp/jero/JEllipsis'
|
|||||||
import BusinessManagementModule from './modules/BusinessManagementModule'
|
import BusinessManagementModule from './modules/BusinessManagementModule'
|
||||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||||
import BusinessAduitModule from './modules/BusinessAduitModule'
|
import { aduitCompany } from '../../api/incomePaymentsApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BusinessManagement',
|
name: 'BusinessManagement',
|
||||||
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle, BusinessAduitModule },
|
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
@@ -172,8 +170,21 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleAudit(id) {
|
handleAudit(id) {
|
||||||
this.$refs.aduitForm.companyId = id
|
const that = this
|
||||||
this.$refs.aduitForm.open()
|
this.$confirm({
|
||||||
|
title: '确认',
|
||||||
|
content: '确认该单位信息吗?',
|
||||||
|
onOk: function () {
|
||||||
|
aduitCompany({id: id}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.result)
|
||||||
|
that.loadData()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,137 +0,0 @@
|
|||||||
<template>
|
|
||||||
<j-modal
|
|
||||||
:title="title"
|
|
||||||
:width="width"
|
|
||||||
:visible="visible"
|
|
||||||
:confirmLoading="confirmLoading"
|
|
||||||
switchFullscreen
|
|
||||||
@ok="handleOk"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
cancelText="关闭">
|
|
||||||
<a-form :form="form">
|
|
||||||
<a-form-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<a-input placeholder="请输入审核人"
|
|
||||||
v-decorator="['userName',validatorRules.userName]"
|
|
||||||
:maxLength='50'
|
|
||||||
:disabled="true"
|
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<a-radio-group v-decorator="['contractStatus', validatorRules.contractStatus]"
|
|
||||||
@change="contractAuditStatuChange">
|
|
||||||
<a-radio :value="3">通过</a-radio>
|
|
||||||
<a-radio :value="4">拒绝</a-radio>
|
|
||||||
</a-radio-group>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="拒绝说明" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="showExplainRemarks">
|
|
||||||
<a-textarea
|
|
||||||
placeholder="请输入拒绝说明"
|
|
||||||
v-decorator="['explainRemarks', validatorRules.explainRemarks]"
|
|
||||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
|
||||||
:maxLength='200'
|
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
|
||||||
</j-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { aduitCompany } from '../../../api/incomePaymentsApi'
|
|
||||||
import Vue from 'vue'
|
|
||||||
import { USER_INFO } from '../../../store/mutation-types'
|
|
||||||
import pick from 'lodash.pick'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'BusinessAduitModule',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: '审核',
|
|
||||||
width: 600,
|
|
||||||
visible: false,
|
|
||||||
confirmLoading: false,
|
|
||||||
form: this.$form.createForm(this),
|
|
||||||
companyId: '',
|
|
||||||
model: {},
|
|
||||||
labelCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 4 }
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 20 }
|
|
||||||
},
|
|
||||||
validatorRules: {
|
|
||||||
userName: {
|
|
||||||
rules: [{ required: true, message: '请输入审核人' }],
|
|
||||||
validateTrigger: 'blur'
|
|
||||||
},
|
|
||||||
contractStatus: {
|
|
||||||
rules: [{ required: true, message: '请选择审核状态' }],
|
|
||||||
validateTrigger: 'blur'
|
|
||||||
},
|
|
||||||
explainRemarks: {
|
|
||||||
rules: [{ required: true, message: '请输入拒绝说明' }],
|
|
||||||
validateTrigger: 'blur'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showExplainRemarks: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleOk() {
|
|
||||||
// 触发表单验证
|
|
||||||
this.form.validateFields((err, values) => {
|
|
||||||
if (!err) {
|
|
||||||
values.id = this.companyId
|
|
||||||
const formData = Object.assign(this.model, values)
|
|
||||||
console.log('表单提交数据', formData)
|
|
||||||
aduitCompany(formData).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$message.success(res.message)
|
|
||||||
this.$emit('ok')
|
|
||||||
this.close()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
this.confirmLoading = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCancel() {
|
|
||||||
this.close()
|
|
||||||
},
|
|
||||||
open() {
|
|
||||||
let userInfo = Vue.ls.get(USER_INFO)
|
|
||||||
console.log(userInfo)
|
|
||||||
this.model.userName = userInfo.realname
|
|
||||||
this.visible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.form.setFieldsValue(pick(this.model, 'userName'))
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.visible = false
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 控制拒绝说明显隐
|
|
||||||
* @param e
|
|
||||||
*/
|
|
||||||
contractAuditStatuChange(e) {
|
|
||||||
console.log(e.target.value)
|
|
||||||
if (e.target.value === 3) {
|
|
||||||
this.showExplainRemarks = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (e.target.value === 4) {
|
|
||||||
this.showExplainRemarks = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user