guoxing 9 months ago
parent
commit
aaf37c7f05
  1. 67
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionAdd.vue
  2. 4
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionInfo.vue
  3. 10
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedAdd.vue
  4. 4
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo.vue
  5. 69
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit.vue
  6. 4
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo.vue

67
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionAdd.vue

@ -173,8 +173,10 @@ export default {
this.viewTitle = '【编辑】专项返利分配申请'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
if (resp.success) {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}
}).catch((e) => {
this.formobj = row
})
@ -233,36 +235,31 @@ export default {
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
disNum: e.disNum,
unitSetAllocationMoney: (parseInt(e.uploadMoney)) / (parseInt(e.disNum))
unitSetAllocationMoney: Math.round((parseFloat(e.uploadMoney) / parseFloat(e.disNum)) * 100) / 100
})
})
}
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
const choose = this.brand_list.filter((item) => item.brandName === value)
if (choose !== null && choose.length > 0) {
this.formobj.brandSid = choose[0].sid
} else {
this.formobj.brandSid = ''
}
},
saveOrUpdate() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.scmSpecialrebatedistributedetails.length === 0) {
this.$message({ showClose: true, type: 'error', message: '专项返利分配申请列表不能为空' })
return
}
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
@ -274,24 +271,24 @@ export default {
})
},
submitVehicleApply() {
if (this.formobj.scmSpecialrebatedistributedetails.length === 0) {
this.$message({ showClose: true, type: 'error', message: '专项返利分配申请列表不能为空' })
return
}
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.scmSpecialrebatedistributedetails.length === 0) {
this.$message({ showClose: true, type: 'error', message: '专项返利分配申请列表不能为空' })
return
}
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
return false
}
})
},

4
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionInfo.vue

@ -100,7 +100,9 @@ export default {
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
if (resp.success) {
this.formobj = resp.data
}
}).catch((e) => {
this.formobj = row
})

10
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedAdd.vue

@ -104,7 +104,7 @@ import req from '@/api/specialrebate/specialrebatedistribution'
import selectvehicle from './relation/selectvehicle.vue'
export default {
name: 'specialrebatetobeallocatedAdd',
name: 'SpecialrebatetobeallocatedAdd',
components: {
selectvehicle
},
@ -162,7 +162,7 @@ export default {
this.viewState = 1
if (value.length > 0) {
this.formobj.setNumber = value.length
this.formobj.unitSetAllocationMoney = (parseInt(this.formobj.allocationMoney)) / (parseInt(this.formobj.setNumber))
this.formobj.unitSetAllocationMoney = Math.round((parseFloat(this.formobj.allocationMoney) / parseFloat(this.formobj.setNumber)) * 100) / 100
value.forEach((e) => {
this.formobj.scmSpecialrebateVehsVehSidAndVinNos.push({
modelName: e.modelName,
@ -184,11 +184,7 @@ export default {
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {

4
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo.vue

@ -173,7 +173,9 @@ export default {
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
if (resp.success) {
this.formobj = resp.data
}
}).catch((e) => {
this.formobj = {}
})

69
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit.vue

@ -153,8 +153,10 @@ export default {
this.viewTitle = '【编辑】专项返利分配申请'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
if (resp.success) {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}
}).catch((e) => {
this.formobj = {}
})
@ -213,36 +215,27 @@ export default {
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
disNum: e.disNum,
unitSetAllocationMoney: (parseInt(e.uploadMoney)) / (parseInt(e.disNum))
unitSetAllocationMoney: Math.round((parseInt(e.uploadMoney) / parseInt(e.disNum)) * 100) / 100
})
})
}
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
const choose = this.brand_list.filter((item) => item.brandName === value)
if (choose !== null && choose.length > 0) {
this.formobj.brandSid = choose[0].sid
} else {
this.formobj.brandSid = ''
}
},
saveOrUpdate() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.$message({ showClose: true, type: 'success', message: resp.msg })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
@ -261,27 +254,27 @@ export default {
})
},
submitVehicleApply() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}, '*')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},

4
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo.vue

@ -136,7 +136,9 @@ export default {
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
if (resp.success) {
this.formobj = resp.data
}
}).catch((e) => {
this.formobj = {}
})

Loading…
Cancel
Save