|
@@ -0,0 +1,191 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <BackBar title="业务提成申报详情-资产" lefttext="返回" />
|
|
|
+ <van-form>
|
|
|
+ <van-cell-group inset>
|
|
|
+ <van-field label="项目名称" v-model="declareForm.name" name="name" type="textarea" readonly placeholder="-" />
|
|
|
+ <van-field label="订单号" v-model="declareForm.orderId" name="orderId" readonly placeholder="-" />
|
|
|
+ <van-field label="报告号" v-model="declareForm.reportNo" name="reportNo" readonly placeholder="-" />
|
|
|
+ <van-field label="业务分类" v-model="declareForm.businessCate" name="businessCate" readonly placeholder="-" />
|
|
|
+ <van-field label="产品类型" v-model="productionType" name="production" readonly placeholder="-" />
|
|
|
+ <van-field
|
|
|
+ label="提成比例"
|
|
|
+ v-model="declareForm.ratio"
|
|
|
+ name="ratio"
|
|
|
+ type="number"
|
|
|
+ :error="true"
|
|
|
+ :readonly="declareForm.declareBusinessType !== 'COMMISSION_DECLARE_ASSET_EVALUATE' || nodeBusinessInfo.nodeCode !== 'DEPARTMENT_LEADER_CHECK' || !couldEdit"
|
|
|
+ placeholder="-"
|
|
|
+ v-if="declareForm.declareBusinessType === 'COMMISSION_DECLARE_ASSET_EVALUATE'"
|
|
|
+ >
|
|
|
+ <template #button>%</template>
|
|
|
+ </van-field>
|
|
|
+ <van-field
|
|
|
+ label="提成下限"
|
|
|
+ v-model="declareForm.definedLowLimitAmount"
|
|
|
+ name="definedLowLimitAmount"
|
|
|
+ type="number"
|
|
|
+ :error="true"
|
|
|
+ :readonly="declareForm.declareBusinessType !== 'COMMISSION_DECLARE_ASSET_EVALUATE' || nodeBusinessInfo.nodeCode !== 'DEPARTMENT_LEADER_CHECK' || !couldEdit"
|
|
|
+ placeholder="-"
|
|
|
+ v-if="declareForm.declareBusinessType === 'COMMISSION_DECLARE_ASSET_EVALUATE'"
|
|
|
+ >
|
|
|
+ <template #button>元</template>
|
|
|
+ </van-field>
|
|
|
+ <van-field label="当前节点" v-model="currentNode.nodeName" name="nodeName" readonly :error="true" placeholder="-" />
|
|
|
+ <van-field label="申报人" v-model="declareForm.declareUser" name="declareUser" readonly placeholder="-" />
|
|
|
+ <van-field label="申报日期" v-model="declareForm.created" name="created" readonly placeholder="-" />
|
|
|
+ <van-field label="审核状态" v-model="declareForm.declareResult" name="declareResult" readonly placeholder="-" />
|
|
|
+ <van-field label="审核备注" v-model="declareForm.remarks" name="remarks" readonly placeholder="-" />
|
|
|
+ <van-field label="我的意见" v-model="commitInfo.comments" name="comments" placeholder="在此填写审核意见" />
|
|
|
+ <div
|
|
|
+ style="margin: 16px;width:120px;float:right"
|
|
|
+ v-if="declareForm.declareBusinessType === 'COMMISSION_DECLARE_ASSET_EVALUATE' && nodeBusinessInfo.nodeCode === 'DEPARTMENT_LEADER_CHECK' && couldEdit"
|
|
|
+ >
|
|
|
+ <van-button round block type="danger" @click="updateCommissionDeclare()" size="small">修改比例与下限</van-button>
|
|
|
+ </div>
|
|
|
+ <VanTable :option="option" :tableData="declareForm.userShareRates"></VanTable>
|
|
|
+ </van-cell-group>
|
|
|
+ </van-form>
|
|
|
+ <div class="button-style" style="float: left">
|
|
|
+ <van-button type="danger" style="width: 100%" @click="commitNode('TERMINATE')">拒绝</van-button>
|
|
|
+ </div>
|
|
|
+ <div class="button-style" style="float: right">
|
|
|
+ <van-button type="success" style="width: 100%" @click="commitNode('PASS')">通过</van-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { showConfirmDialog } from 'vant';
|
|
|
+import { showNotify } from 'vant';
|
|
|
+import { currentNode } from '@/api/workFlowNodeInstance';
|
|
|
+import { commit } from '@/api/workflow';
|
|
|
+import { detail, updateAssetsCommissionDeclare } from '@/api/commissonDeclare';
|
|
|
+import VanTable from '@/components/VanTable/index.vue';
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { VanTable },
|
|
|
+ computed: {
|
|
|
+ productionType() {
|
|
|
+ if (this.declareForm.production === 'REPORT') {
|
|
|
+ return '评估报告';
|
|
|
+ }
|
|
|
+ if (this.declareForm.production === 'LETTER') {
|
|
|
+ return '意见函';
|
|
|
+ }
|
|
|
+ if (this.declareForm.production === 'CONSULT') {
|
|
|
+ return '咨询报告';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ couldEdit: false,
|
|
|
+ businessId: null,
|
|
|
+ nodeBusinessInfo: {},
|
|
|
+ declareForm: {},
|
|
|
+ users: [],
|
|
|
+ cates: [],
|
|
|
+ currentNode: {},
|
|
|
+ option: {
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '评估人员',
|
|
|
+ tableDataprop: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '提成比例(%)',
|
|
|
+ tableDataprop: 'rate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '参与时长',
|
|
|
+ tableDataprop: 'participationDuration',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '成员类型',
|
|
|
+ tableDataprop: 'memberType',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ commitInfo: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.couldEdit = this.$route.query.couldEdit;
|
|
|
+ this.nodeBusinessInfo.businessId = this.$route.query.businessId;
|
|
|
+ this.nodeBusinessInfo.mainBusiness = this.$route.query.businessType;
|
|
|
+ this.declareForm.declareBusinessType = this.$route.query.businessType;
|
|
|
+ this.getCurrentNode();
|
|
|
+ this.businessId = this.$route.query.businessId;
|
|
|
+ this.getDeclareDetail();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取审核详情
|
|
|
+ getDeclareDetail() {
|
|
|
+ detail(this.businessId).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.declareForm = res.data;
|
|
|
+ this.declareForm.remarks = this.declareForm.remarks.map((item) => (item != null ? String(item) : '')).join(', ');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取当前节点实例
|
|
|
+ getCurrentNode() {
|
|
|
+ if (this.nodeBusinessInfo.businessId) {
|
|
|
+ currentNode({
|
|
|
+ mainBusiness: this.nodeBusinessInfo.mainBusiness,
|
|
|
+ businessId: this.nodeBusinessInfo.businessId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 200 && res.data != null) {
|
|
|
+ this.currentNode = res.data;
|
|
|
+ this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
|
|
|
+ this.nodeBusinessInfo.nodeCode = res.data.nodeCode;
|
|
|
+ console.log(this.currentNode)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 更新资产绩效申报提成比例与下限信息
|
|
|
+ updateCommissionDeclare() {
|
|
|
+ let declareDTO = new Object();
|
|
|
+ declareDTO.id = this.businessId;
|
|
|
+ declareDTO.ratio = this.declareForm.ratio;
|
|
|
+ declareDTO.definedLowLimitAmount = this.declareForm.definedLowLimitAmount;
|
|
|
+ declareDTO.recordId = this.currentNode.tasks[0].recordId;
|
|
|
+ updateAssetsCommissionDeclare(declareDTO).then((res) => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ showNotify({ type: 'success', message: '提成比例与下限信息更新成功' });
|
|
|
+ this.getDeclareDetail();
|
|
|
+ } else {
|
|
|
+ showNotify({ type: 'success', message: '提成比例与下限信息更新失败, 请稍后重试' });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 提交节点
|
|
|
+ commitNode(state) {
|
|
|
+ showConfirmDialog({
|
|
|
+ title: '提交节点',
|
|
|
+ message: '确认提交流程节点?',
|
|
|
+ }).then(() => {
|
|
|
+ this.commitInfo.instanceNodeId = this.currentNode.instanceId;
|
|
|
+ this.commitInfo.state = state;
|
|
|
+ commit(this.commitInfo).then((res) => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ showNotify({ type: 'success', message: '节点提交成功' });
|
|
|
+ history.back();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.button-style {
|
|
|
+ display: inline-block;
|
|
|
+ margin: 20px;
|
|
|
+ width: 100px;
|
|
|
+}
|
|
|
+</style>
|