import { Text, View } from '@tarojs/components'
import styles from './index.module.scss'
import IconFont from '@/components/iconfont/iconfont'
import NameLabel from '@/components/nameLabel'
import { goLink } from '@/common/common'

export interface CompanyParam {
  value: { title: string; purchaser_name: string; id: number; phone: string }
}
export default (props: CompanyParam) => {
  const { value } = props
  return <View className={styles.company_item} onClick={() => goLink(`/pages/weightListAdd/index?type=edit&id=${value.id}`)}>
    <NameLabel name={value.title} />
    <View className={styles.desc}>
      <Text>{value?.title }</Text>
      <Text>{`${value?.purchaser_name} ${value?.phone}`}</Text>
    </View>
    <View className={styles.company_icon}><IconFont name="icon-xiala" size={43} /></View>
  </View>
}
