Showing
6 changed files
with
112 additions
and
33 deletions
1 | <template> | 1 | <template> |
2 | <layout-body> | 2 | <layout-body> |
3 | - hehe | 3 | + <layout-list> |
4 | + <Table border :columns="columns" :data="dataList"></Table> | ||
5 | + </layout-list> | ||
4 | </layout-body> | 6 | </layout-body> |
5 | </template> | 7 | </template> |
6 | 8 | ||
7 | <script> | 9 | <script> |
8 | - import {detail as diffDetail} from '../store'; | ||
9 | import {DiffService} from 'services/repository'; | 10 | import {DiffService} from 'services/repository'; |
10 | 11 | ||
11 | export default { | 12 | export default { |
13 | + name: 'order-info', | ||
14 | + props: { | ||
15 | + id: Number | ||
16 | + }, | ||
12 | data() { | 17 | data() { |
13 | - return diffDetail.apply(this); | 18 | + return { |
19 | + columns: [{ | ||
20 | + title: '序号', | ||
21 | + key: 'id' | ||
22 | + | ||
23 | + }, { | ||
24 | + title: '品牌', | ||
25 | + key: 'brandName' | ||
26 | + }, { | ||
27 | + title: '条码', | ||
28 | + key: 'factoryCode' | ||
29 | + }, { | ||
30 | + title: 'sku', | ||
31 | + key: 'productSku' | ||
32 | + }, { | ||
33 | + title: '颜色', | ||
34 | + key: 'color' | ||
35 | + }, { | ||
36 | + title: '尺码', | ||
37 | + key: 'size' | ||
38 | + }, { | ||
39 | + title: '数量', | ||
40 | + key: 'orderNumber' | ||
41 | + }, { | ||
42 | + title: '吊牌价', | ||
43 | + key: 'retailPrice' | ||
44 | + }, { | ||
45 | + title: '供应商', | ||
46 | + key: 'supplierName' | ||
47 | + }] | ||
48 | + }; | ||
14 | }, | 49 | }, |
15 | created() { | 50 | created() { |
16 | this.DiffService = new DiffService(); | 51 | this.DiffService = new DiffService(); |
17 | 52 | ||
18 | - this.DiffService.list().then(res => { | 53 | + this.DiffService.diffInfo({ |
54 | + workOrderId: this.id | ||
55 | + }) | ||
56 | + .then(res => { | ||
19 | this.$Loading.finish(); | 57 | this.$Loading.finish(); |
20 | - this.dataList = res.records; | 58 | + this.dataList = res.data; |
21 | }); | 59 | }); |
22 | }, | 60 | }, |
23 | methods: { | 61 | methods: { |
62 | + | ||
24 | } | 63 | } |
25 | }; | 64 | }; |
26 | </script> | 65 | </script> |
1 | <template> | 1 | <template> |
2 | <layout-body> | 2 | <layout-body> |
3 | - <Table border :data="dataList"></Table> | 3 | + <Table border :columns="columns" :data="dataList" :show-header="false"></Table> |
4 | </layout-body> | 4 | </layout-body> |
5 | </template> | 5 | </template> |
6 | 6 | ||
7 | <script> | 7 | <script> |
8 | + import _ from 'lodash'; | ||
9 | + import {DiffService} from 'services/repository'; | ||
10 | + | ||
8 | export default { | 11 | export default { |
9 | props: { | 12 | props: { |
10 | - dataList: { | ||
11 | - type: Array | 13 | + id: { |
14 | + type: Number | ||
12 | } | 15 | } |
13 | }, | 16 | }, |
17 | + data() { | ||
18 | + return { | ||
19 | + columns: [{ | ||
20 | + width: 200, | ||
21 | + align: 'right', | ||
22 | + key: 'label' | ||
23 | + }, { | ||
24 | + key: 'value' | ||
25 | + }], | ||
26 | + dataList: [] | ||
27 | + }; | ||
28 | + }, | ||
14 | created() { | 29 | created() { |
30 | + this.diffService = new DiffService(); | ||
31 | + this.diffService.detail({id: this.id}) | ||
32 | + .then(res => { | ||
33 | + let fields = [{ | ||
34 | + label: '主题:', | ||
35 | + value: 'subject' | ||
36 | + }, { | ||
37 | + label: '分类:', | ||
38 | + value: 'typeName' | ||
39 | + }, { | ||
40 | + label: '到货单号:', | ||
41 | + value: 'orderNumber' | ||
42 | + }, { | ||
43 | + label: '紧急程度:', | ||
44 | + value: 'emergencyDegreeName' | ||
45 | + }, { | ||
46 | + label: '品牌:', | ||
47 | + value: 'brandName' | ||
48 | + }, { | ||
49 | + label: '描述:', | ||
50 | + value: 'content' | ||
51 | + }]; | ||
52 | + | ||
53 | + _.each(fields, item => { | ||
54 | + item.value = res.data[item.value] || '-'; | ||
55 | + }); | ||
15 | 56 | ||
57 | + this.dataList = fields; | ||
58 | + }); | ||
16 | }, | 59 | }, |
17 | methods: { | 60 | methods: { |
18 | } | 61 | } |
@@ -2,41 +2,27 @@ | @@ -2,41 +2,27 @@ | ||
2 | <layout-body> | 2 | <layout-body> |
3 | <Tabs type="card" :animated="false"> | 3 | <Tabs type="card" :animated="false"> |
4 | <Tab-pane label="工单信息"> | 4 | <Tab-pane label="工单信息"> |
5 | - <order-info :data-list="orderInfo"></order-info> | 5 | + <order-info :id="queryId"></order-info> |
6 | </Tab-pane> | 6 | </Tab-pane> |
7 | <Tab-pane label="工单差异"> | 7 | <Tab-pane label="工单差异"> |
8 | - <order-diff></order-diff> | 8 | + <order-diff :id="queryId"></order-diff> |
9 | </Tab-pane> | 9 | </Tab-pane> |
10 | </Tabs> | 10 | </Tabs> |
11 | </layout-body> | 11 | </layout-body> |
12 | </template> | 12 | </template> |
13 | 13 | ||
14 | <script> | 14 | <script> |
15 | -import {detail as diffDetail} from './store'; | ||
16 | -import {DiffService} from 'services/repository'; | ||
17 | import OrderInfo from './components/order-info'; | 15 | import OrderInfo from './components/order-info'; |
18 | import OrderDiff from './components/order-diff'; | 16 | import OrderDiff from './components/order-diff'; |
19 | 17 | ||
20 | export default { | 18 | export default { |
21 | data() { | 19 | data() { |
22 | - return diffDetail.apply(this); | 20 | + return { |
21 | + queryId: 0 | ||
22 | + }; | ||
23 | }, | 23 | }, |
24 | created() { | 24 | created() { |
25 | - this.DiffService = new DiffService(); | ||
26 | - | ||
27 | - this.DiffService.list().then(res => { | ||
28 | - this.$Loading.finish(); | ||
29 | - this.dataList = res.records; | ||
30 | - }); | ||
31 | - }, | ||
32 | - methods: { | ||
33 | - clearFilter() { | ||
34 | - }, | ||
35 | - filterSearch() { | ||
36 | - | ||
37 | - }, | ||
38 | - pageChange() { | ||
39 | - } | 25 | + this.queryId = this.$route.query.id; |
40 | }, | 26 | }, |
41 | components: { | 27 | components: { |
42 | OrderInfo, | 28 | OrderInfo, |
@@ -48,10 +48,11 @@ export default { | @@ -48,10 +48,11 @@ export default { | ||
48 | created() { | 48 | created() { |
49 | this.DiffService = new DiffService(); | 49 | this.DiffService = new DiffService(); |
50 | 50 | ||
51 | - this.DiffService.list().then(res => { | ||
52 | - this.$Loading.finish(); | ||
53 | - this.dataList = res.records; | ||
54 | - }); | 51 | + this.DiffService.list() |
52 | + .then(res => { | ||
53 | + this.$Loading.finish(); | ||
54 | + this.dataList = res.records; | ||
55 | + }); | ||
55 | }, | 56 | }, |
56 | methods: { | 57 | methods: { |
57 | clearFilter() { | 58 | clearFilter() { |
@@ -17,7 +17,7 @@ let domainApis = { | @@ -17,7 +17,7 @@ let domainApis = { | ||
17 | allotExportList: '/erp-shop-web/export/exportForPurchaseForm', | 17 | allotExportList: '/erp-shop-web/export/exportForPurchaseForm', |
18 | allotPrintExpressDetail: '/erp-shop-web/purchase/queryExpressListByExpressNumber', | 18 | allotPrintExpressDetail: '/erp-shop-web/purchase/queryExpressListByExpressNumber', |
19 | diffWorkOrderList: '/erp-shop-web/logistics/workOrder/queryPage', | 19 | diffWorkOrderList: '/erp-shop-web/logistics/workOrder/queryPage', |
20 | - diffWorkOrderDetail: '/erp-shop-web/logistics/workOrder/queryDetail', | 20 | + diffWorkOrderDetail: '/erp-shop-web/logistics/workOrder/queryInfo', |
21 | diffWorkOrderInfo: '/erp-shop-web/logistics/workOrder/queryDiff', | 21 | diffWorkOrderInfo: '/erp-shop-web/logistics/workOrder/queryDiff', |
22 | returnSupplierList: '/erp-shop-web/logistics/returnedSupplier/list', | 22 | returnSupplierList: '/erp-shop-web/logistics/returnedSupplier/list', |
23 | returnSupplierDetail: '/erp-shop-web/logistics/returnedSupplier/detail', | 23 | returnSupplierDetail: '/erp-shop-web/logistics/returnedSupplier/detail', |
-
Please register or login to post a comment