文件差异内容过多而无法显示
加载差异
文件差异内容过多而无法显示
加载差异
@@ -0,0 +1,725 @@
|
||||
<link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
|
||||
<link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
|
||||
<style>
|
||||
#goodsIndex {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.el-pagination,
|
||||
.el-pagination__total,
|
||||
.el-input__inner,
|
||||
.el-pagination__jump {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.common-btn {
|
||||
height: 32px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.el-input__inner,
|
||||
.el-input__icon {
|
||||
line-height: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
width: 32px;
|
||||
border: 1px solid #E6E6E6;
|
||||
font-size: 14px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.create-goods,
|
||||
.add-params,
|
||||
.add-level1-sku {
|
||||
width: 98px;
|
||||
background: #7536D0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.create-goods {
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.create-goods span,
|
||||
.add-params span,
|
||||
.add-level1-sku span {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #e6e6e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.el-table,
|
||||
.el-table thead,
|
||||
.el-table th {
|
||||
color: #444;
|
||||
font-weight: 500 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.display-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.label-auto {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.el-radio-button__inner,
|
||||
.el-radio-button__inner:hover {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked+.el-radio__label,
|
||||
.el-tabs__item.is-active,
|
||||
.el-tabs__item:hover,
|
||||
.el-pager li.active,
|
||||
.el-select-dropdown__item.selected {
|
||||
color: #7438D5;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner,
|
||||
.el-tabs__active-bar,
|
||||
.el-checkbox__input.is-checked .el-checkbox__inner,
|
||||
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
||||
background: #7438D5;
|
||||
border-color: #7438D5;
|
||||
}
|
||||
|
||||
.one-ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sort-order {
|
||||
margin-left: 6px;
|
||||
color: #C0C4CC;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.recycle-btn {
|
||||
width: 88px;
|
||||
color: #444;
|
||||
border: #444 1px solid;
|
||||
}
|
||||
|
||||
.recycle-btn i {
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.all-btn-up,
|
||||
.all-btn-del,
|
||||
.all-btn-up1 {
|
||||
width: 60px;
|
||||
border: 1px solid #E5E5E5;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.all-btn-up1:hover {
|
||||
color: #7438D5;
|
||||
border-color: #7438D5;
|
||||
}
|
||||
|
||||
.all-btn-up:hover {
|
||||
color: #50E3C2;
|
||||
border-color: #50E3C2;
|
||||
}
|
||||
|
||||
.all-btn-del:hover {
|
||||
color: #FF5959;
|
||||
border-color: #FF5959;
|
||||
}
|
||||
|
||||
.status-box {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.status-btn {
|
||||
width: 56px;
|
||||
height: 26px;
|
||||
border: 1px solid #7438D5;
|
||||
color: #7438D5;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.status-btn-2 {
|
||||
color: #FF5959;
|
||||
border-color: #FF5959;
|
||||
}
|
||||
|
||||
.status-btn-3 {
|
||||
color: #999;
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
.el-table th {
|
||||
background: #F9F9F9;
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
width: 80px;
|
||||
padding: 0;
|
||||
padding-right: 20px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.icon-top {
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.edit-text,
|
||||
.copy-text,
|
||||
.del-text {
|
||||
cursor: pointer;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.copy-text {
|
||||
margin: 0 14px;
|
||||
}
|
||||
|
||||
.edit-text:hover {
|
||||
color: #7438D5;
|
||||
}
|
||||
|
||||
.copy-text:hover {
|
||||
color: #01CFA1;
|
||||
}
|
||||
|
||||
.del-text:hover {
|
||||
color: #FF5959;
|
||||
}
|
||||
|
||||
.el-button--primary,
|
||||
.el-button--primary:hover {
|
||||
background: #7438D5 !important;
|
||||
border-color: #7438D5 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-popover {
|
||||
left: 46px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.choose-container {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.custom-choose,
|
||||
.custom-choose-type,
|
||||
.custom-choose-sub {
|
||||
height: 50px;
|
||||
border-radius: 4px;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.custom-choose-type,
|
||||
.custom-choose-sub {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.custom-choose-sub {
|
||||
height: 70px;
|
||||
padding: 0 10px 20px 20px;
|
||||
}
|
||||
|
||||
.choose-status-tip {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.custom-choose-type-tip {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.choose-btn {
|
||||
width: 80px;
|
||||
border: 1px solid #E6E6E6;
|
||||
margin-right: 10px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.choose-btn-active {
|
||||
background-color: #7536D0;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.choose-price {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.choose-price-line {
|
||||
margin: 0 14px;
|
||||
}
|
||||
|
||||
.el-input-group__append,
|
||||
.el-input-group__prepend {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.custom-table {
|
||||
padding: 20px 20px 30px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
justify-content: space-between;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.custom-refresh {
|
||||
width: 34px;
|
||||
height: 32px;
|
||||
border: 1px solid #E6E6E6;
|
||||
font-size: 16px;
|
||||
justify-content: center;
|
||||
margin-right: 20px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
justify-content: space-between;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/* .el-table td,
|
||||
.el-table th,
|
||||
.el-table th.is-leaf {
|
||||
border-color: #f7f7f7;
|
||||
padding: 0;
|
||||
} */
|
||||
|
||||
/* .el-table th .cell,
|
||||
.el-table td .cell {
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
justify-content: center;
|
||||
} */
|
||||
|
||||
/* .el-table th .cell {
|
||||
height: 40px;
|
||||
} */
|
||||
|
||||
.goods-title {
|
||||
margin-bottom: 4px;
|
||||
width: 154px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.activity-type {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.activity-type-btn {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
padding-top: 2px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.seckill-btn {
|
||||
background: #FFF4F3;
|
||||
border: 1px solid #FECAC4;
|
||||
color: #FE9488;
|
||||
}
|
||||
|
||||
.groupon-btn {
|
||||
background: #F1EDFA;
|
||||
border: 1px solid #CEBEEC;
|
||||
color: #9C7EDA;
|
||||
}
|
||||
|
||||
.score-btn {
|
||||
background: #FDF5E8;
|
||||
border: 1px solid #F8DCAE;
|
||||
color: #F2BA5E;
|
||||
}
|
||||
|
||||
.el-table .bg-color {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.cell-left .cell {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.el-table_1_column_11.is-leaf,
|
||||
.el-table_1_column_11 {
|
||||
border-color: #EBEEF5 !important;
|
||||
}
|
||||
|
||||
.el-radio-button__inner {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.el-table__fixed-right::before,
|
||||
.el-table__fixed::before {
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
.ellipsis-item {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.el-table td,
|
||||
.el-table th {
|
||||
padding: 10px 0 9px;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
</style>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/Sortable.min.js"></script>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/vuedraggable.js"></script>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
|
||||
<div id="goodsIndex" v-cloak v-loading="allAjax" @click.stop="hideup()">
|
||||
<div class="choose-container">
|
||||
<div class="custom-choose display-flex">
|
||||
<div class="choose-status">
|
||||
<span class="choose-status-tip">筛选条件</span>
|
||||
<el-switch @change="isShoose" active-value="1" inactive-value="0" v-model="chooseType"
|
||||
active-color="#7536D0" inactive-color="#E9EBEF">
|
||||
</el-switch>
|
||||
</div>
|
||||
<div class="custom-search">
|
||||
<el-input placeholder="请输入标题" suffix-icon="el-icon-search" v-model="searchKey">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
<div v-if="chooseType==1">
|
||||
<div class="custom-choose-type display-flex">
|
||||
<div class="custom-choose-type-tip">
|
||||
活动类别
|
||||
</div>
|
||||
<div class="common-btn choose-btn" :class="activityType=='all'?'choose-btn-active':''"
|
||||
@click="chooseOpt('all')">
|
||||
全部
|
||||
</div>
|
||||
<div class="common-btn choose-btn" :class="activityType=='groupon'?'choose-btn-active':''"
|
||||
@click="chooseOpt('groupon')">
|
||||
拼团
|
||||
</div>
|
||||
<div class="common-btn choose-btn" :class="activityType=='seckill'?'choose-btn-active':''"
|
||||
@click="chooseOpt('seckill')">
|
||||
秒杀
|
||||
</div>
|
||||
<div class="common-btn choose-btn" :class="activityType=='score'?'choose-btn-active':''"
|
||||
@click="chooseOpt('score')">
|
||||
积分
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-choose-type display-flex">
|
||||
<div class="custom-choose-type-tip">
|
||||
价格区间
|
||||
</div>
|
||||
<div class="choose-price">
|
||||
<el-input v-model="priceFrist">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="choose-price-line">
|
||||
-
|
||||
</div>
|
||||
<div class="choose-price">
|
||||
<el-input v-model="priceLast">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-choose-sub display-flex">
|
||||
<div class="common-btn choose-btn choose-btn-active" style="margin-right: 20px;"
|
||||
@click="goodsOpt('filter')">
|
||||
筛选
|
||||
</div>
|
||||
<div class="common-btn choose-btn" @click="goodsOpt('clear')">
|
||||
清空
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
</div>
|
||||
<div class="custom-table">
|
||||
<div class="custom-header display-flex">
|
||||
<div class="display-flex">
|
||||
<div class="custom-refresh display-flex" @click="getData">
|
||||
<i class="el-icon-refresh"></i>
|
||||
</div>
|
||||
<div class="common-btn create-goods" @click="goodsOpt('create')">
|
||||
<i class="el-icon-plus"></i>
|
||||
<span>新增商品</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-radio-group v-model="activeStatus" fill="#7536D0">
|
||||
<el-radio-button label="all">全部</el-radio-button>
|
||||
<el-radio-button label="up">已上架</el-radio-button>
|
||||
<el-radio-button label="down">已下架</el-radio-button>
|
||||
<el-radio-button label="hidden">已隐藏</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common-btn recycle-btn" @click="goodsOpt('recycle')">
|
||||
<i class="fa fa-recycle"></i>
|
||||
回收站
|
||||
</div>
|
||||
</div>
|
||||
<div v-loading="tableAjax">
|
||||
<el-table ref="multipleTable" :data="goodsData" tooltip-effect="dark" style="width: 100%" border
|
||||
@selection-change="handleSelectionChange" :row-class-name="tableRowClassName"
|
||||
:cell-class-name="tableCellClassName" :header-cell-class-name="tableCellClassName"
|
||||
@row-dblclick="goodsOpt">
|
||||
<el-table-column type="selection" min-width="36">
|
||||
</el-table-column>
|
||||
<el-table-column label="ID" prop="id" min-width="70">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>ID</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='id' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('id','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='id' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('id','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" min-width="330">
|
||||
<template slot-scope="scope">
|
||||
<div class="goods-name">
|
||||
<div class="goods-img">
|
||||
<el-image :src="Fast.api.cdnurl(scope.row.image)" fit="contain">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
</div>
|
||||
<div>
|
||||
<div class="ellipsis-item" style="margin-top: 8px;line-height: 1;">
|
||||
{{scope.row.title}}
|
||||
</div>
|
||||
<div class="display-flex" style="margin-top: 13px;">
|
||||
<span v-if="scope.row.is_sku==1"
|
||||
style="color: #444;margin-right: 12px;line-height: 20px;">
|
||||
{{scope.row.is_sku==1?'多规格':''}}
|
||||
</span>
|
||||
<div v-if="scope.row.activity_type || scope.row.app_type"
|
||||
class="activity-type display-flex">
|
||||
<div v-if="scope.row.app_type" class="activity-tags full-activity-tag">
|
||||
{{scope.row.app_type_text}}
|
||||
</div>
|
||||
<template v-for="(b,a) in scope.row.activity_type_text_arr">
|
||||
<template v-if="a=='groupon'">
|
||||
<div class="activity-tags groupon-activity-tag">
|
||||
拼团
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="a=='seckill'" class="activity-tags seckill-activity-tag">{{b}}
|
||||
</div>
|
||||
<div v-if="a=='full_reduce' || a=='full_discount' || a=='free_shipping'"
|
||||
class="activity-tags full-activity-tag">{{b}}</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="价格" min-width="90">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>价格</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='price' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('price','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='price' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('price','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sales" label="销量" min-width="100">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>销量</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='sales' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('sales','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='sales' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('sales','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="views" label="浏览量" min-width="90">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>浏览量</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='views' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('views','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='views' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('views','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stock" label="库存" min-width="100">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>库存</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='stock' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('stock','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='stock' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('stock','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" min-width="148">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
{{moment(scope.row.updatetime*1000).format("YYYY-MM-DD HH:mm:ss")}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="weigh" label="排序" min-width="80">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<div class="display-flex">
|
||||
<div>排序</div>
|
||||
<div class="display-flex sort-order">
|
||||
<i class="el-icon-sort-up icon-top"
|
||||
:style="{color:(sort=='weigh' && order=='asc')?'#7438d5':''}"
|
||||
@click="sortOrder('weigh','asc')"></i>
|
||||
<i class="el-icon-sort-down icon-bottom"
|
||||
:style="{color:(sort=='weigh' && order=='desc')?'#7438d5':''}"
|
||||
@click="sortOrder('weigh','desc')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="bottom" width="120" trigger="hover">
|
||||
<div class="display-flex status-box">
|
||||
<div class="common-btn status-btn status-btn-1" v-if="scope.row.status!='up'"
|
||||
@click="editStatus(scope.row.id,'up')">
|
||||
上架
|
||||
</div>
|
||||
<div class="common-btn status-btn status-btn-2" v-if="scope.row.status!='down'"
|
||||
@click="editStatus(scope.row.id,'down')">
|
||||
下架
|
||||
</div>
|
||||
<div class="common-btn status-btn status-btn-3" v-if="scope.row.status!='hidden'"
|
||||
@click="editStatus(scope.row.id,'hidden')">
|
||||
隐藏
|
||||
</div>
|
||||
</div>
|
||||
<span slot="reference" style="cursor: pointer;margin-right: 12px;">
|
||||
<span style="color:#7438D5"
|
||||
v-if="scope.row.status=='up'">{{scope.row.status_text}}</span>
|
||||
<span style="color:#FF5959"
|
||||
v-if="scope.row.status=='down'">{{scope.row.status_text}}</span>
|
||||
<span style="color:#999"
|
||||
v-if="scope.row.status=='hidden'">{{scope.row.status_text}}</span>
|
||||
</span>
|
||||
</el-popover>
|
||||
<span class="edit-text" @click="goodsOpt('edit',scope.row.id)">编辑
|
||||
</span>
|
||||
<span class="copy-text" @click="goodsOpt('copy',scope.row.id)">复制
|
||||
</span>
|
||||
<span class="del-text" @click="goodsOpt('del',scope.row.id)">删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="page-container display-flex">
|
||||
<div class="display-flex">
|
||||
<div class="common-btn all-btn-up1" @click="goodsOpt('up',null)" v-if="activeStatus!='up'">
|
||||
上架
|
||||
</div>
|
||||
<div class="common-btn all-btn-up" @click="goodsOpt('down',null)" v-if="activeStatus!='down'">
|
||||
下架
|
||||
</div>
|
||||
<div class="common-btn all-btn-del" @click="goodsOpt('del',null)">
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="limit"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="totalPage">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('shopro/goods/goods/restore')?'':'hide'}" href="javascript:;" data-url="shopro/goods/goods/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
|
||||
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('shopro/goods/goods/destroy')?'':'hide'}" href="javascript:;" data-url="shopro/goods/goods/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
|
||||
<a class="btn btn-success btn-restoreall {:$auth->check('shopro/goods/goods/restore')?'':'hide'}" href="javascript:;" data-url="shopro/goods/goods/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
|
||||
<a class="btn btn-danger btn-destroyall {:$auth->check('shopro/goods/goods/destroy')?'':'hide'}" href="javascript:;" data-url="shopro/goods/goods/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover"
|
||||
data-operate-restore="{:$auth->check('shopro/goods/goods/restore')}"
|
||||
data-operate-destroy="{:$auth->check('shopro/goods/goods/destroy')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,308 @@
|
||||
<link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
|
||||
<link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
|
||||
|
||||
<style>
|
||||
#goodsSelect {
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
color: #444;
|
||||
margin: -15px;
|
||||
}
|
||||
|
||||
.dialog-left {
|
||||
width: 200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
height: 100vh;
|
||||
padding: 9px 20px 0;
|
||||
overflow: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dialog-left::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.dialog-left::-webkit-scrollbar-thumb {
|
||||
width: 6px;
|
||||
background: #e6e6e6;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dialog-right {
|
||||
height: 100vh;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dialog-search {
|
||||
padding: 9px 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dialog-search .el-input {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.dialog-search .el-input__inner {
|
||||
background: #F9F9F9;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-right-body {
|
||||
padding: 0 14px;
|
||||
height: calc(100vh - 62px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
padding: 15px 20px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.operation-button {
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.define-button {
|
||||
background: #6E3DC8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 1px solid #E6E6E6;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.el-pagination.is-background .el-pager li:not(.disabled).active {
|
||||
background: #7438D5;
|
||||
}
|
||||
|
||||
.el-image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.level-item-1,
|
||||
.level-item-2,
|
||||
.level-item-3,
|
||||
.level-item-4 {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.level-item-2 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.level-item-3 {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.level-item-4 {
|
||||
padding-left: 73px;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.arrow-open {
|
||||
transform: rotateZ(90deg);
|
||||
transition: transform .25s linear;
|
||||
}
|
||||
|
||||
.arrow-selected {
|
||||
color: #7438D5;
|
||||
background: rgba(116, 56, 213, 0.14);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
cursor: pointer;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.el-icon-caret-right {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.i-container {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.el-table td,
|
||||
.el-table th {
|
||||
padding: 5px 0 6px;
|
||||
}
|
||||
|
||||
.activity-text {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.activity-text:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.score-activity {
|
||||
color: #FF760D;
|
||||
}
|
||||
|
||||
.groupon-activity {
|
||||
color: #7438D5;
|
||||
}
|
||||
|
||||
.seckill-activity {
|
||||
color: #FF4F39;
|
||||
}
|
||||
|
||||
.full-activity {
|
||||
color: #F5AE6B;
|
||||
}
|
||||
|
||||
.single-select-table thead .el-table-column--selection .cell {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
</style>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
|
||||
<script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
|
||||
<div id="goodsSelect" v-cloak>
|
||||
<div class="dialog-body display-flex">
|
||||
<div class="dialog-left">
|
||||
<div v-for="(level1,p) in categoryData" :key="p">
|
||||
<div class="level-item-1" :class="level1.selected?'arrow-selected':''">
|
||||
<div class="i-container">
|
||||
<i v-if="level1.children && level1.children.length>0" class="el-icon-caret-right"
|
||||
:class="level1.show?'arrow-open':''" @click="showLeft(p, null, null,null)"></i>
|
||||
</div>
|
||||
<span class="item-name" @click="selectCategoryLeft(p, null, null,null)">{{level1.name}}</span>
|
||||
</div>
|
||||
<el-collapse-transition v-for="(level2,c) in level1.children">
|
||||
<div :key="c" v-show="level1.show">
|
||||
<div class="level-item-2" :class="level2.selected?'arrow-selected':''">
|
||||
<div class="i-container">
|
||||
<i v-if="level2.children && level2.children.length>0" class="el-icon-caret-right"
|
||||
:class="level2.show?'arrow-open':''" @click="showLeft(p, c, null,null)"></i>
|
||||
</div>
|
||||
<span class="item-name" @click="selectCategoryLeft(p, c, null,null)">{{level2.name}}</span>
|
||||
</div>
|
||||
<el-collapse-transition v-for="(level3,a) in level2.children">
|
||||
<div :key="a" v-show="level2.show">
|
||||
<div class="level-item-3" :class="level3.selected?'arrow-selected':''">
|
||||
<div class="i-container">
|
||||
<i v-if="level3.children && level3.children.length>0"
|
||||
class="el-icon-caret-right" :class="level3.show?'arrow-open':''"
|
||||
@click="showLeft(p, c, a,null)"></i>
|
||||
</div>
|
||||
<span class="item-name"
|
||||
@click="selectCategoryLeft(p, c, a,null)">{{level3.name}}</span>
|
||||
</div>
|
||||
<el-collapse-transition v-for="(level4,s) in level3.children">
|
||||
<div :key="s" v-show="level3.show">
|
||||
<div class="level-item-4" :class="level4.selected?'arrow-selected':''">
|
||||
<span class="item-name"
|
||||
@click="selectCategoryLeft(p, c, a,s)">{{level4.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-right">
|
||||
<div class="dialog-right-body">
|
||||
<div class="dialog-search display-flex">
|
||||
<el-input size="small" placeholder="请输入搜索内容" v-model="searchWhere">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div :class="multiple=='false'?'single-select-table':''">
|
||||
<el-table :data="goodsList" border @selection-change="multipleSelectionChange"
|
||||
ref="multipleTable" @select="SelectionChange">
|
||||
<el-table-column type="selection" width="40" v-if="multiple=='true'">
|
||||
</el-table-column>
|
||||
<el-table-column type="selection" width="40" v-if="multiple=='false'">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.checked" @change="singleSelectionChange(scope.row)">
|
||||
</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="id" label="ID" min-width="70">
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" min-width="100" align="left">
|
||||
<template slot-scope="scope">
|
||||
<div class="goods-image">
|
||||
<el-image :src="Fast.api.cdnurl(scope.row.image)" fit="contain">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
</div>
|
||||
<div class="goods-title ellipsis-item">{{scope.row.title}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与活动" width="210">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.activity_type || scope.row.app_type" class="display-flex">
|
||||
<div class="activity-text score-activity" v-if="scope.row.app_type">
|
||||
{{scope.row.app_type_text}}
|
||||
</div>
|
||||
<template v-for="(b,a) in scope.row.activity_type_text_arr">
|
||||
<template v-if="a=='groupon'">
|
||||
<div class="activity-text groupon-activity">
|
||||
拼团
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="a=='seckill' || a == 'robbuy'" class="activity-text seckill-activity">{{b}}</div>
|
||||
<div v-if="a=='full_reduce' || a=='full_discount' || a=='free_shipping'"
|
||||
class="activity-text full-activity">{{b}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="display-flex" v-else>-</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stock" label="库存" width="80">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-footer display-flex">
|
||||
<div>
|
||||
<el-pagination background layout="prev, pager, next" :total="totalPage" @prev-click="changeClick"
|
||||
@next-click="changeClick" @current-change="changeClick" :current-page="currentPage">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div class="display-flex">
|
||||
<div @click="operation()" class="operation-button define-button">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,194 @@
|
||||
<style>
|
||||
.skuChildrenBox {
|
||||
display: flex;
|
||||
padding: 0 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.skuChildren {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
line-height: 24px;
|
||||
color: rgba(80, 80, 80, 1);
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.skuChildrenSelect {
|
||||
border: 1px solid rgba(212, 48, 48, 1)
|
||||
}
|
||||
|
||||
.skuChildren-close {
|
||||
position: absolute;
|
||||
background: rgba(212, 48, 48, 1);
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
font-style: 12px;
|
||||
-webkit-transform: scale(0.8);
|
||||
}
|
||||
|
||||
.status {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sku-img {
|
||||
cursor: pointer;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
|
||||
.legend-tip {
|
||||
color: #f00;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.all-edit-btn{
|
||||
width: 120px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.i-color{
|
||||
color: #f00;
|
||||
}
|
||||
.tooltip-inner{
|
||||
background: #fff;
|
||||
color: #999;
|
||||
border: 1px solid #999;
|
||||
box-shadow: 2px 2px 2px 2px #eee;
|
||||
}
|
||||
.tooltip.bottom .tooltip-arrow{
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.tooltip-toggle{
|
||||
color: #000;
|
||||
}
|
||||
.tooltip-toggle:hover{
|
||||
color: #000;
|
||||
}
|
||||
.form-group.skuMain {
|
||||
background-color: #f5f5f5;
|
||||
padding: 10px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sku-tips {
|
||||
padding: 16px;
|
||||
border: 1px solid #7536D0;
|
||||
border-radius: 5px;
|
||||
background-color: #F1EBFA;
|
||||
position: relative;
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="tab-pane fade" id="skuPrce">
|
||||
<div class="widget-body no-padding">
|
||||
<div class="form-group">
|
||||
<legend>规格价格</legend>
|
||||
<div class="sku-tips">
|
||||
<p><strong>注意</strong></p>
|
||||
<p>1、请完善主规格子规格</p>
|
||||
<p>2、注意如果商品参与了拼团,秒杀,积分商城等活动,编辑规格可能会导致活动规格不可用,请谨慎编辑</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="is_reset_sku" v-model="isResetSku">
|
||||
<input type="hidden" name="sku[listData]" v-model="skuListData">
|
||||
<input type="hidden" name="sku[priceData]" v-model="skuPriceData">
|
||||
<label class="control-label col-xs-12 col-sm-2">添加主规格:</label>
|
||||
<div class="col-xs-4 col-sm-4">
|
||||
<input class="form-control" type="text" v-model="skuModal" placeholder="请输入主规格名称" maxlength="5">
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4">
|
||||
<span class="btn btn-primary" @click="addMainSku">确认</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group skuMain" v-for="(s, k) in skuList">
|
||||
<label class="control-label col-xs-12 col-sm-2" style="padding-top: 0px;"><input class="form-control" style="width: 90%;" type="text" v-model="skuList[k]['name']" maxlength="5">:</label>
|
||||
<div class="col-xs-4 col-sm-4">
|
||||
<input class="form-control" type="text" v-model="childrenModal[k]" maxlength="22" placeholder="请输入子规格名称">
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4">
|
||||
<span class="btn btn-primary" @click="addChildrenSku(k)">添加</span>
|
||||
<span class="btn btn-danger" @click="deleteMainSku(k)">移除</span>
|
||||
</div>
|
||||
<div class="col-xs-8 col-sm-8 col-xs-offset-2 col-sm-offset-2 skuChildrenBox">
|
||||
<div class="skuChildren" v-for="(sc, c) in s.children">
|
||||
<input class="form-control" style="width: 100px;" type="text" v-model="skuList[k]['children'][c]['name']" maxlength="22" placeholder="请输入子规格名称">
|
||||
<i class="fa fa-close skuChildren-close" @click="deleteChildrenSku(k,c)"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <span class="btn btn-primary" @click="buildSkuPriceTable">刷新规格表单</span> -->
|
||||
|
||||
<div>
|
||||
<div class="row" v-show="skuPrice.length && skuList.length">
|
||||
<div class="col-md-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<template v-for="(item, i) in skuList" :key="i">
|
||||
<th v-if="item.children.length" >
|
||||
{{item.name}}
|
||||
</th>
|
||||
</template>
|
||||
<th width="80">
|
||||
<span class="tooltip-toggle" data-toggle="tooltip" data-placement="bottom" title="批量设置">现价<i class="fa fa-indent i-color" @click="allEdit('price')"></i></span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-toggle" data-toggle="tooltip" data-placement="bottom" title="批量设置">库存<i class="fa fa-indent i-color" @click="allEdit('stock')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-toggle" data-toggle="tooltip" data-placement="bottom" title="批量设置">重量<i class="fa fa-indent i-color" @click="allEdit('weight')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-toggle" data-toggle="tooltip" data-placement="bottom" title="批量设置">编码<i class="fa fa-indent i-color" @click="allEdit('sn')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">图片</th>
|
||||
<th width="80">当前状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, i) in skuPrice" :key="i">
|
||||
<td v-for="(v, j) in item.goods_sku_text" :key="j">
|
||||
{{v}}
|
||||
</td>
|
||||
<td width="80">
|
||||
<input type="number" class="input-sm form-control" v-model="item.price">
|
||||
</td>
|
||||
<td width="80"><input type="number" v-model="item.stock" class="input-sm form-control">
|
||||
</td>
|
||||
<td width="80"><input type="number" v-model="item.weight" class="input-sm form-control">
|
||||
</td>
|
||||
<td width="80"><input type="text" v-model="item.sn" class="input-sm form-control"></td>
|
||||
<td width="80">
|
||||
<div style="width: 10px">
|
||||
<img v-if="item.image" :src="Fast.api.cdnurl(item.image)" class="choosePicture sku-img"
|
||||
:data-index="i">
|
||||
<button v-else type="button" class="btn-primary btn choosePicture"
|
||||
:data-index="i">
|
||||
上传图片
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td width="80"><span class="input-sm form-control status"
|
||||
@click="editStatus(i)">{{item.status=='up'?'上架':'下架'}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,144 @@
|
||||
<style>
|
||||
.skuChildrenBox {
|
||||
display: flex;
|
||||
padding: 0 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.skuChildren {
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
width: 50px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
color: rgba(80, 80, 80, 1);
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(231, 231, 231, 1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.skuChildrenSelect {
|
||||
border: 1px solid rgba(212, 48, 48, 1)
|
||||
}
|
||||
|
||||
.skuChildren-close {
|
||||
position: absolute;
|
||||
background: rgba(212, 48, 48, 1);
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
font-style: 12px;
|
||||
-webkit-transform: scale(0.8);
|
||||
}
|
||||
|
||||
.status {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sku-img {
|
||||
cursor: pointer;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
|
||||
.legend-tip {
|
||||
color: #f00;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.all-edit-btn{
|
||||
width: 120px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.i-color{
|
||||
color: #f00;
|
||||
}
|
||||
.tooltip-inner{
|
||||
background: #fff;
|
||||
color: #999;
|
||||
border: 1px solid #999;
|
||||
box-shadow: 2px 2px 2px 2px #eee;
|
||||
}
|
||||
.tooltip.bottom .tooltip-arrow{
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.tooltip-show{
|
||||
color: #000;
|
||||
}
|
||||
.tooltip-show:hover{
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
<div class="tab-pane fade" id="skuPrce">
|
||||
<div class="widget-body no-padding">
|
||||
<input type="hidden" name="sku[listData]" v-model="skuListData">
|
||||
<input type="hidden" name="sku[priceData]" v-model="skuPriceData">
|
||||
|
||||
<div>
|
||||
<div class="row" v-show="skuPrice.length && skuList.length">
|
||||
<div class="col-md-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th v-for="(item, i) in skuList" :key="i">
|
||||
{{item.name}}
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-show" data-toggle="tooltip" data-placement="bottom" title="批量设置">现价<i class="fa fa-indent i-color" @click="allEdit('price')"></i></span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-show" data-toggle="tooltip" data-placement="bottom" title="批量设置">库存<i class="fa fa-indent i-color" @click="allEdit('stock')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-show" data-toggle="tooltip" data-placement="bottom" title="批量设置">重量<i class="fa fa-indent i-color" @click="allEdit('weight')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">
|
||||
<span class="tooltip-show" data-toggle="tooltip" data-placement="bottom" title="批量设置">编码<i class="fa fa-indent i-color" @click="allEdit('sn')"></i></span>
|
||||
|
||||
</th>
|
||||
<th width="80">图片</th>
|
||||
<th width="80">当前状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, i) in skuPrice" :key="i">
|
||||
<td v-for="(v, j) in item.goods_sku_text" :key="j">
|
||||
{{v}}
|
||||
</td>
|
||||
<td width="80">
|
||||
<input type="text" class="input-sm form-control" v-model="item.price">
|
||||
</td>
|
||||
<td width="80"><input type="text" v-model="item.stock" class="input-sm form-control">
|
||||
</td>
|
||||
<td width="80"><input type="text" v-model="item.weight" class="input-sm form-control">
|
||||
</td>
|
||||
<td width="80"><input type="text" v-model="item.sn" class="input-sm form-control"></td>
|
||||
<td width="80">
|
||||
<div style="width: 10px">
|
||||
<img v-if="item.image" :src="Fast.api.cdnurl(item.image)" class="choosePicture sku-img"
|
||||
:data-index="i">
|
||||
<button v-else type="button" class="btn-primary btn choosePicture"
|
||||
:data-index="i">
|
||||
上传图片
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td width="80"><span class="input-sm form-control status"
|
||||
@click="editStatus(i)">{{item.status=='up'?'上架':'下架'}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
在新工单中引用
屏蔽一个用户