Authored by htoooth

Merge remote-tracking branch 'origin/release/1.0' into release/1.0

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <LayoutFilter> 3 <LayoutFilter>
4 <FilterItem :label="filters.sknCode.label"> 4 <FilterItem :label="filters.sknCode.label">
5 <Input v-model.trim="filters.sknCode.model" 5 <Input v-model.trim="filters.sknCode.model"
6 - :placeholder="filters.sknCode.holder"></Input> 6 + :placeholder="filters.sknCode.holder" :maxlength="9"></Input>
7 </FilterItem> 7 </FilterItem>
8 <FilterItem :label="filters.prodCode.label"> 8 <FilterItem :label="filters.prodCode.label">
9 <Input v-model.trim="filters.prodCode.model" 9 <Input v-model.trim="filters.prodCode.model"
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <LayoutFilter> 3 <LayoutFilter>
4 <FilterItem :label="filters.sknCode.label"> 4 <FilterItem :label="filters.sknCode.label">
5 <Input v-model.trim="filters.sknCode.model" 5 <Input v-model.trim="filters.sknCode.model"
6 - :placeholder="filters.sknCode.holder"></Input> 6 + :placeholder="filters.sknCode.holder" :maxlength="9"></Input>
7 </FilterItem> 7 </FilterItem>
8 <FilterItem :label="filters.prodCode.label"> 8 <FilterItem :label="filters.prodCode.label">
9 <Input v-model.trim="filters.prodCode.model" 9 <Input v-model.trim="filters.prodCode.model"
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <LayoutFilter> 3 <LayoutFilter>
4 <FilterItem :label="filters.sknCode.label"> 4 <FilterItem :label="filters.sknCode.label">
5 <Input v-model.trim="filters.sknCode.model" :number="true" 5 <Input v-model.trim="filters.sknCode.model" :number="true"
6 - :placeholder="filters.sknCode.holder"></Input> 6 + :placeholder="filters.sknCode.holder" :maxlength="9"></Input>
7 </FilterItem> 7 </FilterItem>
8 <FilterItem label="选择类目"> 8 <FilterItem label="选择类目">
9 <SelectCategory :value="categoryValue" @select-change="sortChange"></SelectCategory> 9 <SelectCategory :value="categoryValue" @select-change="sortChange"></SelectCategory>
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </FilterItem> 11 </FilterItem>
12 <FilterItem :label="filters.prodCode.label"> 12 <FilterItem :label="filters.prodCode.label">
13 <Input v-model.trim.number="filters.prodCode.model" 13 <Input v-model.trim.number="filters.prodCode.model"
14 - :placeholder="filters.prodCode.holder"></Input> 14 + :placeholder="filters.prodCode.holder" :maxlength="9"></Input>
15 </FilterItem> 15 </FilterItem>
16 <FilterItem :label="filters.merChantCode.label"> 16 <FilterItem :label="filters.merChantCode.label">
17 <Input v-model.trim="filters.merChantCode.model" 17 <Input v-model.trim="filters.merChantCode.model"
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </FilterItem> 11 </FilterItem>
12 <FilterItem :label="filters.prodCode.label"> 12 <FilterItem :label="filters.prodCode.label">
13 <Input v-model.trim.number="filters.prodCode.model" 13 <Input v-model.trim.number="filters.prodCode.model"
14 - :placeholder="filters.prodCode.holder"></Input> 14 + :placeholder="filters.prodCode.holder" :maxlength="9"></Input>
15 </FilterItem> 15 </FilterItem>
16 <FilterItem :label="filters.prodBarCode.label"> 16 <FilterItem :label="filters.prodBarCode.label">
17 <Input v-model.trim="filters.prodBarCode.model" 17 <Input v-model.trim="filters.prodBarCode.model"
@@ -72,18 +72,22 @@ @@ -72,18 +72,22 @@
72 }, 72 },
73 filterSearch() { 73 filterSearch() {
74 this.useFilter = true; 74 this.useFilter = true;
75 - this.getExpList(this.params());  
76 - this.page.current = 1; 75 + if (this.params()) {
  76 + this.getExpList(this.params());
  77 + this.page.current = 1;
  78 + }
77 }, 79 },
78 clearFilter() { 80 clearFilter() {
79 this.useFilter = false; 81 this.useFilter = false;
80 - this.getExpList(this.params());  
81 - this.page.current = 1; 82 + if (this.params()) {
  83 + this.getExpList(this.params());
  84 + this.page.current = 1;
  85 + }
82 this.filters = dataStore().filters; 86 this.filters = dataStore().filters;
83 }, 87 },
84 pageChange(page) { 88 pageChange(page) {
85 let params = this.params(); 89 let params = this.params();
86 - 90 +
87 params.pageNo = page; 91 params.pageNo = page;
88 this.page.current = page; 92 this.page.current = page;
89 this.getExpList(params); 93 this.getExpList(params);
@@ -96,32 +100,34 @@ @@ -96,32 +100,34 @@
96 }; 100 };
97 const mapKeys = { 101 const mapKeys = {
98 expressNumber: 'expressNo', 102 expressNumber: 'expressNo',
99 - productSkn: 'prodCode', 103 + skn: 'prodCode',
100 skuFactoryCode: 'prodBarCode', 104 skuFactoryCode: 'prodBarCode',
101 proReqFormId: 'orderNo' 105 proReqFormId: 'orderNo'
102 }; 106 };
103 107
104 - if (this.useFilter) {  
105 - let val;  
106 -  
107 - _.each(mapKeys, (v, k) => {  
108 - val = '' + this.filters[v].model;  
109 - if (val.length) {  
110 - data[k] = this.filters[v].model;  
111 - }  
112 - }); 108 + if (!this.useFilter) {
  109 + return data;
113 } 110 }
114 111
  112 + let val;
  113 +
  114 + _.each(mapKeys, (v, k) => {
  115 + val = '' + this.filters[v].model;
  116 + if (val.length) {
  117 + data[k] = this.filters[v].model;
  118 + }
  119 + });
  120 +
115 if (typeof data.proReqFormId !== 'undefined' && 121 if (typeof data.proReqFormId !== 'undefined' &&
116 !_.isFinite(+data.proReqFormId)) { 122 !_.isFinite(+data.proReqFormId)) {
117 this.$Message.error('调拨单号只能是数字', 3); 123 this.$Message.error('调拨单号只能是数字', 3);
118 - return; 124 + return false;
119 } 125 }
120 126
121 - if (typeof data.productSkn !== 'undefined' &&  
122 - !_.isFinite(+data.productSkn)) { 127 + if (typeof data.skn !== 'undefined' &&
  128 + !_.isFinite(+data.skn)) {
123 this.$Message.error('SKN编码只能是数字', 3); 129 this.$Message.error('SKN编码只能是数字', 3);
124 - return; 130 + return false;
125 } 131 }
126 132
127 return data; 133 return data;
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 </FilterItem> 7 </FilterItem>
8 <FilterItem :label="filters.prodCode.label"> 8 <FilterItem :label="filters.prodCode.label">
9 <Input v-model.trim.number="filters.prodCode.model" 9 <Input v-model.trim.number="filters.prodCode.model"
10 - :placeholder="filters.prodCode.holder"></Input> 10 + :placeholder="filters.prodCode.holder" :maxlength="9"></Input>
11 </FilterItem> 11 </FilterItem>
12 <FilterItem :label="filters.merChantCode.label"> 12 <FilterItem :label="filters.merChantCode.label">
13 <Input v-model.trim="filters.merChantCode.model" 13 <Input v-model.trim="filters.merChantCode.model"