seal.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. * 获取审批流详情(目前crm1.0 只在发起用印申请时需要调用此接口)
  10. * @param {int} FlowId 审批流程id;1:ficc客户审批;2:权益客户审批;3:ficc合同审批,4:权益合同审批,5:用印审批
  11. *
  12. */
  13. export const apiFlowDetail=params=>{
  14. return httpGet('/approval/flowDetail',params)
  15. }
  16. /**
  17. * 新增用印
  18. * @param {string} CompanyName 客户名称,甲方名称
  19. * @param {int} ContractId 系统合同id
  20. * @param {int} CreditCode 社会统一信用代码
  21. * @param {string} FileUrls 文件附件地址数据 crm_8.7 支持上传多个附件
  22. * @param {int} FileNum 文件份数
  23. * @param {string} Remark 备注
  24. * @param {string} SealType 加盖印章类型,枚举值:'合同章', '公章', '法人章'
  25. * @param {string} ServiceType 业务类型,枚举值:'新增业务', '续约业务', '补充协议'
  26. * @param {string} Use 用印用途,枚举值:'销售合同', '渠道合同', '付款通知函', '招投标', '战略合作协议'
  27. * @param {string} UseCompanyName 实际使用方客户名称
  28. */
  29. export const apiSealAdd=params=>{
  30. return httpPost('/seal/add',params)
  31. }
  32. /**
  33. * 用印列表搜索
  34. */
  35. export const apiSealSearch=params=>{
  36. return httpGet('/seal/company_list',params)
  37. }
  38. /**
  39. * 用印客户搜索出对应客户名称
  40. * @param {string} CompanyName 客户名称
  41. */
  42. export const apiSearchCustome=params=>{
  43. return httpGet('/contract/companyListBySeal',{...params,Status:'已审批'})
  44. }
  45. /**
  46. * 根据客户搜索出对应客户下面合同数据
  47. * @param {string} Status 合同状态(固定 已审批)
  48. * @param {string} Keyword 搜索关键字(对应客户名称)
  49. */
  50. export const apiSearchContract=params=>{
  51. // return httpGet('/contract/list',{...params,Status:'已审批'})
  52. // return httpGet('/contract_approval/list',{...params,Status:'已审批',PageSize:10000})
  53. return httpGet('/contract/listBySeal',{...params,Status:'已审批',PageSize:10000})
  54. }
  55. /**
  56. * 审批单列表
  57. * @param {type} Status 状态:待审批、处理中、已审批、已作废
  58. */
  59. export const apiSealApproveList=params=>{
  60. return httpGet('/seal_approval/list',params)
  61. }
  62. /**
  63. * 审批单详情
  64. * @param {int} ContractApprovalId 审批单id
  65. * @param {int} ContractApprovalRecordId 审批流程单id
  66. */
  67. export const apiSealDetail=params=>{
  68. return httpGet('/seal_approval/detail',params)
  69. }
  70. /**
  71. * 用印审批通过
  72. * @param {int} SealId
  73. */
  74. export const apiApprovalPass=params=>{
  75. return httpPost('/seal_approval/approved',params)
  76. }
  77. /**
  78. * 修改用印审批单并通过审批
  79. */
  80. export const apiApprovalPassModify=params=>{
  81. return httpPost('/seal/check_edit',params)
  82. }
  83. /**
  84. * 用印审批驳回
  85. * @param {int} SealId
  86. * @param {string} Remark
  87. */
  88. export const apiApprovalReject=params=>{
  89. return httpPost('/seal_approval/reject',params)
  90. }
  91. /**
  92. * 用印作废
  93. * @param {boolean} IsInvalidContract 是否同步作废合同
  94. * @param {int} SealId 用印id
  95. */
  96. export const apiInvalidSeal=params=>{
  97. return httpPost('/seal/invalid',params)
  98. }
  99. /**
  100. * 用印编辑
  101. */
  102. export const apiSealEdit=params=>{
  103. return httpPost('/seal/edit',params)
  104. }
  105. /**
  106. * 用印撤回
  107. */
  108. export const apiSealCancelApply=params=>{
  109. return httpGet('/seal_approval/cancelApply',params)
  110. }
  111. /**
  112. * 用印列表
  113. */
  114. export const apiSealList=params=>{
  115. return httpGet('/seal/list',params)
  116. }
  117. /**
  118. * 上传用印签回附件
  119. * @param {int} SealId 用印id
  120. * @param {string} FileUrl 文件地址 临时地址
  121. */
  122. export const apiSealCheckBackFiles=params=>{
  123. // return httpPost('/seal/upload_check_back_file',params)
  124. return uniAsync.uploadFile({
  125. url:baseUrl+'/seal/upload_check_back_file',
  126. filePath:params.tempPath,
  127. name:'file',
  128. header:{
  129. Authorization:store.state.token
  130. },
  131. formData:{
  132. SealId:params.SealId
  133. }
  134. })
  135. }
  136. /**
  137. * 上传附近时输入客户名称搜索提示
  138. * @param {int} PageSize
  139. * @param {int} CurrentIndex
  140. * @param {string} Keyword
  141. */
  142. export const apiSearchAllCustome=params=>{
  143. return httpGet('/seal/company_name_list',params)
  144. }
  145. export const getBelongCompany = params => {
  146. return httpGet('/seal/getAffiliatedCompany')
  147. }