search.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!-- 搜索表单 -->
  2. <template>
  3. <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
  4. </template>
  5. <script>
  6. export default {
  7. data() {
  8. return {};
  9. },
  10. props: {
  11. user: {
  12. type: 'String',
  13. default: ''
  14. }
  15. },
  16. computed: {
  17. // 表格列配置
  18. seekList() {
  19. return [
  20. {
  21. label: '关键字:',
  22. value: 'keyWord',
  23. type: 'input',
  24. placeholder: '编码/物品名称/客户名称/设备名称'
  25. },
  26. {
  27. label: '编码:',
  28. value: 'code',
  29. type: 'input',
  30. placeholder: ''
  31. },
  32. {
  33. label: '工单编码:',
  34. value: 'workCode',
  35. type: 'input',
  36. placeholder: ''
  37. },
  38. // {
  39. // label: '物品名称:',
  40. // value: 'categoryName',
  41. // width: 380,
  42. // type: 'input',
  43. // placeholder: ''
  44. // },
  45. {
  46. label: this.user == 'recycleName' ? '回收人' : '领用人',
  47. value: this.user == 'recycleName' ? 'recycleName' : 'recipientName',
  48. width: 380,
  49. type: 'input',
  50. placeholder: ''
  51. },
  52. {
  53. label: '客户名称:',
  54. value: 'contactName',
  55. width: 380,
  56. type: 'input',
  57. placeholder: ''
  58. },
  59. {
  60. label: '设备名称:',
  61. value: 'deviceName',
  62. width: 380,
  63. type: 'input',
  64. placeholder: ''
  65. },
  66. // {
  67. // label: '物品分类:',
  68. // value: 'categoryLevelName',
  69. // width: 380,
  70. // type: 'input',
  71. // placeholder: ''
  72. // },
  73. {
  74. label: '物品名称:',
  75. value: 'categoryName',
  76. width: 380,
  77. type: 'input',
  78. placeholder: ''
  79. },
  80. // {
  81. // label: '领用部门:',
  82. // value: 'receivingDeptName',
  83. // width: 380,
  84. // type: 'input',
  85. // placeholder: '',
  86. // },
  87. {
  88. label: '创建时间:',
  89. value: 'createTime',
  90. type: 'date',
  91. dateType: 'datetimerange',
  92. placeholder: '',
  93. width: 380,
  94. valueAr: ['endTime', 'endTime']
  95. },
  96. ];
  97. }
  98. },
  99. methods: {
  100. /* 搜索 */
  101. search(e) {
  102. this.$emit('search', {
  103. ...e
  104. });
  105. }
  106. }
  107. };
  108. </script>