source_refund_audit.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. $config = [
  3. 'source' => 'place_order/source_refund',
  4. 'update' => [
  5. 'start' => 'place_order/manage/source/refund.audit',
  6. 'field' => [
  7. 'type' => [
  8. 'type' => 'show',
  9. 'default' => 'Dever::call("place_order/manage/source/refund.show", ["type", "{type}"])',
  10. ],
  11. 'desc_type' => [
  12. 'type' => 'show',
  13. 'default' => 'Dever::call("place_order/manage/source/refund.show", ["desc_type", "{desc_type}"])',
  14. ],
  15. 'audit' => [
  16. 'name' => '退款审核',
  17. 'rules' => true,
  18. 'type' => 'radio',
  19. 'option' => [
  20. 1 => '审核通过',
  21. 2 => '审核驳回',
  22. ],
  23. 'default' => 1,
  24. ],
  25. 'audit_desc' => [
  26. 'name' => '审核备注',
  27. //'rules' => true,
  28. 'type' => 'textarea',
  29. 'autosize' => ['minRows' => 2],
  30. ],
  31. ],
  32. ],
  33. ];
  34. $id = Dever::input('id');
  35. if ($id) {
  36. $info = Dever::db('source_refund', 'place_order')->find($id);
  37. if ($info && $info['type'] == 1) {
  38. $config['update']['field']['address_id'] = [
  39. 'type' => 'select',
  40. 'rules' => true,
  41. 'option' => 'Dever::call("place/address.getList")',
  42. ];
  43. }
  44. }
  45. return $config;