Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-shop-manage into release/1.0
Showing
8 changed files
with
43 additions
and
23 deletions
@@ -295,7 +295,11 @@ | @@ -295,7 +295,11 @@ | ||
295 | </script> | 295 | </script> |
296 | 296 | ||
297 | <style lang="scss"> | 297 | <style lang="scss"> |
298 | - .btn-row-space { | 298 | + .cell-action-row { |
299 | margin-top: 10px; | 299 | margin-top: 10px; |
300 | + | ||
301 | + &:last-child { | ||
302 | + margin-bottom: 10px; | ||
303 | + } | ||
300 | } | 304 | } |
301 | </style> | 305 | </style> |
@@ -216,15 +216,19 @@ export default () => { | @@ -216,15 +216,19 @@ export default () => { | ||
216 | width: 180, | 216 | width: 180, |
217 | align: 'center', | 217 | align: 'center', |
218 | render: function(row) { // eslint-disable-line | 218 | render: function(row) { // eslint-disable-line |
219 | - return `<div class="action-btn-row"> | ||
220 | - <i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button> | ||
221 | - <i-button type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button> | ||
222 | - </div> | ||
223 | - <div class="btn-row-space"> | ||
224 | - <i-button v-if="row._disabled" type="success" size="small" | ||
225 | - @click="setOnSale(${row.productSkn})" disabled>上架</i-button> | ||
226 | - <i-button v-else type="success" size="small" @click="setOnSale(${row.productSkn})">上架</i-button> | ||
227 | - </div>`; | 219 | + return `<div class="cell-action-row"> |
220 | + <i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button> | ||
221 | + </div> | ||
222 | + <div class="cell-action-row"> | ||
223 | + <i-button type="primary" size="small" | ||
224 | + @click="editProduct(${row.productSkn})">内容编辑</i-button> | ||
225 | + </div> | ||
226 | + <div class="cell-action-row"> | ||
227 | + <i-button v-if="row._disabled" type="success" size="small" | ||
228 | + @click="setOnSale(${row.productSkn})" disabled>商品上架</i-button> | ||
229 | + <i-button v-else type="success" size="small" | ||
230 | + @click="setOnSale(${row.productSkn})">商品上架</i-button> | ||
231 | + </div>`; | ||
228 | } | 232 | } |
229 | } | 233 | } |
230 | ], | 234 | ], |
@@ -289,7 +289,11 @@ | @@ -289,7 +289,11 @@ | ||
289 | </script> | 289 | </script> |
290 | 290 | ||
291 | <style lang="scss"> | 291 | <style lang="scss"> |
292 | - .btn-row-space { | 292 | + .cell-action-row { |
293 | margin-top: 10px; | 293 | margin-top: 10px; |
294 | + | ||
295 | + &:last-child { | ||
296 | + margin-bottom: 10px; | ||
297 | + } | ||
294 | } | 298 | } |
295 | </style> | 299 | </style> |
@@ -91,16 +91,22 @@ export default () => { | @@ -91,16 +91,22 @@ export default () => { | ||
91 | width: 180, | 91 | width: 180, |
92 | align: 'center', | 92 | align: 'center', |
93 | render: function(row) { | 93 | render: function(row) { |
94 | - return `<div class="action-btn-row"> | ||
95 | - <i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button> | ||
96 | - <i-button type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button> | ||
97 | - </div> | ||
98 | - <div class="btn-row-space"> | ||
99 | - <i-button v-if="row._disabled" type="error" size="small" | ||
100 | - @click="setOffSale(${row.productSkn})" disabled>下架</i-button> | ||
101 | - <i-button v-else type="error" size="small" @click="setOffSale(${row.productSkn})" >下架</i-button> | ||
102 | - </div>`; | ||
103 | - } | 94 | + return `<div class="cell-action-row"> |
95 | + <i-button type="primary" size="small" | ||
96 | + @click="editSize(row.productSkn)">尺码维护</i-button> | ||
97 | + </div> | ||
98 | + <div class="cell-action-row"> | ||
99 | + <i-button type="primary" size="small" | ||
100 | + @click="editProduct(${row.productSkn})">内容编辑</i-button> | ||
101 | + </div> | ||
102 | + <div class="cell-action-row"> | ||
103 | + <i-button v-if="row._disabled" type="error" size="small" | ||
104 | + @click="setOffSale(${row.productSkn})" disabled>商品下架</i-button> | ||
105 | + <i-button v-else type="error" size="small" | ||
106 | + @click="setOffSale(${row.productSkn})" >商品下架</i-button> | ||
107 | + </div>`; | ||
108 | + }, | ||
109 | + cellClassName: 'cell-action' | ||
104 | } | 110 | } |
105 | ], | 111 | ], |
106 | tableData: [], | 112 | tableData: [], |
@@ -93,7 +93,7 @@ export default () => { | @@ -93,7 +93,7 @@ export default () => { | ||
93 | return `<cell-prd-info | 93 | return `<cell-prd-info |
94 | :skn="row.productSkn" | 94 | :skn="row.productSkn" |
95 | :sku="row.productSku" | 95 | :sku="row.productSku" |
96 | - :color="row.colorName" | 96 | + :color="row._colorName" |
97 | :name="row.productName" | 97 | :name="row.productName" |
98 | :brand="row.brandName" | 98 | :brand="row.brandName" |
99 | :price="row.salesPrice" | 99 | :price="row.salesPrice" |
@@ -89,7 +89,7 @@ export default () => { | @@ -89,7 +89,7 @@ export default () => { | ||
89 | return `<cell-prd-info | 89 | return `<cell-prd-info |
90 | :skn="row.productSkn" | 90 | :skn="row.productSkn" |
91 | :sku="row.productSku" | 91 | :sku="row.productSku" |
92 | - :color="row.colorName" | 92 | + :color="row._colorName" |
93 | :name="row.productName" | 93 | :name="row.productName" |
94 | :brand="row.brandName" | 94 | :brand="row.brandName" |
95 | :price="row.salesPrice" | 95 | :price="row.salesPrice" |
@@ -167,6 +167,7 @@ | @@ -167,6 +167,7 @@ | ||
167 | const list = res.data.records; | 167 | const list = res.data.records; |
168 | 168 | ||
169 | _.each(list, i => { | 169 | _.each(list, i => { |
170 | + i._colorName = i.factoryGoodsName || ''; | ||
170 | i.createTime = moment.unix(i.createTime).format(fmt); | 171 | i.createTime = moment.unix(i.createTime).format(fmt); |
171 | }); | 172 | }); |
172 | 173 |
@@ -175,6 +175,7 @@ | @@ -175,6 +175,7 @@ | ||
175 | _.each(list, (v, i) => { | 175 | _.each(list, (v, i) => { |
176 | v._rowIndex = i; // 当前行index | 176 | v._rowIndex = i; // 当前行index |
177 | v._disabled = v.isOvertime === 'Y'; | 177 | v._disabled = v.isOvertime === 'Y'; |
178 | + v._colorName = v.factoryGoodsName || ''; | ||
178 | v.createTime = moment.unix(v.createTime).format(fmt); | 179 | v.createTime = moment.unix(v.createTime).format(fmt); |
179 | v._needDeliver = v.buyingNums - v.lackNum - v.shipmentsNums; // 当前需发数 | 180 | v._needDeliver = v.buyingNums - v.lackNum - v.shipmentsNums; // 当前需发数 |
180 | }); | 181 | }); |
-
Please register or login to post a comment