bding 1 سال پیش
والد
کامیت
997a63b241

+ 6 - 12
src/views/contract_manage/components/allocationDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     :title="allocationDetailForm.isDlgType == '关联合同' ? '打分详情' : '派点详情'"
-    :width="`${widthDlg}px`"
+    width="1200px"
     :visible.sync="allocationDetailVisible"
     v-dialogDrag
     :close-on-click-modal="false"
@@ -11,7 +11,7 @@
     :append-to-body="true"
     custom-class="allocation-detail-content_rai"
   >
-    <p>总点数:{{ allNum }}w</p>
+    <p>总点数:{{ allNum }}</p>
     <div class="content-box-table-detail">
       <div class="table-cont table-cont-top">
         <div style="display: flex" v-for="item in datalist" :key="item.ChartPermissionName">
@@ -19,7 +19,7 @@
             {{ item.ChartPermissionName }}
           </div>
           <div :class="['head-column', 'head-column-item-Proportion']">
-            {{ item.Proportion }}
+            {{ item.Money }}
           </div>
         </div>
       </div>
@@ -59,7 +59,6 @@ export default {
     return {
       datalist: [],
       IsGray: false,
-      widthDlg: 600,
       allNum: "",
     };
   },
@@ -79,7 +78,7 @@ export default {
     // 关闭弹框
     handleClose() {
       this.datalist = [];
-      this.widthDlg = 600;
+   
       this.$emit("update:allocationDetailForm", {});
       this.$emit("update:allocationDetailVisible", false);
     },
@@ -99,16 +98,11 @@ export default {
         ShowDetail: true,
       });
       if (res.Ret === 200) {
-        if (res.Data.List.length > 3) {
-          let isWidth = (res.Data.List.length - 3) * 200;
-          this.widthDlg = this.widthDlg + isWidth;
-        }
         this.IsGray = res.Data.IsGray;
         let maxLength = 0;
         res.Data.List &&
           res.Data.List.forEach((item) => {
             if (maxLength < item.List.length) {
-              console.log(1212);
               maxLength = item.List.length;
             }
           });
@@ -117,12 +111,12 @@ export default {
             for (let index = 0; index < maxLength; index++) {
               item.List[index] = {
                 name: item.List[index] ? item.List[index].RealName : "",
-                val: item.List[index] ? item.List[index].Proportion : "",
+                val: item.List[index] ? item.List[index].Money : "",
               };
             }
           });
         this.datalist = res.Data.List;
-        this.allNum = res.Data.Money;
+        this.allNum = res.Data.TotalPointsContent;
       }
     },
   },

+ 4 - 4
src/views/contract_manage/components/allocationLable.vue

@@ -25,16 +25,16 @@
           <el-tag style="margin: 0 10px 5px 0" v-for="item in row.PermissionName.split(',')" :key="item" size="mini">{{ item }}</el-tag>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="IsAllocation" label="状态" width="90">
+      <el-table-column align="center" prop="IsAllocation" label="状态" width="90" v-if="!typeLable">
         <template slot-scope="{ row }">
           <span :style="{ color: row.IsAllocation == 0 ? '#FF8A00' : row.IsAllocation == 1 ? '#67C23A' : '' }">{{ row.IsAllocation == 0 ? "未派点" : row.IsAllocation == 1 ? "已派点" : "" }}</span>
         </template>
       </el-table-column>
+      <el-table-column align="center" prop="MoneyPoint" label="获得派点" width="90" v-if="typeLable"> </el-table-column>
       <el-table-column align="center" prop="ContractCode" label="操作" v-if="!typeLable">
         <template slot-scope="{ row }">
-          <span :class="row.IsGray ? '' : 'editsty'" @click="allocationDetail(row)">派点</span>
-          &nbsp;
-          <span class="editsty" @click="detailsHandler(row)">派点详情</span>
+          <span v-if="row.IsAllocation == 0" :class="row.IsGray ? '' : 'editsty'" @click="allocationDetail(row)">派点</span>
+          <span v-if="row.IsAllocation == 1" class="editsty" @click="detailsHandler(row)">派点详情</span>
         </template>
       </el-table-column>
       <el-table-column align="center" prop="ContractCode" width="110" label="派点详情" v-if="typeLable">

+ 26 - 19
src/views/contract_manage/components/allocationNumber.vue

@@ -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;

+ 6 - 5
src/views/contract_manage/raiAllocationPage.vue

@@ -77,7 +77,7 @@ export default {
     return {
       /* 筛选条件 */
       filterObj: {
-        month: "近1个月",
+        month: "",
         date: [],
         type: "",
         sale: "",
@@ -171,7 +171,8 @@ export default {
         Keyword: this.searchVal,
         AdminId: salesArr.join(","),
         IsAllocation: this.filterObj.status,
-        EndDate: this.filterObj.date,
+        StartDate: this.filterObj.date[0],
+        EndDate: this.filterObj.date[1],
       };
       for (let key in obj) {
         paramStr = `${paramStr}&${key}=${obj[key]}`;
@@ -183,8 +184,7 @@ export default {
   created() {},
   mounted() {
     this.getSale();
-    /* 默认选中近1个月 */
-    this.filterDate(this.filterObj.month === "近1个月" ? 1 : this.filterObj.month === "近2个月" ? 2 : this.filterObj.month === "近3个月" ? 3 : 0);
+    this.getTableData();
   },
   methods: {
     /* 切换月份 */
@@ -230,7 +230,8 @@ export default {
         Keyword: this.searchVal,
         AdminId: salesArr.join(","),
         IsAllocation: this.filterObj.status,
-        EndDate: this.filterObj.date,
+        StartDate: this.filterObj.date[0],
+        EndDate: this.filterObj.date[1],
       });
       if (res.Ret === 200) {
         this.tableList = res.Data.List;

+ 7 - 5
src/views/contract_manage/researcherStatistics.vue

@@ -79,7 +79,7 @@ export default {
     return {
       /* 筛选条件 */
       filterObj: {
-        month: "近1个月",
+        month: "",
         date: [],
         type: "",
         sale: "",
@@ -110,7 +110,8 @@ export default {
       let token = localStorage.getItem("auth") || "";
       let paramStr = "";
       let obj = {
-        EndDate: this.end_date,
+        StartDate: this.filterObj.date[0],
+        EndDate: this.filterObj.date[1],
         Keyword: this.searchVal,
         IsExport: true,
       };
@@ -123,8 +124,7 @@ export default {
   watch: {},
   created() {},
   mounted() {
-    /* 默认选中近1个月 */
-    this.filterDate(this.filterObj.month === "近1个月" ? 1 : this.filterObj.month === "近2个月" ? 2 : this.filterObj.month === "近3个月" ? 3 : 0);
+    this.getTableData();
   },
   methods: {
     /* 切换月份 */
@@ -150,7 +150,8 @@ export default {
     async getTableData() {
       const res = await contractInterface.getAllocationStatistic({
         Keyword: this.searchVal,
-        EndDate: this.filterObj.date,
+        StartDate: this.filterObj.date[0],
+        EndDate: this.filterObj.date[1],
       });
       if (res.Ret === 200) {
         this.datalist = res.Data.List;
@@ -160,6 +161,7 @@ export default {
     },
     // 查看关联合同数
     lookDetailsHadelr(item) {
+      if (item.RealName == "合计" || item.RealName == "平均") return;
       this.isShowDlg = true;
       this.listDlg = item;
     },