<template>
|
<a-modal
|
:title="title"
|
:width="1200"
|
:visible="visible"
|
:confirmLoading="confirmLoading"
|
:maskClosable="false"
|
@ok="handleOk"
|
@cancel="handleCancel">
|
|
<template slot="footer">
|
<a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
<a-button style="margin-right: .8rem">取消</a-button>
|
</a-popconfirm>
|
|
<a-button type="primary" :loading="confirmLoading" @click="handleOk()">
|
保存
|
</a-button>
|
</template>
|
|
<a-spin :spinning="confirmLoading">
|
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
<!-- 主表单区域 -->
|
<a-card :bordered="false" size="small" title="项目产品奖励办法">
|
|
<a-row class="form-row" :gutter="16">
|
|
<a-col :lg="8">
|
|
<a-form-model-item label="奖励方式" prop="type">
|
<j-dict-select-tag disabled @input="changeRewardType" v-model="model.type" placeholder="请选奖励方式"
|
dictCode="bonus_type" />
|
</a-form-model-item>
|
|
</a-col>
|
|
<a-col :lg="8">
|
|
<a-form-model-item label="奖金基数(默认3万元)" prop="base">
|
<a-input-number v-model="model.base" placeholder="请输入奖金基数" />
|
</a-form-model-item>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-card>
|
|
<div v-show="showModel1">
|
<a-tabs v-model="curPage" @change="tabCallback">
|
<a-tab-pane key="1" tab="新技术产品分类">
|
|
<a-collapse v-model="productKey" style="margin-top: 20px" accordion>
|
<template #expandIcon="props">
|
<a-icon type="caret-right" :rotate="props.isActive ? 90 : 0" />
|
</template>
|
<a-collapse-panel key="1" header="新技术产品分类" class="customStyle">
|
|
<a-form-model-item label="由技术副总,研发总监,技术专家和总工参与,从领域先进性和创新性维度评定,一般采用行业领域对标方法,对于无法对标情况,可由评定小组直接评议:" prop="xmJsfl">
|
<a-radio-group v-model="model.xmJsfl" @change="finishPage(1)">
|
<a-radio class="m5" :value="1">
|
A:技术能力对标同领域国际前三名技术水平,达到国际领先水平。(1)
|
</a-radio>
|
<a-radio class="m5" :value="0.6">
|
B:技术能力对标同领域国际前十名技术水平,达到国际先进水平。(0.6)
|
</a-radio>
|
<a-radio class="m5" :value="0.3">
|
C:技术能力对标同领域国内前三名技术水平达到国内先进水平。(0.3)
|
</a-radio>
|
<a-radio class="m5" :value="0.15">
|
D:不具对标优势,公司关键应用技术的填平补齐。(0.15)
|
</a-radio>
|
</a-radio-group>
|
</a-form-model-item>
|
<!-- <a-icon slot="extra" type="setting" />-->
|
<label slot="extra" style="background: transparent" type="setting"> {{ model.xmJsfl}}</label>
|
|
</a-collapse-panel>
|
</a-collapse>
|
|
</a-tab-pane>
|
<a-tab-pane key="2" tab="研发难度分类" force-render>
|
<a-collapse v-model="diffKey" style="margin-top: 20px" accordion>
|
<template #expandIcon="props">
|
<a-icon type="caret-right" :rotate="props.isActive ? 90 : 0" />
|
</template>
|
<a-collapse-panel key="1" header="研发难度分类" class="customStyle">
|
|
<a-form-model-item label="由技术副总,研发总监,技术专家参与,从资源条件限制维度评定:" prop="xmNdfl">
|
<a-radio-group v-model="model.xmNdfl" >
|
|
<a-radio class="m5" :value="1">
|
A:设计开发难度很高,需投入很多研发资源,缺少相关技术积累,全新技术或平台。(1)
|
</a-radio>
|
<a-radio class="m5" :value="0.6">
|
B:设计开发难度较高,需投入研发资源适中;四成技术已经掌握,仍有六成技术需要研发;已有技术平台的较大幅度升级。(0.6)
|
</a-radio>
|
<a-radio class="m5" :value="0.3">
|
C:根据现有技术积累和资源条件,六成技术已经掌握,仍有四成需要研发;已有技术平台的升级。(0.3)
|
</a-radio>
|
<a-radio class="m5" :value="0.15">
|
D:设计开发难度一般,需投入研发资源少,已有技术,平台或产品的迭代升级。(0.15)
|
</a-radio>
|
</a-radio-group>
|
</a-form-model-item>
|
<label slot="extra" style="background: transparent" type="setting"> {{model.xmNdfl}}</label>
|
|
</a-collapse-panel>
|
</a-collapse>
|
</a-tab-pane>
|
|
</a-tabs>
|
</div>
|
|
|
</a-form-model>
|
</a-spin>
|
|
|
</a-modal>
|
</template>
|
|
<script>
|
import JSelectUserByDepModal from '@/components/jeecgbiz/modal/JSelectUserByDepModal'
|
import { httpAction, getAction, postAction, putAction } from '@/api/manage'
|
import pick from 'lodash.pick'
|
|
export default {
|
name: 'DeXmModal',
|
components: {
|
JSelectUserByDepModal
|
},
|
|
data() {
|
|
return {
|
title: '项目定额',
|
visible: false,
|
form: this.$form.createForm(this),
|
showModel1: true, //根据选择的奖励方式显示UI 默认为model1
|
productKey: ['1'], //折叠面板默认打开第一个
|
diffKey: ['1'], //折叠面板默认打开第一个
|
curPage: '1',
|
model: {},
|
labelCol: {
|
xs: { span: 24 },
|
sm: { span: 5 }
|
},
|
wrapperCol: {
|
xs: { span: 24 },
|
sm: { span: 16 }
|
},
|
confirmLoading: false,
|
validatorRules: {
|
xmNdfl: [{ required: true, message: '请选择研发难度分类!' }],
|
xmJsfl: [{ required: true, message: '请选择新技术产品分类!' }],
|
type: [{ required: true, message: '请选择奖励方式!' }],
|
base: [{ required: true, message: '请输入奖金基数!' }]
|
|
},
|
url: {
|
xm: '/bon/quota/xm',
|
query: '/bon/quota/query',
|
}
|
}
|
},
|
created() {
|
|
},
|
computed: {},
|
watch: {},
|
methods: {
|
|
edit(id) {
|
this.visible = true
|
let res = {}
|
res.id = id
|
res.base = 30000//
|
res.type = 3 //
|
// res.environment = 0.5
|
this.model = Object.assign({}, res)
|
console.info(this.model)
|
|
getAction(this.url.query, { id: this.model.id }).then((res) => {
|
if (res.success) {
|
this.loading = false
|
this.model = res.result
|
}
|
}).finally(() => {
|
this.loading = false
|
})
|
|
},
|
changeRewardType(value) {
|
//显示第一种奖励方案的
|
if (value == 1) {
|
this.showModel1 = true
|
} else {
|
this.showModel1 = false
|
}
|
},
|
|
handleCancel() {
|
this.close()
|
},
|
|
|
|
handleOk() {
|
let that = this
|
this.$refs.form.validate(valid => {
|
if (valid) {
|
console.info(this.model)
|
putAction(this.url.xm,this.model).then((res) => {
|
that.confirmLoading = false
|
if (res.success) {
|
that.close()
|
that.$message.success(res.message)
|
that.$emit('ok', res.result)
|
that.close()
|
} else {
|
that.$message.warning(res.message)
|
}
|
}).finally(() => {
|
that.confirmLoading = false
|
|
})
|
|
|
//市场机会系数= 以上各项分值之和
|
/* let market = this.model.environment + this.model.strategy + this.model.profit + this.model.demand
|
market = market.toFixed(1)
|
// 项目奖金定额 = 市场机会系数*技术成熟度系数(technology)*项目工作量系数* 5万元
|
let quantum = market * this.model.technology * this.model.workcoe * this.model.normalBonus * 1000
|
quantum = quantum.toFixed(0)
|
/!*console.info('市场机会系数:'+market);
|
console.info('技术成熟度系数:'+this.model.technology );
|
console.info('项目工作量系数:'+this.model.workcoe);
|
console.info('项目工作量系数:'+this.model.workcoe /10);
|
console.info('奖金基数:'+this.model.normalBonus);
|
console.info('项目奖金定额:'+quantum);*!/
|
that.model.quantum = quantum
|
that.handleRequest()*/
|
} else {
|
that.$message.warning('请先完成表格填写!')
|
}
|
|
})
|
|
},
|
close() {
|
this.$emit('close')
|
this.visible = false
|
},
|
workCoeChange(value) {
|
|
},
|
finishPage(page) {
|
let that = this
|
setTimeout(function() {
|
that.curPage = page + 1 + ''
|
}, 1000)
|
},
|
tabCallback(key) {
|
|
}
|
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.m5 {
|
margin-top: 5px;
|
}
|
|
.customStyle {
|
background: #ffffff;
|
border-radius: 4px;
|
|
|
}
|
|
.ant-radio-wrapper {
|
width: 100%;
|
}
|
|
.logo {
|
height: 300px;
|
vertical-align: top;
|
margin-right: 16px;
|
border-style: none;
|
}
|
|
</style>
|