瀏覽代碼

work-jyf 结算单

jiayufei 3 年之前
父節點
當前提交
b73510f4e0

+ 5 - 2
src/views/modules/settlement-account/settlement-account.vue

@@ -12,7 +12,9 @@
                 </span>
             </div>
             <div>
-                <span class="add-acount-policy-btn"><a-button type="primary" @click="handleUploadAccount">上传账户数据</a-button></span>
+                <span v-if="userSaleList.includes(userInfo().roleName)" class="add-acount-policy-btn">
+                    <a-button type="primary" @click="handleUploadAccount">上传账户数据</a-button>
+                </span>
             </div>
         </div>
         <div class="control-con-header">
@@ -248,6 +250,7 @@ export default {
     name: 'settlement-account',
     data() {
         return {
+            userSaleList: ['外部销售', '销售总监', '销售', '销售助理', '销售支持经理', '销售AM', '媒介', '管理员'],
             confirmLoading: false,
             allProjectListOption: [],
             allAdverListOption: [],
@@ -457,7 +460,7 @@ export default {
             this.controlLoading = true;
             const paramsData = {
                 createUserId: this.userInfo().id,
-                advertiserName: this.configForm.adverName,
+                advertiserName: this.configForm.advertiserName,
                 productName: this.configForm.productName,
                 projectName: this.configForm.projectName,
                 accountName: this.configForm.accountName,

+ 28 - 3
src/views/modules/settlement-information/settlement-information.vue

@@ -15,9 +15,15 @@
             </div>
             <div>
                 <!-- v-if="userInfo().roleName !== '财务'" -->
-                <span class="add-acount-policy-btn"><a-button @click="handleDownloadProfit">下载利润表</a-button></span>
-                <span class="add-acount-policy-btn"><a-button @click="handleDownloadSettlement">下载结算单</a-button></span>
-                <span class="add-acount-policy-btn"><a-button type="primary" @click="handleUploadAccount">上传截图</a-button></span>
+                <span v-if="profitBtnStatus" class="add-acount-policy-btn">
+                    <a-button @click="handleDownloadProfit">下载利润表</a-button>
+                </span>
+                <span v-if="settlementBtnStatus" class="add-acount-policy-btn">
+                    <a-button @click="handleDownloadSettlement">下载结算单</a-button>
+                </span>
+                <span v-if="accountBtnStatus" class="add-acount-policy-btn">
+                    <a-button type="primary" @click="handleUploadAccount">上传截图</a-button>
+                </span>
             </div>
         </div>
         <div class="control-con-header">
@@ -336,6 +342,9 @@ export default {
         return {
             userOperateList: ['快手运营总监', '运营助理', '运营专员', '头条运营经理', '外部运营经理', '快手运营', '商务运营', '运营总经理', '直播运营', '头条运营总监', '快手运营助理', '快手运营经理', '头条运营', '头条运营助理'],
             userSaleList: ['外部销售', '销售总监', '销售', '销售助理', '销售支持经理', '销售AM'],
+            profitBtnStatus: false,
+            settlementBtnStatus: false,
+            accountBtnStatus: false,
             downLoadAccountNum: 0,
             downLoadImgNum: 0,
             mode2: ['month', 'month'],
@@ -451,6 +460,22 @@ export default {
         this.searchForm = this.$form.createForm(this);
     },
     mounted() {
+        const userRoleName = this.userInfo().roleName;
+        if (userRoleName === '财务') {
+            this.profitBtnStatus = true;
+            this.settlementBtnStatus = true;
+        }
+        else if (this.userOperateList.includes(userRoleName)) {
+            this.accountBtnStatus = true;
+        }
+        else if (this.userSaleList.includes(userRoleName)) {
+            this.settlementBtnStatus = true;
+        }
+        else if (userRoleName === '管理员') {
+            this.profitBtnStatus = true;
+            this.settlementBtnStatus = true;
+            this.accountBtnStatus = true;
+        }
         this.handleInitTable();
         this.handleGetAllSaleList();
         this.handleGetAllAdverList();