waybill.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. import {
  2. startStatus,
  3. WaybillStatus
  4. } from '@/assets/js/blockSort'
  5. export const employee = () => {
  6. return [{
  7. field: 'selection',
  8. label: '多选',
  9. align: 'center',
  10. }, {
  11. field: 'waybillNo',
  12. label: '运单号',
  13. align: 'center',
  14. }, {
  15. field: 'status',
  16. label: '状态',
  17. align: 'center',
  18. options: WaybillStatus()
  19. }, {
  20. field: 'senderAddressName',
  21. label: '寄件人',
  22. align: 'center',
  23. }, {
  24. field: 'consigneeAddressName',
  25. label: '收件人',
  26. align: 'center',
  27. }, {
  28. field: 'createdAt',
  29. label: '下单时间',
  30. align: 'center',
  31. }, {
  32. field: 'printUser.nickName',
  33. label: '制单人',
  34. align: 'center',
  35. }, {
  36. field: 'action',
  37. label: '操作',
  38. colWidth: '370px',
  39. align: 'center',
  40. labelButton: [{
  41. type: 'pdf',
  42. label: '下载PDF',
  43. icon: 'el-icon-download',
  44. style: 'warning',
  45. },{
  46. type: 'logs',
  47. label: '详情',
  48. icon: 'el-icon-tickets',
  49. style: 'success',
  50. }, {
  51. type: 'edit',
  52. label: '编辑',
  53. icon: 'el-icon-edit',
  54. style: 'primary',
  55. }, {
  56. type: 'send',
  57. label: '派单',
  58. icon: 'el-icon-tickets',
  59. style: 'primary',
  60. }, {
  61. type: 'del',
  62. label: '删除',
  63. icon: 'el-icon-delete',
  64. style: 'danger',
  65. }]
  66. }]
  67. }
  68. export const formRules = () => {
  69. return [{
  70. field: 'temperatureInterval',
  71. type: 'select',
  72. label: '温度需求',
  73. placeholder: '请选择',
  74. colWidth: 12,
  75. multiple: false,
  76. rules: [{
  77. required: true,
  78. message: '请选择',
  79. trigger: 'blur,change'
  80. }],
  81. options: [{
  82. label: '常温',
  83. value: '常温',
  84. },
  85. {
  86. label: '冷藏(2-8℃℃)',
  87. value: '冷藏(2-8℃℃)',
  88. },
  89. {
  90. label: '冷藏(0-5℃℃)',
  91. value: '冷藏(0-5℃℃)',
  92. },
  93. {
  94. label: '冷冻(0℃以下)',
  95. value: '冷冻(0℃以下)',
  96. }
  97. ],
  98. }, {
  99. field: 'deliveryCondition',
  100. type: 'select',
  101. label: '配送要求',
  102. placeholder: '请选择',
  103. colWidth: 12,
  104. multiple: false,
  105. rules: [{
  106. required: true,
  107. message: '请选择',
  108. trigger: 'blur,change'
  109. }],
  110. options: [{
  111. label: '保温箱',
  112. value: '保温箱',
  113. },
  114. {
  115. label: '冷藏车',
  116. value: '冷藏车',
  117. },
  118. {
  119. label: '航空',
  120. value: '航空',
  121. },
  122. {
  123. label: '医药整车',
  124. value: '医药整车',
  125. }
  126. ],
  127. }, {
  128. field: 'cargoType',
  129. type: 'select',
  130. label: '货物类型',
  131. placeholder: '请选择',
  132. colWidth: 12,
  133. multiple: false,
  134. rules: [{
  135. required: true,
  136. message: '请选择',
  137. trigger: 'blur,change'
  138. }],
  139. options: [{
  140. label: '药品',
  141. value: '药品',
  142. },
  143. {
  144. label: '试剂',
  145. value: '试剂',
  146. },
  147. {
  148. label: '血液制品',
  149. value: '血液制品',
  150. },
  151. {
  152. label: '疫苗',
  153. value: '疫苗',
  154. },
  155. {
  156. label: '其它',
  157. value: '其它',
  158. }
  159. ],
  160. }, {
  161. field: 'customerName',
  162. type: 'input',
  163. label: '下单客户',
  164. placeholder: '请输入',
  165. colWidth: 12,
  166. multiple: false,
  167. rules: [{
  168. required: false,
  169. message: '请选择',
  170. trigger: 'blur,change'
  171. }],
  172. }, {
  173. field: 'remark',
  174. label: '备注',
  175. placeholder: '备注',
  176. type: 'textarea',
  177. colWidth: 24,
  178. }, ]
  179. }
  180. export const addressBook = () => {
  181. return [{
  182. field: 'name',
  183. label: '姓名',
  184. align: 'center',
  185. }, {
  186. field: 'phone',
  187. label: '电话',
  188. align: 'center',
  189. }, {
  190. field: 'region',
  191. label: '省市区',
  192. align: 'center',
  193. }, {
  194. field: 'address',
  195. label: '详细地址',
  196. align: 'center',
  197. }, ]
  198. }
  199. export const sendList = () => {
  200. return [{
  201. field: 'type',
  202. label: '类型',
  203. placeholder: '类型',
  204. type: 'radio',
  205. colWidth: 24,
  206. rules: [{
  207. required: true,
  208. message: '选择类型',
  209. trigger: 'blur,change'
  210. }],
  211. options: [{
  212. label: '仓管',
  213. value: 2,
  214. },
  215. {
  216. label: '司机',
  217. value: 3,
  218. },
  219. ]
  220. }, {
  221. field: 'printUserId',
  222. type: 'searchSelect',
  223. label: '制单人',
  224. placeholder: '请选择制单人',
  225. colWidth: 24,
  226. multiple: false,
  227. rules: [{
  228. required: true,
  229. message: '请选择制单人',
  230. trigger: 'blur,change'
  231. }],
  232. options: [],
  233. }]
  234. }