Authored by 李奇

请退单详情修改

... ... @@ -10,19 +10,20 @@
</filter-item>
</layout-filter>
<layout-list>
<Table border :columns="columns"
<Table border :columns="columns" :row-class-name="rowClassName"
@on-selection-change="selectChange" :data="dataList"></Table>
</layout-list>
</layout-body>
</template>
<script>
import store from './store/detail';
import _ from 'lodash';
import { detail } from './store';
import rs from 'return-service';
export default {
data() {
return store.apply(this);
return detail.apply(this);
},
created() {
const returnId = this.$route.params.id;
... ... @@ -42,8 +43,32 @@
},
methods: {
resolveRes(data) {
let totalNum = 0;
let totalOut = 0;
this.dataList = data.records;
this.dataList.push({productSkn: '总计'});
_.each(this.dataList, item => {
totalNum += item.nums;
totalOut += item.outNums;
});
this.dataList.push({
productSkn: '总计',
nums: totalNum,
outNums: totalOut,
_isLastLine: true,
cellClassName: {
productSkn: 'cell-total',
occupiedNum: 'cell-occupy',
nums: 'cell-num',
outNums: 'cell-out-num'
}
});
},
rowClassName(row) {
if (row._isLastLine) {
return 'last-line';
}
return '';
},
backList() {
this.$router.push({ name: 'repository.prodReturn.list' });
... ... @@ -71,4 +96,16 @@
margin-right: 20px;
}
.last-line {
td {
border: none;
}
}
.cell-num,
.cell-occupy,
.cell-total,
.cell-out-num {
border-right: 1px solid #e3e8ee !important;
}
</style>
... ...
... ... @@ -22,6 +22,10 @@ export default function() {
render: (h, params) => {
const row = params.row;
if (row._isLastLine) {
return '';
}
return (
<span>{row.productSkc}({row.colorName})</span>
);
... ... @@ -33,6 +37,10 @@ export default function() {
render: (h, params) => {
const row = params.row;
if (row._isLastLine) {
return '';
}
return (
<span>{row.productSku}({row.sizeName})</span>
);
... ... @@ -44,6 +52,10 @@ export default function() {
render: (h, params) => {
const row = params.row;
if (row._isLastLine) {
return '';
}
return (
<span>{row.factoryCode || '-'}</span>
);
... ... @@ -95,6 +107,10 @@ export default function() {
render: (h, params) => {
const row = params.row;
if (row._isLastLine) {
return '';
}
return (
<span>{row.returndReason || '-'}</span>
);
... ... @@ -106,6 +122,10 @@ export default function() {
render: (h, params) => {
const row = params.row;
if (row._isLastLine) {
return '';
}
return (
<span>{row.expressCode || '-'}</span>
);
... ... @@ -120,6 +140,10 @@ export default function() {
title: '请退时间',
align: 'center',
render: (h, params) => {
if (params.row._isLastLine) {
return '';
}
return (
<span>{timeFormat(params.row.createTime)}</span>
);
... ... @@ -129,6 +153,10 @@ export default function() {
title: '退库时间',
align: 'center',
render: (h, params) => {
if (params.row._isLastLine) {
return '';
}
return (
<span>{timeFormat(params.row.outTime)}</span>
);
... ...
/**
* index.js
* @author: leo
* @date: 07/06/2017
*/
import list from './list';
import detail from './detail';
export {
list,
detail
};
... ...