import request from '@/common/request'; import { FINANCE_PATH as prefix } from "@/api/AppPath"; export default { list: function (params) { return request({ url: prefix + "/cw_finance/invoice/list", method: "get", params: params, }); }, queryById: function (id) { return request({ url: prefix + "/cw_finance/invoice/queryById", method: "get", params: { id: id }, }); }, queryByNumber: function (number, id) { return request({ url: prefix + "/cw_finance/invoice/queryByNumber", method: "get", params: { number: number, id: id }, }); }, save: function (inputForm) { return request({ url: prefix + `/cw_finance/invoice/save`, method: "post", data: inputForm, }); }, delete: function (ids) { return request({ url: prefix + "/cw_finance/invoice/delete", method: "delete", params: { ids: ids }, }); }, updateStatusById: function (data) { return request({ url: prefix + "/cw_finance/invoice/updateStatusById", method: "post", data: data, }); }, isReceivables: function (data) { return request({ url: prefix + "/cw_finance/invoice/isReceivables", method: "post", data: data, }); }, saveForm: function (inputForm) { return request({ url: prefix + `/cw_finance/invoice/saveForm`, method: "post", data: inputForm, }); }, saveFormInvalid: function (inputForm) { return request({ url: prefix + `/cw_finance/invoice/saveFormInvalid`, method: "post", data: inputForm, }); }, queryIdByInvalidId: function (id) { return request({ url: prefix + "/cw_finance/invoice/queryIdByInvalidId", method: "get", params: { id: id }, }); }, importDetail: function (data) { return request({ url: prefix + "/cw_finance/invoice/importDetail", method: "post", data: data, }); }, exportTemplate: function () { return request({ url: prefix + "/cw_finance/invoice/importDetail/template", method: "get", responseType: "blob", }); }, getByIds: function (projectId, invoiceForm) { return request({ url: prefix + "/cw_finance/invoice/getByIds", method: "get", params: { projectId: projectId, ...invoiceForm }, }); }, getByIds2: function (projectId, invoiceForm) { return request({ url: prefix + "/cw_finance/invoice/getByIds2", method: "get", params: { projectId: projectId, ...invoiceForm }, }); }, getByContractId: function (contractId, invoiceForm) { return request({ url: prefix + "/cw_finance/invoice/getByContractId", method: "get", params: { contractId: contractId, ...invoiceForm }, }); }, getIdByClientId: function (clientId, invoiceForm) { return request({ url: prefix + "/cw_finance/invoice/getIdByClientId", method: "get", params: { clientId: clientId, ...invoiceForm }, }); }, exportFile: function (params) { return request({ url: prefix + "/cw_finance/invoice/export", method: "get", params: params, responseType: "blob", }); }, getLabelById:function (param) { return request({ url: prefix+"/cwProjectRecords/getLabelById", method:"get", params: {id: param} }) }, listByProgramId: function (params) { return request({ url: prefix + "/cw_finance/invoice/listByProgramId", method: "get", params: params, }); }, };