...
|
...
|
@@ -6,171 +6,189 @@ |
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
let tableCols = function() {
|
|
|
return [
|
|
|
{
|
|
|
title: '入库单号',
|
|
|
key: 'id',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
key: 'createTime',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let time = moment.unix(params.row.createTime);
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
<div> {time.format('YYYY/MM/DD')} </div>
|
|
|
<div> {time.format('HH:mm:ss')} </div>
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '到货仓库',
|
|
|
key: 'storeroomName',
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
title: '税率',
|
|
|
key: 'inputTaxRate',
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
title: '总进货金额',
|
|
|
key: 'totalPurchasePrice',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '总吊牌金额',
|
|
|
key: 'totalRetailPrice',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '发货进度',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let percent = 0;
|
|
|
export default function() {
|
|
|
return {
|
|
|
tableCols: [
|
|
|
{
|
|
|
title: '入库单号',
|
|
|
key: 'id',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
key: 'createTime',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let time = moment.unix(params.row.createTime);
|
|
|
|
|
|
if (params.row.sendNum && params.row.totalNum) {
|
|
|
percent = params.row.sendNum / params.row.totalNum;
|
|
|
return (
|
|
|
<div>
|
|
|
<div> {time.format('YYYY/MM/DD')} </div>
|
|
|
<div> {time.format('HH:mm:ss')} </div>
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '到货仓库',
|
|
|
key: 'storeroomName',
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
title: '税率',
|
|
|
key: 'inputTaxRate',
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
title: '总进货金额',
|
|
|
key: 'totalPurchasePrice',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '总吊牌金额',
|
|
|
key: 'totalRetailPrice',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: '发货进度',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let percent = 0;
|
|
|
|
|
|
if (percent > 1) {
|
|
|
percent = 100;
|
|
|
} else {
|
|
|
percent *= 100;
|
|
|
if (params.row.sendNum && params.row.totalNum) {
|
|
|
percent = params.row.sendNum / params.row.totalNum;
|
|
|
|
|
|
if (percent > 1) {
|
|
|
percent = 100;
|
|
|
} else {
|
|
|
percent *= 100;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
<div><i-progress percent={ percent} hide-info={true} ></i-progress></div>
|
|
|
<div>{params.row.sendNum || 0} / {params.row.totalNum || 0}</div>
|
|
|
</div>
|
|
|
);
|
|
|
return (
|
|
|
<div>
|
|
|
<div>
|
|
|
<i-progress percent={ percent} hide-info={true}></i-progress>
|
|
|
</div>
|
|
|
<div>{params.row.sendNum || 0} / {params.row.totalNum || 0}</div>
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
|
renderHeader() {
|
|
|
return '发货进度<br/> 已发数/需发总数 ';
|
|
|
}
|
|
|
},
|
|
|
renderHeader() {
|
|
|
return '发货进度<br/> 已发数/需发总数 ';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '入库进度',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let percent = 0;
|
|
|
{
|
|
|
title: '入库进度',
|
|
|
align: 'center',
|
|
|
render: function(h, params) {
|
|
|
let percent = 0;
|
|
|
|
|
|
if (params.row.inStoreNum && params.row.totalNum) {
|
|
|
percent = params.row.inStoreNum / params.row.totalNum;
|
|
|
if (params.row.inStoreNum && params.row.totalNum) {
|
|
|
percent = params.row.inStoreNum / params.row.totalNum;
|
|
|
|
|
|
if (percent > 1) {
|
|
|
percent = 100;
|
|
|
} else {
|
|
|
percent *= 100;
|
|
|
if (percent > 1) {
|
|
|
percent = 100;
|
|
|
} else {
|
|
|
percent *= 100;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
<div><i-progress percent={ percent }
|
|
|
hide-info={true}></i-progress></div>
|
|
|
<div>{ params.row.inStoreNum || 0} / {params.row.totalNum || 0}</div>
|
|
|
</div>
|
|
|
);
|
|
|
return (
|
|
|
<div>
|
|
|
<div>
|
|
|
<i-progress percent={ percent }
|
|
|
hide-info={true}></i-progress>
|
|
|
</div>
|
|
|
<div>{ params.row.inStoreNum || 0} / {params.row.totalNum || 0}</div>
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
|
renderHeader() {
|
|
|
return '入库进度<br/> 已入库数/需发总数';
|
|
|
}
|
|
|
},
|
|
|
renderHeader() {
|
|
|
return '入库进度<br/> 已入库数/需发总数';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '审核状态',
|
|
|
key: 'auditStatus',
|
|
|
align: 'center',
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<div>{ this.showAuditStatus(params.row.auditStatus) } </div>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
|
width: 250,
|
|
|
align: 'center',
|
|
|
render: (h, params) => {
|
|
|
let status = params.row.auditStatus;
|
|
|
let total = params.row.totalNum;
|
|
|
|
|
|
let info = (
|
|
|
<i-button type="success" size="small" onClick={() => this.onClickInfo(params)}>查看</i-button>
|
|
|
);
|
|
|
|
|
|
let commit = null;
|
|
|
|
|
|
if (total) {
|
|
|
commit = (
|
|
|
<i-button type="warning" size="small" onClick={() => this.onClickCommit(params)}>提交</i-button>
|
|
|
{
|
|
|
title: '审核状态',
|
|
|
key: 'auditStatus',
|
|
|
align: 'center',
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<div>{ this.showAuditStatus(params.row.auditStatus) } </div>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
|
width: 250,
|
|
|
align: 'center',
|
|
|
render: (h, params) => {
|
|
|
let status = params.row.auditStatus;
|
|
|
let total = params.row.totalNum;
|
|
|
|
|
|
let edit = (
|
|
|
<i-button type="primary" size="small" onClick={() => this.onClickEdit(params)}>编辑</i-button>
|
|
|
);
|
|
|
let info = (
|
|
|
<i-button type="success" size="small" onClick={() => this.onClickInfo(params)}>查看</i-button>
|
|
|
);
|
|
|
|
|
|
let del = (
|
|
|
<i-button type="error" size="small" onClick={() => this.onClickDelete(params)}>删除</i-button>
|
|
|
);
|
|
|
let commit = null;
|
|
|
|
|
|
let deliver = (
|
|
|
<i-button type="info" size="small" onClick={() => this.onClickDeliver(params)}>发货</i-button>
|
|
|
);
|
|
|
if (total) {
|
|
|
commit = (
|
|
|
<i-button type="warning" size="small" onClick={() => this.onClickCommit(params)}>
|
|
|
提交</i-button>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
if (status === 10) {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {edit} {commit} {del}
|
|
|
</div>
|
|
|
let edit = (
|
|
|
<i-button type="primary" size="small" onClick={() => this.onClickEdit(params)}>编辑</i-button>
|
|
|
);
|
|
|
|
|
|
} else if (status === 20) {
|
|
|
let del = (
|
|
|
<i-button type="error" size="small" onClick={() => this.onClickDelete(params)}>删除</i-button>
|
|
|
);
|
|
|
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info}
|
|
|
</div>
|
|
|
let deliver = (
|
|
|
<i-button type="info" size="small" onClick={() => this.onClickDeliver(params)}>发货</i-button>
|
|
|
);
|
|
|
} else if (status === 40) {
|
|
|
|
|
|
if (params.row.sendNum < params.row.totalNum) {
|
|
|
if (status === 10) {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {edit} {commit} {del}
|
|
|
</div>
|
|
|
);
|
|
|
|
|
|
} else if (status === 20) {
|
|
|
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {deliver}
|
|
|
{info}
|
|
|
</div>
|
|
|
);
|
|
|
} else if (status === 40) {
|
|
|
|
|
|
if (params.row.sendNum < params.row.totalNum) {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {deliver}
|
|
|
</div>
|
|
|
);
|
|
|
|
|
|
} else {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
} else if (status === 41) {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {edit} {commit} {del}
|
|
|
</div>
|
|
|
);
|
|
|
} else {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
...
|
...
|
@@ -178,27 +196,93 @@ let tableCols = function() { |
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
} else if (status === 41) {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info} {edit} {commit} {del}
|
|
|
</div>
|
|
|
);
|
|
|
} else {
|
|
|
return (
|
|
|
<div class="action-btn-row">
|
|
|
{info}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
tableData: [],
|
|
|
pageData: {
|
|
|
total: 0,
|
|
|
current: 1,
|
|
|
pageSize: 20
|
|
|
},
|
|
|
filters: {
|
|
|
id: {
|
|
|
label: '入库单号',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
expressNumber: {
|
|
|
label: '物流单号',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
productSkn: {
|
|
|
label: 'SKN编码',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
sknFactoryCode: {
|
|
|
label: '商家编码',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
skuFactoryCode: {
|
|
|
label: '商品条码',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
createTime: {
|
|
|
label: '创建时间',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18
|
|
|
},
|
|
|
auditStatus: {
|
|
|
label: '审核状态',
|
|
|
labelSpan: 6,
|
|
|
model: '',
|
|
|
holder: '',
|
|
|
fieldSpan: 18,
|
|
|
options: [
|
|
|
{
|
|
|
value: -1,
|
|
|
label: '全部'
|
|
|
},
|
|
|
{
|
|
|
value: 10,
|
|
|
label: '未提交'
|
|
|
},
|
|
|
{
|
|
|
value: 20,
|
|
|
label: '待审核'
|
|
|
},
|
|
|
{
|
|
|
value: 41,
|
|
|
label: '驳回'
|
|
|
},
|
|
|
{
|
|
|
value: 40,
|
|
|
label: '通过'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
modal: {
|
|
|
show: false,
|
|
|
title: '',
|
|
|
content: '',
|
|
|
onSuccess: null
|
|
|
}
|
|
|
];
|
|
|
};
|
|
|
|
|
|
let tableData = [];
|
|
|
|
|
|
export {
|
|
|
tableCols,
|
|
|
tableData,
|
|
|
};
|
|
|
}; |
...
|
...
|
|