|
@ -60,27 +60,63 @@ |
|
|
{{ searchxianshitit }} |
|
|
{{ searchxianshitit }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
<div v-show="isSearchShow" class="search"> |
|
|
<div v-show="isSearchShow" class="search"> |
|
|
<el-form ref="queryParams" :model="queryParams" :inline="true" class="tab-header"> |
|
|
<el-form :model="listQuery" :inline="true" class="tab-header"> |
|
|
<el-form-item label="仓库/门店"> |
|
|
<el-form-item label="输入搜索:"> |
|
|
<el-input v-model="queryParams.params.orderId" placeholder="" clearable /> |
|
|
<el-input style="width: 203px" v-model="listQuery.keyword" placeholder="商品名称"></el-input> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="起始日期"> |
|
|
|
|
|
<el-date-picker v-model="queryParams.params.orderStartDate" type="date" clearable |
|
|
|
|
|
value-format="yyyy-MM-dd" placeholder="选择日期" /> |
|
|
|
|
|
<span style="padding: 0 8px">至</span> |
|
|
|
|
|
<el-date-picker v-model="queryParams.params.orderEndDate" type="date" clearable |
|
|
|
|
|
value-format="yyyy-MM-dd" placeholder="选择日期" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="商品名称"> |
|
|
|
|
|
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="商品编码"> |
|
|
|
|
|
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable /> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="商品类型:"> |
|
|
|
|
|
<el-select v-model="listQuery.productAttributeCategoryId" placeholder="商品类型" clearable style="width: 160px;"> |
|
|
|
|
|
<el-option v-for="item in productAttributeCategoryOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="商品分类:"> |
|
|
|
|
|
<el-cascader clearable change-on-select v-model="selectProductCateValue" |
|
|
|
|
|
:options="productCateOptions"> |
|
|
|
|
|
</el-cascader> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="商品品牌:"> |
|
|
|
|
|
<el-select v-model="listQuery.brandId" placeholder="请选择品牌" clearable> |
|
|
|
|
|
<el-option v-for="item in brandOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="上架状态:"> |
|
|
|
|
|
<el-select v-model="listQuery.publishStatus" placeholder="全部" clearable style="width: 120px;"> |
|
|
|
|
|
<el-option v-for="item in publishStatusOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="审核状态:"> |
|
|
|
|
|
<el-select v-model="listQuery.verifyStatus" placeholder="全部" clearable style="width: 120px;"> |
|
|
|
|
|
<el-option v-for="item in verifyStatusOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="是否新品:"> |
|
|
|
|
|
<el-select v-model="listQuery.newStatus" placeholder="全部" clearable style="width: 120px;"> |
|
|
|
|
|
<el-option v-for="item in newStatusOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="是否推荐:"> |
|
|
|
|
|
<el-select v-model="listQuery.recommandStatus" placeholder="全部" clearable style="width: 120px;"> |
|
|
|
|
|
<el-option v-for="item in recommandStatusOptions" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="btn" style="text-align: center;"> |
|
|
<div class="btn" style="text-align: center;"> |
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="handleSearchList()">查询</el-button> |
|
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="handleResetSearch()">重置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -99,9 +135,9 @@ |
|
|
<el-tab-pane name="3"> |
|
|
<el-tab-pane name="3"> |
|
|
<span slot="label"><i class="el-icon-truck"></i>仓库中</span> |
|
|
<span slot="label"><i class="el-icon-truck"></i>仓库中</span> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane name="4"> |
|
|
<!-- <el-tab-pane name="4"> |
|
|
<span slot="label"><i class="el-icon-truck"></i> 回收站</span> |
|
|
<span slot="label"><i class="el-icon-truck"></i> 回收站</span> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> --> |
|
|
<!-- <el-tab-pane name="5"> |
|
|
<!-- <el-tab-pane name="5"> |
|
|
<span slot="label"><i class="el-icon-truck"></i> |
|
|
<span slot="label"><i class="el-icon-truck"></i> |
|
|
<el-button class="btn-add" @click="handleAddProduct()" size="mini"> |
|
|
<el-button class="btn-add" @click="handleAddProduct()" size="mini"> |
|
@ -141,6 +177,7 @@ |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<p>{{scope.row.name}}</p> |
|
|
<p>{{scope.row.name}}</p> |
|
|
<p>品牌:{{scope.row.brandName}}</p> |
|
|
<p>品牌:{{scope.row.brandName}}</p> |
|
|
|
|
|
<p>类别:{{scope.row.productCategoryName}}</p> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="价格/货号" width="120" align="center"> |
|
|
<el-table-column label="价格/货号" width="120" align="center"> |
|
@ -166,7 +203,7 @@ |
|
|
:active-value="1" :inactive-value="0" v-model="scope.row.recommandStatus"> |
|
|
:active-value="1" :inactive-value="0" v-model="scope.row.recommandStatus"> |
|
|
</el-switch> |
|
|
</el-switch> |
|
|
</p> |
|
|
</p> |
|
|
<p>分销: |
|
|
<!-- <p>分销: |
|
|
<el-switch @change="handleFenxiaoStatusChange(scope.$index, scope.row)" |
|
|
<el-switch @change="handleFenxiaoStatusChange(scope.$index, scope.row)" |
|
|
:active-value="1" :inactive-value="0" v-model="scope.row.isFenxiao"> |
|
|
:active-value="1" :inactive-value="0" v-model="scope.row.isFenxiao"> |
|
|
</el-switch> |
|
|
</el-switch> |
|
@ -175,17 +212,17 @@ |
|
|
<el-switch @change="handleVipStatusChange(scope.$index, scope.row)" :active-value="1" |
|
|
<el-switch @change="handleVipStatusChange(scope.$index, scope.row)" :active-value="1" |
|
|
:inactive-value="0" v-model="scope.row.isVip"> |
|
|
:inactive-value="0" v-model="scope.row.isVip"> |
|
|
</el-switch> |
|
|
</el-switch> |
|
|
</p> |
|
|
</p> --> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="排序" width="100" align="center"> |
|
|
<!-- <el-table-column label="排序" width="100" align="center"> |
|
|
<template slot-scope="scope">{{scope.row.sort}}</template> |
|
|
<template slot-scope="scope">{{scope.row.sort}}</template> |
|
|
</el-table-column> |
|
|
</el-table-column> --> |
|
|
<el-table-column label="SKU库存" width="100" align="center"> |
|
|
<el-table-column label="库存数" width="100" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<p>{{scope.row.stock }}</p> |
|
|
<p>{{scope.row.stock }}</p> |
|
|
<el-button type="primary" icon="el-icon-edit" |
|
|
<!-- <el-button type="primary" icon="el-icon-edit" |
|
|
@click="handleShowSkuEditDialog(scope.$index, scope.row)" circle></el-button> |
|
|
@click="handleShowSkuEditDialog(scope.$index, scope.row)" circle></el-button> --> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="销量" width="100" align="center"> |
|
|
<el-table-column label="销量" width="100" align="center"> |
|
@ -203,14 +240,16 @@ |
|
|
<el-table-column label="操作" width="160" align="center"> |
|
|
<el-table-column label="操作" width="160" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<p> |
|
|
<p> |
|
|
<el-button size="mini" @click="handleDeleteStatus(scope.$index, scope.row)">回收 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button size="mini" @click="handleUpdateProduct(scope.$index, scope.row)">编辑 |
|
|
<el-button size="mini" @click="handleUpdateProduct(scope.$index, scope.row)">编辑 |
|
|
</el-button> |
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-button size="mini" @click="handleDeleteStatus(scope.$index, scope.row)">回收 |
|
|
|
|
|
</el-button> |
|
|
</p> |
|
|
</p> |
|
|
<p> |
|
|
<p> |
|
|
<el-button size="mini" @click="handleShowVeriyEditDialog(scope.$index, scope.row)">日志 |
|
|
<el-button size="mini" @click="handleShowVeriyEditDialog(scope.$index, scope.row)">日志 |
|
|
</el-button> |
|
|
</el-button> --> |
|
|
|
|
|
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除 |
|
|
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</p> |
|
|
</p> |
|
@ -317,7 +356,8 @@ |
|
|
update as updateSkuStockList |
|
|
update as updateSkuStockList |
|
|
} from '@/api/skuStock' |
|
|
} from '@/api/skuStock' |
|
|
import { |
|
|
import { |
|
|
fetchList as fetchProductAttrList |
|
|
fetchList as fetchProductAttrList, |
|
|
|
|
|
fetchAllList as fetchProductAttrAllList |
|
|
} from '@/api/productAttr' |
|
|
} from '@/api/productAttr' |
|
|
import { |
|
|
import { |
|
|
fetchList as fetchBrandList |
|
|
fetchList as fetchBrandList |
|
@ -325,6 +365,7 @@ |
|
|
import { |
|
|
import { |
|
|
fetchListWithChildren |
|
|
fetchListWithChildren |
|
|
} from '@/api/productCate' |
|
|
} from '@/api/productCate' |
|
|
|
|
|
import {fetchList as fetchProductAttrCateList} from '@/api/productAttrCate' |
|
|
|
|
|
|
|
|
const defaultListQuery = { |
|
|
const defaultListQuery = { |
|
|
keyword: null, |
|
|
keyword: null, |
|
@ -335,6 +376,9 @@ |
|
|
verifyStatus: null, |
|
|
verifyStatus: null, |
|
|
productSn: null, |
|
|
productSn: null, |
|
|
productCategoryId: null, |
|
|
productCategoryId: null, |
|
|
|
|
|
productAttributeCategoryId: null, |
|
|
|
|
|
newStatus: null, |
|
|
|
|
|
recommandStatus: null, |
|
|
brandId: null |
|
|
brandId: null |
|
|
}; |
|
|
}; |
|
|
export default { |
|
|
export default { |
|
@ -389,14 +433,14 @@ |
|
|
label: "取消新品", |
|
|
label: "取消新品", |
|
|
value: "newOff" |
|
|
value: "newOff" |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
// { |
|
|
label: "转移到分类", |
|
|
// label: "转移到分类", |
|
|
value: "transferCategory" |
|
|
// value: "transferCategory" |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
label: "移入回收站", |
|
|
// label: "移入回收站", |
|
|
value: "recycle" |
|
|
// value: "recycle" |
|
|
} |
|
|
// } |
|
|
], |
|
|
], |
|
|
tabsName: '1', |
|
|
tabsName: '1', |
|
|
operateType: null, |
|
|
operateType: null, |
|
@ -408,6 +452,7 @@ |
|
|
multipleSelection: [], |
|
|
multipleSelection: [], |
|
|
productCateOptions: [], |
|
|
productCateOptions: [], |
|
|
brandOptions: [], |
|
|
brandOptions: [], |
|
|
|
|
|
productAttributeCategoryOptions: [], |
|
|
publishStatusOptions: [{ |
|
|
publishStatusOptions: [{ |
|
|
value: 1, |
|
|
value: 1, |
|
|
label: '上架' |
|
|
label: '上架' |
|
@ -422,6 +467,20 @@ |
|
|
value: 0, |
|
|
value: 0, |
|
|
label: '未审核' |
|
|
label: '未审核' |
|
|
}], |
|
|
}], |
|
|
|
|
|
newStatusOptions: [{ |
|
|
|
|
|
value: 1, |
|
|
|
|
|
label: '是' |
|
|
|
|
|
}, { |
|
|
|
|
|
value: 0, |
|
|
|
|
|
label: '否' |
|
|
|
|
|
}], |
|
|
|
|
|
recommandStatusOptions: [{ |
|
|
|
|
|
value: 1, |
|
|
|
|
|
label: '是' |
|
|
|
|
|
}, { |
|
|
|
|
|
value: 0, |
|
|
|
|
|
label: '否' |
|
|
|
|
|
}], |
|
|
statusOptions: [{ |
|
|
statusOptions: [{ |
|
|
value: 1, |
|
|
value: 1, |
|
|
label: '出售中' |
|
|
label: '出售中' |
|
@ -431,10 +490,12 @@ |
|
|
}, { |
|
|
}, { |
|
|
value: 3, |
|
|
value: 3, |
|
|
label: '仓库中' |
|
|
label: '仓库中' |
|
|
}, { |
|
|
} |
|
|
value: 4, |
|
|
// , { |
|
|
label: '回收站' |
|
|
// value: 4, |
|
|
}], |
|
|
// label: '回收站' |
|
|
|
|
|
// }, |
|
|
|
|
|
], |
|
|
btnList: [], |
|
|
btnList: [], |
|
|
queryParams: { |
|
|
queryParams: { |
|
|
current: 1, |
|
|
current: 1, |
|
@ -462,6 +523,7 @@ |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
this.getBrandList(); |
|
|
this.getBrandList(); |
|
|
this.getProductCateList(); |
|
|
this.getProductCateList(); |
|
|
|
|
|
this.getProductAttrCateList(); |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
selectProductCateValue: function(newValue) { |
|
|
selectProductCateValue: function(newValue) { |
|
@ -594,6 +656,16 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
getProductAttrCateList() { |
|
|
|
|
|
let param = {pageNum: 1, pageSize: 100}; |
|
|
|
|
|
fetchProductAttrCateList().then(response => { |
|
|
|
|
|
let list = response.data.records; |
|
|
|
|
|
this.productAttributeCategoryOptions = []; |
|
|
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
|
|
this.productAttributeCategoryOptions.push({label: list[i].name, value: list[i].id}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
handleShowVeriyEditDialog(index, row) { |
|
|
handleShowVeriyEditDialog(index, row) { |
|
|
this.vertyProduct.dialogVisible = true; |
|
|
this.vertyProduct.dialogVisible = true; |
|
|
this.vertyProduct.productId = row.id; |
|
|
this.vertyProduct.productId = row.id; |
|
|