index.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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\\goods\\ProductConfig','add'),
  20. edit:Yunqi.auth.check('app\\admin\\controller\\goods\\ProductConfig','edit'),
  21. del:Yunqi.auth.check('app\\admin\\controller\\goods\\ProductConfig','del'),
  22. multi:Yunqi.auth.check('app\\admin\\controller\\goods\\ProductConfig','multi'),
  23. recyclebin:Yunqi.auth.check('app\\admin\\controller\\goods\\ProductConfig','recyclebin'),
  24. },
  25. extend:{
  26. index_url: 'goods/product_config/index',
  27. add_url: 'goods/product_config/add',
  28. edit_url: 'goods/product_config/edit',
  29. del_url: 'goods/product_config/del',
  30. multi_url: 'goods/product_config/multi',
  31. download_url: 'goods/product_config/download',
  32. recyclebin_url: 'goods/product_config/recyclebin',
  33. },
  34. columns:[
  35. {checkbox: true},
  36. {field: 'id',title: __('ID'),width:80,sortable: true},
  37. {field: 'type_id',title: __('品种'),operate:'LIKE', searchList: Yunqi.data.varietyList},
  38. {field: 'title',title: __('标题'),operate: '='},
  39. {field: 'another_name', title: __('别名'),operate:'LIKE'},
  40. {field: 'weight', title: __('重量(斤)'),operate: false},
  41. //{field: 'type_box', title: __('包装箱'),operate: false, searchList: Yunqi.data.packingList},
  42. {field: 'status', title: __('状态'),width:120,searchList: {1: __('正常'),2: __('停用')},formatter:Yunqi.formatter.switch},
  43. {field: 'sort', title: __('排序'), operate:false,sortable: true},
  44. {field: 'createtime', title: __('创建时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},
  45. {
  46. field: 'operate',
  47. title: __('操作'),
  48. width:150,
  49. action:{sort:true,edit:true,del:true}
  50. }
  51. ]
  52. },
  53. methods: {
  54. }
  55. }
  56. </script>
  57. <style>
  58. </style>