Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/cd-work-flow-web

jbb 2 years ago
parent
commit
39a359bfb9
2 changed files with 32 additions and 31 deletions
  1. 1 1
      src/components/jeecgbiz/JSelectRole.vue
  2. 31 30
      src/views/oa/modules/IncidentTicketModal.vue

+ 1 - 1
src/components/jeecgbiz/JSelectRole.vue

@@ -8,7 +8,7 @@
     :returnKeys="returnKeys"
     :listUrl="url.list"
     :columns="columns"
-    queryParamText="角色编码"
+    queryParamText="角色名称"
 
     v-on="$listeners"
     v-bind="$attrs"

+ 31 - 30
src/views/oa/modules/IncidentTicketModal.vue

@@ -550,21 +550,22 @@
         })
       },
       handleOk(){
-        var begin = this.accessory2.indexOf('http://220.191.168.86:18087/jeecg-boot/sys/common/static/')
-        if(this.accessory2.length!==0&&this.accessory2){
-          if(begin==0){
-            this.formState.accessory2 = [{"type":"file","name":this.accessory2,"status":"done","uid":1673507319016,"url":this.accessory2}]
+        
+          if(this.accessory2.length!==0&&this.accessory2){
+            var begin = this.accessory2.toString().indexOf('http://220.191.168.86:18087/jeecg-boot/sys/common/static/')
+            if(begin == -1){
+               this.formState.accessory2 = [{"type":"file","name":this.accessory2,"status":"done","uid":1673507319016,"url":"http://220.191.168.86:18087/jeecg-boot/sys/common/static/"+this.accessory2}]
+            }else{
+               this.formState.accessory2 = [{"type":"file","name":this.accessory2,"status":"done","uid":1673507319016,"url":this.accessory2}]
+            } 
           }else{
-            this.formState.accessory2 = [{"type":"file","name":this.accessory2,"status":"done","uid":1673507319016,"url":"http://220.191.168.86:18087/jeecg-boot/sys/common/static/"+this.accessory2}]
-          } 
-        }else{
-         this.formState.accessory2=[]
-        }
-         
+           this.formState.accessory2=[]
+          }
+        
           this.formState.accessory2 = JSON.stringify(this.formState.accessory2)
           var addData = 'yes'
           this.incidentTicketChildrenTable.dataSource.every(item=>{
-            // if(item.zhanghaoId==''||!item.zhanghaoId){
+            // if(item.zhanghaoId=='' ||!item.zhanghaoId){
             //   this.$message.warning('请选择账套号!')
             //    addData = 'no'
             //    return false;
@@ -581,25 +582,25 @@
             }
             return true
           })
-      this.$refs.form.validate(valid => {
-        if (valid) { 
-          if(addData=='yes'){
-            var obj = this.formState
-            obj.createTime = ''
-            obj.incidentTicketChildrenList =  this.incidentTicketChildrenTable.dataSource
-            obj.invoicingDate = moment(this.formState.invoicingDate).add (1,'days')
-                putAction('/oa/incidentTicket/edit', obj).then((res) => {
-                   if(res.success){
-                      this.$message.success('编辑成功')
-                      this.handleCancel()
-                      this.$emit('close')
-                   }else{
-                       this.$message.warning(res.message)
-                     }
-                 })
-          } 
-        }
-      })
+          this.$refs.form.validate(valid => {
+            if (valid) { 
+              if(addData=='yes'){
+                var obj = this.formState
+                obj.createTime = ''
+                obj.incidentTicketChildrenList =  this.incidentTicketChildrenTable.dataSource
+                obj.invoicingDate = moment(this.formState.invoicingDate).add (1,'days')
+                    putAction('/oa/incidentTicket/edit', obj).then((res) => {
+                       if(res.success){
+                          this.$message.success('编辑成功')
+                          this.handleCancel()
+                          this.$emit('close')
+                       }else{
+                           this.$message.warning(res.message)
+                         }
+                     })
+              } 
+            }
+          })
       },
       // 改变账套号
       handleChange(record,index){