Authored by 李奇

差异工单详情页修改

<template>
<layout-body>
hehe
<layout-list>
<Table border :columns="columns" :data="dataList"></Table>
</layout-list>
</layout-body>
</template>
<script>
import {detail as diffDetail} from '../store';
import {DiffService} from 'services/repository';
export default {
name: 'order-info',
props: {
id: Number
},
data() {
return diffDetail.apply(this);
return {
columns: [{
title: '序号',
key: 'id'
}, {
title: '品牌',
key: 'brandName'
}, {
title: '条码',
key: 'factoryCode'
}, {
title: 'sku',
key: 'productSku'
}, {
title: '颜色',
key: 'color'
}, {
title: '尺码',
key: 'size'
}, {
title: '数量',
key: 'orderNumber'
}, {
title: '吊牌价',
key: 'retailPrice'
}, {
title: '供应商',
key: 'supplierName'
}]
};
},
created() {
this.DiffService = new DiffService();
this.DiffService.list().then(res => {
this.DiffService.diffInfo({
workOrderId: this.id
})
.then(res => {
this.$Loading.finish();
this.dataList = res.records;
this.dataList = res.data;
});
},
methods: {
}
};
</script>
... ...
<template>
<layout-body>
<Table border :data="dataList"></Table>
<Table border :columns="columns" :data="dataList" :show-header="false"></Table>
</layout-body>
</template>
<script>
import _ from 'lodash';
import {DiffService} from 'services/repository';
export default {
props: {
dataList: {
type: Array
id: {
type: Number
}
},
data() {
return {
columns: [{
width: 200,
align: 'right',
key: 'label'
}, {
key: 'value'
}],
dataList: []
};
},
created() {
this.diffService = new DiffService();
this.diffService.detail({id: this.id})
.then(res => {
let fields = [{
label: '主题:',
value: 'subject'
}, {
label: '分类:',
value: 'typeName'
}, {
label: '到货单号:',
value: 'orderNumber'
}, {
label: '紧急程度:',
value: 'emergencyDegreeName'
}, {
label: '品牌:',
value: 'brandName'
}, {
label: '描述:',
value: 'content'
}];
_.each(fields, item => {
item.value = res.data[item.value] || '-';
});
this.dataList = fields;
});
},
methods: {
}
... ...
... ... @@ -2,41 +2,27 @@
<layout-body>
<Tabs type="card" :animated="false">
<Tab-pane label="工单信息">
<order-info :data-list="orderInfo"></order-info>
<order-info :id="queryId"></order-info>
</Tab-pane>
<Tab-pane label="工单差异">
<order-diff></order-diff>
<order-diff :id="queryId"></order-diff>
</Tab-pane>
</Tabs>
</layout-body>
</template>
<script>
import {detail as diffDetail} from './store';
import {DiffService} from 'services/repository';
import OrderInfo from './components/order-info';
import OrderDiff from './components/order-diff';
export default {
data() {
return diffDetail.apply(this);
return {
queryId: 0
};
},
created() {
this.DiffService = new DiffService();
this.DiffService.list().then(res => {
this.$Loading.finish();
this.dataList = res.records;
});
},
methods: {
clearFilter() {
},
filterSearch() {
},
pageChange() {
}
this.queryId = this.$route.query.id;
},
components: {
OrderInfo,
... ...
... ... @@ -48,10 +48,11 @@ export default {
created() {
this.DiffService = new DiffService();
this.DiffService.list().then(res => {
this.$Loading.finish();
this.dataList = res.records;
});
this.DiffService.list()
.then(res => {
this.$Loading.finish();
this.dataList = res.records;
});
},
methods: {
clearFilter() {
... ...
... ... @@ -17,7 +17,7 @@ let domainApis = {
allotExportList: '/erp-shop-web/export/exportForPurchaseForm',
allotPrintExpressDetail: '/erp-shop-web/purchase/queryExpressListByExpressNumber',
diffWorkOrderList: '/erp-shop-web/logistics/workOrder/queryPage',
diffWorkOrderDetail: '/erp-shop-web/logistics/workOrder/queryDetail',
diffWorkOrderDetail: '/erp-shop-web/logistics/workOrder/queryInfo',
diffWorkOrderInfo: '/erp-shop-web/logistics/workOrder/queryDiff',
returnSupplierList: '/erp-shop-web/logistics/returnedSupplier/list',
returnSupplierDetail: '/erp-shop-web/logistics/returnedSupplier/detail',
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
\ No newline at end of file
... ...