Showing
7 changed files
with
60 additions
and
32 deletions
@@ -7,16 +7,16 @@ | @@ -7,16 +7,16 @@ | ||
7 | 咨询回复 | 7 | 咨询回复 |
8 | </p> | 8 | </p> |
9 | <div style="text-align: center"> | 9 | <div style="text-align: center"> |
10 | - <filter-item> | ||
11 | - <Input | ||
12 | - type = "textarea" | ||
13 | - :rows = "10" | ||
14 | - placeholder="请输入文字内容" | ||
15 | - v-model="answer" | ||
16 | - @on-enter="submit"/> | ||
17 | - </filter-item> | 10 | + <Input |
11 | + type = "textarea" | ||
12 | + :rows = "10" | ||
13 | + placeholder="请输入文字内容" | ||
14 | + :maxlength="250" | ||
15 | + v-model="answer"/> | ||
16 | + </div> | ||
17 | + <div style="text-align: right"> | ||
18 | + <span style="color: #999; font-size: 10px; margin-top: 2px;">{{textMsg}}</span> | ||
18 | </div> | 19 | </div> |
19 | - | ||
20 | <div slot="footer" style="text-align: center"> | 20 | <div slot="footer" style="text-align: center"> |
21 | <Button type="primary" size="large" :loading="modal_loading" @click="submit">回复</Button> | 21 | <Button type="primary" size="large" :loading="modal_loading" @click="submit">回复</Button> |
22 | <Button type="default" size="large" @click="cancel">取消</Button> | 22 | <Button type="default" size="large" @click="cancel">取消</Button> |
@@ -42,7 +42,15 @@ export default { | @@ -42,7 +42,15 @@ export default { | ||
42 | answer: '' | 42 | answer: '' |
43 | }; | 43 | }; |
44 | }, | 44 | }, |
45 | + computed: { | ||
46 | + textMsg() { | ||
47 | + if (this.answer) { | ||
48 | + let num = 250 - this.answer.length; | ||
45 | 49 | ||
50 | + return `还能输${num >= 0 ? num : 0}个字`; | ||
51 | + } | ||
52 | + } | ||
53 | + }, | ||
46 | methods: { | 54 | methods: { |
47 | show(row) { | 55 | show(row) { |
48 | this.reset(); | 56 | this.reset(); |
@@ -79,6 +87,9 @@ export default { | @@ -79,6 +87,9 @@ export default { | ||
79 | }; | 87 | }; |
80 | </script> | 88 | </script> |
81 | 89 | ||
90 | +<<<<<<< HEAD | ||
82 | <style lang="scss"> | 91 | <style lang="scss"> |
83 | 92 | ||
84 | </style> | 93 | </style> |
94 | +======= | ||
95 | +>>>>>>> feature/suggestDev |
@@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
37 | <Date-picker v-model="filters.answerTimeStr.model" | 37 | <Date-picker v-model="filters.answerTimeStr.model" |
38 | type="datetimerange" | 38 | type="datetimerange" |
39 | placeholder="选择日期和时间" | 39 | placeholder="选择日期和时间" |
40 | + placement="bottom-end" | ||
40 | @on-change="answerTimeChange"> | 41 | @on-change="answerTimeChange"> |
41 | </Date-picker> | 42 | </Date-picker> |
42 | </filter-item> | 43 | </filter-item> |
@@ -94,6 +95,10 @@ | @@ -94,6 +95,10 @@ | ||
94 | this.filters.answerEndTime.model = ''; | 95 | this.filters.answerEndTime.model = ''; |
95 | this.filters.askTimeStr.model = ''; | 96 | this.filters.askTimeStr.model = ''; |
96 | this.filters.answerTimeStr.model = ''; | 97 | this.filters.answerTimeStr.model = ''; |
98 | + this.filters.sort.first.model = null; | ||
99 | + this.filters.sort.second.model = null; | ||
100 | + this.filters.sort.third.model = null; | ||
101 | + this.categoryValue = []; | ||
97 | this.pageData.current = 1; | 102 | this.pageData.current = 1; |
98 | 103 | ||
99 | this.list(); | 104 | this.list(); |
@@ -113,7 +118,7 @@ | @@ -113,7 +118,7 @@ | ||
113 | middleSortId = fts.sort.second.model, | 118 | middleSortId = fts.sort.second.model, |
114 | smallSortId = fts.sort.third.model, | 119 | smallSortId = fts.sort.third.model, |
115 | brandId = fts.brandId.model === '' || fts.brandId.model === null ? | 120 | brandId = fts.brandId.model === '' || fts.brandId.model === null ? |
116 | - null : fts.brandId.model, | 121 | + null : fts.brandId.model, |
117 | askStartTime = fts.askStartTime.model, | 122 | askStartTime = fts.askStartTime.model, |
118 | askEndTime = fts.askEndTime.model, | 123 | askEndTime = fts.askEndTime.model, |
119 | answerStartTime = fts.answerStartTime.model, | 124 | answerStartTime = fts.answerStartTime.model, |
@@ -7,6 +7,7 @@ import CellInfo from 'components/cell/cell-info'; | @@ -7,6 +7,7 @@ import CellInfo from 'components/cell/cell-info'; | ||
7 | 7 | ||
8 | export default function() { | 8 | export default function() { |
9 | return { | 9 | return { |
10 | + categoryValue: [], | ||
10 | tableCols: [ | 11 | tableCols: [ |
11 | { | 12 | { |
12 | title: 'SKN', | 13 | title: 'SKN', |
@@ -58,13 +59,29 @@ export default function() { | @@ -58,13 +59,29 @@ export default function() { | ||
58 | }, | 59 | }, |
59 | { | 60 | { |
60 | title: '回复内容', | 61 | title: '回复内容', |
61 | - key: 'answer', | ||
62 | - align: 'center' | 62 | + align: 'center', |
63 | + render: (h, params) => { | ||
64 | + let answer = params.row.answer; | ||
65 | + | ||
66 | + if (answer.length > 0) { | ||
67 | + return answer; | ||
68 | + } else { | ||
69 | + return '—'; | ||
70 | + } | ||
71 | + } | ||
63 | }, | 72 | }, |
64 | { | 73 | { |
65 | title: '回复人', | 74 | title: '回复人', |
66 | - key: 'answerUserName', | ||
67 | align: 'center', | 75 | align: 'center', |
76 | + render: (h, params) => { | ||
77 | + let answerUserName = params.row.answerUserName; | ||
78 | + | ||
79 | + if (answerUserName) { | ||
80 | + return params.row.answerUserName; | ||
81 | + } else { | ||
82 | + return '—'; | ||
83 | + } | ||
84 | + }, | ||
68 | }, | 85 | }, |
69 | { | 86 | { |
70 | title: '咨询及回复时间', | 87 | title: '咨询及回复时间', |
@@ -75,10 +92,10 @@ export default function() { | @@ -75,10 +92,10 @@ export default function() { | ||
75 | const infoItems = [ | 92 | const infoItems = [ |
76 | { | 93 | { |
77 | label: '咨询', | 94 | label: '咨询', |
78 | - value: row.askTimeStr | 95 | + value: row.askTimeStr.length > 0 ? row.askTimeStr : '—' |
79 | }, { | 96 | }, { |
80 | label: '回复', | 97 | label: '回复', |
81 | - value: row.answerTimeStr | 98 | + value: row.answerTimeStr.length > 0 ? row.answerTimeStr : '—' |
82 | } | 99 | } |
83 | ]; | 100 | ]; |
84 | 101 | ||
@@ -102,7 +119,7 @@ export default function() { | @@ -102,7 +119,7 @@ export default function() { | ||
102 | return ( | 119 | return ( |
103 | <div class="cell-action-row"> | 120 | <div class="cell-action-row"> |
104 | <i-button type="error" size="small" | 121 | <i-button type="error" size="small" |
105 | - onClick={() => this.editAnswer(row)}> | 122 | + onClick={() => this.editAnswer(row)}> |
106 | 修改 | 123 | 修改 |
107 | </i-button> | 124 | </i-button> |
108 | </div> | 125 | </div> |
@@ -111,7 +128,7 @@ export default function() { | @@ -111,7 +128,7 @@ export default function() { | ||
111 | return ( | 128 | return ( |
112 | <div class="cell-action-row"> | 129 | <div class="cell-action-row"> |
113 | <i-button type="primary" size="small" | 130 | <i-button type="primary" size="small" |
114 | - onClick={() => this.editAnswer(row)}> | 131 | + onClick={() => this.editAnswer(row)}> |
115 | 回复 | 132 | 回复 |
116 | </i-button> | 133 | </i-button> |
117 | </div> | 134 | </div> |
@@ -68,8 +68,9 @@ | @@ -68,8 +68,9 @@ | ||
68 | this.filters.productName.model = null; | 68 | this.filters.productName.model = null; |
69 | this.filters.hasImage.model = null; | 69 | this.filters.hasImage.model = null; |
70 | this.filters.brand.model = null; | 70 | this.filters.brand.model = null; |
71 | - this.filters.beginTime = null; | ||
72 | - this.filters.endTime = null; | 71 | + this.filters.createTime.model = ''; |
72 | + this.filters.beginTime.model = ''; | ||
73 | + this.filters.endTime.model = ''; | ||
73 | this.pageData.current = 1; | 74 | this.pageData.current = 1; |
74 | 75 | ||
75 | this.list(); | 76 | this.list(); |
@@ -86,7 +87,7 @@ | @@ -86,7 +87,7 @@ | ||
86 | productName = fts.productName.model, | 87 | productName = fts.productName.model, |
87 | hasImage = fts.hasImage.model, | 88 | hasImage = fts.hasImage.model, |
88 | brand_id = fts.brand.model === '' || fts.brand.model === null ? | 89 | brand_id = fts.brand.model === '' || fts.brand.model === null ? |
89 | - null : fts.brand.model, | 90 | + null : fts.brand.model, |
90 | beginTime = fts.beginTime.model, | 91 | beginTime = fts.beginTime.model, |
91 | endTime = fts.endTime.model; | 92 | endTime = fts.endTime.model; |
92 | 93 | ||
@@ -177,9 +178,3 @@ | @@ -177,9 +178,3 @@ | ||
177 | } | 178 | } |
178 | }; | 179 | }; |
179 | </script> | 180 | </script> |
180 | -<style lang="scss"> | ||
181 | - .cell-img { | ||
182 | - width: 80px; | ||
183 | - background-size: 100%; | ||
184 | - } | ||
185 | -</style> |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | */ | 5 | */ |
6 | import CellInfo from 'components/cell/cell-info'; | 6 | import CellInfo from 'components/cell/cell-info'; |
7 | import CellImage from 'components/cell/cell-image'; | 7 | import CellImage from 'components/cell/cell-image'; |
8 | +import _ from 'lodash'; | ||
8 | 9 | ||
9 | export default function() { | 10 | export default function() { |
10 | return { | 11 | return { |
@@ -33,7 +34,7 @@ export default function() { | @@ -33,7 +34,7 @@ export default function() { | ||
33 | }, | 34 | }, |
34 | { | 35 | { |
35 | label: 'SKN', | 36 | label: 'SKN', |
36 | - value: row.erpSkuId | 37 | + value: row.productSkn |
37 | }, | 38 | }, |
38 | { | 39 | { |
39 | label: '品牌', | 40 | label: '品牌', |
@@ -71,15 +72,15 @@ export default function() { | @@ -71,15 +72,15 @@ export default function() { | ||
71 | { | 72 | { |
72 | title: '评价图片', | 73 | title: '评价图片', |
73 | key: 'image', | 74 | key: 'image', |
74 | - width: 150, | ||
75 | align: 'center', | 75 | align: 'center', |
76 | render: (h, params) => { | 76 | render: (h, params) => { |
77 | let url = params.row.url; | 77 | let url = params.row.url; |
78 | + let urlNew = _.replace(url, 'w/800/h/800', 'w/80/h/80'); | ||
78 | 79 | ||
79 | if (url.length > 0 && url.length !== 1) { | 80 | if (url.length > 0 && url.length !== 1) { |
80 | return h(CellImage, { | 81 | return h(CellImage, { |
81 | props: { | 82 | props: { |
82 | - imageSrc: url, | 83 | + imageSrc: urlNew, |
83 | productUrl: url | 84 | productUrl: url |
84 | } | 85 | } |
85 | }); | 86 | }); |
-
Please register or login to post a comment