This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-27 16:47:15 +08:00
parent 8ae1802772
commit b002300ef9
2 changed files with 236 additions and 323 deletions
src/views
merchant/list
product/productExamine

@ -3,82 +3,35 @@
<div class="selCard">
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="85px" :inline="true">
<el-form-item label="选择时间:">
<el-date-picker
v-model="timeVal"
type="daterange"
placeholder="选择日期"
format="yyyy/MM/dd"
value-format="yyyy/MM/dd"
range-separator="-"
style="width:280px;"
:picker-options="pickerOptions"
@change="onchangeTime"
/>
<el-date-picker v-model="timeVal" type="daterange" placeholder="选择日期" format="yyyy/MM/dd"
value-format="yyyy/MM/dd" range-separator="-" style="width:280px;" :picker-options="pickerOptions"
@change="onchangeTime" />
</el-form-item>
<el-form-item label="商户类别:" prop="is_trader">
<el-select
v-model="tableFrom.is_trader"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-select v-model="tableFrom.is_trader" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
<el-option label="自营" value="1" />
<el-option label="非自营" value="0" />
</el-select>
</el-form-item>
<el-form-item label="商户分类:" prop="category_id">
<el-select
v-model="tableFrom.category_id"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option
v-for="item in merCateList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="tableFrom.category_id" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
<el-option v-for="item in merCateList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="店铺类型:" prop="type_id">
<el-select
v-model="tableFrom.type_id"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option
v-for="item in storeType"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="tableFrom.type_id" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
<el-option v-for="item in storeType" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="是否推荐:" prop="is_best">
<el-select
v-model="tableFrom.is_best"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-select v-model="tableFrom.is_best" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
<el-option key="1" label="是" value="1" />
<el-option key="0" label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="关键字:" prop="keyword">
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入店铺关键字/店铺名/联系电话"
class="selWidth"
clearable
/>
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList(1)" placeholder="请输入店铺关键字/店铺名/联系电话"
class="selWidth" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
@ -89,48 +42,26 @@
<el-card class="mt14">
<div class="mb20">
<el-tabs v-if="headeNum.length > 0" v-model="tableFrom.status" @tab-click="getList(1), getHeadNum()">
<el-tab-pane
v-for="(item,index) in headeNum"
:key="index"
:name="item.type.toString()"
:label="item.title +'('+item.count +')' "
/>
<el-tab-pane v-for="(item, index) in headeNum" :key="index" :name="item.type.toString()"
:label="item.title + '(' + item.count + ')'" />
</el-tabs>
<el-button size="small" type="primary" class="mt5" @click="onAdd">添加商户</el-button>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
size="small"
highlight-current-row
>
<el-table v-loading="listLoading" :data="tableData.data" size="small" highlight-current-row>
<el-table-column prop="mer_id" label="ID" min-width="60" />
<el-table-column prop="mer_name" label="商户名称" min-width="150" />
<el-table-column prop="real_name" label="商户姓名" min-width="150" />
<el-table-column prop="spread" label="推广人" min-width="150" />
<el-table-column prop="status" label="推荐" min-width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_best"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否"
:width="40"
@click.native="onchangeIsShow(scope.row)"
/>
<el-switch v-model="scope.row.is_best" :active-value="1" :inactive-value="0" active-text=""
inactive-text="否" :width="40" @click.native="onchangeIsShow(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="status" label="开启/关闭" min-width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="0"
active-text="开启"
inactive-text="关闭"
:width="55"
@click.native="onchangeIsClose(scope.row)"
/>
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" active-text="开启"
inactive-text="关闭" :width="55" @click.native="onchangeIsClose(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="purchase_amount" label="采购金额" min-width="120" />
@ -147,48 +78,25 @@
<el-table-column label="操作" min-width="150" fixed="right">
<template slot-scope="scope">
<el-button
v-if="tableFrom.status === '1'"
type="text"
size="small"
@click="onLogo(scope.row.mer_id)"
>登录</el-button>
<el-button v-if="tableFrom.status === '1'" type="text" size="small"
@click="onLogo(scope.row.mer_id)">登录</el-button>
<el-button type="text" size="small" @click="onEdit(scope.row.mer_id)">编辑</el-button>
<el-button type="text" size="small" @click="onDetails(scope.row.mer_id)">详情</el-button>
<el-button
v-if="tableFrom.status === '0'"
type="text"
size="small"
@click="handleDelete(scope.row.mer_id, scope.$index)"
>删除</el-button>
<el-button v-if="tableFrom.status === '0'" type="text" size="small"
@click="handleDelete(scope.row.mer_id, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
background
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
<el-pagination background :page-size="tableFrom.limit" :current-page="tableFrom.page"
layout="total, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
@current-change="pageChange" />
</div>
</el-card>
<!--商户详情-->
<mer-detail
ref="merDetail"
:merId="merId"
:merCateList="merCateList"
:storeType="storeType"
@closeDrawer="closeDrawer"
@changeDrawer="changeDrawer"
@onPassword="onPassword"
@handleTimes="handleTimes"
@getList="getList"
:drawer="drawer"
></mer-detail>
<mer-detail ref="merDetail" :merId="merId" :merCateList="merCateList" :storeType="storeType"
@closeDrawer="closeDrawer" @changeDrawer="changeDrawer" @onPassword="onPassword" @handleTimes="handleTimes"
@getList="getList" :drawer="drawer"></mer-detail>
</div>
</template>
<script>
@ -417,5 +325,4 @@ export default {
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

@ -1,12 +1,7 @@
<template>
<div>
<el-drawer
:with-header="false"
:visible.sync="drawer"
size="1100px"
:direction="direction"
:before-close="handleClose"
>
<el-drawer :with-header="false" :visible.sync="drawer" size="1100px" :direction="direction"
:before-close="handleClose">
<div v-loading="loading">
<div class="head">
<div class="full">
@ -52,7 +47,8 @@
</li>
<li class="item item100">
<div class="item-title">轮播图</div>
<img v-for="(pic,idx) in productData.slider_image" :key="idx" :src="pic" style="width:40px;height:40px;margin-right:12px;"/>
<img v-for="(pic, idx) in productData.slider_image" :key="idx" :src="pic"
style="width:40px;height:40px;margin-right:12px;" />
</li>
</ul>
<li class="item item100">
@ -67,17 +63,22 @@
<li v-if="productData.merCateId && productData.merCateId.length > 0" class="item">
<div class="item-title">商户分类</div>
<div class="value">
<span v-for="(item,index) in productData.merCateId" :key="index">{{item.category&&item.category.cate_name}}&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span v-for="(item, index) in productData.merCateId" :key="index">{{ item.category &&
item.category.cate_name }}&nbsp;&nbsp;&nbsp;&nbsp;</span>
</div>
</li>
<li class="item">
<div class="item-title">商品标签</div>
<div v-if="(productData.mer_labels&&productData.mer_labels_data.length) || (productData.sys_labels_data&&productData.sys_labels_data.length)" class="value">
<div
v-if="(productData.mer_labels && productData.mer_labels_data.length) || (productData.sys_labels_data && productData.sys_labels_data.length)"
class="value">
<template v-if="productData.mer_labels_data && productData.mer_labels_data.length">
<span v-for="(item,index) in productData.mer_labels_data" :key="index" class="value-item"> {{item}} </span>
<span v-for="(item, index) in productData.mer_labels_data" :key="index" class="value-item">
{{ item }} </span>
</template>
<template v-if="productData.sys_labels_data && productData.sys_labels_data.length">
<span v-for="(item,index) in productData.sys_labels_data" :key="index" class="value-item"> {{item}} </span>
<span v-for="(item, index) in productData.sys_labels_data" :key="index" class="value-item">
{{ item }} </span>
</template>
</div>
<div v-else class="value"><span>-</span></div>
@ -98,7 +99,8 @@
<div class="item-title">配送方式</div>
<template v-if="productData.type == 0">
<div v-if="productData.delivery_way.length == 2" class="value">快递/到店自提</div>
<div v-else-if="productData.delivery_way.length==1">{{productData.delivery_way[0]==1 ? "到店自提" : "快递"}}</div>
<div v-else-if="productData.delivery_way.length == 1">{{ productData.delivery_way[0] == 1 ? "到店自提" :
"快递" }}</div>
</template>
<template v-else>
<div v-if="productData.type == 1" class="value">虚拟发货</div>
@ -109,7 +111,8 @@
<ul v-if="productData.video_link" class="list">
<li class="item item100">
<div class="item-title">主图视频</div>
<video style="width:300px;height: 150px;border-radius: 10px;" :src="productData.video_link" controls="controls">
<video style="width:300px;height: 150px;border-radius: 10px;" :src="productData.video_link"
controls="controls">
您的浏览器不支持 video 标签
</video>
</li>
@ -125,7 +128,9 @@
</li>
<li v-if="mer_svip_status" class="item">
<div>付费会员价设置</div>
<div class="value">{{productData.svip_price_type==0 ? '不设置会员价' : productData.svip_price_type==1 ? '默认设置会员价' : '自定义设置会员价'}}</div>
<div class="value">{{ productData.svip_price_type == 0 ? '不设置会员价' : productData.svip_price_type == 1 ?
'默认设置会员价' :
'自定义设置会员价' }}</div>
</li>
<li class="item">
<div class="item-title">规格</div>
@ -141,14 +146,12 @@
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
style="width: 60px; height: 60px"
:src="scope.row.image"
/>
<el-image style="width: 60px; height: 60px" :src="scope.row.image" />
</div>
</template>
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<el-table-column v-for="(item, iii) in attrValue" :key="iii" :label="formThead[iii].title"
align="center" min-width="120">
<template slot-scope="scope">
<span class="priceBox" v-text="scope.row[iii]" />
</template>
@ -170,7 +173,8 @@
<template v-if="productData.spec_type === 1">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="100">
<el-table-column v-for="(item, iii) in manyTabDate" :key="iii" align="center"
:label="manyTabTit[iii].title" min-width="100">
<template slot-scope="scope">
<span class="priceBox" v-text="scope.row[iii]" />
</template>
@ -183,7 +187,8 @@
</div>
</template>
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="100">
<el-table-column v-for="(item, iii) in attrValue" :key="iii" :label="formThead[iii].title"
align="center" min-width="100">
<template slot-scope="scope">
<span class="priceBox">{{ scope.row[iii] }}</span>
</template>
@ -207,7 +212,12 @@
</el-tab-pane>
<el-tab-pane label="商品详情" name="detail">
<div class="section">
<div class="contentPic" v-html="productData.content"/>
<el-form v-if="productData.content && productData.content.image && productData.content.image.length > 0">
<el-form-item label="商品图片">
<el-image style="width:100px;margin-right:10px;" v-for="(item, indx) in productData.content.image"
:key="indx" :src="item" :preview-src-list="productData.content.image" />
</el-form-item>
</el-form>
</div>
</el-tab-pane>
<el-tab-pane label="营销信息" name="marketing">
@ -219,7 +229,8 @@
</li>
<li class="item">
<div class="item-title">平台推荐</div>
<div v-if="productData.is_benefit||productData.is_new||productData.is_best||productData.is_hot" class="value">
<div v-if="productData.is_benefit || productData.is_new || productData.is_best || productData.is_hot"
class="value">
<span class="value-item" v-if="productData.is_benefit">促销单品</span>
<span class="value-item" v-if="productData.is_new">首发新品</span>
<span class="value-item" v-if="productData.is_best">精品推荐</span>
@ -239,8 +250,10 @@
</li>
<li v-if="productData.merchant && productData.integral_rate != 0" class="item">
<div class="item-title">积分抵扣比例</div>
<div v-if="productData.integral_rate == -1&&productData.merchant" class="value">默认设置{{'('+productData.merchant.mer_integral_rate+'%)'}}</div>
<div v-else-if="productData.integral_rate > 0" class="value">单独设置{{'('+productData.integral_rate+'%)'}}</div>
<div v-if="productData.integral_rate == -1 && productData.merchant" class="value">
默认设置{{ '(' + productData.merchant.mer_integral_rate + '%)' }}</div>
<div v-else-if="productData.integral_rate > 0" class="value">
单独设置{{ '(' + productData.integral_rate + '%)' }}</div>
</li>
<li v-if="productData.integral_rate != 0" class="item">
<div class="item-title">积分抵扣金额</div>
@ -249,7 +262,8 @@
<li v-if="productData.coupon && productData.coupon.length > 0" class="item">
<div class="item-title">优惠券(赠送券)</div>
<div class="value">
<span v-for="(itm,idx) in productData.coupon" :key="idx" class="value-item"> {{itm.title}} </span>
<span v-for="(itm, idx) in productData.coupon" :key="idx" class="value-item"> {{ itm.title }}
</span>
</div>
</li>
<li class="item">
@ -286,14 +300,21 @@
</li>
<li v-if="productData.pay_limit != 0" class="item">
<div class="item-title">限购类型</div>
<div class="value">{{productData.pay_limit==1?'单次限购':'长期限购'}}{{productData.once_min_count+'('+productData.unit_name+')'}}</div>
<div class="value">
{{ productData.pay_limit == 1 ? '单次限购' : '长期限购' }}{{ productData.once_min_count + '(' +
productData.unit_name
+ ')' }}
</div>
</li>
<li v-if="productData.guarantee" class="item item100">
<div class="item-title">保障服务</div>
<div class="value" style="width: 250px;">
<span>{{ productData.guarantee.template_name }}</span>
<div v-if="productData.guarantee.templateValue && productData.guarantee.templateValue.length>0" style="display: inline;">
<span v-for="(item,i) in productData.guarantee.templateValue" :key="i" class="value-temp">{{item.value&&item.value.guarantee_name}}</span>
<div v-if="productData.guarantee.templateValue && productData.guarantee.templateValue.length > 0"
style="display: inline;">
<span v-for="(item, i) in productData.guarantee.templateValue" :key="i" class="value-temp">{{
item.value &&
item.value.guarantee_name }}</span>
</div>
</div>
</li>
@ -308,19 +329,9 @@
<li class="item item100">
<div class="item-title">商户商品参数</div>
<div class="value" style="width: 721px;">
<el-table
border
ref="tableParameter"
:data="merParams"
row-key="parameter_value_id"
size="small"
class="ones"
>
<el-table-column
align="center"
label="参数名称"
width="360"
>
<el-table border ref="tableParameter" :data="merParams" row-key="parameter_value_id" size="small"
class="ones">
<el-table-column align="center" label="参数名称" width="360">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
@ -336,19 +347,9 @@
<li class="item item100">
<div class="item-title">平台商品参数</div>
<div class="value" style="width: 721px;">
<el-table
border
ref="tableParameter"
:data="sysParams"
row-key="parameter_value_id"
size="small"
class="ones"
>
<el-table-column
align="center"
label="参数名称"
width="360"
>
<el-table border ref="tableParameter" :data="sysParams" row-key="parameter_value_id" size="small"
class="ones">
<el-table-column align="center" label="参数名称" width="360">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
@ -365,8 +366,10 @@
<div class="item-title">关联系统表单</div>
<div v-if="!productData.mer_form_id" class="value">关闭</div>
<div v-else-if="productData.mer_form_id && formData.length == 0" class="value">表单已被删除</div>
<div v-else-if="formData.length>0 && productData.mer_form_id && activeName=='others'" class="value" style="width: 350px;">
<iframe class="iframe-box" :src="formUrl" frameborder="0" ref="iframe" style="min-height: 300px;"></iframe>
<div v-else-if="formData.length > 0 && productData.mer_form_id && activeName == 'others'"
class="value" style="width: 350px;">
<iframe class="iframe-box" :src="formUrl" frameborder="0" ref="iframe"
style="min-height: 300px;"></iframe>
<!-- <el-table
border
class="specsList"
@ -413,46 +416,22 @@
<el-form size="small" label-width="90px">
<div class="acea-row">
<el-form-item label="操作端:">
<el-select
v-model="recordForm.type"
placeholder="请选择"
class="selWidth mr10"
clearable
filterable
@change="getRecordData(productId)"
>
<el-select v-model="recordForm.type" placeholder="请选择" class="selWidth mr10" clearable filterable
@change="getRecordData(productId)">
<el-option label="平台端" value="1" />
<el-option label="商户端" value="2" />
</el-select>
</el-form-item>
<el-form-item label="操作时间:">
<el-date-picker
class="selWidth"
v-model="timeVal"
type="datetimerange"
placeholder="选择日期"
value-format="yyyy/MM/dd HH:mm:ss"
clearable
@change="onchangeTime"
>
<el-date-picker class="selWidth" v-model="timeVal" type="datetimerange" placeholder="选择日期"
value-format="yyyy/MM/dd HH:mm:ss" clearable @change="onchangeTime">
</el-date-picker>
</el-form-item>
</div>
</el-form>
<el-table
border
ref="productRecords"
:data="recordData.data"
row-key="operate_log_id"
size="small"
class="ones"
>
<el-table-column
align="center"
label="序号"
min-width="60"
prop="operate_log_id"
/>
<el-table border ref="productRecords" :data="recordData.data" row-key="operate_log_id" size="small"
class="ones">
<el-table-column align="center" label="序号" min-width="60" prop="operate_log_id" />
<el-table-column align="center" label="操作记录" min-width="120">
<template slot-scope="scope">
<span>{{ scope.row.category_name }}</span>
@ -473,15 +452,12 @@
<span>{{ scope.row.operator_nickname }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作时间"
min-width="100"
prop="create_time"
/>
<el-table-column align="center" label="操作时间" min-width="100" prop="create_time" />
</el-table>
<div class="block">
<el-pagination :page-size="recordForm.limit" :current-page="recordForm.page" layout="prev, pager, next, jumper" :total="recordData.total" @size-change="handleSizeChange" @current-change="pageChange" />
<el-pagination :page-size="recordForm.limit" :current-page="recordForm.page"
layout="prev, pager, next, jumper" :total="recordData.total" @size-change="handleSizeChange"
@current-change="pageChange" />
</div>
</div>
</el-tab-pane>
@ -709,19 +685,24 @@ export default {
<style lang="scss" scoped>
.head {
padding: 20px 35px;
.full {
display: flex;
align-items: center;
.order_icon {
width: 60px;
height: 60px;
}
.iconfont {
color: var(--prev-color-primary);
&.sale-after {
color: #90add5;
}
}
.text {
align-self: center;
flex: 1;
@ -729,6 +710,7 @@ export default {
padding-left: 12px;
font-size: 13px;
color: #606266;
.title {
margin-bottom: 10px;
font-weight: 500;
@ -737,24 +719,28 @@ export default {
font-weight: bold;
color: #282828;
}
.order-num {
padding-top: 10px;
white-space: nowrap;
}
}
}
.list {
display: flex;
margin-top: 20px;
overflow: hidden;
list-style: none;
padding: 0;
.item {
flex: none;
width: 20%;
font-size: 14px;
line-height: 14px;
color: rgba(0, 0, 0, 0.85);
.title {
margin-bottom: 12px;
font-size: 13px;
@ -764,17 +750,21 @@ export default {
}
}
}
.tabNumWidth {
max-height: 350px;
overflow-y: auto;
&:before {
display: none;
}
}
.el-tabs--border-card {
box-shadow: none;
border-bottom: none;
}
.section {
.title {
margin-bottom: 20px;
@ -782,6 +772,7 @@ export default {
line-height: 15px;
color: #303133;
}
.list {
display: flex;
flex-wrap: wrap;
@ -789,6 +780,7 @@ export default {
padding: 0;
margin: 0;
}
.item {
flex: 0 0 calc(100% / 3);
display: flex;
@ -796,26 +788,32 @@ export default {
font-size: 13px;
color: #606266;
align-items: center;
&:nth-child(3n + 1) {
padding-right: 20px;
}
&:nth-child(3n + 2) {
padding-right: 10px;
padding-left: 10px;
}
&:nth-child(3n + 3) {
padding-left: 20px;
}
.item-title {
width: 100px;
text-align: right;
}
}
.item100 {
padding-left: 0;
flex: 0 0 calc(100% / 1);
padding-left: 0 !important;
}
.contentPic {
width: 500px;
margin: 0 auto;
@ -829,23 +827,27 @@ export default {
content: "/";
display: inline-block;
}
&:last-child {
&::after {
display: none;
}
}
}
.value-temp {
&::after {
content: "、";
display: inline-block;
}
&:last-child {
&::after {
display: none;
}
}
}
image {
display: inline-block;
width: 40px;
@ -855,23 +857,27 @@ export default {
}
}
}
.contentPic ::v-deep img {
max-width: 100%;
}
.tab {
display: flex;
align-items: center;
.el-image {
width: 36px;
height: 36px;
margin-right: 10px;
}
}
::v-deep .el-drawer__body {
overflow: auto;
}
::v-deep .ones th {
background: #F0F5FF;
}
</style>