/**
 * Global Config Files
 * Added By YangXB 2021.11.24
 */
export const servicePhone = '4000-5858-22';
export const OSSBaseUrl = 'https://cdn.fzcfkj.com/';

export const colors = {
  primary: '#0052d9',
  success: '#2ba471',
  warning: '#e37318',
  danger: '#d54941',
  info: '#029cd4',
  gray: '#999999',
} as const;

export const defaultAvatarUrl =
  'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';

const envVersion = wx.getAccountInfoSync().miniProgram.envVersion;

export const base = {
  appletName: '易宝赞普惠版',
  apiHost: envVersion == 'release' ? 'https://f.ebaozan.com/api/' : 'http://192.168.1.138:93/',

  webViewBaseUrl: envVersion == 'release' ? 'https://f.ebaozan.com/' : 'http://free.erp/',
  cookieKey: 'OwCookie',
};

// 头文件
export const http = {
  header: {
    'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'X-Requested-With': 'XMLHttpRequest',
  },
  unLoginCode: 110000,
};

/**
 * 生产状态
 */
export const SaleOrderProcessStateOption = [
  { label: '生产未完成', value: 200 },
  { label: '生产已完成', value: 202 },
];

export const SaleOrderProcessStateObj = {
  200: '生产未完成',
  202: '生产已完成',
};

/**
 * 收款状态
 */
export const PayedStateOption = [
  { label: '全部', value: '' },
  { label: '未收款', value: '1' },
  { label: '部分收款', value: '2' },
  { label: '收款完成', value: '3' },
];

/** 收支类型 */
export const FinanceItemTypeObj = { 1: '收入', 2: '支出' };

export const FinanceItemTypeArr = [
  { value: '1', label: '收入' },
  { value: '2', label: '支出' },
];
