Authored by htoooth

add fix

  1 +<template>
  2 + <Modal
  3 + v-model="modal"
  4 + title="是否确认对账?"
  5 + @on-ok="onOk(data)"
  6 + @on-cancel="onCancel(data)">
  7 + <Alert type="warning" show-icon>温馨提示:结算金额以结算单为准</Alert>
  8 + <Form :label-width="80">
  9 + <FormItem label="支付金额:" style="margin-bottom: 0">
  10 + <span>200</span>
  11 + </FormItem>
  12 + <FormItem label="结算比例:" style="margin-bottom: 0">
  13 + <span>7%</span>
  14 + </FormItem>
  15 + <FormItem label="结算金额:" style="margin-bottom: 0">
  16 + <span>14</span>
  17 + </FormItem>
  18 + </Form>
  19 + </Modal>
  20 +</template>
  21 +
  22 +<script>
  23 +export default {
  24 + name: 'reconciliation-confirm',
  25 + props: {
  26 + onOk: {
  27 + type: Function,
  28 + default() {
  29 + return {};
  30 + }
  31 + },
  32 + onCancel: {
  33 + type: Function,
  34 + default() {
  35 + return {};
  36 + }
  37 + }
  38 + },
  39 + data() {
  40 + return {
  41 + modal: this.value,
  42 + data: {}
  43 + };
  44 + },
  45 + methods: {
  46 + show(row) {
  47 + this.data = row;
  48 + this.modal = true;
  49 + }
  50 + }
  51 +};
  52 +</script>
  53 +
  54 +
  55 +
1 -<template>  
2 - <div>局部组件</div>  
3 -</template>  
4 -  
5 -<script>  
6 - export default {  
7 - name: 'Demo',  
8 - };  
9 -</script>  
1 -import Demo from './demo'; 1 +import Confirm from './confirm.vue';
2 2
3 export { 3 export {
4 - Demo 4 + Confirm
5 }; 5 };
@@ -40,11 +40,13 @@ @@ -40,11 +40,13 @@
40 <Page :total="pageData.total" :current="pageData.current" 40 <Page :total="pageData.total" :current="pageData.current"
41 @on-change="pageChange" :page-size="20" show-total></Page> 41 @on-change="pageChange" :page-size="20" show-total></Page>
42 </layout-list> 42 </layout-list>
  43 +
  44 + <Confirm ref="confirm"></Confirm>
43 </layout-body> 45 </layout-body>
44 </template> 46 </template>
45 47
46 <script> 48 <script>
47 -import {Demo} from './components'; 49 +import {Confirm} from './components';
48 export default { 50 export default {
49 data() { 51 data() {
50 return { 52 return {
@@ -139,10 +141,11 @@ export default { @@ -139,10 +141,11 @@ export default {
139 this.search(); 141 this.search();
140 }, 142 },
141 edit() { 143 edit() {
  144 + this.$refs.confirm.show();
142 }, 145 },
143 del() {} 146 del() {}
144 }, 147 },
145 - components: {Demo} 148 + components: {Confirm}
146 }; 149 };
147 </script> 150 </script>
148 151
1 <template> 1 <template>
2 <layout-body> 2 <layout-body>
3 <layout-filter ref="filter" :model="query"> 3 <layout-filter ref="filter" :model="query">
  4 + <filter-item label="结算单号">
  5 + <Input v-model.trim="query.settlementId" :maxlength="9"></Input>
  6 + </filter-item>
4 <filter-item label="SKN编码"> 7 <filter-item label="SKN编码">
5 <Input v-model.trim="query.sknCode" :maxlength="9"></Input> 8 <Input v-model.trim="query.sknCode" :maxlength="9"></Input>
6 </filter-item> 9 </filter-item>
7 - <filter-item label="商家编码">  
8 - <Input v-model.trim="query.prodCode"></Input>  
9 - </filter-item>  
10 <filter-item label="商品名称"> 10 <filter-item label="商品名称">
11 <Input v-model.trim="query.prodName"></Input> 11 <Input v-model.trim="query.prodName"></Input>
12 </filter-item> 12 </filter-item>
13 - <filter-item label="商品条码">  
14 - <Input v-model.trim="query.prodBarCode"></Input> 13 + <filter-item label="品牌">
  14 + <select-brand v-model="query.brand"></select-brand>
  15 + </filter-item>
  16 + <filter-item label="订单号">
  17 + <Input v-model.trim="query.orderId"></Input>
  18 + </filter-item>
  19 + <filter-item label="业务类型">
  20 + <Select v-model="query.settlementType" clearable>
  21 + <Option value="1">销售出库</Option>
  22 + <Option value="2">退货入库</Option>
  23 + <Option value="3">换货入库</Option>
  24 + <Option value="3">换货出库</Option>
  25 + </Select>
  26 + </filter-item>
  27 + <filter-item label="状态">
  28 + <Select v-model="query.settlementStatus" clearable>
  29 + <Option value="2">待支付</Option>
  30 + <Option value="3">已支付</Option>
  31 + </Select>
15 </filter-item> 32 </filter-item>
16 <filter-item> 33 <filter-item>
17 <Button type="primary" @click="search">筛选</Button> 34 <Button type="primary" @click="search">筛选</Button>
@@ -33,14 +50,13 @@ export default { @@ -33,14 +50,13 @@ export default {
33 data() { 50 data() {
34 return { 51 return {
35 query: { 52 query: {
  53 + settlementId: '',
36 sknCode: '', 54 sknCode: '',
37 - prodCode: '',  
38 prodName: '', 55 prodName: '',
39 - prodBarCode: '',  
40 - category: [],  
41 brand: 0, 56 brand: 0,
42 - saleStatus: 0,  
43 - stockStatus: 0 57 + orderId: 0,
  58 + settlementType: 0,
  59 + settlementStatus: 0
44 }, 60 },
45 pageData: { 61 pageData: {
46 total: 0, 62 total: 0,
@@ -57,21 +73,44 @@ export default { @@ -57,21 +73,44 @@ export default {
57 col2: '6' 73 col2: '6'
58 }], 74 }],
59 tableCols: [{ 75 tableCols: [{
60 - title: '列1', 76 + title: '结算单号',
  77 + key: 'col1'
  78 + }, {
  79 + title: '对账单号',
61 key: 'col1' 80 key: 'col1'
62 }, { 81 }, {
63 - title: '列2',  
64 - key: 'col2' 82 + title: 'SKU',
  83 + key: 'col1'
  84 + }, {
  85 + title: '商品名称',
  86 + key: 'col1'
  87 + }, {
  88 + title: '品牌',
  89 + key: 'col1'
  90 + }, {
  91 + title: '订单号',
  92 + key: 'col1'
65 }, { 93 }, {
66 - title: '操作',  
67 - render: (h, params) => {  
68 - return (  
69 - <action-group>  
70 - <i-button type="primary" size="small" onClick={() => this.edit(params.row)}>编辑</i-button>  
71 - <i-button type="error" size="small" onClick={() => this.del(params.row)}>删除</i-button>  
72 - </action-group>  
73 - );  
74 - } 94 + title: '业务类型',
  95 + key: 'col1'
  96 + }, {
  97 + title: '吊牌价',
  98 + key: 'col1'
  99 + }, {
  100 + title: '支付金额',
  101 + key: 'col1'
  102 + }, {
  103 + title: '结算比例',
  104 + key: 'col1'
  105 + }, {
  106 + title: '数量',
  107 + key: 'col1'
  108 + }, {
  109 + title: '佣金',
  110 + key: 'col1'
  111 + }, {
  112 + title: '状态',
  113 + key: 'col1'
75 }] 114 }]
76 }; 115 };
77 }, 116 },
1 <template> 1 <template>
2 <layout-body> 2 <layout-body>
3 <layout-filter ref="filter" :model="query"> 3 <layout-filter ref="filter" :model="query">
  4 + <filter-item label="结算单ID">
  5 + <Input v-model.trim="query.settlementId"></Input>
  6 + </filter-item>
4 <filter-item label="SKN编码"> 7 <filter-item label="SKN编码">
5 <Input v-model.trim="query.sknCode" :maxlength="9"></Input> 8 <Input v-model.trim="query.sknCode" :maxlength="9"></Input>
6 </filter-item> 9 </filter-item>
7 - <filter-item label="商家编码">  
8 - <Input v-model.trim="query.prodCode"></Input> 10 + <filter-item label="结算单名称">
  11 + <Input v-model.trim="query.settlementName"></Input>
9 </filter-item> 12 </filter-item>
10 - <filter-item label="商品名称">  
11 - <Input v-model.trim="query.prodName"></Input> 13 + <filter-item label="支付时间">
  14 + <Input v-model.trim="query.payDate"></Input>
12 </filter-item> 15 </filter-item>
13 - <filter-item label="商品条码">  
14 - <Input v-model.trim="query.prodBarCode"></Input> 16 + <filter-item label="结算单状态">
  17 + <Select v-model="query.settlementStatus" clearable>
  18 + <Option value="1">未到票</Option>
  19 + <Option value="2">待支付</Option>
  20 + <Option value="3">已支付</Option>
  21 + </Select>
15 </filter-item> 22 </filter-item>
16 <filter-item> 23 <filter-item>
17 <Button type="primary" @click="search">筛选</Button> 24 <Button type="primary" @click="search">筛选</Button>
@@ -28,19 +35,16 @@ @@ -28,19 +35,16 @@
28 </template> 35 </template>
29 36
30 <script> 37 <script>
31 -import {Demo} from './components'; 38 +
32 export default { 39 export default {
33 data() { 40 data() {
34 return { 41 return {
35 query: { 42 query: {
  43 + settlementId: '',
36 sknCode: '', 44 sknCode: '',
37 - prodCode: '',  
38 - prodName: '',  
39 - prodBarCode: '',  
40 - category: [],  
41 - brand: 0,  
42 - saleStatus: 0,  
43 - stockStatus: 0 45 + settlementName: '',
  46 + payDate: 0,
  47 + settlementStatus: 0
44 }, 48 },
45 pageData: { 49 pageData: {
46 total: 0, 50 total: 0,
@@ -57,18 +61,38 @@ export default { @@ -57,18 +61,38 @@ export default {
57 col2: '6' 61 col2: '6'
58 }], 62 }],
59 tableCols: [{ 63 tableCols: [{
60 - title: '列1', 64 + title: '结算单ID',
  65 + key: 'col1'
  66 + }, {
  67 + title: '开始时间',
  68 + key: 'col1'
  69 + }, {
  70 + title: '结束时间',
  71 + key: 'col1'
  72 + }, {
  73 + title: '应付金额',
  74 + key: 'col1'
  75 + }, {
  76 + title: '到票金额',
  77 + key: 'col1'
  78 + }, {
  79 + title: '实付金额',
  80 + key: 'col1'
  81 + }, {
  82 + title: '状态',
61 key: 'col1' 83 key: 'col1'
62 }, { 84 }, {
63 - title: '列2', 85 + title: '支付时间',
  86 + key: 'col1'
  87 + }, {
  88 + title: '备注',
64 key: 'col2' 89 key: 'col2'
65 }, { 90 }, {
66 title: '操作', 91 title: '操作',
67 render: (h, params) => { 92 render: (h, params) => {
68 return ( 93 return (
69 <action-group> 94 <action-group>
70 - <i-button type="primary" size="small" onClick={() => this.edit(params.row)}>编辑</i-button>  
71 - <i-button type="error" size="small" onClick={() => this.del(params.row)}>删除</i-button> 95 + <i-button type="primary" size="small" onClick={() => this.edit(params.row)}>查看详情</i-button>
72 </action-group> 96 </action-group>
73 ); 97 );
74 } 98 }
@@ -88,10 +112,17 @@ export default { @@ -88,10 +112,17 @@ export default {
88 pageChange() { 112 pageChange() {
89 this.search(); 113 this.search();
90 }, 114 },
91 - edit() {}, 115 + edit() {
  116 + this.$router.push({
  117 + name: 'kol.settlement.detail',
  118 + params: {
  119 + id: 1
  120 + }
  121 + });
  122 + },
92 del() {} 123 del() {}
93 }, 124 },
94 - components: {Demo} 125 + components: {}
95 }; 126 };
96 </script> 127 </script>
97 128
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 "express-session": "^1.15.2", 58 "express-session": "^1.15.2",
59 "font-awesome": "^4.7.0", 59 "font-awesome": "^4.7.0",
60 "gt3-sdk": "^2.0.0", 60 "gt3-sdk": "^2.0.0",
61 - "iview": "^2.4.0", 61 + "iview": "^2.8.0",
62 "lodash": "^4.17.4", 62 "lodash": "^4.17.4",
63 "moment": "^2.18.1", 63 "moment": "^2.18.1",
64 "promise-polyfill": "^6.0.2", 64 "promise-polyfill": "^6.0.2",