import request from '@/utils/request'
import { MessageBox } from 'element-ui'


// 采购明细
// flow/caigoumingxi-wait-list
//flow/caigoumingxi-receive-list
//flow/caigoumingxi-confirm
export function waitList(params) {
  return request({
    method: 'get',
    url: `/api/oa/flow/caigoumingxi-wait-list`,
    params
  })
}

export function receiveList(params) {
  return request({
    method: 'get',
    url: `/api/oa/flow/caigoumingxi-receive-list`,
    params
  })
}

export function updateList(data) {
  return request({
    method: 'post',
    url: `/api/oa/flow/caigoumingxi-update`,
    data
  })
}

export function confirmList(data) {
  return request({
    method: 'post',
    url: `/api/oa/flow/caigoumingxi-confirm`,
    data
  })
}

// 已支付物资明细情况
export function getItems(params) {
  return request({
    method: 'get',
    url: `/api/ht/fund_log/wuzicaigou-items`,
    params
  })
}
//
export function fundLogSave(data) {
  return request({
    method: 'post',
    url: `/api/ht/fund_log/store`,
    data
  })
}

// 获取合同详情
export function detailContract(params){
  return request({
    method:'get',
    url:'/api/ht/contract/show',
    params
  })
}
// 获取 付款登记次数
export function getFundLog(params,noloading = false){
  return request({
    method:'get',
    url:'/api/ht/fund_log/index',
    params,
    noloading
  })
}

// 设置最后一笔为 最后一笔支付

export function fundLogEnd(params){
  return request({
    method:'get',
    url:'/api/ht/fund_log/end',
    params
  })
}
