Showing
14 changed files
with
138 additions
and
105 deletions
1 | import Vue from 'vue'; | 1 | import Vue from 'vue'; |
2 | import purview from './purview'; | 2 | import purview from './purview'; |
3 | import prodImage from './prod-image'; | 3 | import prodImage from './prod-image'; |
4 | -import time from './time'; | ||
5 | 4 | ||
6 | Vue.directive('purview', purview); | 5 | Vue.directive('purview', purview); |
7 | Vue.directive('prod-img', prodImage); | 6 | Vue.directive('prod-img', prodImage); |
8 | -Vue.directive('time', time); |
app/directives/time.js
deleted
100644 → 0
1 | -import _ from 'lodash'; | ||
2 | -import moment from 'moment'; | ||
3 | - | ||
4 | -export default { | ||
5 | - // unix timestamp format | ||
6 | - // use example: | ||
7 | - // v-time="1495787643" | ||
8 | - // v-time="{time: 1495787643}" | ||
9 | - // v-time="{time: 1495787643, format: 'moment支持的format格式'}" | ||
10 | - bind(el, binding) { | ||
11 | - let format; | ||
12 | - let unixStamp; | ||
13 | - const value = binding.value; | ||
14 | - const isNum = _.isFinite(value); | ||
15 | - const isObj = _.isPlainObject(value); | ||
16 | - const defaultFmt = 'YYYY-MM-DD HH:mm:ss'; | ||
17 | - | ||
18 | - if (isNum) { | ||
19 | - unixStamp = value; | ||
20 | - format = defaultFmt; | ||
21 | - } else if (isObj) { | ||
22 | - unixStamp = binding.value.time; | ||
23 | - format = binding.value.format || defaultFmt; | ||
24 | - } else { | ||
25 | - unixStamp = 'Invalid value.'; | ||
26 | - } | ||
27 | - | ||
28 | - el.innerHTML = moment.unix(unixStamp).format(format); | ||
29 | - } | ||
30 | -}; |
@@ -287,9 +287,17 @@ | @@ -287,9 +287,17 @@ | ||
287 | 287 | ||
288 | this.productService.updateSalesPrice(params) | 288 | this.productService.updateSalesPrice(params) |
289 | .then(res => { | 289 | .then(res => { |
290 | + const data = res.data; | ||
291 | + const code = data.code; | ||
292 | + | ||
293 | + if (code === 200) { | ||
290 | this.tableData[index].salesPrice = salesPrice; | 294 | this.tableData[index].salesPrice = salesPrice; |
291 | row.changePrice = false; | 295 | row.changePrice = false; |
292 | - this.$Message.success(res.data.message); | 296 | + this.$Message.success(data.message); |
297 | + } else { | ||
298 | + row.changePrice = false; | ||
299 | + this.$Message.error(data.message); | ||
300 | + } | ||
293 | }); | 301 | }); |
294 | }, | 302 | }, |
295 | editProduct(skn) { | 303 | editProduct(skn) { |
@@ -24,14 +24,14 @@ | @@ -24,14 +24,14 @@ | ||
24 | <select-category :value="categoryValue" @select-change="sortChange"></select-category> | 24 | <select-category :value="categoryValue" @select-change="sortChange"></select-category> |
25 | </filter-item> | 25 | </filter-item> |
26 | <filter-item :label="filters.verifyStatus.label"> | 26 | <filter-item :label="filters.verifyStatus.label"> |
27 | - <Select v-model.trim="filters.verifyStatus.model"> | 27 | + <Select v-model.trim="filters.verifyStatus.model" clearable> |
28 | <Option v-for="option in filters.verifyStatus.options" | 28 | <Option v-for="option in filters.verifyStatus.options" |
29 | :value="option.value" | 29 | :value="option.value" |
30 | :key="option.value">{{option.label}}</Option> | 30 | :key="option.value">{{option.label}}</Option> |
31 | </Select> | 31 | </Select> |
32 | </filter-item> | 32 | </filter-item> |
33 | <filter-item :label="filters.stockStatus.label"> | 33 | <filter-item :label="filters.stockStatus.label"> |
34 | - <Select v-model.trim="filters.stockStatus.model"> | 34 | + <Select v-model.trim="filters.stockStatus.model" clearable> |
35 | <Option v-for="option in filters.stockStatus.options" | 35 | <Option v-for="option in filters.stockStatus.options" |
36 | :value="option.value" | 36 | :value="option.value" |
37 | :key="option.value">{{option.label}}</Option> | 37 | :key="option.value">{{option.label}}</Option> |
@@ -102,9 +102,11 @@ | @@ -102,9 +102,11 @@ | ||
102 | maxSortId: fts.sort.first.model, | 102 | maxSortId: fts.sort.first.model, |
103 | middleSortId: fts.sort.second.model, | 103 | middleSortId: fts.sort.second.model, |
104 | smallSortId: fts.sort.third.model, | 104 | smallSortId: fts.sort.third.model, |
105 | - brandId: fts.brand.model !== -1 ? fts.brand.model : null, | ||
106 | - auditStatus: fts.verifyStatus.model !== -1 ? fts.verifyStatus.model : null, | ||
107 | - stock: fts.stockStatus.model !== -1 ? this.filters.stockStatus.model : null | 105 | + brandId: fts.brand.model === '' || fts.brand.model === null ? |
106 | + null : fts.brand.model, | ||
107 | + auditStatus: fts.verifyStatus.model ? fts.verifyStatus.model : null, | ||
108 | + stock: fts.stockStatus.model === '' || fts.stockStatus.model === null ? | ||
109 | + null : this.filters.stockStatus.model | ||
108 | }; | 110 | }; |
109 | 111 | ||
110 | return data; | 112 | return data; |
@@ -115,7 +117,6 @@ | @@ -115,7 +117,6 @@ | ||
115 | this.useFilterSign = true; | 117 | this.useFilterSign = true; |
116 | this.productList(params); | 118 | this.productList(params); |
117 | this.pageData.current = 1; | 119 | this.pageData.current = 1; |
118 | - | ||
119 | }, | 120 | }, |
120 | clearFilter() { | 121 | clearFilter() { |
121 | const store = onSaleStore.apply(this); | 122 | const store = onSaleStore.apply(this); |
@@ -262,9 +263,17 @@ | @@ -262,9 +263,17 @@ | ||
262 | 263 | ||
263 | this.productService.updateSalesPrice(params) | 264 | this.productService.updateSalesPrice(params) |
264 | .then(res => { | 265 | .then(res => { |
266 | + const data = res.data; | ||
267 | + const code = data.code; | ||
268 | + | ||
269 | + if (code === 200) { | ||
265 | this.tableData[index].salesPrice = salesPrice; | 270 | this.tableData[index].salesPrice = salesPrice; |
266 | row.changePrice = false; | 271 | row.changePrice = false; |
267 | - this.$Message.success(res.data.message); | 272 | + this.$Message.success(data.message); |
273 | + } else { | ||
274 | + row.changePrice = false; | ||
275 | + this.$Message.error(data.message); | ||
276 | + } | ||
268 | }); | 277 | }); |
269 | }, | 278 | }, |
270 | editProduct(skn) { | 279 | editProduct(skn) { |
@@ -156,72 +156,50 @@ export default function() { | @@ -156,72 +156,50 @@ export default function() { | ||
156 | filterFields: { | 156 | filterFields: { |
157 | sknCode: { | 157 | sknCode: { |
158 | label: 'SKN编码', | 158 | label: 'SKN编码', |
159 | - labelSpan: 6, | ||
160 | model: '', | 159 | model: '', |
161 | - holder: '', | ||
162 | - fieldSpan: 18 | 160 | + holder: '' |
163 | }, | 161 | }, |
164 | prodCode: { | 162 | prodCode: { |
165 | label: '商家编码', | 163 | label: '商家编码', |
166 | - labelSpan: 6, | ||
167 | model: '', | 164 | model: '', |
168 | - holder: '', | ||
169 | - fieldSpan: 18 | 165 | + holder: '' |
170 | }, | 166 | }, |
171 | prodName: { | 167 | prodName: { |
172 | label: '商品名称', | 168 | label: '商品名称', |
173 | - labelSpan: 6, | ||
174 | model: '', | 169 | model: '', |
175 | - holder: '', | ||
176 | - fieldSpan: 18 | 170 | + holder: '' |
177 | }, | 171 | }, |
178 | prodBarCode: { | 172 | prodBarCode: { |
179 | label: '商品条码', | 173 | label: '商品条码', |
180 | - labelSpan: 6, | ||
181 | model: '', | 174 | model: '', |
182 | - holder: '', | ||
183 | - fieldSpan: 18 | 175 | + holder: '' |
184 | }, | 176 | }, |
185 | sort: { | 177 | sort: { |
186 | first: { | 178 | first: { |
187 | label: '选择类目', | 179 | label: '选择类目', |
188 | holder: '选择一级类目', | 180 | holder: '选择一级类目', |
189 | - labelSpan: 6, | ||
190 | - fieldSpan: 18, | ||
191 | model: '' | 181 | model: '' |
192 | }, | 182 | }, |
193 | second: { | 183 | second: { |
194 | label: '二级类目', | 184 | label: '二级类目', |
195 | holder: '选择二级类目', | 185 | holder: '选择二级类目', |
196 | - labelSpan: 6, | ||
197 | - fieldSpan: 18, | ||
198 | model: '' | 186 | model: '' |
199 | }, | 187 | }, |
200 | third: { | 188 | third: { |
201 | label: '三级类目', | 189 | label: '三级类目', |
202 | holder: '选择三级类目', | 190 | holder: '选择三级类目', |
203 | - labelSpan: 6, | ||
204 | - fieldSpan: 18, | ||
205 | model: '' | 191 | model: '' |
206 | } | 192 | } |
207 | }, | 193 | }, |
208 | brand: { | 194 | brand: { |
209 | label: '选择品牌', | 195 | label: '选择品牌', |
210 | - labelSpan: 6, | ||
211 | - fieldSpan: 18, | ||
212 | model: '' | 196 | model: '' |
213 | }, | 197 | }, |
214 | verifyStatus: { | 198 | verifyStatus: { |
215 | label: '审核状态', | 199 | label: '审核状态', |
216 | - labelSpan: 6, | ||
217 | - fieldSpan: 18, | ||
218 | - model: -1, | 200 | + model: '', |
219 | options: [ | 201 | options: [ |
220 | { | 202 | { |
221 | - value: -1, | ||
222 | - label: '全部' | ||
223 | - }, | ||
224 | - { | ||
225 | value: 1, | 203 | value: 1, |
226 | label: '下架待审核' | 204 | label: '下架待审核' |
227 | }, | 205 | }, |
@@ -233,15 +211,9 @@ export default function() { | @@ -233,15 +211,9 @@ export default function() { | ||
233 | }, | 211 | }, |
234 | stockStatus: { | 212 | stockStatus: { |
235 | label: '库存情况', | 213 | label: '库存情况', |
236 | - labelSpan: 6, | ||
237 | - fieldSpan: 18, | ||
238 | - model: -1, | 214 | + model: '', |
239 | options: [ | 215 | options: [ |
240 | { | 216 | { |
241 | - value: -1, | ||
242 | - label: '全部' | ||
243 | - }, | ||
244 | - { | ||
245 | value: 1, | 217 | value: 1, |
246 | label: '有库存' | 218 | label: '有库存' |
247 | }, | 219 | }, |
@@ -115,7 +115,9 @@ export default function() { | @@ -115,7 +115,9 @@ export default function() { | ||
115 | default: '-' | 115 | default: '-' |
116 | }; | 116 | }; |
117 | 117 | ||
118 | - return h('span', vsText[vs]); | 118 | + return ( |
119 | + <span>{vsText[vs]}</span> | ||
120 | + ); | ||
119 | } | 121 | } |
120 | }, | 122 | }, |
121 | { | 123 | { |
@@ -171,13 +173,9 @@ export default function() { | @@ -171,13 +173,9 @@ export default function() { | ||
171 | }, | 173 | }, |
172 | priceStatus: { | 174 | priceStatus: { |
173 | label: '价格状态', | 175 | label: '价格状态', |
174 | - model: -1, | 176 | + model: '', |
175 | options: [ | 177 | options: [ |
176 | { | 178 | { |
177 | - value: -1, | ||
178 | - label: '全部' | ||
179 | - }, | ||
180 | - { | ||
181 | value: 1, | 179 | value: 1, |
182 | label: '启用' | 180 | label: '启用' |
183 | }, | 181 | }, |
@@ -189,13 +187,9 @@ export default function() { | @@ -189,13 +187,9 @@ export default function() { | ||
189 | }, | 187 | }, |
190 | saleStatus: { | 188 | saleStatus: { |
191 | label: '销售状态', | 189 | label: '销售状态', |
192 | - model: -1, | 190 | + model: '', |
193 | options: [ | 191 | options: [ |
194 | { | 192 | { |
195 | - value: -1, | ||
196 | - label: '全部' | ||
197 | - }, | ||
198 | - { | ||
199 | value: 8, | 193 | value: 8, |
200 | label: '新品未上架' | 194 | label: '新品未上架' |
201 | }, | 195 | }, |
@@ -211,13 +205,9 @@ export default function() { | @@ -211,13 +205,9 @@ export default function() { | ||
211 | }, | 205 | }, |
212 | stockStatus: { | 206 | stockStatus: { |
213 | label: '库存状态', | 207 | label: '库存状态', |
214 | - model: -1, | 208 | + model: '', |
215 | options: [ | 209 | options: [ |
216 | { | 210 | { |
217 | - value: -1, | ||
218 | - label: '全部' | ||
219 | - }, | ||
220 | - { | ||
221 | value: 1, | 211 | value: 1, |
222 | label: '有库存' | 212 | label: '有库存' |
223 | }, | 213 | }, |
@@ -14,21 +14,21 @@ | @@ -14,21 +14,21 @@ | ||
14 | :placeholder="filters.prodBarCode.holder"></Input> | 14 | :placeholder="filters.prodBarCode.holder"></Input> |
15 | </filter-item> | 15 | </filter-item> |
16 | <filter-item :label="filters.priceStatus.label"> | 16 | <filter-item :label="filters.priceStatus.label"> |
17 | - <Select v-model.trim="filters.priceStatus.model"> | 17 | + <Select v-model.trim="filters.priceStatus.model" clearable> |
18 | <Option v-for="option in filters.priceStatus.options" | 18 | <Option v-for="option in filters.priceStatus.options" |
19 | :value="option.value" | 19 | :value="option.value" |
20 | :key="option.value">{{option.label}}</Option> | 20 | :key="option.value">{{option.label}}</Option> |
21 | </Select> | 21 | </Select> |
22 | </filter-item> | 22 | </filter-item> |
23 | <filter-item :label="filters.saleStatus.label"> | 23 | <filter-item :label="filters.saleStatus.label"> |
24 | - <Select v-model.trim="filters.saleStatus.model"> | 24 | + <Select v-model.trim="filters.saleStatus.model" clearable> |
25 | <Option v-for="option in filters.saleStatus.options" | 25 | <Option v-for="option in filters.saleStatus.options" |
26 | :value="option.value" | 26 | :value="option.value" |
27 | :key="option.value">{{option.label}}</Option> | 27 | :key="option.value">{{option.label}}</Option> |
28 | </Select> | 28 | </Select> |
29 | </filter-item> | 29 | </filter-item> |
30 | <filter-item :label="filters.stockStatus.label"> | 30 | <filter-item :label="filters.stockStatus.label"> |
31 | - <Select v-model.trim="filters.stockStatus.model"> | 31 | + <Select v-model.trim="filters.stockStatus.model" clearable> |
32 | <Option v-for="option in filters.stockStatus.options" | 32 | <Option v-for="option in filters.stockStatus.options" |
33 | :value="option.value" | 33 | :value="option.value" |
34 | :key="option.value">{{option.label}}</Option> | 34 | :key="option.value">{{option.label}}</Option> |
@@ -117,7 +117,7 @@ | @@ -117,7 +117,7 @@ | ||
117 | _.each(selectKeys, key => { | 117 | _.each(selectKeys, key => { |
118 | const val = values[key]; | 118 | const val = values[key]; |
119 | 119 | ||
120 | - if (val === -1) { | 120 | + if (!(val + '').length || _.isNull(val)) { |
121 | values[key] = null; | 121 | values[key] = null; |
122 | } | 122 | } |
123 | }); | 123 | }); |
@@ -10,25 +10,26 @@ | @@ -10,25 +10,26 @@ | ||
10 | </filter-item> | 10 | </filter-item> |
11 | </layout-filter> | 11 | </layout-filter> |
12 | <layout-list> | 12 | <layout-list> |
13 | - <Table border :columns="columns" | 13 | + <Table border :columns="columns" :row-class-name="rowClassName" |
14 | @on-selection-change="selectChange" :data="dataList"></Table> | 14 | @on-selection-change="selectChange" :data="dataList"></Table> |
15 | </layout-list> | 15 | </layout-list> |
16 | </layout-body> | 16 | </layout-body> |
17 | </template> | 17 | </template> |
18 | 18 | ||
19 | <script> | 19 | <script> |
20 | - import store from './store/detail'; | ||
21 | import {ReturnService} from 'services/repository'; | 20 | import {ReturnService} from 'services/repository'; |
21 | + import _ from 'lodash'; | ||
22 | + import { detail } from './store'; | ||
22 | 23 | ||
23 | export default { | 24 | export default { |
24 | data() { | 25 | data() { |
25 | - return store.apply(this); | 26 | + return detail.apply(this); |
26 | }, | 27 | }, |
27 | created() { | 28 | created() { |
28 | this.returnService = new ReturnService(); | 29 | this.returnService = new ReturnService(); |
29 | const returnId = this.$route.params.id; | 30 | const returnId = this.$route.params.id; |
30 | - const supplierId = this.$route.params.supplierId; | ||
31 | - const supplierName = this.$route.params.supplierName; | 31 | + const supplierId = this.$route.query.sId; |
32 | + const supplierName = this.$route.query.sName; | ||
32 | const params = { supplierId, returnedSupplierId: returnId }; | 33 | const params = { supplierId, returnedSupplierId: returnId }; |
33 | 34 | ||
34 | this.returnId = returnId; | 35 | this.returnId = returnId; |
@@ -43,8 +44,32 @@ | @@ -43,8 +44,32 @@ | ||
43 | }, | 44 | }, |
44 | methods: { | 45 | methods: { |
45 | resolveRes(data) { | 46 | resolveRes(data) { |
47 | + let totalNum = 0; | ||
48 | + let totalOut = 0; | ||
49 | + | ||
46 | this.dataList = data.records; | 50 | this.dataList = data.records; |
47 | - this.dataList.push({productSkn: '总计'}); | 51 | + _.each(this.dataList, item => { |
52 | + totalNum += item.nums; | ||
53 | + totalOut += item.outNums; | ||
54 | + }); | ||
55 | + this.dataList.push({ | ||
56 | + productSkn: '总计', | ||
57 | + nums: totalNum, | ||
58 | + outNums: totalOut, | ||
59 | + _isLastLine: true, | ||
60 | + cellClassName: { | ||
61 | + productSkn: 'cell-total', | ||
62 | + occupiedNum: 'cell-occupy', | ||
63 | + nums: 'cell-num', | ||
64 | + outNums: 'cell-out-num' | ||
65 | + } | ||
66 | + }); | ||
67 | + }, | ||
68 | + rowClassName(row) { | ||
69 | + if (row._isLastLine) { | ||
70 | + return 'last-line'; | ||
71 | + } | ||
72 | + return ''; | ||
48 | }, | 73 | }, |
49 | backList() { | 74 | backList() { |
50 | this.$router.push({ name: 'repository.prodReturn.list' }); | 75 | this.$router.push({ name: 'repository.prodReturn.list' }); |
@@ -72,4 +97,16 @@ | @@ -72,4 +97,16 @@ | ||
72 | margin-right: 20px; | 97 | margin-right: 20px; |
73 | } | 98 | } |
74 | 99 | ||
100 | + .last-line { | ||
101 | + td { | ||
102 | + border: none; | ||
103 | + } | ||
104 | + } | ||
105 | + | ||
106 | + .cell-num, | ||
107 | + .cell-occupy, | ||
108 | + .cell-total, | ||
109 | + .cell-out-num { | ||
110 | + border-right: 1px solid #e3e8ee !important; | ||
111 | + } | ||
75 | </style> | 112 | </style> |
@@ -169,9 +169,11 @@ | @@ -169,9 +169,11 @@ | ||
169 | this.$router.push({ | 169 | this.$router.push({ |
170 | name: 'repository.prodReturn.detail', | 170 | name: 'repository.prodReturn.detail', |
171 | params: { | 171 | params: { |
172 | - supplierId, | ||
173 | - supplierName, | ||
174 | id: returnId | 172 | id: returnId |
173 | + }, | ||
174 | + query: { | ||
175 | + sId: supplierId, | ||
176 | + sName: supplierName | ||
175 | } | 177 | } |
176 | }); | 178 | }); |
177 | 179 |
@@ -22,6 +22,10 @@ export default function() { | @@ -22,6 +22,10 @@ export default function() { | ||
22 | render: (h, params) => { | 22 | render: (h, params) => { |
23 | const row = params.row; | 23 | const row = params.row; |
24 | 24 | ||
25 | + if (row._isLastLine) { | ||
26 | + return ''; | ||
27 | + } | ||
28 | + | ||
25 | return ( | 29 | return ( |
26 | <span>{row.productSkc}({row.colorName})</span> | 30 | <span>{row.productSkc}({row.colorName})</span> |
27 | ); | 31 | ); |
@@ -33,6 +37,10 @@ export default function() { | @@ -33,6 +37,10 @@ export default function() { | ||
33 | render: (h, params) => { | 37 | render: (h, params) => { |
34 | const row = params.row; | 38 | const row = params.row; |
35 | 39 | ||
40 | + if (row._isLastLine) { | ||
41 | + return ''; | ||
42 | + } | ||
43 | + | ||
36 | return ( | 44 | return ( |
37 | <span>{row.productSku}({row.sizeName})</span> | 45 | <span>{row.productSku}({row.sizeName})</span> |
38 | ); | 46 | ); |
@@ -44,6 +52,10 @@ export default function() { | @@ -44,6 +52,10 @@ export default function() { | ||
44 | render: (h, params) => { | 52 | render: (h, params) => { |
45 | const row = params.row; | 53 | const row = params.row; |
46 | 54 | ||
55 | + if (row._isLastLine) { | ||
56 | + return ''; | ||
57 | + } | ||
58 | + | ||
47 | return ( | 59 | return ( |
48 | <span>{row.factoryCode || '-'}</span> | 60 | <span>{row.factoryCode || '-'}</span> |
49 | ); | 61 | ); |
@@ -95,6 +107,10 @@ export default function() { | @@ -95,6 +107,10 @@ export default function() { | ||
95 | render: (h, params) => { | 107 | render: (h, params) => { |
96 | const row = params.row; | 108 | const row = params.row; |
97 | 109 | ||
110 | + if (row._isLastLine) { | ||
111 | + return ''; | ||
112 | + } | ||
113 | + | ||
98 | return ( | 114 | return ( |
99 | <span>{row.returndReason || '-'}</span> | 115 | <span>{row.returndReason || '-'}</span> |
100 | ); | 116 | ); |
@@ -106,6 +122,10 @@ export default function() { | @@ -106,6 +122,10 @@ export default function() { | ||
106 | render: (h, params) => { | 122 | render: (h, params) => { |
107 | const row = params.row; | 123 | const row = params.row; |
108 | 124 | ||
125 | + if (row._isLastLine) { | ||
126 | + return ''; | ||
127 | + } | ||
128 | + | ||
109 | return ( | 129 | return ( |
110 | <span>{row.expressCode || '-'}</span> | 130 | <span>{row.expressCode || '-'}</span> |
111 | ); | 131 | ); |
@@ -120,6 +140,10 @@ export default function() { | @@ -120,6 +140,10 @@ export default function() { | ||
120 | title: '请退时间', | 140 | title: '请退时间', |
121 | align: 'center', | 141 | align: 'center', |
122 | render: (h, params) => { | 142 | render: (h, params) => { |
143 | + if (params.row._isLastLine) { | ||
144 | + return ''; | ||
145 | + } | ||
146 | + | ||
123 | return ( | 147 | return ( |
124 | <span>{timeFormat(params.row.createTime)}</span> | 148 | <span>{timeFormat(params.row.createTime)}</span> |
125 | ); | 149 | ); |
@@ -129,6 +153,10 @@ export default function() { | @@ -129,6 +153,10 @@ export default function() { | ||
129 | title: '退库时间', | 153 | title: '退库时间', |
130 | align: 'center', | 154 | align: 'center', |
131 | render: (h, params) => { | 155 | render: (h, params) => { |
156 | + if (params.row._isLastLine) { | ||
157 | + return ''; | ||
158 | + } | ||
159 | + | ||
132 | return ( | 160 | return ( |
133 | <span>{timeFormat(params.row.outTime)}</span> | 161 | <span>{timeFormat(params.row.outTime)}</span> |
134 | ); | 162 | ); |
app/pages/repository/return/store/index.js
0 → 100644
@@ -25,6 +25,7 @@ | @@ -25,6 +25,7 @@ | ||
25 | <script> | 25 | <script> |
26 | import _ from 'lodash'; | 26 | import _ from 'lodash'; |
27 | import {InvoiceService} from 'services/repository'; | 27 | import {InvoiceService} from 'services/repository'; |
28 | +import timeFormat from 'filters/time-format'; | ||
28 | 29 | ||
29 | export default { | 30 | export default { |
30 | name: 'modal-invoice', | 31 | name: 'modal-invoice', |
@@ -73,7 +74,7 @@ export default { | @@ -73,7 +74,7 @@ export default { | ||
73 | width: 155, | 74 | width: 155, |
74 | render: (h, params) => { | 75 | render: (h, params) => { |
75 | return ( | 76 | return ( |
76 | - <span v-time={params.row.createTime}></span> | 77 | + <span>{timeFormat(params.row.createTime)}</span> |
77 | ); | 78 | ); |
78 | } | 79 | } |
79 | }, { | 80 | }, { |
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | * @author: qi.li <qi.li@yoho.cn> | 3 | * @author: qi.li <qi.li@yoho.cn> |
4 | * @date: 2017/04/13 | 4 | * @date: 2017/04/13 |
5 | */ | 5 | */ |
6 | +import timeFormat from 'filters/time-format'; | ||
7 | + | ||
6 | export default function() { | 8 | export default function() { |
7 | return { | 9 | return { |
8 | columns: [ | 10 | columns: [ |
@@ -19,7 +21,7 @@ export default function() { | @@ -19,7 +21,7 @@ export default function() { | ||
19 | const row = params.row; | 21 | const row = params.row; |
20 | 22 | ||
21 | return ( | 23 | return ( |
22 | - <p v-time={{time: row.createTime}}></p> | 24 | + <p>{timeFormat(row.createTime)}</p> |
23 | ); | 25 | ); |
24 | } | 26 | } |
25 | }, | 27 | }, |
@@ -4,6 +4,8 @@ | @@ -4,6 +4,8 @@ | ||
4 | * @date: 04/05/2017 | 4 | * @date: 04/05/2017 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | +import timeFormat from 'filters/time-format'; | ||
8 | + | ||
7 | export default function() { | 9 | export default function() { |
8 | return { | 10 | return { |
9 | filters: { | 11 | filters: { |
@@ -56,7 +58,7 @@ export default function() { | @@ -56,7 +58,7 @@ export default function() { | ||
56 | align: 'center', | 58 | align: 'center', |
57 | render(h, params) { | 59 | render(h, params) { |
58 | return ( | 60 | return ( |
59 | - <span v-time={params.row.createTime}></span> | 61 | + <span>{timeFormat(params.row.createTime)}</span> |
60 | ); | 62 | ); |
61 | } | 63 | } |
62 | }, | 64 | }, |
-
Please register or login to post a comment