Browse Source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 years ago
parent
commit
0050821967

+ 21 - 16
src/HDrpManagement/contractManage/components/addContract.vue

@@ -25,7 +25,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="业务员:" prop="salername">
+              <el-form-item label="业务员:">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
@@ -95,7 +95,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="业务员:" prop="salername">
+              <el-form-item label="业务员:">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
@@ -165,7 +165,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="业务员:" prop="salername">
+              <el-form-item label="业务员:">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
@@ -223,7 +223,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="业务员:" prop="salername">
+              <el-form-item label="业务员:">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
@@ -305,7 +305,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="业务员:" prop="salername">
+              <el-form-item label="业务员:">
                   <el-input disabled type="text" size="small" v-model="form.salername"></el-input>
               </el-form-item>
             </el-col>
@@ -513,17 +513,22 @@ export default {
     })
   },
   watch: {
-    DrawerShow (val) {
-      if (!val) {
-        console.log('触发清空');
-        
-        this.$refs.form.resetFields()
-      } else {
-        if(this.$refs.project) {
-          this.$refs.project.params.content.type = this.$route.query.type == '经销项目' ? '2' : '1'
-          this.$refs.project.queryEnterpriseArchives()
+    'DrawerShow': {
+      handler (val) {
+        if (!val) {
+          this.showChange(false)
+          if (this.$refs.form) this.$refs.form.resetFields()
+        } else {
+          if(this.$refs.project) {
+            this.$refs.project.params.content.type = this.$route.query.type == '经销项目' ? '2' : '1'
+            console.log(this.$refs.project.params.content.type,'项目类型');
+            
+            this.$refs.project.queryEnterpriseArchives()
+          }
         }
-      }
+        
+      },
+      immediate:true,
     }
   },
   created () {
@@ -567,7 +572,7 @@ export default {
       this.accountVisible = false
       this.modelVisible = false
       this.concratVisible = false
-      this[key] = true
+      key ? this[key] = true : ''
     },
     agentChange (data) {
       this.form.sys_enterpriseid = data[0].sys_enterpriseid

+ 23 - 9
src/HDrpManagement/contractManage/components/editContract.vue

@@ -20,7 +20,7 @@
                   v-model="agentVisible"
                   width="400">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="agentChange" @onCancel="agentVisible = false"></selectAgent>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="agentVisible=true;salerVisible = false;projectVisible=false" v-model="form.enterprisename"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -78,7 +78,7 @@
                   v-model="agentVisible"
                   width="400">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="agentChange" @onCancel="agentVisible = false"></selectAgent>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="agentVisible=true;salerVisible = false;projectVisible=false" v-model="form.enterprisename"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -90,7 +90,7 @@
                   v-model="projectVisible"
                   width="600">
                   <seleteProject type="2" @onSelect="projectChange" @onCanel="projectVisible=false"></seleteProject>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="projectVisible=true;salerVisible = false;agentVisible=false" v-model="form.projectname"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('projectVisible')" v-model="form.projectname"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -148,7 +148,7 @@
                   v-model="accountVisible"
                   width="400">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="accountVisible = false"></selectAgent>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="accountVisible=true;agentVisible=false;salerVisible = false;projectVisible=false" v-model="form.enterprisename"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -160,7 +160,7 @@
                   v-model="projectVisible"
                   width="600">
                   <seleteProject type="1" @onSelect="projectChange" @onCanel="projectVisible=false"></seleteProject>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="projectVisible=true;salerVisible = false;agentVisible=false;accountVisible=false" v-model="form.projectname"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('projectVisible')" v-model="form.projectname"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -218,7 +218,7 @@
                   v-model="accountVisible"
                   width="400">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="accountVisible = false"></selectAgent>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="accountVisible=true;salerVisible = false" v-model="form.enterprisename"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -276,7 +276,7 @@
                   v-model="accountVisible"
                   width="400">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="agentVisible = false"></selectAgent>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="agentVisible=true;salerVisible = false;projectVisible=false;accountVisible=true" v-model="form.enterprisename"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -288,7 +288,7 @@
                   v-model="concratVisible"
                   width="600">
                   <seleteProjectContract ref="project" @onSelect="concratChange" @onCanel="concratVisible=false"></seleteProjectContract>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="concratVisible=true,projectVisible=false;salerVisible = false;agentVisible=false;accountVisible=false" v-model="form.ascription_title"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('concratVisible')" v-model="form.ascription_title"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -300,7 +300,7 @@
                   v-model="projectVisible"
                   width="600">
                   <seleteProject type="3" @onSelect="projectChange" @onCanel="projectVisible=false"></seleteProject>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="projectVisible=true;salerVisible = false;agentVisible=false;accountVisible=false" v-model="form.projectname"></el-input>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('projectVisible')" v-model="form.projectname"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
@@ -514,6 +514,11 @@ export default {
   computed: {
   },
   watch: {
+    drawer (val) {
+      if(!val) {
+        this.showChange(false)
+      }
+    }
   },
   created () {
   },
@@ -556,6 +561,15 @@ export default {
         }
       })
     },
+    showChange (key) {
+      this.agentVisible = false
+      this.salerVisible = false
+      this.projectVisible = false
+      this.accountVisible = false
+      this.modelVisible = false
+      this.concratVisible = false
+      key ? this[key] = true : ''
+    },
     onCancel () {
       this.drawer = false
       this.$refs.form.resetFlieds()

+ 1 - 1
src/HDrpManagement/contractManage/components/seleteProject.vue

@@ -77,7 +77,7 @@ export default {
   },
   methods:{
     async queryEnterpriseArchives () {
-      this.params.content.type = this.type
+      !this.params.content.type ? this.params.content.type = this.type : ''
       const res = await this.$api.requested(this.params)
       this.ENlist = res.data
       this.total = res.total

+ 2 - 2
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="inline-16" v-if="data.status">
     <el-popconfirm v-if="refresh" title="确定提交当前合同吗?" @confirm="submit">
-      <el-button size="mini" slot="reference" type="primary" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit')">提 交</el-button>
-      <el-button size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check')">审 核</el-button>
+      <el-button size="mini" slot="reference" type="primary" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit') && !disabled">提 交</el-button>
+      <el-button size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check') && !disabled">审 核</el-button>
     </el-popconfirm>
   </div>
 </template>

+ 15 - 0
src/HDrpManagement/contractManage/index.vue

@@ -107,6 +107,7 @@ export default {
   created () {
     this.getSystemList()
     this.getAgentList()
+    this.queryUserInfo()
   },
   methods:{
     async getSystemList () {
@@ -132,6 +133,20 @@ export default {
       })
       console.log(res.data);
       
+    },
+    async queryUserInfo() {
+      let res = await this.$api.requested({
+        "classname": "common.usercenter.usercenter",
+        "method": "queryUserMsg",
+        "content": {
+        }
+      })
+      this.userInfo = {
+        isAuth : res.data.hr.isleader,
+        userid: res.data.hr.userid
+      }
+      window.sessionStorage.setItem('userInfo',JSON.stringify(this.userInfo))
+      
     },
     list (params) {
       params.content.type = 0

+ 5 - 0
src/HDrpManagement/contractManage/modules/detail.vue

@@ -183,9 +183,14 @@ export default {
   watch: {
     mainData: {
       handler (val) {
+        if (Object.keys(JSON.parse(window.sessionStorage.getItem('userInfo'))).length > 0) {
+        console.log('负责人逻辑');
         this.isLeader = val.leader ? JSON.parse(window.sessionStorage.getItem('active_account')).userid == val.leader[0].userid : false
         console.log(this.isLeader);
         
+        } else {
+          this.isLeader = true
+        }
       },
       deep:true,
       immediate:true

+ 2 - 2
src/HManagement/clueManage/clue_rule/index.vue

@@ -7,7 +7,7 @@
       <div slot="header" class="clearfix">
         <div class="my-tabs" >
           <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
-            <el-tab-pane label="经销商目录" name="first"></el-tab-pane>
+            <!-- <el-tab-pane label="经销商目录" name="first"></el-tab-pane> -->
             <el-tab-pane label="业务员目录" name="second"></el-tab-pane>
           </el-tabs>
         </div>
@@ -52,7 +52,7 @@ import delSaler from './modules/del_saler.vue'
 export default {
   data () {
     return {
-      activeName:'first'
+      activeName:'second'
     }
   },
   components:{