Commit 6640d43d62eecdbcb9f25fba2f40fc30d73ed505

Authored by lxf
1 parent 2969e907

fix: 支持批量查询单号

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