|
@@ -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){
|