index.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <el-card shadow="never">
  3. <yun-table
  4. :columns="columns"
  5. search="name,phone"
  6. toolbar="refresh,add,edit,del,more"
  7. ref="yuntable"
  8. :auth="auth"
  9. :extend="extend">
  10. </yun-table>
  11. </el-card>
  12. </template>
  13. <script>
  14. import table from "@components/Table.js";
  15. export default{
  16. components:{'YunTable':table},
  17. data:{
  18. auth:{
  19. add:Yunqi.auth.check('app\\admin\\controller\\shop\\Customer','add'),
  20. edit:Yunqi.auth.check('app\\admin\\controller\\shop\\Customer','edit'),
  21. del:Yunqi.auth.check('app\\admin\\controller\\shop\\Customer','del'),
  22. multi:Yunqi.auth.check('app\\admin\\controller\\shop\\Customer','multi'),
  23. recyclebin:Yunqi.auth.check('app\\admin\\controller\\shop\\Customer','recyclebin'),
  24. },
  25. extend:{
  26. index_url: 'shop/customer/index',
  27. add_url: 'shop/customer/add',
  28. edit_url: 'shop/customer/edit',
  29. del_url: 'shop/customer/del',
  30. multi_url: 'shop/customer/multi',
  31. download_url: 'shop/customer/download',
  32. recyclebin_url: 'shop/customer/recyclebin',
  33. },
  34. columns:[
  35. {checkbox: true},
  36. {field: 'id',title: __('ID'),width:80,sortable: true},
  37. {field: 'name',title: __('姓名'),operate:'LIKE'},
  38. {field: 'phone',title: __('手机'),operate: '='},
  39. {field: 'status', title: __('状态'),width:120,searchList: {1: __('正常'),2: __('停用')},formatter:Yunqi.formatter.switch},
  40. {field: 'account_term', title: __('账期'),searchList: {1: __('日结'), 2: __('周结'), 3: __('半月结')}},
  41. {field: 'remark', title: __('备注'),operate: false},
  42. {field: 'createtime', title: __('创建时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},
  43. {
  44. field: 'operate',
  45. title: __('操作'),
  46. width:150,
  47. action:{sort:true,edit:true,del:true}
  48. }
  49. ]
  50. },
  51. methods: {
  52. }
  53. }
  54. </script>
  55. <style>
  56. </style>