[update] 企业管理--审核
This commit is contained in:
@@ -50,6 +50,8 @@ const addPackProject = (param) => postAction('/pack/payPackCompanyProject/add',
|
||||
const removePackProject = (param) => postAction('/pack/payPackCompanyProject/remove', param)
|
||||
// 批量取消打包
|
||||
const batchRemovePackProject = (param) => postAction('/pack/payPackCompanyProject/removeBatch', param)
|
||||
// 企业管理审核
|
||||
const aduitCompany = (param) => getAction('/company/payCompanyManagement/audit', param)
|
||||
|
||||
export {
|
||||
getWorkingGroupById,
|
||||
@@ -76,5 +78,6 @@ export {
|
||||
getPackCompanyById,
|
||||
addPackProject,
|
||||
removePackProject,
|
||||
batchRemovePackProject
|
||||
batchRemovePackProject,
|
||||
aduitCompany
|
||||
}
|
||||
|
||||
+3
-2
@@ -599,8 +599,9 @@ export function addZero(e) {
|
||||
// console.log(e.target.value)
|
||||
// 判断是否包含 .
|
||||
let value = e.target.value
|
||||
// 判断是否包含小数点
|
||||
// 判断是否有数据
|
||||
if (value && value !== '') {
|
||||
// 判断是否包含小数点
|
||||
if (value.includes('.')) {
|
||||
// 获取索引
|
||||
let index = value.indexOf('.')
|
||||
@@ -614,7 +615,7 @@ export function addZero(e) {
|
||||
e.target.value = beforePointValue + afterPointValue
|
||||
}else {
|
||||
// 不足2位补0
|
||||
afterPointValue = afterPointValue.padEnd(2,'0')
|
||||
afterPointValue = afterPointValue.padEnd(2,'0')
|
||||
e.target.value = beforePointValue + afterPointValue
|
||||
}
|
||||
}else {
|
||||
|
||||
@@ -63,11 +63,13 @@
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a @click="handleDelete(record.id)">删除</a>
|
||||
<a @click="handleAudit(record.id)" v-if="record.dataSource===2 && record.status===2">审核</a>
|
||||
<a @click="handleAudit(record.id)">审核</a>
|
||||
<!-- v-if="record.dataSource===2 && record.status===2"-->
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<business-management-module ref="modalForm" @ok="modalFormOk"></business-management-module>
|
||||
<business-aduit-module ref="aduitForm"></business-aduit-module>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -78,10 +80,11 @@ import JEllipsis from '@comp/jero/JEllipsis'
|
||||
import BusinessManagementModule from './modules/BusinessManagementModule'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
import BusinessAduitModule from './modules/BusinessAduitModule'
|
||||
|
||||
export default {
|
||||
name: 'BusinessManagement',
|
||||
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle },
|
||||
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle, BusinessAduitModule },
|
||||
mixins: [JeroListMixin],
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
@@ -168,8 +171,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAudit() {
|
||||
|
||||
handleAudit(id) {
|
||||
this.$refs.aduitForm.companyId = id
|
||||
this.$refs.aduitForm.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<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