import { Request, Response } from 'express';
export default {

  'GET /api/system/list': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [
        
      ],
      total: 2,
      msg: '操作成功'
    });
  },
  'GET /api/system/treeData': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [ {
        title: '中国远洋海运集团集团总部',
        key: 'head',
        children: [
          {
            title: '集采',
            key: 'collection',
            children: [
              { title: '镇江分公司', key: 'zhenjiang' },
              { title: '浦东分公司', key: 'pudong' },
            ],
          },
        ],
      },],
      total: 2,
      msg: '操作成功'
    });
  },

  'GET /api/system/regionOptions': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [
        { label: '境内', value: '境内' },
        { label: '境外', value: '境外' },
      ],
      total: 2,
      msg: '操作成功'
    });
  },

  'GET /api/system/categoryOptions': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [
        { label: '原材料', value: '原材料' },
        { label: '配件', value: '配件' },
        { label: '燃油', value: '燃油' },
      ],
      total: 2,
      msg: '操作成功'
    });
  },
  'GET /api/system/storeOptions': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [
        { label: '库1', value: '库1' },
        { label: '库2', value: '库2' },
      ],
      total: 2,
      msg: '操作成功'
    });
  },

'GET /api/system/supplierDetail': (req: Request, res: Response) => {
    res.json({ code: 200, 
      data: [
        { id: 1, unit: "中国远洋海运集团",        category: "燃油",   accessTime: "2025-01-05", exitTime: "2025-01-05", grayTime: "2024-01-01~2025-01-02", blackTime: "" },
        { id: 2, unit: "中国远洋海运集团",        category: "配件",   accessTime: "2025-01-05", exitTime: "",            grayTime: "",                    blackTime: "" },
        { id: 3, unit: "中远海运（天津）有限公司", category: "天然气", accessTime: "2025-03-05", exitTime: "",            grayTime: "",                    blackTime: "" },
        { id: 4, unit: "中远海运（青岛）有限公司", category: "天然气", accessTime: "2025-03-09", exitTime: "",            grayTime: "",                    blackTime: "" },
      ],
      total: 10,
      msg: '操作成功' });
  },

};
