Authored by htoooth

fix

1 import ModalSizeEdit from './modal-size-edit'; 1 import ModalSizeEdit from './modal-size-edit';
2 import ModalStockOut from './modal-stock-out'; 2 import ModalStockOut from './modal-stock-out';
3 import ModalDeliver from './modal-deliver'; 3 import ModalDeliver from './modal-deliver';
  4 +import ModalExample from './modal-example';
4 5
5 export { 6 export {
6 ModalSizeEdit, 7 ModalSizeEdit,
7 ModalStockOut, 8 ModalStockOut,
8 ModalDeliver, 9 ModalDeliver,
  10 + ModalExample
9 }; 11 };
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 width: 100px; 51 width: 100px;
52 height: 150px; 52 height: 150px;
53 border-radius: 3px; 53 border-radius: 3px;
54 - background-image: url(../../../../images/example/#{$num}.png); 54 + background-image: url(../../images/example/#{$num}.png);
55 background-repeat: no-repeat; 55 background-repeat: no-repeat;
56 margin: 15px 15px; 56 margin: 15px 15px;
57 } 57 }
@@ -218,7 +218,7 @@ @@ -218,7 +218,7 @@
218 import api from 'product-create/api'; 218 import api from 'product-create/api';
219 import service from 'product-create/service'; 219 import service from 'product-create/service';
220 import serial from 'product-create/serialize'; 220 import serial from 'product-create/serialize';
221 -import ModalExample from './modal-example'; 221 +import {ModalExample} from 'components/modal';
222 222
223 export default { 223 export default {
224 props: ['step', 'product'], 224 props: ['step', 'product'],
@@ -85,6 +85,7 @@ export default { @@ -85,6 +85,7 @@ export default {
85 this.modal_loading = true; 85 this.modal_loading = true;
86 86
87 this.save().then(() => { 87 this.save().then(() => {
  88 + this.$emit('on-success');
88 this.modal_loading = false; 89 this.modal_loading = false;
89 this.close(); 90 this.close();
90 }); 91 });
@@ -96,12 +97,13 @@ export default { @@ -96,12 +97,13 @@ export default {
96 this.productSkn = null; 97 this.productSkn = null;
97 this.brandId = null; 98 this.brandId = null;
98 this.modal_loading = false; 99 this.modal_loading = false;
  100 + this.table.data = [];
99 }, 101 },
100 getData() { 102 getData() {
101 service.getStorageBySkn(this.productSkn, this.brandId) 103 service.getStorageBySkn(this.productSkn, this.brandId)
102 .then((result) => { 104 .then((result) => {
103 if (result.code === 200) { 105 if (result.code === 200) {
104 - this.tableData = result.data; 106 + this.table.data = result.data;
105 } 107 }
106 }); 108 });
107 }, 109 },
@@ -112,7 +114,7 @@ export default { @@ -112,7 +114,7 @@ export default {
112 return service.updateStorage(data); 114 return service.updateStorage(data);
113 }, 115 },
114 refreshTable() { 116 refreshTable() {
115 - this.table.data = this.$storeTable.rebuildData; 117 + this.table.data = this.$refs.storeTable.rebuildData;
116 }, 118 },
117 beforeSave() { 119 beforeSave() {
118 return this.table.data.map((item) => { 120 return this.table.data.map((item) => {
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 @on-change="pageChange" :page-size="20" show-total></Page> 25 @on-change="pageChange" :page-size="20" show-total></Page>
26 </LayoutList> 26 </LayoutList>
27 27
28 - <EditStore ref="showStoreEdit"></EditStore> 28 + <EditStore ref="showStoreEdit" @on-success="editSuccess"></EditStore>
29 </LayoutBody> 29 </LayoutBody>
30 </template> 30 </template>
31 31
@@ -69,6 +69,9 @@ @@ -69,6 +69,9 @@
69 editStore(row) { 69 editStore(row) {
70 this.$refs.showStoreEdit.show(row); 70 this.$refs.showStoreEdit.show(row);
71 }, 71 },
  72 + editSuccess() {
  73 + this.getProduct();
  74 + },
72 filterParams() { 75 filterParams() {
73 let productSkn = this.filters.sknCode.model; 76 let productSkn = this.filters.sknCode.model;
74 let brandId = this.filters.brand.model === -1 ? null : this.filters.brand.model; 77 let brandId = this.filters.brand.model === -1 ? null : this.filters.brand.model;
@@ -90,7 +93,7 @@ @@ -90,7 +93,7 @@
90 }; 93 };
91 }, 94 },
92 filterSearch() { 95 filterSearch() {
93 - this.productList(); 96 + this.getProduct();
94 }, 97 },
95 clearFilter() { 98 clearFilter() {
96 this.filters.sknCode.model = null; 99 this.filters.sknCode.model = null;
@@ -15,11 +15,8 @@ function listProduct(params) { @@ -15,11 +15,8 @@ function listProduct(params) {
15 } 15 }
16 16
17 function getStorageBySkn(productSkn, brandId) { 17 function getStorageBySkn(productSkn, brandId) {
18 - return request.get(apiUrl.getStorageBySkn, {  
19 - params: {  
20 - productSkn, brandId  
21 - }  
22 - }).then(res => res.data); 18 + return request.post(apiUrl.getStorageBySkn, { productSkn, brandId })
  19 + .then(res => res.data);
23 } 20 }
24 21
25 function updateStorage(params) { 22 function updateStorage(params) {