Commit 33b0b0e4 authored by yaya's avatar yaya

feat: 众筹需求优化

parent 6f71e395
...@@ -226,3 +226,16 @@ export function autoConfigTimeByLot(data) { ...@@ -226,3 +226,16 @@ export function autoConfigTimeByLot(data) {
}) })
} }
/**
* 开团
* @param data
* @returns {*}
*/
export function collectorItemConvertToGroupPurchase(data) {
return request({
url: '/groupPurchase/collectorItemConvertToGroupPurchase',
method: 'post',
data
})
}
This diff is collapsed.
...@@ -37,36 +37,29 @@ ...@@ -37,36 +37,29 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="标题" min-width="150px" prop="name"> <el-table-column align="center" label="商品名称" min-width="150px" prop="name">
<template slot-scope="scope"> <template slot-scope="scope">
<Line2Hidden :text="scope.row.name" /> <Line2Hidden :text="scope.row.name" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="众筹售价" prop="salePrice">
<el-table-column align="center" label="上架类型" prop="type" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.type === 1 ? '一口价' : scope.row.type === 3 ? '帖子' : '竞拍'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="平台定价" prop="distributionPrice">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.distributionPrice ? `¥ ${scope.row.distributionPrice}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="供货价" prop="distributionPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.distributionPrice ? `¥ ${scope.row.distributionPrice}` : '-'}` }}</span> <span class="tooltip-span">{{ `${scope.row.salePrice ? `¥ ${scope.row.salePrice}` : '-'}` }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="定金" prop="supplyPrice"> <el-table-column align="center" label="供货价" prop="supplyPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.supplyPrice ? `¥ ${scope.row.supplyPrice}` : '-'}` }}</span> <span class="tooltip-span">{{ `${scope.row.supplyPrice ? `¥ ${scope.row.supplyPrice}` : '-'}` }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="库存" prop="stock" /> <el-table-column align="center" label="库存" prop="stock" />
<el-table-column align="center" label="销量" prop="selledNum" /> <el-table-column align="center" label="销量" prop="selledNum" />
<el-table-column align="center" label="团购时间" prop="updateTime" /> <el-table-column align="center" label="众筹时间" prop="groupPurchaseStartTime" min-width="150px">
<el-table-column align="center" label="发布者" prop="updateTime" /> <template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.groupPurchaseStartTime} ~ ${scope.row.groupPurchaseEndTime}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="众筹发起人" prop="creatorName" />
<el-table-column align="center" label="更新时间" prop="updateTime" /> <el-table-column align="center" label="更新时间" prop="updateTime" />
<el-table-column align="center" label="状态" prop="isOnSale" min-width="100px"> <el-table-column align="center" label="状态" prop="isOnSale" min-width="100px">
<template slot-scope="scope" style="height: 100px"> <template slot-scope="scope" style="height: 100px">
...@@ -125,7 +118,8 @@ export default { ...@@ -125,7 +118,8 @@ export default {
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20 limit: 20,
type: 6
}, },
list: [], list: [],
total: 0, total: 0,
...@@ -153,7 +147,8 @@ export default { ...@@ -153,7 +147,8 @@ export default {
handleReset() { handleReset() {
this.listQuery = { this.listQuery = {
page: 1, page: 1,
limit: 20 limit: 20,
type: 6
} }
this.getList() this.getList()
}, },
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-button class="filter-item" type="primary" style="margin-left: 12px" @click="handleReset">重置</el-button> <el-button class="filter-item" type="primary" style="margin-left: 12px" @click="handleReset">重置</el-button>
</div> </div>
<div> <div>
<el-button size="mini" class="filter-item" type="primary" @click="handleMultiGroup">开团</el-button> <el-button size="mini" class="filter-item" type="primary" @click="handleMultiGroup">转众筹</el-button>
<el-button size="mini" class="filter-item" type="primary" icon="el-icon-edit" @click="handleMultiAuction">转拍卖</el-button> <el-button size="mini" class="filter-item" type="primary" icon="el-icon-edit" @click="handleMultiAuction">转拍卖</el-button>
</div> </div>
</div> </div>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
:disabled="scope.row.isTransformAuction" :disabled="scope.row.isTransformAuction"
type="primary" type="primary"
size="mini" size="mini"
@click="handleToGroup(scope.row)">开团 @click="handleToGroup(scope.row)">转众筹
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.status === 0" v-if="scope.row.status === 0"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<script> <script>
import Line2Hidden from '@/components/line2Hidden' import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getSaleList, updateOnSale, deleteSaleItem, irregularOff, collectorItemConvertToAuction } from '@/api/business/sale' import { getSaleList, updateOnSale, deleteSaleItem, irregularOff, collectorItemConvertToAuction, collectorItemConvertToGroupPurchase } from '@/api/business/sale'
import { MessageBox } from 'element-ui' import { MessageBox } from 'element-ui'
export default { export default {
...@@ -253,12 +253,12 @@ export default { ...@@ -253,12 +253,12 @@ export default {
}) })
return return
} }
this.$confirm('确定将选中的藏品开启团购吗?', '提示', { this.$confirm('确定将选中的藏品转众筹吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.handleRequestToAuction('') this.handleRequestToGroup('')
}) })
}, },
handleFilter() { handleFilter() {
...@@ -374,7 +374,7 @@ export default { ...@@ -374,7 +374,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.handleRequestToAuction(row.id) this.handleRequestToGroup(row.id)
}) })
}, },
/** /**
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
const params = { const params = {
itemIdsStr: itemId ? String(itemId) : this.selectionIdList.join(',') itemIdsStr: itemId ? String(itemId) : this.selectionIdList.join(',')
} }
collectorItemConvertToAuction(params).then(response => { collectorItemConvertToGroupPurchase(params).then(response => {
if (itemId) { if (itemId) {
this.list = this.list.filter((item) => { this.list = this.list.filter((item) => {
if (item.id === itemId) { if (item.id === itemId) {
...@@ -402,7 +402,7 @@ export default { ...@@ -402,7 +402,7 @@ export default {
this.selectionIdList = [] this.selectionIdList = []
} }
this.$notify.success({ this.$notify.success({
message: '拍品成功' message: '众筹成功'
}) })
}).catch((e) => { }).catch((e) => {
console.log('===报错=', e) console.log('===报错=', e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment