|
@@ -1,8 +1,12 @@
|
|
|
<template>
|
|
|
<div class="container-allocation-number-rai">
|
|
|
- <el-dialog title="派点" :width="`${widthDlg}px`" :visible.sync="allocationVisible" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
|
|
|
- <div>
|
|
|
- <h5>{{ TotalPointsContent }}</h5>
|
|
|
+ <el-dialog title="派点" width="1300px" :visible.sync="allocationVisible" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
|
|
|
+ <div class="top-content">
|
|
|
+ <div>
|
|
|
+ <h5>总点数:{{ TotalPointsContent }}</h5>
|
|
|
+ <el-button style="margin-top: 20px" type="primary" size="mini" @click="averageaAllocation">平均分配</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
<p>
|
|
|
1)单行业套餐只能在对应行业内部分配研究员贡献百分比<br />
|
|
|
2)多行业套餐先在行业间分配百分比(最低不低于平均值的一半),再分配到个人<br />
|
|
@@ -11,7 +15,6 @@
|
|
|
<br />
|
|
|
</p>
|
|
|
</div>
|
|
|
- <el-button style="margin-top: 20px" type="primary" size="mini" @click="averageaAllocation">平均分配</el-button>
|
|
|
<div class="content-box">
|
|
|
<div v-for="item in listArr" :key="item.ChartPermissionName">
|
|
|
<div class="industry-ul">
|
|
@@ -22,7 +25,7 @@
|
|
|
</el-input>
|
|
|
<p style="width: 38px">{{ roundedResult(item) }}</p>
|
|
|
</template>
|
|
|
- <p style="width: 38px; text-align: center" v-else>{{ item.Money }}</p>
|
|
|
+ <p style="width: 38px; height: 32px; line-height: 32px; text-align: center" v-else>{{ item.Money }}</p>
|
|
|
</div>
|
|
|
<div v-for="study in item.List" :key="study.RealName" class="industry-ul">
|
|
|
<span :class="['study-name', item.ChartPermissionName == '买方研选' && 'name-yanxuan']">{{ study.RealName }}</span>
|
|
@@ -32,16 +35,17 @@
|
|
|
</el-input>
|
|
|
<p style="width: 38px">{{ roundedResult(study) }}</p>
|
|
|
</template>
|
|
|
- <p style="width: 38px; text-align: center" v-else>{{ study.Money }}</p>
|
|
|
+ <p style="width: 38px; height: 32px; line-height: 32px; text-align: center" v-else>{{ study.Money }}</p>
|
|
|
</div>
|
|
|
<div class="all-item" v-if="item.ChartPermissionName != '买方研选'">
|
|
|
- {{ allPerCentHandler(item) == 0 ? "" : `总值:${allPerCentHandler(item)}` }}
|
|
|
+ <span> {{ allPerCentHandler(item) == 0 ? "" : `总占比:` }}</span>
|
|
|
+ <span> {{ allPerCentHandler(item) == 0 ? "" : `${allPerCentHandler(item)}` }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
- <el-button type="primary" @click="addAllocationHandler">发 布</el-button>
|
|
|
+ <el-button type="primary" @click="addAllocationHandler">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -68,7 +72,6 @@ export default {
|
|
|
listArr: [],
|
|
|
allNum: 0,
|
|
|
TotalPointsContent: "",
|
|
|
- widthDlg: 500,
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -86,20 +89,20 @@ export default {
|
|
|
// 取消弹框
|
|
|
handleClose() {
|
|
|
this.listArr = [];
|
|
|
- this.widthDlg = 500;
|
|
|
this.$emit("update:allocationForm", {});
|
|
|
this.$emit("update:allocationVisible", false);
|
|
|
},
|
|
|
// 提交弹框
|
|
|
async addAllocationHandler() {
|
|
|
- +this.listArr.forEach((item) => {
|
|
|
+ this.listArr.forEach((item) => {
|
|
|
item.Money = Number(item.Money) || 0;
|
|
|
+ item.Proportion = Number(item.Proportion) || 0;
|
|
|
item.List.forEach((_) => {
|
|
|
_.Money = Number(_.Money) || 0;
|
|
|
+ _.Proportion = Number(_.Proportion) || 0;
|
|
|
});
|
|
|
});
|
|
|
let arrList = this.listArr;
|
|
|
- console.log(arrList);
|
|
|
const res = await contractInterface.getAllocationDetailUpdate({
|
|
|
CompanyContractId: this.allocationForm.CompanyContractId,
|
|
|
List: arrList,
|
|
@@ -125,7 +128,7 @@ export default {
|
|
|
allPerCentHandler(item) {
|
|
|
let num = 0;
|
|
|
item && item.List.forEach((key) => (num = num + +key.Proportion));
|
|
|
- return num;
|
|
|
+ return num.toFixed(2);
|
|
|
},
|
|
|
// 获取数据
|
|
|
async getList() {
|
|
@@ -133,10 +136,6 @@ export default {
|
|
|
CompanyContractId: this.allocationForm.CompanyContractId,
|
|
|
});
|
|
|
if (res.Ret === 200) {
|
|
|
- if (res.Data.List.length > 2) {
|
|
|
- let isWidth = (res.Data.List.length - 2) * 260;
|
|
|
- this.widthDlg = this.widthDlg + isWidth;
|
|
|
- }
|
|
|
this.allNum = res.Data.Money;
|
|
|
this.listArr = res.Data.List;
|
|
|
this.TotalPointsContent = res.Data.TotalPointsContent;
|
|
@@ -164,6 +163,10 @@ export default {
|
|
|
<style lang="scss">
|
|
|
.container-allocation-number-rai {
|
|
|
overflow: hidden;
|
|
|
+ .top-content {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
.content-box {
|
|
|
display: flex;
|
|
|
.industry-ul {
|
|
@@ -179,7 +182,7 @@ export default {
|
|
|
.industry-name {
|
|
|
width: 58px;
|
|
|
flex-shrink: 0;
|
|
|
- font-weight: 500;
|
|
|
+ font-weight: 800;
|
|
|
font-size: 16px;
|
|
|
line-height: 22px;
|
|
|
}
|
|
@@ -199,9 +202,13 @@ export default {
|
|
|
display: flex;
|
|
|
padding-right: 15px;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ // justify-content: center;
|
|
|
color: #999;
|
|
|
font-size: 14px;
|
|
|
+ span {
|
|
|
+ display: inline-block;
|
|
|
+ width: 80px;
|
|
|
+ }
|
|
|
}
|
|
|
.name-yanxuan {
|
|
|
width: 65px !important;
|