Commit 408e4b01 authored by xiami's avatar xiami

新增店铺管理

parent ea5e1444
......@@ -808,6 +808,44 @@ export const asyncRouterMap = [
}
]
},
{
path: '/shop',
component: Layout,
redirect: 'noredirect',
alwaysShow: true,
name: 'finance',
meta: {
title: '店铺管理',
icon: 'shopping'
},
children: [
{
path: 'shopManagerList',
component: () => import('@/views/shop/shopManagerList'),
name: 'shopManagerList',
meta: {
perms: [],
title: '店铺管理列表',
icon: 'drag',
noCache: true,
keepAlive: true
}
},
{
path: 'shopManagerDetail',
component: () => import('@/views/shop/shopManagerDetail'),
name: 'shopManagerDetail',
meta: {
perms: [],
title: '店铺详情',
icon: 'list',
noCache: true,
keepAlive: true
},
hidden: true
}
]
},
/* {
path: '/service',
component: Layout,
......
<template>
<el-dialog
v-if="logisticDialogShow"
:visible.sync="logisticDialogShow"
:before-close="handleCancelLogisticDialog"
width="600px"
height="800px"
title="寄出快递">
<el-form ref="imageValue" :model="logisticForm" :rules="logisticRules">
<el-form-item label="物流公司" label-width="100px" prop="outLogisticsCode">
<el-select v-model="logisticForm.logisticsCode" placeholder="请选择物流公司" style="width: 240px;margin-right: 10px;margin-bottom: 10px">
<el-option
v-for="item in logisticList"
:key="item.code"
:label="item.name"
:value="item.code"/>
</el-select>
</el-form-item>
<el-form-item label="快递单号" label-width="100px" prop="outWaybill">
<el-input
v-model="logisticForm.waybill"
clearable
class="filter-item"
style="width: 240px;margin-right: 10px"
placeholder="请输入快递单号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelLogisticDialog">取 消</el-button>
<el-button type="primary" @click="handleLogistic">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentifyDelivery, requestIdentifySendBack, requestLogisticsList, requestDelivery } from '@/api/business/order'
export default {
name: 'ExchangeLogisticIdentifyDialog',
props: {
logisticDialogShow: {
type: Boolean,
default: false
},
distributionOrderId: {
type: String,
default: ''
},
identifyOrderId: {
type: String,
default: ''
},
type: {
type: Number,
default: 1
}
},
data() {
return {
logisticForm: {
logisticsCode: '',
waybill: ''
},
logisticRules: {
logisticsCode: [
{ required: true, message: '请选择物流公司', trigger: 'blur' }
],
waybill: [
{ required: true, message: '请输入快递单号', trigger: 'blur' }
]
},
logisticList: [
{
'code': 'JD',
'name': '京东快递'
},
{
'code': 'SF',
'name': '顺丰快递'
},
{
'code': 'STO',
'name': '申通快递'
},
{
'code': 'YTO',
'name': '圆通快递'
},
{
'code': 'ZTO',
'name': '中通快递'
},
{
'code': 'YD',
'name': '韵达快递'
}
]
}
},
created() {
this.getLogisticsList()
},
methods: {
handleCancelLogisticDialog() {
this.$emit('cancelDialog')
},
/**
* 获取物流公司列表
*/
getLogisticsList() {
requestLogisticsList().then((response) => {
console.log('==response===', response)
this.logisticList = response.data.data
}).catch((err) => {
console.log('==err===', err)
})
},
/**
* 实物评估
*/
handleLogistic() {
const params = { ...this.logisticForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId }
this.$refs.imageValue.validate((valid) => {
if (valid) {
if (this.type === 1) {
requestIdentifyDelivery(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '发货成功'
})
this.$emit('refreshDelivery')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
} if (this.type === 3) {
requestDelivery(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '发货成功'
})
this.$emit('refreshDelivery')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
} else {
requestIdentifySendBack(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '退回成功'
})
this.$emit('refreshSendBack')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<el-dialog
v-if="showNoPassIdentifyDialogShow"
:visible.sync="showNoPassIdentifyDialogShow"
:before-close="handleCancelConsignDialog"
width="600px"
height="600px"
title="审核结果">
<el-form ref="cancel" :model="cancelForm" :rules="cancelRules">
<el-form-item label="" label-width="80px" prop="content">
<div>该商家不通过原因:</div>
</el-form-item>
<el-form-item label="" label-width="80px" prop="remark">
<el-input
v-model="cancelForm.remark"
:autosize="{ minRows: 8, maxRows: 8}"
style="width: 400px"
maxlength="50"
type="textarea"
show-word-limit
placeholder="请填写不通过原因" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelConsignDialog">取 消</el-button>
<el-button type="primary" @click="handleCancelValue">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentify } from '@/api/business/order'
export default {
name: 'NoPassIdentifyDialog',
props: {
showNoPassIdentifyDialogShow: {
type: Boolean,
default: false
},
distributionOrderId: {
type: String,
default: ''
},
identifyOrderId: {
type: String,
default: ''
}
},
data() {
return {
cancelForm: {
remark: ''
},
cancelRules: {
remark: [
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
}
}
},
methods: {
handleCancelConsignDialog() {
this.$emit('cancelDialog')
},
/**
* 取消
*/
handleCancelValue() {
if (this.distributionOrderId) {
const params = { ...this.cancelForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId, approved: 0 }
this.$refs.cancel.validate((valid) => {
if (valid) {
requestIdentify(params)
.then(response => {
this.$notify.success({
message: '操作成功'
})
this.cancelForm = {}
this.$emit('refreshItem', this.distributionOrderId)
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<el-dialog
v-if="logisticDialogShow"
:visible.sync="logisticDialogShow"
:before-close="handleCancelLogisticDialog"
width="600px"
height="800px"
title="寄出快递">
<el-form ref="imageValue" :model="logisticForm" :rules="logisticRules">
<el-form-item label="物流公司" label-width="100px" prop="outLogisticsCode">
<el-select v-model="logisticForm.outLogisticsCode" placeholder="请选择物流公司" style="width: 240px;margin-right: 10px;margin-bottom: 10px">
<el-option
v-for="item in logisticList"
:key="item.code"
:label="item.name"
:value="item.code"/>
</el-select>
</el-form-item>
<el-form-item label="快递单号" label-width="100px" prop="outWaybill">
<el-input
v-model="logisticForm.outWaybill"
clearable
class="filter-item"
style="width: 240px;margin-right: 10px"
placeholder="请输入快递单号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelLogisticDialog">取 消</el-button>
<el-button type="primary" @click="handleLogistic">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentifyDelivery, requestIdentifySendBack, requestLogisticsList, requestDelivery} from '@/api/business/order'
export default {
name: 'ReturnLogisticIdentifyDialog',
props: {
logisticDialogShow: {
type: Boolean,
default: false
},
distributionOrderId: {
type: String,
default: ''
},
identifyOrderId: {
type: String,
default: ''
},
type: {
type: Number,
default: 1
}
},
data() {
return {
logisticForm: {
outLogisticsCode: '',
outWaybill: ''
},
logisticRules: {
outLogisticsCode: [
{ required: true, message: '请选择物流公司', trigger: 'blur' }
],
outWaybill: [
{ required: true, message: '请输入快递单号', trigger: 'blur' }
]
},
logisticList: [
{
'code': 'JD',
'name': '京东快递'
},
{
'code': 'SF',
'name': '顺丰快递'
},
{
'code': 'STO',
'name': '申通快递'
},
{
'code': 'YTO',
'name': '圆通快递'
},
{
'code': 'ZTO',
'name': '中通快递'
},
{
'code': 'YD',
'name': '韵达快递'
}
]
}
},
created() {
this.getLogisticsList()
},
methods: {
handleCancelLogisticDialog() {
this.$emit('cancelDialog')
},
/**
* 获取物流公司列表
*/
getLogisticsList() {
requestLogisticsList().then((response) => {
console.log('==response===', response)
this.logisticList = response.data.data
}).catch((err) => {
console.log('==err===', err)
})
},
/**
* 实物评估
*/
handleLogistic() {
const params = { ...this.logisticForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId }
this.$refs.imageValue.validate((valid) => {
if (valid) {
if (this.type === 1) {
requestIdentifyDelivery(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '发货成功'
})
this.$emit('refreshDelivery')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
} if (this.type === 3) {
requestDelivery(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '发货成功'
})
this.$emit('refreshDelivery')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
else {
requestIdentifySendBack(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '退回成功'
})
this.$emit('refreshSendBack')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<div class="exchange_list">
<el-table :data="itemList" size="small" border fit highlight-current-row>
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="right" class="table-expand" label-width="100px">
<el-form-item v-if="props.row.images" label="藏品图片:">
<div class="image_list">
<div v-for="pic in props.row.images.split(';')" :key="pic">
<el-image
:preview-src-list="[pic]"
:src="pic"
class="table-td-thumb"
/>
</div>
</div>
</el-form-item>
<el-form-item label="详情:">
<span>{{ props.row.description }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column align="center" min-width="200" label="商品ID" prop="itemId"/>
<el-table-column align="center" min-width="200" label="名称" prop="name">
<template slot-scope="scope" >
<Line2Hidden :text="scope.row.name" />
</template>
</el-table-column>
<el-table-column align="center" property="homePageImage" label="图片">
<template slot-scope="scope">
<div v-if="scope.row.images && scope.row.images.split(';').length > 0" class="image_preview">
<el-image
:preview-src-list="[scope.row.images.split(';')[0]]"
:src="scope.row.images.split(';')[0]"
class="table-td-thumb"
/>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="售价" min-width="200" 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="官方估价" min-width="200" prop="officialEstimatedPrice">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.officialEstimatedPrice ? `¥ ${scope.row.officialEstimatedPrice}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
export default {
name: 'ExchangeItemListView',
components: {
Line2Hidden
},
props: {
itemList: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
imageUrl: '',
showLargeDialog: false
}
},
methods: {
handleShowLargeDialog(imageUrl) {
this.imageUrl = imageUrl
this.showLargeDialog = true
}
}
}
</script>
<style lang="scss" scoped>
.exchange_list {
padding: 10px;
margin-left: 20px;
}
.table-expand {
margin-left: 10px;
}
.image_list {
display: flex;
flex-direction: row;
}
.table-td-thumb {
width: 60px;
height: 60px;
margin-right: 10px;
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input v-model="listQuery.name" clearable class="filter-item" style="width: 200px;" placeholder="请输入标题"/>
<el-input v-model="listQuery.name" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家ID"/>
<!-- <el-select v-model="listQuery.isAbleSale" placeholder="请选择商品状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select> -->
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" style="margin-left: 12px" @click="handleReset">重置</el-button>
</div>
<el-button size="mini" class="filter-item" type="primary" icon="el-icon-edit" @click="handleCreate">添加</el-button>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
height="800"
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="id" label="商品ID" />
<el-table-column align="center" label="封面图" prop="itemImg">
<template slot-scope="scope">
<div class="image_preview">
<el-image
:preview-src-list="scope.row.images.split(';')"
:src="scope.row.images.split(';')[0]"
class="table-td-thumb"
/>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="name">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.name" />
</template>
</el-table-column>
<!-- <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}` }}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="进货价" prop="supplyPrice">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.supplyPrice ? `¥ ${scope.row.supplyPrice}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="状态" prop="isOnSale" min-width="100px">
<template slot-scope="scope" style="height: 100px">
<el-switch
v-model="scope.row.isOnSale"
:active-text="scope.row.isOnSale ? '上架' : '下架'"
style="display: block"
@change="handleSaleSwitch($event, scope.row)" />
</template>
</el-table-column> -->
<el-table-column align="center" label="数量" prop="stock" />
<el-table-column align="center" label="藏家昵称" prop="selledNum" />
<el-table-column align="center" label="藏家ID" prop="updateTime" />
<el-table-column align="center" label="仓位" prop="updateTime" />
<el-table-column align="center" label="入库时间" prop="updateTime" />
<el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="handleToDetail(scope.row)">编辑
</el-button>
<!-- <el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="danger"
size="mini"
@click="handleDelete(scope.row)">删除
</el-button> -->
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { getSaleList, updateOnSale, deleteSaleItem } from '@/api/business/sale'
import { MessageBox } from 'element-ui'
export default {
name: 'SaleList',
components: {
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '上架'
}, {
value: 0,
label: '下架'
}],
listLoading: true,
listQuery: {
page: 1,
limit: 20
},
list: [],
total: 0,
// 图文估价
imageValueDialogShow: false,
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
currentSaleId: ''
}
},
created() {
this.getList()
},
methods: {
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handleReset() {
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleSaleSwitch(e, item) {
const params = { id: item.id, isOnSale: e }
updateOnSale(params)
.then(response => {
this.$notify.success({
message: e ? '上架成功' : '下架成功'
})
})
.catch(response => {
item.isOnSale = !e
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
},
handleCreate() {
this.$router.push({ path: '/sale/saleAdd' })
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
getSaleList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
this.list = []
this.total = 0
this.listLoading = false
})
},
/**
* 详情
*/
handleToDetail(item) {
this.$router.push({ path: '/factory/factorySaleAdd', query: { id: item.id }})
},
/**
* 删除
*/
handleDelete(item) {
this.$confirm('你确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = {
id: item.id
}
deleteSaleItem(data).then((res) => {
this.$notify.success({
title: '成功',
message: '删除成功'
})
this.getList()
}).catch(err => {
this.$notify.error({
title: '失败',
message: err.data.errmsg
})
})
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
}
</style>
<template>
<div class="page_transferDetail">
<div v-if="itemContent && itemContent.distributionOrderId" class="detail_button">
<el-button
v-if="(itemContent && itemContent.transferState === 12)"
type="primary"
size="mini"
@click="handleReceive()">确认收货
</el-button>
<el-button
v-if="(itemContent.transferState === 13)"
type="primary"
size="mini"
@click="handlePass()">通过
</el-button>
<el-button
v-if="(itemContent.transferState === 13)"
type="danger"
size="mini"
@click="handleNoPass()">不通过
</el-button>
<el-button
v-if="(itemContent.transferState === 14)"
type="primary"
size="mini"
@click="handleSend(1)">去发货
</el-button>
<el-button
v-if="(itemContent.transferState === 15)"
type="primary"
size="mini"
@click="handleSend(2)">退回藏品
</el-button>
</div>
<el-card class="box-card" style="margin: 0 16px">
<div class="title">
<div class="title_content">店铺信息</div>
<el-button v-if="itemContent.transferStateName" type="warning" plain size="mini">{{ itemContent.transferStateName }}</el-button>
</div>
<div class="user_info flex">
<el-form ref="addInviteRef" label-width="100px" style="width: 30%">
<el-form-item label="商家ID:">
<div>{{ itemContent.distributionOrderId || '-' }}</div>
</el-form-item>
<el-form-item label="昵称:">
<div>{{ itemContent.createTime || '-' }}</div>
</el-form-item>
</el-form>
<el-form ref="addInviteRef" label-width="100px" style="width: 30%">
<el-form-item label="申请时间:">
<div>{{ itemContent.sellerName || '-' }}</div>
</el-form-item>
<el-form-item label="粉丝:">
<div>{{ itemContent.buyerName || '-' }}</div>
</el-form-item>
</el-form>
<el-form ref="addInviteRef" label-width="200px" style="width: 30%">
<el-form-item label="已上架的商品:">
<div>{{ itemContent.sellerName || '-' }}</div>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card class="box-card" style="margin: 16px 16px 0">
<div class="title">
<div class="title_content">身份信息</div>
</div>
<div v-if="list && list.length > 0" class="user_info flex">
<el-table
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<el-table-column align="center" label="身份证正面" prop="homePageImage" class="image_preview">
<template slot-scope="scope">
<!-- <img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px"> -->
<el-image
:preview-src-list="[scope.row.homePageImage.url ]"
:src="scope.row.homePageImage.url"
class="table-td-thumb"
/>
</template>
</el-table-column>
<el-table-column align="center" label="身份证反面" prop="homePageImage">
<template slot-scope="scope">
<!-- <img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px"> -->
<el-image
:preview-src-list="[scope.row.homePageImage.url ]"
:src="scope.row.homePageImage.url"
class="table-td-thumb"
/>
</template>
</el-table-column>
<el-table-column align="center" label="银行卡号" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="开户行" prop="itemNum" />
<el-table-column align="center" label="持卡人姓名" prop="itemPrice" />
<el-table-column align="center" label="开店费" prop="itemNum" />
<el-table-column align="center" label="质保金" prop="itemPrice" />
</el-table>
</div>
</el-card>
<NoPassIdentifyDialog
:show-no-pass-identify-dialog-show="showNoPassIdentifyDialog"
:distribution-order-id="itemContent.distributionOrderId"
:identify-order-id="itemContent.identifyOrderId"
@refreshItem="handleRefreshItem"
@cancelDialog="showNoPassIdentifyDialog = false"
/>
<ReturnLogisticIdentifyDialog
v-if="logisticDialogShow"
:logistic-dialog-show="logisticDialogShow"
:distribution-order-id="itemContent.distributionOrderId"
:identify-order-id="itemContent.identifyOrderId"
:type="logisticType"
@cancelDialog="handleCancelLogisticDialog"
@refreshDelivery="handleRefreshLogisticItem"
@refreshSendBack="handleRefreshLogisticItem"/>
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import NoPassIdentifyDialog from './components/NoPassIdentifyDialog'
import ReturnLogisticIdentifyDialog from './components/ReturnLogisticIdentifyDialog'
import { requestSigned, requestIdentify, requestTransferDetail } from '@/api/business/order'
export default {
name: 'shopManagerDetail',
components: { ReturnLogisticIdentifyDialog, NoPassIdentifyDialog, Line2Hidden },
data() {
return {
itemContent: {},
distributionOrderId: '',
showNoPassIdentifyDialog: false,
logisticDialogShow: false,
logisticType: 1,
deliveryLogisticsInfo: '',
fromLogisticsInfo: '',
returnLogisticsInfo: '',
list: []
}
},
created() {
const id = this.$route.query.distributionOrderId
if (!id) {
return
}
this.distributionOrderId = id
this.handleGetDetail()
},
methods: {
handleGetDetail() {
const params = {
distributionOrderId: this.distributionOrderId
}
requestTransferDetail(params).then(response => {
console.log('===response=', response)
this.itemContent = response.data.data.data || {}
this.fromLogisticsInfo = response.data.data.fromLogisticsInfo || '-'
this.returnLogisticsInfo = response.data.data.returnLogisticsInfo || ''
this.deliveryLogisticsInfo = response.data.data.deliveryLogisticsInfo || ''
const model = {
itemName: this.itemContent.itemName,
homePageImage: this.itemContent.homePageImage,
itemNum: this.itemContent.itemNum,
itemPrice: this.itemContent.itemPrice ? ${this.itemContent.itemPrice}` : '-'
}
this.list = [model]
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
},
/**
* 收货
* @param item
*/
handleReceive() {
this.$confirm('请确认包裹的物流信息是否正确?', '确认收货', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'message'
}).then(() => {
const params = {
identifyOrderId: this.itemContent.identifyOrderId
}
requestSigned(params).then(response => {
this.handleGetDetail()
this.$notify.success({
message: '确认收货成功'
})
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
})
},
/**
* 通过
* @param item
*/
handlePass() {
this.$confirm('确定通过该藏家的开店申请?', '平台开店结果', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'message'
}).then(() => {
const params = {
identifyOrderId: this.itemContent.identifyOrderId,
distributionOrderId: this.itemContent.distributionOrderId,
approved: 1
}
requestIdentify(params).then(response => {
this.handleGetDetail()
this.$notify.success({
message: '操作成功'
})
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
})
},
/**
* 不通过
*/
handleNoPass() {
this.showNoPassIdentifyDialog = true
},
/**
* 不通过操作成功,刷新列表
*/
handleRefreshItem() {
this.handleGetDetail()
this.showNoPassIdentifyDialog = false
},
/**
* 不通过
* @param row type: 1平台发货 2退回藏品
*/
handleSend(type) {
this.logisticDialogShow = true
this.logisticType = type
},
/**
* 不通过操作成功,刷新列表
*/
handleRefreshLogisticItem() {
this.logisticDialogShow = false
this.handleGetDetail()
},
/**
* 发货 or 退回操作
*/
handleCancelLogisticDialog() {
this.logisticDialogShow = false
},
/**
* 不通过操作取消
*/
handleCancelNoPassDialog() {
this.handleGetDetail()
}
}
}
</script>
<style lang="scss" scoped>
.page_transferDetail {
height: 100%;
display: flex;
flex-direction: column;
padding: 0 10px 10px;
.detail_button {
text-align: end;
margin: 16px;
}
.title {
display: flex;
flex-direction: row;
margin-bottom: 10px;
.title_content {
font-weight: 600;
font-size: 22px;
margin-right: 16px;
}
}
}
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
/deep/ .el-card__body {
padding: 12px;
}
/deep/ .el-form-item {
margin-bottom: 0;
}
/deep/ .el-switch {
height: 30px;
}
</style>
<template>
<div class="page_consignList">
<div class="page_orderAll">
<!-- <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleMenuSelect"> -->
<!-- <el-menu-item v-for="item in menuList" :key="item.index" :index="item.index">{{ item.title }}</el-menu-item>
</el-menu> -->
<div class="order_select">
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入藏家ID" />
<el-select v-model="listQuery.state" placeholder="请选择开店状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini" />
</el-select>
<el-input
v-model="listQuery.itemName"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入藏家昵称" />
<!-- <el-input
v-model="listQuery.sellerName"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入分销商名称" /> -->
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
style="margin-left: 12px"
@click="handleFilter">查找
</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
height="800"
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="商家ID" />
<!-- <el-table-column align="center" label="分销商名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img
v-if="scope.row.homePageImage && scope.row.homePageImage.url"
:src="scope.row.homePageImage.url"
width="60px"
height="60px">
</template>
</el-table-column> -->
<el-table-column align="center" label="店铺名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<!-- <el-table-column align="center" label="藏片件数" prop="itemNum" />
<el-table-column align="center" label="实付款" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column align="center" label="下单用户" prop="buyerName" /> -->
<el-table-column align="center" label="店铺状态" prop="stateName" />
<el-table-column align="center" label="申请时间" prop="createTime" />
<!-- <el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName">{{
scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress
}}</span>
</template>
</el-table-column> -->
<!-- <el-table-column align="center" label="订单状态" prop="stateName" /> -->
<!-- <el-table-column align="center" label="物流公司" prop="logisticsName">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.logisticsName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="快递单号" prop="waybill">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.waybill || '-'}` }}</span>
</template>
</el-table-column> -->
<el-table-column align="center" label="操作" width="250" fixed="right">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="handleToDetail(scope.row)">详情
</el-button>
<el-button
v-if="(scope.row.state === 20)"
type="primary"
size="mini"
@click="handlePass(scope.row)">通过
</el-button>
<el-button
v-if="(scope.row.state === 20)"
type="danger"
size="mini"
@click="handleNoPass()">不通过
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
<el-dialog :visible.sync="sendDialogVisible" title="发货">
<el-form
ref="sendFormRef"
:model="sendForm"
:rules="rules"
status-icon
label-position="left"
label-width="130px"
style="width: 600px; margin-left:50px;">
<el-form-item label="请输入快递单号:" prop="waybill" >
<el-select v-model="sendForm.logisticsCode" placeholder="请选择快的公司" class="filter-item" style="width: 200px;">
<el-option
v-for="item in logisticList"
:key="item.name"
:label="item.name"
:value="item.code"
size="mini" />
</el-select>
</el-form-item>
<el-form-item prop="waybill" label="快递单号:" >
<el-input v-model="sendForm.waybill" placeholder="请输入快递单号" style="width: 200px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="sendDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleShowSendDialog">确定</el-button>
</div>
</el-dialog>
<NoPassIdentifyDialog
:show-no-pass-identify-dialog-show="showNoPassIdentifyDialog"
@cancelDialog="showNoPassIdentifyDialog = false"
/>
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import NoPassIdentifyDialog from './components/NoPassIdentifyDialog'
import { requestOrderList, requestLogisticsList, requestDelivery } from '@/api/business/order'
export default {
name: 'shopManagerList',
components: {
Pagination,
Line2Hidden,
NoPassIdentifyDialog
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待审核'
}, {
value: 20,
label: '通过'
}, {
value: 30,
label: '不通过'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20
},
list: [],
showNoPassIdentifyDialog: false,
total: 0,
// 图文估价
imageValueDialogShow: false,
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
// 发货
sendDialogVisible: false,
currentSaleId: '',
logisticOptions: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
menuList: [
{
title: '全部',
index: '0'
}, {
title: '待付款',
index: '1'
}, {
title: '待发货',
index: '10'
}, {
title: '待收货',
index: '20'
}, {
title: '已签收',
index: '90'
}, {
title: '已完成',
index: '100'
}, {
title: '已取消',
index: '101'
}, {
title: '售后处理中',
index: '30'
}
],
sendForm: {},
logisticList: [],
orderId: '',
rules: {
waybill: [{ required: true, message: '请输入物流单号', trigger: 'blur' }],
logisticsCode: [{ required: true, message: '请选择快递公司', trigger: 'blur' }]
}
}
},
created() {
this.getList()
this.getLogisticsList()
},
methods: {
/**
* 通过
* @param item
*/
handlePass(row) {
this.$confirm('确定通过该藏家的开店申请?', '平台开店结果', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'message'
}).then(() => {
const params = {
distributionOrderId: row.distributionOrderId,
approved: 1
}
exchangeApplyOrdercheck(params).then(response => {
this.list = this.list.filter((item) => {
if (item.distributionOrderId === row.distributionOrderId) {
item.stateName = '待发货'
item.state = 10
return item
}
return item
})
this.$notify.success({
message: '操作成功'
})
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
})
},
// handleNoPass(row) {
// this.$confirm('确定不通过藏家的开店申请?', '平台开店结果', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'message'
// }).then(() => {
// const params = {
// distributionOrderId: row.distributionOrderId,
// approved: 2
// }
// exchangeApplyOrdercheck(params).then(response => {
// this.list = this.list.filter((item) => {
// if (item.distributionOrderId === row.distributionOrderId) {
// item.stateName = '已取消'
// item.state = 101
// return item
// }
// return item
// })
// this.$notify.success({
// message: '操作成功'
// })
// }).catch((e) => {
// console.log('===报错=', e)
// this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
// })
// })
// },
/**
* 获取物流公司列表
*/
getLogisticsList() {
requestLogisticsList().then((response) => {
console.log('==response===', response)
this.logisticList = response.data.data
}).catch((err) => {
console.log('==err===', err)
})
},
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
requestOrderList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
},
/**
* 展示发货弹窗
*/
handleShowSendDialog() {
this.$refs.sendFormRef.validate((valid) => {
if (valid) {
this.sendForm.distributionOrderId = this.orderId
requestDelivery(this.sendForm)
.then(response => {
this.$notify.success({
message: '发货成功'
})
this.list = this.list.filter((item) => {
if (item.distributionOrderId === this.orderId) {
item.stateName = '待收货'
item.state = 20
item.waybill = this.sendForm.waybill
this.logisticList.map((logisticItem) => {
if (logisticItem.code === this.sendForm.logisticsCode) {
item.logisticsName = logisticItem.name
}
})
this.orderId = ''
return item
}
return item
})
this.sendDialogVisible = false
})
.catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg
})
})
}
})
},
/**
* 详情
* @param item
*/
handleToDetail(item) {
this.$router.push({ path: '/shop/shopManagerDetail', query: { distributionOrderId: item.distributionOrderId }})
},
/**
* 订单状态切换
* @param value
*/
handleMenuSelect(value) {
console.log('=====tab切换=', value)
this.activeIndex = value
this.handleReset()
},
/**
* 不通过
*/
handleNoPass() {
this.showNoPassIdentifyDialog = true
},
/**
* 不通过操作成功,刷新列表
*/
handleRefreshItem() {
this.handleGetDetail()
this.showNoPassIdentifyDialog = false
},
/**
* 发货
*/
handleToSend(row) {
this.sendDialogVisible = true
this.orderId = row.distributionOrderId
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
.page_orderAll {
padding: 10px;
.order_select {
margin-top: 10px;
}
.expand_view {
color: #1890ff;
font-weight: 500;
}
}
</style>
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