index.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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:{
  48. spec:{
  49. tooltip:true,
  50. icon:'fa fa-list',
  51. type:'info',
  52. text:__('关联规格'),
  53. method:'spec'
  54. },
  55. edit:true,
  56. del:true
  57. }
  58. }
  59. ]
  60. },
  61. methods: {
  62. spec:function (row){
  63. Yunqi.api.open({
  64. url:'shop/customer_spec/add',
  65. width:1000,
  66. title:__('关联规格'),
  67. icon:'fa fa-list'
  68. });
  69. },
  70. }
  71. }
  72. </script>
  73. <style>
  74. </style>