Browse Source

合同居间新增调整,消息跳转调整,营销物料重命名调整

qymljy 1 year ago
parent
commit
42f5557fa6

+ 29 - 36
src/HDrpManagement/contractManage/components/addContract.vue

@@ -841,45 +841,38 @@ export default {
         if (val) {
           this.$store.commit('setLoading',true)
           /* 居间新建 */
-          if (this.$route.query.type == '居间' && this.centerEnterpriseList) {
-            let is = this.centerEnterpriseList.some(item => item.sys_enterpriseid == this.form.sys_enterpriseid)
-            if (is) {
-              this.$confirm('该项目商机已存在居间服务商,不可创建','提示',{
-                cancelButtonText:'取消',
-                showConfirmButton:false
-              }).then(() => {
-                this.$store.commit('setLoading',false)
-              })
+          if (this.$route.query.type == '居间') {
+
+            if (this.$route.query.type == '直销项目') {
+              this.form.type = '项目'
+              this.form.typemx = '直销'
+            } else if (this.$route.query.type == '经销项目') {
+              this.form.type = '项目'
+              this.form.typemx = '经销'
             } else {
-              if (this.$route.query.type == '直销项目') {
-                this.form.type = '项目'
-                this.form.typemx = '直销'
-              } else if (this.$route.query.type == '经销项目') {
-                this.form.type = '项目'
-                this.form.typemx = '经销'
-              } else {
-                this.form.type = this.$route.query.type
-              }
+              this.form.type = this.$route.query.type
+            }
 
-              this.form.discountrate ? this.form.discountrate =  (this.form.discountrate / 100).toFixed(4) : ''
-              this.form.productdiscount ? this.form.productdiscount =  (this.form.productdiscount / 100).toFixed(4) : ''
-              this.form.orderratio ? this.form.orderratio =  (this.form.orderratio / 100).toFixed(4) : ''
-              let res = await this.$api.requested({
-                "id":20221121185302,
-                "content": this.form
-              })
-              if (res.code == 0){
-                this.form.discountrate = this.form.discountrate * 100
-                this.form.productdiscount = this.form.productdiscount * 100
-                this.form.orderratio = this.form.orderratio * 100
-              }
-              this.tool.showMessage(res,() => {
-                this.$store.commit('setLoading',false)
-                this.$store.dispatch('DrawerShowChange',false)
-                this.$store.dispatch('changeDetailDrawer',true)
-                this.$router.push({path:'/contractDetail',query:{type:this.$route.query.type,id:res.data.sa_contractid,rowindex:res.data.rowindex}})
-              })
+            this.form.discountrate ? this.form.discountrate =  (this.form.discountrate / 100).toFixed(4) : ''
+            this.form.productdiscount ? this.form.productdiscount =  (this.form.productdiscount / 100).toFixed(4) : ''
+            this.form.orderratio ? this.form.orderratio =  (this.form.orderratio / 100).toFixed(4) : ''
+            let res = await this.$api.requested({
+              "id":20221121185302,
+              "content": this.form
+            })
+            if (res.code == 0){
+              this.form.discountrate = this.form.discountrate * 100
+              this.form.productdiscount = this.form.productdiscount * 100
+              this.form.orderratio = this.form.orderratio * 100
+              this.$store.commit('setLoading',false)
             }
+            this.tool.showMessage(res,() => {
+              this.$store.commit('setLoading',false)
+              this.$store.dispatch('DrawerShowChange',false)
+              this.$store.dispatch('changeDetailDrawer',true)
+              this.$router.push({path:'/contractDetail',query:{type:this.$route.query.type,id:res.data.sa_contractid,rowindex:res.data.rowindex}})
+            })
+
           } else {
             /* 其它新建 */
             if (this.$route.query.type == '直销项目') {

+ 8 - 5
src/HManagement/archvies_mag/index.vue

@@ -8,9 +8,9 @@
         </template>
         <template  v-else>
           <el-button-group slot="btngroup">
-            <download v-if="tool.checkAuth($route.name,'download')" :checklist="checklist"></download>
-            <delete-file v-if="tool.checkAuth($route.name,'delete')" :checklist="checklist" @onSuccess="onSuccess"></delete-file>
-            <more-operation v-if="tool.checkAuth($route.name,'update')" ref="edit" :checklist="checklist" @restName="restName" @onSuccess="onSuccess" @changeAuthData="changeAuth"></more-operation>
+            <download v-if="tool.checkAuth($route.name,'download')" :checklist="checklist" :isRest="isRest"></download>
+            <delete-file v-if="tool.checkAuth($route.name,'delete')" :checklist="checklist" @onSuccess="onSuccess" :isRest="isRest"></delete-file>
+            <more-operation v-if="tool.checkAuth($route.name,'update')" ref="edit" :checklist="checklist" @restName="restName" @onSuccess="onSuccess" @changeAuthData="changeAuth" :isRest="isRest"></more-operation>
           </el-button-group>
         </template>
       </list>
@@ -50,13 +50,15 @@ export default {
     return {
       showBtnGroup:false,
       folderid:JSON.parse(sessionStorage.getItem('folderid')).salematerialfolderid,
-      checklist:[]
+      checklist:[],
+      isRest:false,
     }
   },
   methods:{
     // 监听修改文件夹名称,失去焦点执行
     onNameChange (folder) {
       folder.attachmentid ? this.$refs.edit.confirmRestName(folder) : this.$refs.add.createFolderComplete(folder)
+      this.isRest = false
     },
 
     // 监听创建成功
@@ -70,7 +72,7 @@ export default {
     // 监听文件选择
     folderChecked (arr) {
       this.checklist = arr
-      if (arr.length > 0) {
+      if (arr.length > 0 || this.isRest) {
         this.showBtnGroup = true
       } else {
         this.showBtnGroup = false
@@ -82,6 +84,7 @@ export default {
     },
     // 监听重命名
     restName () {
+      this.isRest = true
       this.checklist[0].newfolder = true
       let obj = this.checklist[0]
       this.$refs.list.list.forEach((e,index) => {

+ 4 - 4
src/HManagement/archvies_mag/modules/delete.vue

@@ -1,11 +1,11 @@
 <template>
-    <el-button icon="el-icon-delete" size="small" @click="clickDelete">删 除</el-button>
+    <el-button icon="el-icon-delete" size="small" @click="clickDelete" :disabled="isRest">删 除</el-button>
 </template>
 
 <script>
 import { Loading } from 'element-ui';
 export default {
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {
       filecount:0
@@ -27,7 +27,7 @@ export default {
         this.$message({
           type: 'info',
           message: '已取消删除'
-        });          
+        });
       });
     },
     async deleteFiles (id) {
@@ -61,4 +61,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 2 - 2
src/HManagement/archvies_mag/modules/download.vue

@@ -1,10 +1,10 @@
 <template>
-  <el-button icon="el-icon-download" size="small" @click="clickDownload" v-show="checklist.length === 1">下 载</el-button>
+  <el-button icon="el-icon-download" size="small" @click="clickDownload" v-show="checklist.length === 1 || isRest"  :disabled="isRest">下 载</el-button>
 </template>
 
 <script>
 export default {
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {}
   },

+ 3 - 3
src/HManagement/archvies_mag/modules/moreOperation.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dropdown style="border-left:1px solid #dcdfe6" v-show="checklist.length === 1" >
+  <el-dropdown style="border-left:1px solid #dcdfe6" v-show="checklist.length === 1" :disabled="isRest">
     <el-button size="small">
       <i class="el-icon-more"></i>
     </el-button>
@@ -26,7 +26,7 @@ export default {
   components:{
     modifyLocation
   },
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {
       urlDialog:false,
@@ -96,4 +96,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 1 - 1
src/HManagement/department/staff/list/modules/edit.vue

@@ -271,7 +271,7 @@ export default {
       this.form = Object.assign({},this.form, res.data)
       /*this.form.discountrate = Math.round((this.form.discountrate*100)*100)/100*/
       this.issalehr = this.form.issalehr
-      this.salerList = res.data.salearearows.map(item=>{
+      this.salerList = res.data.salearea.map(item=>{
         return {
           "name":this.form.name,
           "areaname":item.areaname,

+ 66 - 4
src/views/message/index.vue

@@ -210,10 +210,72 @@ export default {
             })
           })
         }else {
-          if (this.message.link.listPath === '/workreport'){
-            this.$router.push({
-              path:this.message.link.listPath,
-            })
+          switch (this.message.link.listPath) {
+            case '/workreport':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+                  break
+            case '/notice_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/notice_mag_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submitedit_one':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submitedit_more':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submit_mag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archvies_mag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_admag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_adlist':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_adclass':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_sc_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_scmag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
           }
         }
       }