小程序农机手端

index.jsx 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import Taro from "@tarojs/taro"
  2. import { View, Text } from '@tarojs/components'
  3. import Jianbian from "@/components/Jianbian"
  4. import MyCell from "../MyCell"
  5. import MyButton from "../MyButton"
  6. import './style.less'
  7. export default (props) => {
  8. const { detail, order, job, value, onClick,goDetail } = props
  9. return (
  10. <View className='card'>
  11. <Jianbian status='1' />
  12. <View className='cardHead'>
  13. {
  14. job && <MyCell header='需求时间' job action='详情>>' handleAction={goDetail}>2022-06-02</MyCell>
  15. }
  16. {
  17. !job && <MyCell header='需求时间'>2022-06-02</MyCell>
  18. }
  19. </View>
  20. <View className='line' />
  21. <MyCell header='农机名称'>{value?.machineryName||'收割机001'}</MyCell>
  22. <MyCell header='下单人'>{value?.personName}</MyCell>
  23. <MyCell header='手机号'>{value?.phone}</MyCell>
  24. <MyCell header='订单时间'>{value?.createDate.substr(0,10)||'2022-03-08'}</MyCell>
  25. {
  26. detail && <MyCell header='服务地址'>{value?.address||'河南省南阳市邓州市孟楼镇'}</MyCell>
  27. }
  28. <MyCell header='作业时间'>上午06:00--晚上21:00</MyCell>
  29. <MyCell header='订单费用'>{(value?.charges&&value.charges/100)||600}元</MyCell>
  30. {
  31. job && <MyButton value='开始作业' onClick={onClick} />
  32. }
  33. {
  34. order && <View className='line' />
  35. }
  36. {
  37. order && <View className='footer' onClick={goDetail}>详情{">"}{">"}</View>
  38. }
  39. </View>
  40. )
  41. }