referral.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. var Request = GetRequest();
  2. var serveFollowupDate=JSON.parse(window.localStorage.getItem('serveFollowupDate'))
  3. new Vue({
  4. el: '#app',
  5. data: {
  6. DRUG_ADVERSE_MARK:"",
  7. ADR_REMARK:"",
  8. REFUSE_REFERRAL:"",
  9. REFUSE_REFERRAL_WHY:"",
  10. TRANSFER_RESON:"",
  11. TRANSFER_ORG_DEPT:"",
  12. readonly:false,
  13. objData:'',
  14. status:'', //3进行2计划中1完成
  15. isFinsh:false
  16. },
  17. mounted: function() {
  18. var vm = this
  19. var Request = GetRequest();
  20. if(serveFollowupDate.status=='1'){
  21. this.isFinsh=true
  22. }else{
  23. this.isFinsh=false
  24. }
  25. recordAPI.getFollowupProjectData({id:Request["id"],followupProject:9}).then(function(res){
  26. if(res.status==200){
  27. var data = res.data;
  28. vm.objData = res.data;
  29. // delete data["create_time"];delete data["followup_id"];delete data["followup_project"];delete data["id"];
  30. for(var key in data){
  31. vm[key] = data[key]
  32. }
  33. }
  34. })
  35. },
  36. methods:{
  37. saveButton: function () {
  38. var vm = this;
  39. params = { id: Request["id"], followupProject:9}
  40. var checkID = {};
  41. checkID['DRUG_ADVERSE_MARK'] = vm.DRUG_ADVERSE_MARK
  42. checkID['ADR_REMARK'] = vm.ADR_REMARK
  43. checkID['REFUSE_REFERRAL'] = vm.REFUSE_REFERRAL
  44. checkID['REFUSE_REFERRAL_WHY'] = vm.REFUSE_REFERRAL_WHY
  45. checkID['TRANSFER_RESON'] = vm.TRANSFER_RESON
  46. checkID['TRANSFER_ORG_DEPT'] = vm.TRANSFER_ORG_DEPT
  47. console.log(checkID)
  48. params.followupProjectData = JSON.stringify(checkID);
  49. console.log(params.followupProjectData)
  50. console.log(params)
  51. recordAPI.ModifyFollowupResult(params).then( function (res) {
  52. if (res.status == 200) {
  53. toastr.info("保存成功")
  54. } else {
  55. toastr.error(res.msg)
  56. }
  57. })
  58. },
  59. finishFollowup: function () {
  60. var params={id:Request["id"]}
  61. var vm=this
  62. recordAPI.finishFollowup(params).then(function (res) {
  63. if (res.status == 200) {
  64. vm.isFinsh = true
  65. toastr.info("操作成功")
  66. } else {
  67. toastr.error(res.msg)
  68. }
  69. })
  70. }
  71. }
  72. })