import { Request, Response } from 'express';

// 代码中会兼容本地 service mock 以及部署站点的静态数据
export default {

  'GET /api/system/getPage': (req: Request, res: Response) => {
    res.json({
      code: 200,
      data: [
        {
          deptName: '供应商名称变更',
          categoryName: '2024-05-20 13:22:11',
          createTime: '集团采购部',
          exitTime: '已通过',
          exitReason: '2024-05-21 09:10:31',
        },
        {
          deptName: '法人代表变更',
          categoryName: '2024-05-18 08:30:55',
          createTime: '分公司审核部',
          exitTime: '审核中',
          exitReason: '',
        },
      ],
      total: 2,
      msg: '操作成功'
    });
  },

  'GET /api/system/getSupplierChangeDetail': (req: Request, res: Response) => {
    res.json({
      "code": 200,
      "msg": "success",
      "data": {
        baseInfo: [
          { label: '供应商名称', value: 'xxx' },
          { label: '境内/境外', value: '境内' },
          { label: '准入单位', value: 'xxxx' },
          { label: '准入部门', value: '采购部' },
        ],
        changeInfo: [
          { label: '供应商名称-变更前', value: 'xxxx' },
          { label: '供应商名称-变更后', value: 'xxxx' },
        ],
        "supplierName": "中山市合创展包装材料有限公司",
        "accessUnit": "中远海运（青岛）有限公司",
        "region": "境内",
        "accessDept": "采购部",
        "beforeName": "中山市合创展包装材料有限公司",
        "afterName": "中山市合创展包装有限公司",
        "qualifications": [
          {
            "type": "CMMI资质",
            "name": "CMMI资质",
            "level": "高级",
            "number": "546464",
            "org": "XX机构",
            "issueDate": "2024-09-08",
            "validDate": "2028-09-10",
            "file": "https://dummyimage.com/40x30/1890ff/fff.png&text=附件"
          }
        ]
      }
    }
    );
  },
};
