Authored by 李奇

入库差异修改

1 <template> 1 <template>
2 <layout-body> 2 <layout-body>
3 <layout-filter> 3 <layout-filter>
4 - <filter-item :label="filterOptions.handleActions.label">  
5 - <Select v-model.trim="filters.handleActions">  
6 - <Option v-for="option in filterOptions.handleActions.options" 4 + <filter-item :label="filters.subject.label">
  5 + <Input v-model.trim="filters.subject.model"
  6 + :placeholder="filters.subject.holder"></Input>
  7 + </filter-item>
  8 + <filter-item :label="filters.emergency.label">
  9 + <Select v-model.trim="filters.emergency.model">
  10 + <Option v-for="option in filters.emergency.options"
7 :value="option.value" 11 :value="option.value"
8 :key="option.value">{{option.label}}</Option> 12 :key="option.value">{{option.label}}</Option>
9 </Select> 13 </Select>
10 </filter-item> 14 </filter-item>
11 - <filter-item :label="filterOptions.handleStatus.label">  
12 - <Select v-model.trim="filters.handleStatus">  
13 - <Option v-for="option in filterOptions.handleStatus.options" 15 + <filter-item :label="filters.brand.label">
  16 + <select-brand v-model="filters.brand.model"></select-brand>
  17 + </filter-item>
  18 + <filter-item :label="filters.status.label">
  19 + <Select v-model.trim="filters.status.model">
  20 + <Option v-for="option in filters.status.options"
14 :value="option.value" 21 :value="option.value"
15 :key="option.value">{{option.label}}</Option> 22 :key="option.value">{{option.label}}</Option>
16 </Select> 23 </Select>
@@ -22,54 +29,37 @@ @@ -22,54 +29,37 @@
22 </layout-filter> 29 </layout-filter>
23 30
24 <layout-list> 31 <layout-list>
25 - <Table border :columns="table.cols" :data="table.data"></Table>  
26 - <Page :total="pager.total" :current="pager.current" 32 + <Table border :columns="tableColumns" :data="tableDataList"></Table>
  33 + <Page :total="page.total" :current="page.current"
27 @on-change="pageChange" :page-size="20" show-total></Page> 34 @on-change="pageChange" :page-size="20" show-total></Page>
28 </layout-list> 35 </layout-list>
29 </layout-body> 36 </layout-body>
30 </template> 37 </template>
31 38
32 <script> 39 <script>
33 -import {filterFields, table} from './store'; 40 +import diffData from './store';
  41 +import {SelectBrand} from 'components/select';
34 42
35 export default { 43 export default {
36 data() { 44 data() {
37 - return {  
38 - self: this,  
39 - filters: {  
40 - handleActions: '',  
41 - handleStatus: ''  
42 - },  
43 - filterOptions: filterFields,  
44 - table: {  
45 - cols: table.cols,  
46 - data: []  
47 - },  
48 - pager: {  
49 - total: 0,  
50 - current: 1  
51 - }  
52 - }; 45 + return diffData.apply(this);
53 }, 46 },
54 created() { 47 created() {
55 }, 48 },
56 methods: { 49 methods: {
57 clearFilter() { 50 clearFilter() {
58 - this.filters.handleActions = '';  
59 - this.filters.handleStatus = '';  
60 }, 51 },
61 filterSearch() { 52 filterSearch() {
62 53
63 }, 54 },
64 pageChange() { 55 pageChange() {
65 -  
66 } 56 }
67 }, 57 },
  58 + components: {
  59 + SelectBrand
  60 + }
68 }; 61 };
69 </script> 62 </script>
70 63
71 <style lang="scss"> 64 <style lang="scss">
72 - .btn-row-space {  
73 - margin-top: 10px;  
74 - }  
75 </style> 65 </style>
1 /** 1 /**
2 - * on sale page store 2 + * 入库差异
3 * @author: qi.li <qi.li@yoho.cn> 3 * @author: qi.li <qi.li@yoho.cn>
4 - * @date: 2017/04/13 4 + * @date: 2017/06/08
5 */ 5 */
6 -  
7 -let filterFields = {  
8 - handleActions: {  
9 - label: '处理方式',  
10 - labelSpan: 6,  
11 - fieldSpan: 18,  
12 - model: -1,  
13 - options: [ 6 +export default function() {
  7 + return {
  8 + tableColumns: [
14 { 9 {
15 - value: -1,  
16 - label: '全部' 10 + type: 'selection',
  11 + width: 60,
  12 + align: 'center'
17 }, 13 },
18 { 14 {
19 - value: 1,  
20 - label: '退回'  
21 - },  
22 - {  
23 - value: 2,  
24 - label: '补单入库'  
25 - },  
26 - {  
27 - value: 3,  
28 - label: '少货补库' 15 + title: '商品图片',
  16 + key: 'image',
  17 + align: 'center',
  18 + render: (h, params) => {
  19 + return (
  20 + <img v-prod-img={params.row.productSKN}/>
  21 + );
  22 + }
29 } 23 }
30 - ]  
31 - },  
32 - handleStatus: {  
33 - label: '状态',  
34 - labelSpan: 6,  
35 - fieldSpan: 18,  
36 - model: -1,  
37 - options: [  
38 - {  
39 - value: -1,  
40 - label: '全部' 24 + ],
  25 + tableDataList: [],
  26 + page: {
  27 + total: 0,
  28 + current: 1
  29 + },
  30 + filters: {
  31 + subject: {
  32 + label: '主题',
  33 + model: ''
41 }, 34 },
42 - {  
43 - value: 1,  
44 - label: '处理中-侍确认' 35 + emergency: {
  36 + label: '紧急程度',
  37 + model: '',
  38 + options: [
  39 + {
  40 + value: 1,
  41 + label: '启用'
  42 + },
  43 + {
  44 + value: 2,
  45 + label: '禁用'
  46 + }
  47 + ]
45 }, 48 },
46 - {  
47 - value: 2,  
48 - label: '处理中-已确认' 49 + brand: {
  50 + label: '选择品牌',
  51 + model: ''
  52 + },
  53 + status: {
  54 + label: '状态',
  55 + model: '',
  56 + options: [
  57 + {
  58 + value: 1,
  59 + label: '启用'
  60 + },
  61 + {
  62 + value: 2,
  63 + label: '禁用'
  64 + }
  65 + ]
49 }, 66 },
50 - {  
51 - value: 3,  
52 - label: '完成'  
53 - }  
54 - ]  
55 - }  
56 -};  
57 -  
58 -const table = {  
59 - cols: [  
60 - {  
61 - title: '差异单号',  
62 - key: 'info',  
63 - align: 'center',  
64 - },  
65 - {  
66 - title: '差异来源',  
67 - key: 'info',  
68 - align: 'center',  
69 - },  
70 - {  
71 -  
72 - title: '主题',  
73 - key: 'info',  
74 - align: 'center',  
75 - },  
76 - {  
77 -  
78 - title: '处理方式',  
79 - key: 'info',  
80 - align: 'center',  
81 - },  
82 - {  
83 -  
84 - title: '发起时间',  
85 - key: 'info',  
86 - align: 'center',  
87 - },  
88 - {  
89 - title: '品牌经理',  
90 - key: 'info',  
91 - align: 'center',  
92 - },  
93 - {  
94 - title: '操作',  
95 - key: 'info',  
96 - align: 'center',  
97 } 67 }
98 -  
99 - ]  
100 -};  
101 -  
102 -export {  
103 - filterFields,  
104 - table  
105 -};  
106 - 68 + };
  69 +}
1 -import diff from './diff-iframe'; 1 +import diff from './diff';
2 import jit from './jit'; 2 import jit from './jit';
3 import prodReturn from './return'; 3 import prodReturn from './return';
4 import supplement from './supplement'; 4 import supplement from './supplement';