order-review-search.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!-- 搜索表单 -->
  2. <template>
  3. <ele-card :body-style="{ paddingBottom: '8px' }">
  4. <ProSearch :items="columns" ref="searchRef" :isShowLabel="false" @search="search">
  5. <el-col :span="6" style="min-width: 160px">
  6. <el-button style="width: 80px" type="primary" plain @click="search">查询</el-button>
  7. <el-button style="width: 80px" type="info" @click="reset">重置</el-button>
  8. </el-col>
  9. </ProSearch>
  10. </ele-card>
  11. </template>
  12. <script setup>
  13. import { reactive, ref, defineEmits } from 'vue';
  14. import { useFormData } from '@/utils/use-form-data';
  15. import ProSearch from '@/components/CommonPage/ProSearch2.vue';
  16. import request from '@/utils/request';
  17. const emit = defineEmits(['search']);
  18. const columns = ref([
  19. {
  20. type: 'select',
  21. label: '复审状态',
  22. prop: 'reviewStatus',
  23. options: [
  24. { label: '未复审', value: '1' },
  25. { label: '已复审', value: '2' },
  26. { label: '复审终止', value: '3' }
  27. ]
  28. },
  29. {
  30. type: 'input',
  31. label: '用户名',
  32. prop: 'userName'
  33. },
  34. {
  35. type: 'input',
  36. label: '订单编号(多个以中文逗号、空格或换行分割)',
  37. prop: 'orderIds',
  38. colProps: { span: 8 }
  39. },
  40. {
  41. type: 'input',
  42. label: '物流单号(多个以中文逗号、空格或换行分割)',
  43. prop: 'waybillCodes',
  44. colProps: { span: 8 }
  45. },
  46. {
  47. type: 'select',
  48. label: '收货仓库',
  49. prop: 'godownId',
  50. options: []
  51. },
  52. {
  53. type: 'datetime',
  54. label: '提交复审时间(开始时间)',
  55. prop: 'applyTimeStart',
  56. props: {
  57. format: 'YYYY-MM-DD HH:mm:ss',
  58. valueFormat: 'YYYY-MM-DD HH:mm:ss'
  59. }
  60. },
  61. {
  62. type: 'datetime',
  63. label: '提交复审时间(结束时间)',
  64. prop: 'applyTimeEnd',
  65. props: {
  66. valueFormat: 'YYYY-MM-DD HH:mm:ss'
  67. }
  68. },
  69. ]);
  70. //获取仓库数据
  71. function getGodownList() {
  72. request.post('/baseinfo/godown/searchGodown?name=').then((res) => {
  73. if (res.data.code === 200) {
  74. let item = columns.value.find(
  75. (item) => item.prop === 'godownId'
  76. );
  77. item.options = res.data.data.map((item) => ({
  78. label: item.godownName,
  79. value: item.id
  80. }));
  81. }
  82. });
  83. }
  84. getGodownList();
  85. const searchRef = ref(null);
  86. /** 搜索 */
  87. const search = (data) => {
  88. emit('search', { ...data });
  89. };
  90. /** 重置 */
  91. const reset = () => {
  92. resetFields();
  93. search();
  94. };
  95. </script>