zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<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>