elkers
2025-01-16 0b62eca817d6c40c188dc72c3034835a61a30a35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * @Author: Liuyi candymxq888@outlook.com
 * @Date: 2024-08-15 14:49:55
 * @LastEditors: Liuyi candymxq888@outlook.com
 * @LastEditTime: 2024-08-20 14:13:30
 * @FilePath: \water-qinghe-web\src\api\financial\invoice\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
 
import { publicRequest } from '@/utils/request'
 
//发票
export default function invoice(){
    return {
        //创建发票
        create: (data) => {
            return publicRequest({
                url: '/invoice/create',
                method: 'post',
                data,
            });
        },
        //删除发票
        remove: (id) => {
            return publicRequest({
                url: `/invoice/remove?id=${id}`,
                method: 'post',
            });
        },
        //编辑发票
        modify: (data) => {
            return publicRequest({
                url: '/invoice/modify',
                method: 'post',
                data,
            });
        },
        //停用发票
        stop: (data) => {
            return publicRequest({
                url: `/invoice/stop?id=${data}`,
                method: 'post',
            });
        },
        //启用发票
        enable: (data) => {
            return publicRequest({
                url: `/invoice/enable?id=${data}`,
                method: 'post',
            });
        },
        //分页查询发票
        search: (data) => {
            return publicRequest({
                url: '/invoice/search',
                method: 'post',
                data,
            });
        },
        //获取发票
        get: (id) => {
            return publicRequest({
                url: `/invoice/get?id=${id}`,
                method: 'get',
            });
        },
    };
}