From 637e1f3a199d007cc8ae870f15eac2eb31f0f6c7 Mon Sep 17 00:00:00 2001
From: HK <461671400@qq.com>
Date: Tue, 10 Mar 2020 17:28:53 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../administrative/CommissionManagement.vue   | 309 ++++++++----------
 .../administrative/DjCommissionDetail.vue     |   6 -
 .../administrative/QzCommissionDetail.vue     |   6 -
 .../administrative/departmentManagement.vue   |   1 -
 4 files changed, 140 insertions(+), 182 deletions(-)

diff --git a/src/components/administrative/CommissionManagement.vue b/src/components/administrative/CommissionManagement.vue
index dbc40bc96..5505180d7 100644
--- a/src/components/administrative/CommissionManagement.vue
+++ b/src/components/administrative/CommissionManagement.vue
@@ -1,25 +1,20 @@
 <style>
-.CM_look {
-  padding: 4px !important;
-  position: relative;
-  top: 1px;
-}
-.TCommission-finance {
-  font-size: 12px;
-  text-decoration: underline;
-  cursor: pointer;
-  margin-right: 5px;
-}
+  .CM_look {
+    padding: 4px !important;
+    position: relative;
+    top: 1px;
+  }
+
+  .TCommission-finance {
+    font-size: 12px;
+    text-decoration: underline;
+    cursor: pointer;
+    margin-right: 5px;
+  }
+
 </style>
 <template>
   <div class="flexOne">
-    <!-- <div class="query-box">
-      <ul>
-        <li>
-            <input type="button" class="normalBtn" @click="generateTable" value="生成提成报表"/>
-        </li>
-      </ul>
-    </div>-->
     <table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <th>期数</th>
@@ -32,179 +27,155 @@
       </tr>
       <tr v-for="(item,index) in dataList" :key="index">
         <td>{{item.periods}}</td>
-        <td
-          v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49"
-        >{{item.sumPrice.toFixed(2)}}</td>
+        <td v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49">{{item.sumPrice.toFixed(2)}}</td>
         <td>{{item.createByStr}}</td>
         <td>{{item.branchMoney.toFixed(2)}}</td>
         <td>
-          <span
-            class="TCommission-finance"
-            v-for="(fno, i) in item.financialsArray"
-            :key="i"
-            @click="goUrl2(fno)"
-          >{{fno}}</span>
+          <span class="TCommission-finance" v-for="(fno, i) in item.financialsArray" :key="i"
+            @click="goUrl2(fno)">{{fno}}</span>
         </td>
         <td>{{item.createStr}}</td>
         <td>
           <el-tooltip class="item" effect="dark" content="查看" placement="top">
-            <el-button
-              type="primary"
-              class="CM_look"
-              @click="goUrl('CommissionDetail',item.id)"
-              icon="iconfont icon-chakan"
-              title="查看"
-              circle
-            ></el-button>
+            <el-button type="primary" class="CM_look" @click="goUrl('CommissionDetail',item.id)"
+              icon="iconfont icon-chakan" title="查看" circle></el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" content="制单" placement="top">
-            <el-button v-if="btnShow"
-              type="primary"
-              class="CM_look"
-              @click="generalFinancacls(item)"
-              icon="el-icon-plus"
-              title="制单"
-              circle
-            ></el-button>
+            <el-button v-if="btnShow" type="primary" class="CM_look" @click="generalFinancacls(item)"
+              icon="el-icon-plus" title="制单" circle></el-button>
           </el-tooltip>
         </td>
       </tr>
     </table>
     <!-- 分页 -->
-    <el-pagination
-      background
-      @current-change="handleCurrentChange"
-      :current-page.sync="currentPage"
-      layout="total,prev, pager, next, jumper"
-      :page-size="msg.PageSize"
-      :total="total"
-    ></el-pagination>
+    <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
+      layout="total,prev, pager, next, jumper" :page-size="msg.PageSize" :total="total"></el-pagination>
   </div>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      msg: {
-        PageIndex: 1,
-        PageSize: 20
-      },
-      loading: false,
-      //数据源
-      dataList: [],
-      total: 0,
-      currentPage: 1,
-      userInfo: {},
-      btnShow:false,
-    };
-  },
-  mounted() {
-    this.getList();
-    this.userInfo = this.getLocalStorage();
-    let userInfo = this.getLocalStorage();
-    let ActionMenuCode=userInfo.ActionMenuCode;
-      if(ActionMenuCode.indexOf('CommissionVoucher')!=-1){
-        this.btnShow=true;
-      }
-  },
-  methods: {
-    handleCurrentChange(val) {
-      this.msg.PageIndex = val;
-      this.getList();
+  export default {
+    data() {
+      return {
+        msg: {
+          PageIndex: 1,
+          PageSize: 20
+        },
+        loading: false,
+        //数据源
+        dataList: [],
+        total: 0,
+        currentPage: 1,
+        userInfo: {},
+        btnShow: false,
+      };
     },
-    goUrl(path, id) {
-      this.$router.push({
-        path: path,
-        query: {
-          ParentId: id,
-          blank: "y",
-          tab: "报价详情"
-        }
-      });
+    mounted() {
+      this.getList();
+      this.userInfo = this.getLocalStorage();
+      let userInfo = this.getLocalStorage();
+      let ActionMenuCode = userInfo.ActionMenuCode;
+      if (ActionMenuCode.indexOf('CommissionVoucher') != -1) {
+        this.btnShow = true;
+      }
     },
-    //获取数据
-    getList() {
-      this.loading = true;
-      this.apipost(
-        "sellcommission_GetPageList",
-        this.msg,
-        res => {
-          this.loading = false;
-          if (res.data.resultCode == 1) {
-            this.dataList = res.data.data.pageData;
-            this.total = res.data.data.count;
-            this.dataList.forEach(x => {
-              if (x.financials && x.financials.length > 0) {
-                x.financialsArray = x.financials.split(",");
-              }
-            });
-          } else {
-            this.Error(res.data.message);
+    methods: {
+      handleCurrentChange(val) {
+        this.msg.PageIndex = val;
+        this.getList();
+      },
+      goUrl(path, id) {
+        this.$router.push({
+          path: path,
+          query: {
+            ParentId: id,
+            blank: "y",
+            tab: "报价详情"
           }
-        },
-        null
-      );
-    },
-    goUrl2(id) {
-      this.$router.push({
-        path: "/FinancialDocumentsDetail",
-        query: {
-          id,
+        });
+      },
+      //获取数据
+      getList() {
+        this.loading = true;
+        this.apipost(
+          "sellcommission_GetPageList",
+          this.msg,
+          res => {
+            this.loading = false;
+            if (res.data.resultCode == 1) {
+              this.dataList = res.data.data.pageData;
+              this.total = res.data.data.count;
+              this.dataList.forEach(x => {
+                if (x.financials && x.financials.length > 0) {
+                  x.financialsArray = x.financials.split(",");
+                }
+              });
+            } else {
+              this.Error(res.data.message);
+            }
+          },
+          null
+        );
+      },
+      goUrl2(id) {
+        this.$router.push({
+          path: "/FinancialDocumentsDetail",
+          query: {
+            id,
+            blank: "y",
+            tab: id + "单据详情"
+          }
+        });
+      },
+      //生成提成报表
+      generateTable() {
+        let msg = {
+          UserId: 0
+        };
+        this.apipost(
+          "sellcommission_SetGenerateCommission",
+          msg,
+          res => {
+            if (res.data.resultCode == 1) {
+              this.getList();
+              this.Success("报表生成成功");
+            } else {
+              this.Error(res.data.message);
+            }
+          },
+          null
+        );
+      },
+      generalFinancacls(item) {
+        if (item.financialsArray && item.financialsArray.length > 0) {
+          this.Error("请不要多次制单!")
+          return;
+        }
+        let obj = {
+          CostType: 16,
+          Money: item.branchMoney,
+          CurrencyId: 1,
+          XSTC: 1,
+        }
+        let query = {
           blank: "y",
-          tab: id + "单据详情"
+          tab: "新增付款单据",
+          Type: 2,
+          IsUploadPic: 1,
+          orderObj: JSON.stringify(obj)
         }
-      });
-    },
-    //生成提成报表
-    generateTable() {
-      let msg = {
-        UserId: 0
-      };
-      this.apipost(
-        "sellcommission_SetGenerateCommission",
-        msg,
-        res => {
-          if (res.data.resultCode == 1) {
-            this.getList();
-            this.Success("报表生成成功");
-          } else {
-            this.Error(res.data.message);
-          }
-        },
-        null
-      );
-    },
-    generalFinancacls(item){
-      if(item.financialsArray&&item.financialsArray.length>0){
-        this.Error("请不要多次制单!")
-        return;
-      }
-      let obj = {
-        CostType: 16,
-        Money: item.branchMoney,
-        CurrencyId: 1,
-        XSTC: 1,
-      }
-      let query = {
-        blank: "y",
-        tab: "新增付款单据",
-        Type:2,
-        IsUploadPic:1,
-        orderObj: JSON.stringify(obj)
-      }
-      if(this.userInfo.RB_Branch_id==0) {
-        query.id=28
-        query.Name="总部销售提成单"
-      }else{
-        query.id=30
-        query.Name="分公司销售提成单"
+        if (this.userInfo.RB_Branch_id == 0) {
+          query.id = 28
+          query.Name = "总部销售提成单"
+        } else {
+          query.id = 30
+          query.Name = "分公司销售提成单"
+        }
+        this.$router.push({
+          path: "/addFinancialDocuments",
+          query
+        });
       }
-      this.$router.push({
-        path: "/addFinancialDocuments",
-        query
-      });
     }
-  }
-};
-</script>
+  };
+</script>
\ No newline at end of file
diff --git a/src/components/administrative/DjCommissionDetail.vue b/src/components/administrative/DjCommissionDetail.vue
index abec95d92..2c9988e0e 100644
--- a/src/components/administrative/DjCommissionDetail.vue
+++ b/src/components/administrative/DjCommissionDetail.vue
@@ -286,12 +286,6 @@ export default {
         isResize: true,
         width: 80,
         componentName: "commission-table-beizhu"
-        
-        // formatter: function(rowData, rowIndex, pagingIndex, field) {
-        //   return `<span v-if="${rowData.EmployeeId==0 && oPComissionPeriods.FRID>0}">
-        //   <span>${rowData.EmployeeId}</span>
-        //   单据号:${oPComissionPeriods.FRID}</span>`;
-        // }
       };
       let opera = {
         title: "操作",
diff --git a/src/components/administrative/QzCommissionDetail.vue b/src/components/administrative/QzCommissionDetail.vue
index 6e197aa41..f9c53cfbe 100644
--- a/src/components/administrative/QzCommissionDetail.vue
+++ b/src/components/administrative/QzCommissionDetail.vue
@@ -286,12 +286,6 @@ export default {
         isResize: true,
         width: 80,
         componentName: "commission-table-beizhu"
-        
-        // formatter: function(rowData, rowIndex, pagingIndex, field) {
-        //   return `<span v-if="${rowData.EmployeeId==0 && oPComissionPeriods.FRID>0}">
-        //   <span>${rowData.EmployeeId}</span>
-        //   单据号:${oPComissionPeriods.FRID}</span>`;
-        // }
       };
       let opera = {
         title: "操作",
diff --git a/src/components/administrative/departmentManagement.vue b/src/components/administrative/departmentManagement.vue
index 94cf8e6dd..00394aab2 100644
--- a/src/components/administrative/departmentManagement.vue
+++ b/src/components/administrative/departmentManagement.vue
@@ -1009,7 +1009,6 @@
       },
       resetForm(formName) { //弹出框取消 初始化谈框内表单
         this.$refs[formName].resetFields();
-        // this.addMsg1.EmployeeId='0'
       },
       addData() { //新增数据
         if (this.addMsg.ManagerIdArr.length > 0) {
-- 
2.18.1