Authored by 陈峰

merge

... ... @@ -33,6 +33,8 @@ export default {
let data = null;
let key = null;
console.log(binding);
if (!_.isEmpty(binding.modifiers)) {
key = _.first(_.keys(binding.modifiers));
} else {
... ...
... ... @@ -42,9 +42,13 @@
title: '商品图片',
align: 'center',
render: (h, params) => {
let directives = [
{name: 'prod-img', value: params.row.skn, modifiers: {skn: true}}
];
return (
<div>
<img v-prod-img={params.row.skn}></img>
<img {...{directives}}></img>
</div>
);
}
... ...
... ... @@ -28,7 +28,7 @@
</layout-filter>
<layout-action>
<Button>导出</Button>
<Button @click="exportList">导出</Button>
</layout-action>
<layout-list>
... ... @@ -141,6 +141,11 @@
time: data.createTime
}
});
},
exportList() {
expressService.exportList().then((url) => {
window.open(url, '_blank');
});
}
}
};
... ...
... ... @@ -43,6 +43,7 @@
methods: {
resolveRes(data) {
this.dataList = data.records;
this.dataList.push({productSkn: '总计'});
},
backList() {
this.$router.push({ name: 'repository.prodReturn.list' });
... ...
... ... @@ -13,7 +13,6 @@
</template>
<script>
import _ from 'lodash';
import moment from 'moment';
import service from 'trade-service';
... ... @@ -33,10 +32,17 @@
}, {
title: '商品图片',
align: 'center',
render() {
return `<div>
<img v-prod-img.sku="row.sku">
</div>`;
render: (h, params) => {
const row = params.row;
const directives = [
{ name: 'prod-img', value: row.sku, modifiers: { sku: true } }
];
return (
<div>
<img {...{ directives }}></img>
</div>
);
}
}, {
title: '商品名称',
... ... @@ -45,20 +51,26 @@
}, {
title: '规格',
align: 'center',
render(row) {
return `${row.colorName || ''}/${row.size}`;
render(h, params) {
const row = params.row;
return (
<span>{row.colorName || ''}/{row.size}</span>
);
}
}, {
title: '调拨单号/已发数',
align: 'center',
render(row) {
let $html = '';
_.each(row.boList, i => {
$html += `<p>${i.proRequisitionFormId}/${i.num}</p>`;
});
render(h, params) {
const row = params.row;
return $html;
return (
<div>
{row.boList.map(item => {
return <p>{item.proRequisitionFormId}/{item.num}</p>;
})}
</div>
);
}
}
],
... ...
/**
* done tab store
* @author: leo
* @date: 04/05/2017
*/
export default () => {
return {
filters: {
orderNo: {
label: '入库单号',
model: '',
holder: '入库单号',
},
expressNo: {
label: '物流单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodCode: {
label: '商品编码',
labelSpan: 6,
model: '',
holder: 'SKN/SKU',
fieldSpan: 18
},
expressStatus: {
label: '物流状态',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '待处理'
},
{
value: 2,
label: '待处理超时'
}
]
},
prodBarCode: {
label: '商品条码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
},
page: {
total: 0,
current: 1
},
table: {
cols: [
{
title: '物流单号',
align: 'center',
render(row) {
return `${row.expressNumber}(${row.expressName})`;
}
},
{
title: '发货时间',
key: 'createTime',
align: 'center'
},
{
title: '查看明细',
key: 'detail',
align: 'center',
render() {
return '<i-button type="primary">查看明细</i-button>';
}
}
],
list: []
}
};
};
... ... @@ -7,6 +7,7 @@ import request from 'axios';
const apiUrl = {
listExpress: '/erp/expressList',
showExpress: '/erp/expressDetail',
exportExpress: '/Api/erp/expressExport'
};
function list(params) {
... ... @@ -19,7 +20,12 @@ function show(params) {
.then(res => res.data);
}
function exportList() {
return Promise.resolve(apiUrl.exportExpress);
}
export default {
list,
show
show,
exportList
};
... ...
... ... @@ -35,6 +35,7 @@ let domainApis = {
invoiceGoodsAvailable: '/erp-shop-web/invoice/goods/available',
expressList: '/erp-shop-web/purchase/expressList',
expressDetail: '/erp-shop-web/purchase/expressDetail',
expressExport: '/erp-shop-web/export/exportExpressForInvoice',
invoiceGoodsAdd: '/erp-shop-web/invoice/goods/add',
invoiceGoodsUpdate: '/erp-shop-web/invoice/goods/update',
invoiceGoodsDelete: '/erp-shop-web/invoice/goods/delete',
... ...