Authored by htoooth

fix

import ModalSizeEdit from './modal-size-edit';
import ModalStockOut from './modal-stock-out';
import ModalDeliver from './modal-deliver';
import ModalExample from './modal-example';
export {
ModalSizeEdit,
ModalStockOut,
ModalDeliver,
ModalExample
};
... ...
... ... @@ -51,7 +51,7 @@
width: 100px;
height: 150px;
border-radius: 3px;
background-image: url(../../../../images/example/#{$num}.png);
background-image: url(../../images/example/#{$num}.png);
background-repeat: no-repeat;
margin: 15px 15px;
}
... ...
... ... @@ -218,7 +218,7 @@
import api from 'product-create/api';
import service from 'product-create/service';
import serial from 'product-create/serialize';
import ModalExample from './modal-example';
import {ModalExample} from 'components/modal';
export default {
props: ['step', 'product'],
... ...
... ... @@ -85,6 +85,7 @@ export default {
this.modal_loading = true;
this.save().then(() => {
this.$emit('on-success');
this.modal_loading = false;
this.close();
});
... ... @@ -96,12 +97,13 @@ export default {
this.productSkn = null;
this.brandId = null;
this.modal_loading = false;
this.table.data = [];
},
getData() {
service.getStorageBySkn(this.productSkn, this.brandId)
.then((result) => {
if (result.code === 200) {
this.tableData = result.data;
this.table.data = result.data;
}
});
},
... ... @@ -112,7 +114,7 @@ export default {
return service.updateStorage(data);
},
refreshTable() {
this.table.data = this.$storeTable.rebuildData;
this.table.data = this.$refs.storeTable.rebuildData;
},
beforeSave() {
return this.table.data.map((item) => {
... ...
... ... @@ -25,7 +25,7 @@
@on-change="pageChange" :page-size="20" show-total></Page>
</LayoutList>
<EditStore ref="showStoreEdit"></EditStore>
<EditStore ref="showStoreEdit" @on-success="editSuccess"></EditStore>
</LayoutBody>
</template>
... ... @@ -69,6 +69,9 @@
editStore(row) {
this.$refs.showStoreEdit.show(row);
},
editSuccess() {
this.getProduct();
},
filterParams() {
let productSkn = this.filters.sknCode.model;
let brandId = this.filters.brand.model === -1 ? null : this.filters.brand.model;
... ... @@ -90,7 +93,7 @@
};
},
filterSearch() {
this.productList();
this.getProduct();
},
clearFilter() {
this.filters.sknCode.model = null;
... ...
... ... @@ -15,11 +15,8 @@ function listProduct(params) {
}
function getStorageBySkn(productSkn, brandId) {
return request.get(apiUrl.getStorageBySkn, {
params: {
productSkn, brandId
}
}).then(res => res.data);
return request.post(apiUrl.getStorageBySkn, { productSkn, brandId })
.then(res => res.data);
}
function updateStorage(params) {
... ...