contract.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /**
  2. * 审批模块(合同)
  3. */
  4. import {httpGet,httpPost} from "@/utils/request.js"
  5. import {baseUrl} from '@/utils/config.js'
  6. import store from '@/store/index.js'
  7. import uniAsync from '@/utils/uni-async.js'// uni api async 化
  8. /**
  9. * 合同审批列表
  10. * @param {string} ContractType 合同类型,枚举值:’新签合同’,’续约合同’,’补充协议’
  11. * @param {string} Status 合同状态,枚举值:’待审批’,’已审批’,’已驳回’,’已撤回’
  12. * @param {int} ProductId 客户类型:传0或者不传为当前账号权限,1 代表是:ficc;2 代表是:权益
  13. * @param {string} SellerId 选择的销售id
  14. * @param {string} Keyword 搜索关键字
  15. * @param {string} ModifyStartTime 服务更新时间的选择开始时间,格式:2021-05-23 00:00:00
  16. * @param {string} ModifyEndTime 服务更新时间的选择结束时间,格式:2021-05-26 23:59:59
  17. */
  18. export const apiContractApproveList=params=>{
  19. return httpGet('/contract_approval/list',{...params,PageSize:20})
  20. }
  21. /**
  22. * 合同审批详情 (在审批状态为 待审批、处理中 时 使用审批单详情 其余均使用合同详情)
  23. * @param {int} ContractApprovalId 审批单id
  24. * @param {int} ContractApprovalRecordId 审批流程单id (从消息列表进入传此参数)
  25. */
  26. export const apiContractApprovalDetail=params=>{
  27. return httpGet('/contract_approval/detail',params)
  28. }
  29. /**
  30. * 合同详情
  31. * @param {int} ContractId 合同id
  32. */
  33. export const apiContractDetail=params=>{
  34. return httpGet('/contract/detail',params)
  35. }
  36. /**
  37. * 合同审批 通过
  38. * @param {int} ContractId 合同id
  39. */
  40. export const apiContractApproved=params=>{
  41. return httpPost('/contract_approval/approved',params)
  42. }
  43. /**
  44. * 合同审批 拒绝
  45. * @param {int} ContractId 审批单id
  46. * @param {string} Remark 理由
  47. */
  48. export const apiContractReject=params=>{
  49. return httpPost('/contract_approval/reject',params)
  50. }
  51. /**
  52. * 合同搜索
  53. * @param {string} Keyword 搜索关键字
  54. */
  55. export const apiContractSearch=params=>{
  56. return httpGet('/contract/company_list',params)
  57. }
  58. /**
  59. * 合同列表
  60. * @param {int} CurrentIndex 页码
  61. * @param {string} Keyword
  62. */
  63. export const apiContractSearchV2=params=>{
  64. return httpGet('/contract/listV2',params)
  65. }
  66. /**
  67. * 合同列表
  68. * @param {int} CurrentIndex 页码
  69. * @param {string} Keyword
  70. */
  71. export const apiContractList=params=>{
  72. return httpGet('/contract/list',params)
  73. }
  74. /**
  75. * 合同回签附件
  76. * @param {int} ContractId 合同id
  77. * @param {string} FileUrl 临时文件地址
  78. */
  79. export const apiContractSignBackFiles=params=>{
  80. // return httpPost('/contract/upload_check_back_file',params)
  81. return uniAsync.uploadFile({
  82. url:baseUrl+'/contract/upload_check_back_file',
  83. filePath:params.tempPath,
  84. name:'file',
  85. header:{
  86. Authorization:store.state.token
  87. },
  88. formData:{
  89. ContractId:params.ContractId
  90. }
  91. })
  92. }