Authored by 李奇

商品退库导出修改

... ... @@ -31,6 +31,7 @@
const params = { supplierId, returnedSupplierId: returnId };
this.returnId = returnId;
this.supplierId = supplierId;
this.supplierName = supplierName;
this.$Loading.start();
... ... @@ -47,7 +48,10 @@
this.$router.push({ name: 'repository.prodReturn.list' });
},
exportDetail() {
let href = `/Api/erp/exportProductReturnList?
supplierId=${this.supplierId}&returnedSupplierId=${this.returnId}`;
window.open(href, '_blank');
}
}
};
... ...
... ... @@ -23,7 +23,7 @@
</FilterItem>
<FilterItem>
<Button type="primary" @click="filterSearch">筛选</Button>
<Button type="primary">导出</Button>
<Button type="primary" @click="exportList">导出</Button>
<Button @click="clearFilter">清空条件</Button>
</FilterItem>
</LayoutFilter>
... ... @@ -166,6 +166,39 @@
}
});
},
exportList() {
const keysMap = {
bOutTime: 'bOutTime',
eOutTime: 'eOutTime',
productSkn: 'sknCode',
productSku: 'skuCode',
factoryCode: 'prodBarCode',
bCreateTime: 'bCreateTime',
eCreateTime: 'eCreateTime',
returnedSupplierId: 'reqNum'
};
const fields = this.filters;
let temp = [];
let params = {};
_.each(keysMap, (val, key) => {
params[key] = fields[val].model;
});
params = _.pickBy(params, (v) => {
return (v + '').length;
});
_.each(params, (val, key) => {
temp.push(`${key}=${val}`);
});
window.open(`/Api/erp/allotExportList?${temp.join('&')}`, '_blank');
},
exportOne(id) {
window.open(`/Api/erp/exportProductReturnList?returnedSupplierId=${id}`, '_blank');
}
},
components: {}
... ...
... ... @@ -8,6 +8,7 @@ import timeFormat from 'filters/time-format';
export default function() {
return {
returnId: '',
supplierId: '',
supplierName: '',
columns: [
{
... ...
... ... @@ -139,7 +139,12 @@ export default function() {
详情
</i-button>
</span>
<span><i-button type="primary" size="small">导出</i-button></span>
<span>
<i-button type="primary" size="small"
onClick={() => this.exportOne(row.returnedSupplierId)}>
导出
</i-button>
</span>
</div>
);
},
... ...
... ... @@ -18,6 +18,8 @@ let domainApis = {
allotPrintExpressDetail: '/erp-shop-web/purchase/queryExpressListByExpressNumber',
returnSupplierList: '/erp-shop-web/logistics/returnedSupplier/list',
returnSupplierDetail: '/erp-shop-web/logistics/returnedSupplier/detail',
exportProductReturnList: '/erp-shop-web/export/exportReturnForInvoice',
exportProductReturnDetail: '/erp-shop-web/export/exportReturnDetailForInvoice',
jitProductList: '/erp-shop-web/product/jitProductList',
getJitStorageListBySkn: '/erp-shop-web/product/getJitStorageListBySkn',
importJitStorage: '/erp-shop-web/product/importJitStorage',
... ...