Commit 6640d43d62eecdbcb9f25fba2f40fc30d73ed505

Authored by lxf
1 parent 2969e907

fix: 支持批量查询单号

pages/order/filter.vue
... ... @@ -49,7 +49,7 @@
49 49 </template>
50 50  
51 51 <script>
52   -import { urlParam } from '@/utils/param';
  52 +import { urlParam, formatBatchCode } from '@/utils/param';
53 53 export default {
54 54 name: 'order-filter',
55 55 props: {
... ... @@ -105,7 +105,7 @@ export default {
105 105 },
106 106 // 查询
107 107 inquiryChange() {
108   - this.getOpenerEventChannel().emit('refreshData', this.searchForm);
  108 + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, code: formatBatchCode(this.searchForm.code) });
109 109 setTimeout(() => uni.navigateBack(), 500);
110 110 },
111 111 chosePayStatus() {
... ...
pages/payPlan/filter.vue
... ... @@ -35,7 +35,7 @@
35 35 </template>
36 36  
37 37 <script>
38   -import { urlParam } from '@/utils/param';
  38 +import { formatBatchCode, urlParam } from '@/utils/param';
39 39 export default {
40 40 name: 'payPlanFilter',
41 41 props: {
... ... @@ -87,7 +87,7 @@ export default {
87 87 },
88 88 // 查询
89 89 inquiryChange() {
90   - this.getOpenerEventChannel().emit('refreshData', this.searchForm);
  90 + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, orderCode: formatBatchCode(this.searchForm.orderCode) });
91 91 setTimeout(() => uni.navigateBack(), 500);
92 92 },
93 93 },
... ...
pages/settlement/filter.vue
... ... @@ -52,7 +52,7 @@
52 52 </template>
53 53  
54 54 <script>
55   -import { urlParam } from '@/utils/param';
  55 +import { formatBatchCode, urlParam } from '@/utils/param';
56 56 export default {
57 57 name: 'settlement-filter',
58 58 props: {
... ... @@ -112,7 +112,7 @@ export default {
112 112 },
113 113 // 查询
114 114 inquiryChange() {
115   - this.getOpenerEventChannel().emit('refreshData', this.searchForm);
  115 + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, orderCode: formatBatchCode(this.searchForm.orderCode) });
116 116 setTimeout(() => uni.navigateBack(), 500);
117 117 },
118 118 chosePayStatus() {
... ...
utils/param.js
... ... @@ -51,3 +51,7 @@ export const urlParam = data =&gt; {
51 51 export const clearURL = (str = '') => {
52 52 return str.replace(/^(\s|\/)+|(\s|\/)+$/g, '');
53 53 };
  54 +
  55 +export const formatBatchCode = val => {
  56 + return val ? val.replace(/,/, ',').replace(/\s+/g, ',') : '';
  57 +};
... ...