Browse Source

0313xiugai

liuhj 1 month ago
parent
commit
f3d7a122f5
3 changed files with 40 additions and 22 deletions
  1. 1 2
      src/components/OP/Groupedit.vue
  2. 21 2
      src/components/OP/OPgroup.vue
  3. 18 18
      src/components/OP/SharedFile.vue

+ 1 - 2
src/components/OP/Groupedit.vue

@@ -526,7 +526,7 @@ export default {
                 this.ruleForm.visitingtime=new Date();
             }else{
                 this.nongroupty=true;
-                this.initializeinfo();
+                // this.initializeinfo();
             }
 
             if (val==1348) {
@@ -741,7 +741,6 @@ export default {
                 remark: '',
                 phonenumber: '',
                 Wechat: '',
-                OP: '',
                 grades: '',
                 person: '',
                 opRoyaltyLv: '',

+ 21 - 2
src/components/OP/OPgroup.vue

@@ -1,5 +1,9 @@
 <template>
     <div v-loading="fullscreenLoading">
+        <el-dialog top="35vh" width="400px" title="合同下载" :visible.sync="contractVisible">
+            <el-button type="primary">主要按钮</el-button>
+            <el-button type="primary">主要按钮</el-button>
+        </el-dialog>
         <el-dialog top="35vh" width="400px" title="团组清单下载" :visible.sync="groupVisible">
             <el-date-picker
             style="width:100%;"
@@ -111,6 +115,9 @@
                         prop="teamName"
                         label="团队名称"
                         >
+                        <template slot-scope="scope">
+                            <span @click="tofile(scope.row)" style="color: #409EFF;cursor:pointer;">{{scope.row.teamName}}</span>
+                        </template>
                     </el-table-column>
                     <el-table-column
                         prop="clientName"
@@ -142,7 +149,7 @@
                         label="成单人"
                         width="110">
                     </el-table-column>
-                    <el-table-column label="操作"  width="200">
+                    <el-table-column label="操作"  width="250">
                         <template slot-scope="scope">
                             <el-button
                             size="mini"
@@ -150,6 +157,11 @@
                             @click="handleEdit(scope.$index, scope.row)"><i class="el-icon-edit"></i></el-button>
                             <el-button
                             size="mini"
+                            @click="contracton"
+                            title="合同下载"
+                            ><i class="el-icon-document"></i></el-button>
+                            <el-button
+                            size="mini"
                             title="删除"
                             type="danger"
                             @click="handleDelete(scope.$index, scope.row,groupDatas)"><i class="el-icon-delete"></i></el-button>
@@ -254,9 +266,12 @@ export default {
             customertype:'',
             customertypeoptions:[],
             customerleveloptions:[],
+            contractVisible:false,
         }
     },
-    
+    contracton(){
+        this.contractVisible=true
+    },
     activated() {
         if(!this.$route.meta.isBack){
             // 如果isBack是false,表明需要获取新数据,否则就不再请求,直接使用缓存的数据
@@ -327,6 +342,10 @@ export default {
             this.downloadtime="";
             this.groupVisible=true;
         },
+        //跳转到文件
+        tofile(val){
+            this.$router.push({path: '/home/SharedFile?diId='+val.id});
+        },
         //团组清单下载
         GroupListFile(){
             if (this.downloadtime==null||this.downloadtime=="") {

+ 18 - 18
src/components/OP/SharedFile.vue

@@ -121,17 +121,7 @@
                     <div class="sharedsile-table-tb tb-type">WORD</div>
                     <div class="sharedsile-table-tb tb-Language">中文</div>
                     <div class="sharedsile-table-tb tb-download">
-                        <el-button size="small" @click="eptschedule(1, item.id)" type="primary">下载</el-button>
-                    </div>
-                </div>
-                <div>
-                    <div v-for="(items,indexs) in filesidarrss" :key="indexs" class="sharedsile-table-tr">
-                        <div class="sharedsile-table-tb tb-name">{{ items.name }}</div>
-                        <div class="sharedsile-table-tb tb-type">WORD</div>
-                        <div class="sharedsile-table-tb tb-Language">中文</div>
-                        <div class="sharedsile-table-tb tb-download">
-                            <el-button size="small" @click="eptschedule(2, items.id)" type="primary">下载</el-button>
-                        </div>
+                        <el-button size="small" @click="eptschedule(item.filetype, item.id)" type="primary">下载</el-button>
                     </div>
                 </div>
             </div>
@@ -220,7 +210,7 @@ export default {
             fileName:'',
             shdatetime:[],
             filesidarrs:[],
-            filesidarrss:[],
+            grouptodiid:0
         }
     },
     methods: {
@@ -245,11 +235,20 @@ export default {
             }).then(function (res) {
                 if (res.data.code == 200) {
                     that.delegationInfoList = res.data.data.dropDownGroupList;
-                    that.diIdselect = that.delegationInfoList[0].id;
                     that.filetypelist = res.data.data.dropDownType;
                     that.filetype = that.filetypelist[0].id;
                     that.isMarketingDepartment=res.data.data.isMarketingDepartment;
-                    that.EnterExitCostFileOwner(that.delegationInfoList[0].provinceId);
+                    if (that.grouptodiid!==that.grouptodiid) {
+                        that.diIdselect = that.delegationInfoList[0].id;
+                        that.EnterExitCostFileOwner(that.delegationInfoList[0].provinceId);
+                    }else{
+                        that.diIdselect = that.grouptodiid;
+                        var objs = {}
+                        objs = that.delegationInfoList.find(function (i) {
+                            return i.id === that.grouptodiid
+                        });
+                        that.EnterExitCostFileOwner(objs.provinceId);
+                    }
                     that.QuerySharedFile();
                 } else {
                     that.$message.error(res.data.msg);
@@ -274,13 +273,14 @@ export default {
                 if (res.data.code == 200) {
                     var files=res.data.data;
                     for(let i=0;i<files.wordTypeData.length;i++){
-                        filesidarr.push(files.wordTypeData[i])
+                        files.wordTypeData[i].filetype=1
+                        filesidarr.push(files.wordTypeData[i]);
                     }
                     for(let j=0;j<files.excelTypeData.length;j++){
-                        filesidarrs.push(files.excelTypeData[j])
+                        files.excelTypeData[j].filetype=2
+                        filesidarr.push(files.excelTypeData[j])
                     }
                     that.filesidarrs=filesidarr;
-                    that.filesidarrss=filesidarrs;
                     
                 }else {
                     that.$message.error(res.data.msg);
@@ -315,7 +315,6 @@ export default {
             })
         },
         QuerySharedFilegroup(val){
-            console.log(val);
             var obj = {}
             obj = this.delegationInfoList.find(function (i) {
                 return i.id === val
@@ -623,6 +622,7 @@ export default {
         }
     },
     created() {
+        this.grouptodiid = Number(this.$route.query.diId);
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageId = Number(localStorage.getItem('indexs').split('-')[1]);//页面id