Newer
Older
xc-business-system / src / api / resource / contract.ts
/**
 * 合同执行变更登记表
 */
import request from '../index'
const prefix = '/resource/customer/contractChange'
// 列表查询
export function getCustomerContractList(data: any) {
  return request({
    url: `${prefix}/approval/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 获取详情
export function getCustomerContractDetail(data: { id: string }) {
  return request({
    url: `${prefix}/detail`,
    method: 'post',
    data,
  })
}

// 新建(保存至草稿箱)
export function addCustomerContract(data: object) {
  return request({
    url: `${prefix}/save`,
    method: 'post',
    data,
  })
}

// 编辑--草稿箱
export function updateCustomerContract(data: object) {
  return request({
    url: `${prefix}/draftUpdate`,
    method: 'post',
    data,
  })
}
// 编辑--未通过、已取消
export function failUpdateCustomerContract(data: object) {
  return request({
    url: `${prefix}/failUpdate`,
    method: 'post',
    data,
  })
}

// 获取详情信息
export function getInfo(data: { id: string }) {
  return request({
    url: `${prefix}/detail`,
    method: 'post',
    data,
  })
}

// 提交
export function submit(data: { id: string; formId: string; processId?: string }) {
  return request({
    url: `${prefix}/submit`,
    method: 'post',
    data,
  })
}

// 删除--草稿箱
export function draftDelete(data: { id: string }) {
  return request({
    url: `${prefix}/draftDelete`,
    method: 'post',
    data,
  })
}

// 审批删除--已取消、全部
export function approvalDelete(data: { id: string; taskId: string }) {
  return request({
    url: `${prefix}/approval/delete`,
    method: 'post',
    data,
  })
}

// 取消
export function cancelApproval(data: { processInstanceId?: string; comments: string; id: string }) {
  return request({
    url: `${prefix}/approval/revoke`,
    method: 'post',
    data,
  })
}

// 拒绝
export function refuseApproval(data: { id: string; taskId: string; comments: string }) {
  return request({
    url: `${prefix}/approval/refuse`,
    method: 'post',
    data,
  })
}

// 导出word/pdf/打印
export function getStream(data: any) {
  return request({
    url: `${prefix}/exportFile`,
    method: 'post',
    responseType: 'blob',
    data,
  })
}

// 发送给委托方
export function sendTo(data: { id: string; noticeUserId: string; noticeUserName: string }) {
  return request({
    url: `${prefix}/sendTo`,
    method: 'post',
    data,
  })
}

// 模拟受检系统委托方反馈意见
export function handleCustomerAdvice(data: { id: string; customerAdvice: string; customerAdviceTime: string }) {
  return request({
    url: '/resource/customer/contractChange/customerAdvice',
    method: 'post',
    data,
  })
}