Authored by 陈峰

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-shop-manage into release/1.0

... ... @@ -295,7 +295,11 @@
</script>
<style lang="scss">
.btn-row-space {
.cell-action-row {
margin-top: 10px;
&:last-child {
margin-bottom: 10px;
}
}
</style>
... ...
... ... @@ -216,15 +216,19 @@ export default () => {
width: 180,
align: 'center',
render: function(row) { // eslint-disable-line
return `<div class="action-btn-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
<i-button type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="btn-row-space">
<i-button v-if="row._disabled" type="success" size="small"
@click="setOnSale(${row.productSkn})" disabled>上架</i-button>
<i-button v-else type="success" size="small" @click="setOnSale(${row.productSkn})">上架</i-button>
</div>`;
return `<div class="cell-action-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
</div>
<div class="cell-action-row">
<i-button type="primary" size="small"
@click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="cell-action-row">
<i-button v-if="row._disabled" type="success" size="small"
@click="setOnSale(${row.productSkn})" disabled>商品上架</i-button>
<i-button v-else type="success" size="small"
@click="setOnSale(${row.productSkn})">商品上架</i-button>
</div>`;
}
}
],
... ...
... ... @@ -289,7 +289,11 @@
</script>
<style lang="scss">
.btn-row-space {
.cell-action-row {
margin-top: 10px;
&:last-child {
margin-bottom: 10px;
}
}
</style>
... ...
... ... @@ -91,16 +91,22 @@ export default () => {
width: 180,
align: 'center',
render: function(row) {
return `<div class="action-btn-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
<i-button type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="btn-row-space">
<i-button v-if="row._disabled" type="error" size="small"
@click="setOffSale(${row.productSkn})" disabled>下架</i-button>
<i-button v-else type="error" size="small" @click="setOffSale(${row.productSkn})" >下架</i-button>
</div>`;
}
return `<div class="cell-action-row">
<i-button type="primary" size="small"
@click="editSize(row.productSkn)">尺码维护</i-button>
</div>
<div class="cell-action-row">
<i-button type="primary" size="small"
@click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="cell-action-row">
<i-button v-if="row._disabled" type="error" size="small"
@click="setOffSale(${row.productSkn})" disabled>商品下架</i-button>
<i-button v-else type="error" size="small"
@click="setOffSale(${row.productSkn})" >商品下架</i-button>
</div>`;
},
cellClassName: 'cell-action'
}
],
tableData: [],
... ...
... ... @@ -93,7 +93,7 @@ export default () => {
return `<cell-prd-info
:skn="row.productSkn"
:sku="row.productSku"
:color="row.colorName"
:color="row._colorName"
:name="row.productName"
:brand="row.brandName"
:price="row.salesPrice"
... ...
... ... @@ -89,7 +89,7 @@ export default () => {
return `<cell-prd-info
:skn="row.productSkn"
:sku="row.productSku"
:color="row.colorName"
:color="row._colorName"
:name="row.productName"
:brand="row.brandName"
:price="row.salesPrice"
... ...
... ... @@ -167,6 +167,7 @@
const list = res.data.records;
_.each(list, i => {
i._colorName = i.factoryGoodsName || '';
i.createTime = moment.unix(i.createTime).format(fmt);
});
... ...
... ... @@ -175,6 +175,7 @@
_.each(list, (v, i) => {
v._rowIndex = i; // 当前行index
v._disabled = v.isOvertime === 'Y';
v._colorName = v.factoryGoodsName || '';
v.createTime = moment.unix(v.createTime).format(fmt);
v._needDeliver = v.buyingNums - v.lackNum - v.shipmentsNums; // 当前需发数
});
... ...