'新增批发价,取消会员价'

This commit is contained in:
weipengfei 2023-12-04 14:24:04 +08:00
parent 95beee9000
commit ec8e023c79
3 changed files with 1328 additions and 463 deletions

View File

@ -4,7 +4,11 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<div class="container"> <div class="container">
<el-form size="small" inline label-width="100px"> <el-form size="small" inline label-width="100px">
<el-form-item label="时间选择:" class="width100" style="display: block;"> <el-form-item
label="时间选择:"
class="width100"
style="display: block"
>
<el-radio-group <el-radio-group
v-model="tableFrom.date" v-model="tableFrom.date"
type="button" type="button"
@ -16,7 +20,8 @@
v-for="(item, i) in fromList.fromTxt" v-for="(item, i) in fromList.fromTxt"
:key="i" :key="i"
:label="item.val" :label="item.val"
>{{ item.text }}</el-radio-button> >{{ item.text }}</el-radio-button
>
</el-radio-group> </el-radio-group>
<el-date-picker <el-date-picker
v-model="timeVal" v-model="timeVal"
@ -26,12 +31,16 @@
type="daterange" type="daterange"
placement="bottom-end" placement="bottom-end"
placeholder="自定义时间" placeholder="自定义时间"
style="width: 250px;" style="width: 250px"
@change="onchangeTime" @change="onchangeTime"
/> />
</el-form-item> </el-form-item>
<el-form-item label="审核状态:"> <el-form-item label="审核状态:">
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1)"> <el-radio-group
v-model="tableFrom.status"
type="button"
@change="getList(1)"
>
<el-radio-button label="">全部 </el-radio-button> <el-radio-button label="">全部 </el-radio-button>
<el-radio-button label="0">待审核</el-radio-button> <el-radio-button label="0">待审核</el-radio-button>
<el-radio-button label="1">已审核</el-radio-button> <el-radio-button label="1">已审核</el-radio-button>
@ -69,7 +78,11 @@
</el-form-item> </el-form-item>
<el-form-item label="收款方式:"> <el-form-item label="收款方式:">
<el-radio-group v-model="tableFrom.financial_type" type="button" @change="getList(1)"> <el-radio-group
v-model="tableFrom.financial_type"
type="button"
@change="getList(1)"
>
<el-radio-button label="">全部 </el-radio-button> <el-radio-button label="">全部 </el-radio-button>
<el-radio-button label="1">银行卡</el-radio-button> <el-radio-button label="1">银行卡</el-radio-button>
<el-radio-button label="3">支付宝</el-radio-button> <el-radio-button label="3">支付宝</el-radio-button>
@ -100,10 +113,21 @@
class="selWidth" class="selWidth"
size="small" size="small"
> >
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt" @click="getList(1)" /> <el-button
slot="append"
icon="el-icon-search"
size="small"
class="el-button-solt"
@click="getList(1)"
/>
</el-input> </el-input>
<el-button size="small" type="primary" icon="el-icon-top" @click="exports">列表导出</el-button> <el-button
size="small"
type="primary"
icon="el-icon-top"
@click="exports"
>列表导出</el-button
>
<!-- <el-button size="small" type="primary" @click="getExportFileList">导出记录</el-button> --> <!-- <el-button size="small" type="primary" @click="getExportFileList">导出记录</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -119,32 +143,58 @@
> >
<el-table-column label="序号" min-width="60"> <el-table-column label="序号" min-width="60">
<template scope="scope"> <template scope="scope">
<span>{{ scope.$index+(tableFrom.page - 1) * tableFrom.limit + 1 }}</span> <span>{{
scope.$index + (tableFrom.page - 1) * tableFrom.limit + 1
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mer_name" label="商户类别" min-width="80"> <el-table-column prop="mer_name" label="商户类别" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.merchant" class="spBlock">{{ scope.row.merchant .is_trader ? '自营' : '非自营' }}</span> <span v-if="scope.row.merchant" class="spBlock">{{
scope.row.merchant.is_trader ? "自营" : "非自营"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商户名称" min-width="150"> <el-table-column label="商户名称" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name : '' }}</span> <span>{{
scope.row.merchant ? scope.row.merchant.mer_name : ""
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="申请时间" min-width="150" /> <el-table-column prop="create_time" label="申请时间" min-width="150" />
<el-table-column prop="extract_money" label="转账金额(元)" min-width="120" /> <el-table-column
<el-table-column prop="admin_id" label="平台管理员姓名" min-width="120" /> prop="extract_money"
label="转账金额(元)"
min-width="120"
/>
<el-table-column
prop="admin_id"
label="平台管理员姓名"
min-width="120"
/>
<el-table-column label="收款方式" min-width="100"> <el-table-column label="收款方式" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.financial_type">{{scope.row.financial_type == 1 ? '银行' : scope.row.financial_type == 2 ? '微信' : '支付宝' }}</span> <span v-if="scope.row.financial_type">{{
scope.row.financial_type == 1
? "银行"
: scope.row.financial_type == 2
? "微信"
: "支付宝"
}}</span>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核状态" min-width="120"> <el-table-column label="审核状态" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.status == 0 ? '待审核' : scope.row.status == 1 ? '审核通过' : '审核未通过' }}</span> <span>{{
<span v-if="scope.row.status === -1" style="font-size: 12px;"> scope.row.status == 0
? "待审核"
: scope.row.status == 1
? "审核通过"
: "审核未通过"
}}</span>
<span v-if="scope.row.status === -1" style="font-size: 12px">
<br /> <br />
原因{{ scope.row.refusal }} 原因{{ scope.row.refusal }}
</span> </span>
@ -152,16 +202,50 @@
</el-table-column> </el-table-column>
<el-table-column label="到账状态" min-width="120"> <el-table-column label="到账状态" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.financial_status == 1 ? '已转账' : '未转账' }}</span> <span>{{
scope.row.financial_status == 1 ? "已转账" : "未转账"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mer_money" label="商户余额(元)" min-width="120"/> <el-table-column
<el-table-column label="操作" min-width="180" fixed="right" align="center"> prop="mer_money"
label="商户余额(元)"
min-width="120"
/>
<el-table-column
label="操作"
min-width="180"
fixed="right"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status == 0" type="text" size="small" @click="transferDetail(scope.row.financial_id)">审核</el-button> <el-button
<el-button v-if="scope.row.status == 1 && scope.row.financial_status != 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,1)">转账</el-button> v-if="scope.row.status == 0"
<el-button v-if="scope.row.status == 1 && scope.row.financial_status == 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,0)">转账信息</el-button> type="text"
<el-button type="text" size="small" @click="transferMark(scope.row.financial_id)">备注</el-button> size="small"
@click="transferDetail(scope.row.financial_id)"
>审核</el-button
>
<el-button
v-if="scope.row.status == 1 && scope.row.financial_status != 1"
type="text"
size="small"
@click="transferDetail(scope.row.financial_id, 1)"
>转账</el-button
>
<el-button
v-if="scope.row.status == 1 && scope.row.financial_status == 1"
type="text"
size="small"
@click="transferDetail(scope.row.financial_id, 0)"
>转账信息</el-button
>
<el-button
type="text"
size="small"
@click="transferMark(scope.row.financial_id)"
>备注</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -178,40 +262,136 @@
</div> </div>
</el-card> </el-card>
<!--转账信息--> <!--转账信息-->
<el-dialog :title="transferData.status == 0 ? '审核' : '转账信息'" :visible.sync="dialogVisible" width="700px" v-if="dialogVisible"> <el-dialog
:title="transferData.status == 0 ? '审核' : '转账信息'"
:visible.sync="dialogVisible"
width="700px"
v-if="dialogVisible"
>
<div class="box-container"> <div class="box-container">
<div class="acea-row"> <div class="acea-row">
<div class="list sp100"><label class="name">商户名称</label>{{ transferData.merchant && transferData.merchant.mer_name }}</div> <div class="list sp100">
<div class="list sp100"><label class="name">商户ID</label>{{ transferData.merchant && transferData.merchant.mer_id }}</div> <label class="name">商户名称</label
<div class="list sp100"><label class="name">商户余额</label>{{ transferData.mer_money }}</div> >{{ transferData.merchant && transferData.merchant.mer_name }}
<div class="list sp100"><label class="name">商户收款方式</label>{{ transferData.financial_type == 1 ? '银行卡' : transferData.financial_type == 2 ? '微信' : '支付宝' }}</div> </div>
<div class="list sp100" v-if="transferData.financial_type == 1"><label class="name">开户银行</label>{{ transferData.financial_account.bank }}</div> <div class="list sp100">
<div class="list sp100" v-if="transferData.financial_type == 1"><label class="name">银行账号</label>{{ transferData.financial_account.bank_code }}</div> <label class="name">商户ID</label
<div class="list sp100" v-if="transferData.financial_type == 1"><label class="name">开户户名</label>{{ transferData.financial_account.name }}</div> >{{ transferData.merchant && transferData.merchant.mer_id }}
<div class="list sp100" v-if="transferData.financial_type != 1"><label class="name">真实姓名</label>{{ transferData.financial_account.name }}</div> </div>
<div class="list sp100" v-if="transferData.financial_type == 2"><label class="name">微信号</label>{{ transferData.financial_account.wechat }}</div> <div class="list sp100">
<div class="list sp100 image" v-if="transferData.financial_type == 2"><label class="name">微信收款二维码:</label><img style="max-width: 150px; height: 80px;" @click="getPicture(transferData.financial_account.wechat_code);return false;" :src="transferData.financial_account.wechat_code"/></div> <label class="name">商户余额</label>{{ transferData.mer_money }}
<div class="list sp100" v-if="transferData.financial_type == 3"><label class="name">支付宝账号</label>{{ transferData.financial_account.alipay }}</div> </div>
<div class="list sp100 image" v-if="transferData.financial_type == 3"><label class="name">支付宝收款二维码:</label><img style="max-width: 150px; height: 80px;" @click="getPicture(transferData.financial_account.alipay_code);return false;" :src="transferData.financial_account.alipay_code"/></div> <div class="list sp100">
<div class="list sp100"><label class="name">本次申请转账金额</label><span class="font-red">{{ transferData.extract_money }}</span></div> <label class="name">商户收款方式</label
<div class="list sp100" v-if="transferData.status != 0"><label class="name">审核状态</label>{{ transferData.status == 0 ? '待审核' : transferData.status == 1 ? '已审核' : '审核失败' }}</div> >{{
<div class="list sp100" v-if="transferData.status == 1"><label class="name">审核时间</label>{{ transferData.status_time }}</div> transferData.financial_type == 1
<div class="list sp100" v-if="transferData.status == -1"><label class="name">审核未通过原因</label>{{ transferData.refusal }}</div> ? "银行卡"
: transferData.financial_type == 2
? "微信"
: "支付宝"
}}
</div>
<div class="list sp100" v-if="transferData.financial_type == 1">
<label class="name">银行</label
>{{ transferData.financial_account.bank }}
</div>
<div class="list sp100" v-if="transferData.financial_type == 1">
<label class="name">卡号</label
>{{ transferData.financial_account.bank_code }}
</div>
<div class="list sp100" v-if="transferData.financial_type == 1">
<label class="name">持卡人</label
>{{ transferData.financial_account.name }}
</div>
<div class="list sp100" v-if="transferData.financial_type != 1">
<label class="name">真实姓名</label
>{{ transferData.financial_account.name }}
</div>
<div class="list sp100" v-if="transferData.financial_type == 2">
<label class="name">微信号</label
>{{ transferData.financial_account.wechat }}
</div>
<div class="list sp100 image" v-if="transferData.financial_type == 2">
<label class="name">微信收款二维码</label
><img
style="max-width: 150px; height: 80px"
@click="
getPicture(transferData.financial_account.wechat_code);
return false;
"
:src="transferData.financial_account.wechat_code"
/>
</div>
<div class="list sp100" v-if="transferData.financial_type == 3">
<label class="name">支付宝账号</label
>{{ transferData.financial_account.alipay }}
</div>
<div class="list sp100 image" v-if="transferData.financial_type == 3">
<label class="name">支付宝收款二维码</label
><img
style="max-width: 150px; height: 80px"
@click="
getPicture(transferData.financial_account.alipay_code);
return false;
"
:src="transferData.financial_account.alipay_code"
/>
</div>
<div class="list sp100">
<label class="name">本次申请转账金额</label
><span class="font-red">{{ transferData.extract_money }}</span>
</div>
<div class="list sp100" v-if="transferData.status != 0">
<label class="name">审核状态</label
>{{
transferData.status == 0
? "待审核"
: transferData.status == 1
? "已审核"
: "审核失败"
}}
</div>
<div class="list sp100" v-if="transferData.status == 1">
<label class="name">审核时间</label>{{ transferData.status_time }}
</div>
<div class="list sp100" v-if="transferData.status == -1">
<label class="name">审核未通过原因</label
>{{ transferData.refusal }}
</div>
<el-form ref="ruleForm" class="demo-ruleForm" label-width="90px"> <el-form ref="ruleForm" class="demo-ruleForm" label-width="90px">
<el-form-item label="审核状态:" required v-if="transferData.status == 0"> <el-form-item
label="审核状态:"
required
v-if="transferData.status == 0"
>
<el-radio-group v-model="formValidate.status"> <el-radio-group v-model="formValidate.status">
<el-radio :label="1" class="radio">通过</el-radio> <el-radio :label="1" class="radio">通过</el-radio>
<el-radio :label="-1">拒绝</el-radio> <el-radio :label="-1">拒绝</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="原因:" required v-if="formValidate.status == -1"> <el-form-item
<el-input type="textarea" v-model="formValidate.refusal"></el-input> label="原因:"
required
v-if="formValidate.status == -1"
>
<el-input
type="textarea"
v-model="formValidate.refusal"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="转账凭证:" v-if="transferData.status == 1"> <el-form-item label="转账凭证:" v-if="transferData.status == 1">
<div class="acea-row"> <div class="acea-row">
<div v-if="voucher_image.length > 0" v-for="(item,index) in voucher_image" :key="index" class="pictrue"> <div
v-if="voucher_image.length > 0"
v-for="(item, index) in voucher_image"
:key="index"
class="pictrue"
>
<img :src="item" @click="getPicture(item)" /> <img :src="item" @click="getPicture(item)" />
<i class="el-icon-error btndel" @click="handleRemove(index)" /> <i
class="el-icon-error btndel"
@click="handleRemove(index)"
/>
</div> </div>
<div class="upLoadPicBox" @click="modalPicTap('2')"> <div class="upLoadPicBox" @click="modalPicTap('2')">
<div class="upLoad"> <div class="upLoad">
@ -221,15 +401,29 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="transferData.status == 0" type="primary" @click="transferReview(transferData.financial_id)">提交</el-button> <el-button
<el-button v-if="transferData.status == 1" type="primary" @click="onSubmit(transferData.financial_id)">提交</el-button> v-if="transferData.status == 0"
type="primary"
@click="transferReview(transferData.financial_id)"
>提交</el-button
>
<el-button
v-if="transferData.status == 1"
type="primary"
@click="onSubmit(transferData.financial_id)"
>提交</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!--查看二维码--> <!--查看二维码-->
<el-dialog :visible.sync="pictureVisible" width="700px" v-if="pictureVisible"> <el-dialog
:visible.sync="pictureVisible"
width="700px"
v-if="pictureVisible"
>
<img :src="pictureUrl" class="pictures" /> <img :src="pictureUrl" class="pictures" />
</el-dialog> </el-dialog>
<!--导出订单列表--> <!--导出订单列表-->

View File

@ -5,30 +5,91 @@
<div class="container"> <div class="container">
<el-form size="small" label-width="100px" :inline="true"> <el-form size="small" label-width="100px" :inline="true">
<el-form-item label="选择时间:" style="display: inline-block"> <el-form-item label="选择时间:" style="display: inline-block">
<el-radio-group v-model="tableFrom.date" size="small" @change="selectChange(tableFrom.date)"> <el-radio-group
<el-radio-button v-for="(itemn, indexn) in fromList.fromTxt" :key="indexn" :label="itemn.val">{{ itemn.text }}</el-radio-button> v-model="tableFrom.date"
size="small"
@change="selectChange(tableFrom.date)"
>
<el-radio-button
v-for="(itemn, indexn) in fromList.fromTxt"
:key="indexn"
:label="itemn.val"
>{{ itemn.text }}</el-radio-button
>
</el-radio-group> </el-radio-group>
<el-date-picker v-model="timeVal" type="daterange" placeholder="选择日期" format="yyyy/MM/dd" value-format="yyyy/MM/dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="onchangeTime" /> <el-date-picker
v-model="timeVal"
type="daterange"
placeholder="选择日期"
format="yyyy/MM/dd"
value-format="yyyy/MM/dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="onchangeTime"
/>
</el-form-item> </el-form-item>
<el-form-item label="关键字:" label-width="80px" style="display: inline-block"> <el-form-item
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList(1)" placeholder="请输入店铺关键字/店铺名/联系电话" class="selWidth"> label="关键字:"
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)" /> label-width="80px"
style="display: inline-block"
>
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入店铺关键字/店铺名/联系电话"
class="selWidth"
>
<el-button
slot="append"
icon="el-icon-search"
class="el-button-solt"
@click="getList(1)"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="商户类别:"> <el-form-item label="商户类别:">
<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="1" />
<el-option label="非自营" value="0" /> <el-option label="非自营" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商户分类:"> <el-form-item label="商户分类:">
<el-select v-model="tableFrom.category_id" clearable placeholder="请选择" class="selWidth" @change="getList(1)"> <el-select
<el-option v-for="item in merCateList" :key="item.value" :label="item.label" :value="item.value" /> 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-select>
</el-form-item> </el-form-item>
<el-form-item label="店铺类型:"> <el-form-item label="店铺类型:">
<el-select v-model="tableFrom.type_id" clearable placeholder="请选择" class="selWidth" @change="getList(1)"> <el-select
<el-option v-for="item in storeType" :key="item.value" :label="item.label" :value="item.value" /> 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-select>
</el-form-item> </el-form-item>
<el-form-item label="店铺商圈:"> <el-form-item label="店铺商圈:">
@ -46,17 +107,43 @@
:value="item.code" :value="item.code"
/> />
</el-select> --> </el-select> -->
<el-cascader v-model="tableFrom.area_id" :options="form.options" @change="handleChange1"></el-cascader> <el-cascader
<el-cascader v-model="tableFrom.street_id" :options="form.options1" @change="getList(1)"></el-cascader> v-model="tableFrom.area_id"
:options="form.options"
@change="handleChange1"
></el-cascader>
<el-cascader
v-model="tableFrom.street_id"
:options="form.options1"
@change="getList(1)"
></el-cascader>
</el-form-item> </el-form-item>
<el-tabs v-if="headeNum.length > 0" v-model="tableFrom.status" @tab-click="getList(1), getHeadNum()"> <el-tabs
<el-tab-pane v-for="(item, index) in headeNum" :key="index" :name="item.type.toString()" :label="item.title + '(' + item.count + ')'" /> 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-tabs> </el-tabs>
</el-form> </el-form>
</div> </div>
<el-button size="small" type="primary" @click="onAdd">添加商户</el-button> <el-button size="small" type="primary" @click="onAdd"
>添加商户</el-button
>
</div> </div>
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="small" highlight-current-row class="switchTable"> <el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="small"
highlight-current-row
class="switchTable"
>
<el-table-column prop="mer_id" label="ID" min-width="60" /> <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="mer_name" label="商户名称" min-width="150" />
<!--<el-table-column prop="mer_name" label="商户类别" min-width="90"> <!--<el-table-column prop="mer_name" label="商户类别" min-width="90">
@ -80,7 +167,15 @@
<el-table-column prop="mark" label="备注" min-width="200" /> <el-table-column prop="mark" label="备注" min-width="200" />
<el-table-column prop="status" label="推荐" min-width="100"> <el-table-column prop="status" label="推荐" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.is_best" :active-value="1" :inactive-value="0" active-text="是" inactive-text="否" disabled @click.native="onchangeIsShow(scope.row)" /> <el-switch
v-model="scope.row.is_best"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否"
disabled
@click.native="onchangeIsShow(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="150" /> <el-table-column prop="create_time" label="创建时间" min-width="150" />
@ -99,10 +194,23 @@
<el-table-column prop="status" label="开启/关闭" min-width="100"> <el-table-column prop="status" label="开启/关闭" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" active-text="开启" inactive-text="关闭" disabled @click.native="onchangeIsClose(scope.row)" /> <el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="0"
active-text="开启"
inactive-text="关闭"
disabled
@click.native="onchangeIsClose(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="280" fixed="right" align="center"> <el-table-column
label="操作"
min-width="280"
fixed="right"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <router-link <!-- <router-link
v-if="tableFrom.status === '1'" v-if="tableFrom.status === '1'"
@ -110,11 +218,40 @@
> >
<el-button type="text" size="small" class="mr10">对账</el-button> <el-button type="text" size="small" class="mr10">对账</el-button>
</router-link>--> </router-link>-->
<el-button v-if="tableFrom.status === '1'" type="text" size="small" @click="onLogo(scope.row.mer_id)">登录</el-button> <el-button
<el-button type="text" size="small" @click="onEdit(scope.row.mer_id)">编辑</el-button> v-if="tableFrom.status === '1'"
<el-button v-if="tableFrom.status === '1'" type="text" size="small" @click="onPassword(scope.row.mer_id)">修改管理员密码</el-button> type="text"
<el-button v-if="tableFrom.status === '0'" type="text" size="small" @click="handleDelete(scope.row.mer_id, scope.$index)">删除</el-button> size="small"
<el-button v-if="tableFrom.status === '1'" type="text" size="small" @click="handleTimes(scope.row.mer_id)">设置第三方平台商品复制次数</el-button> @click="onLogo(scope.row.mer_id)"
>登录</el-button
>
<el-button
type="text"
size="small"
@click="onEdit(scope.row.mer_id)"
>编辑</el-button
>
<el-button
v-if="tableFrom.status === '1'"
type="text"
size="small"
@click="onPassword(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 === '1'"
type="text"
size="small"
@click="handleTimes(scope.row.mer_id)"
>设置第三方平台商品复制次数</el-button
>
<!-- <el-button <!-- <el-button
v-if="tableFrom.status === '1'" v-if="tableFrom.status === '1'"
type="text" type="text"
@ -125,93 +262,312 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page" layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange" @current-change="pageChange" /> <el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div> </div>
</el-card> </el-card>
<!-- 添加商户弹出层 --> <!-- 添加商户弹出层 -->
<el-dialog :title="edit == 0 ? '新增商户信息' : '编辑商户信息'" :visible.sync="popFormVisible" @close="close('form')"> <el-dialog
:title="edit == 0 ? '新增商户信息' : '编辑商户信息'"
:visible.sync="popFormVisible"
@close="close('form')"
>
<el-form :model="form" :rules="rules" ref="form"> <el-form :model="form" :rules="rules" ref="form">
<el-form-item label="商户名称" :label-width="formLabelWidth" prop="mer_name"> <el-form-item
<el-input v-model="form.mer_name" autocomplete="off" placeholder="请输入商户名称"></el-input> label="商户名称"
:label-width="formLabelWidth"
prop="mer_name"
>
<el-input
v-model="form.mer_name"
autocomplete="off"
placeholder="请输入商户名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商户分类" :label-width="formLabelWidth"> <el-form-item label="商户分类" :label-width="formLabelWidth">
<el-select v-model="form.category_id" placeholder="请选择商户分类"> <el-select v-model="form.category_id" placeholder="请选择商户分类">
<el-option :label="item.label" :value="item.value" v-for="item in merCateList" :key="item.value"></el-option> <el-option
:label="item.label"
:value="item.value"
v-for="item in merCateList"
:key="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="店铺类型" :label-width="formLabelWidth" prop="type_id"> <el-form-item
label="店铺类型"
:label-width="formLabelWidth"
prop="type_id"
>
<el-select v-model="form.type_id" placeholder="请选择店铺类型"> <el-select v-model="form.type_id" placeholder="请选择店铺类型">
<el-option :label="item.label" :value="item.value" v-for="item in storeType" :key="item.value"></el-option> <el-option
:label="item.label"
:value="item.value"
v-for="item in storeType"
:key="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商圈" :label-width="formLabelWidth"> <el-form-item label="商圈" :label-width="formLabelWidth">
<el-cascader v-model="form.info" :options="form.options" @change="handleChange1"></el-cascader> <el-cascader
<el-cascader v-model="form.info1" :options="form.options1" @change="handleChange2"></el-cascader> v-model="form.info"
<el-cascader v-model="form.info2" :options="form.options2" @change="handleChange3($event, form.options2)"></el-cascader> :options="form.options"
@change="handleChange1"
></el-cascader>
<el-cascader
v-model="form.info1"
:options="form.options1"
@change="handleChange2"
></el-cascader>
<el-cascader
v-model="form.info2"
:options="form.options2"
@change="handleChange3($event, form.options2)"
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="商户账号" :label-width="formLabelWidth" prop="mer_account"> <el-form-item
<el-input v-model="form.mer_account" autocomplete="off" placeholder="请输入商户账号" :disabled="!add"></el-input> label="商户账号"
:label-width="formLabelWidth"
prop="mer_account"
>
<el-input
v-model="form.mer_account"
autocomplete="off"
placeholder="请输入商户账号"
:disabled="!add"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="登陆密码" :label-width="formLabelWidth" prop="mer_password"> <el-form-item
<el-input v-model="form.mer_password" autocomplete="off" placeholder="请输入登陆密码" :disabled="!add"></el-input> label="登陆密码"
:label-width="formLabelWidth"
prop="mer_password"
>
<el-input
v-model="form.mer_password"
autocomplete="off"
placeholder="请输入登陆密码"
:disabled="!add"
></el-input>
</el-form-item> </el-form-item>
<div class="dis"> <div class="dis">
<el-form-item label="保证金额度" :label-width="formLabelWidth" class="mer_phone"> <el-form-item
<el-input v-model="form.ot_margin" style="width: 200px" autocomplete="off" disabled placeholder="保证金额度"></el-input> label="保证金额度"
:label-width="formLabelWidth"
class="mer_phone"
>
<el-input
v-model="form.ot_margin"
style="width: 200px"
autocomplete="off"
disabled
placeholder="保证金额度"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="已缴纳的保证金" :label-width="formLabelWidth" class="mer_phone"> <el-form-item
<el-input v-model="form.paid_margin" style="width: 200px" autocomplete="off" disabled placeholder="已缴纳的保证金"></el-input> label="已缴纳的保证金"
:label-width="formLabelWidth"
class="mer_phone"
>
<el-input
v-model="form.paid_margin"
style="width: 200px"
autocomplete="off"
disabled
placeholder="已缴纳的保证金"
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="dis"> <div class="dis">
<el-form-item label="需缴纳的保证金" :label-width="formLabelWidth" class="mer_phone"> <el-form-item
<el-input v-model="form.margin" style="width: 200px" autocomplete="off" placeholder="请输入需缴纳的保证金"></el-input> label="需缴纳的保证金"
:label-width="formLabelWidth"
class="mer_phone"
>
<el-input
v-model="form.margin"
style="width: 200px"
autocomplete="off"
placeholder="请输入需缴纳的保证金"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="自动扣除保证金比例" :label-width="formLabelWidth" prop="commission_rate"> <el-form-item
<el-input v-model="form.auto_margin_rate" style="width: 200px" autocomplete="off"></el-input> label="自动扣除保证金比例"
:label-width="formLabelWidth"
prop="commission_rate"
>
<el-input
v-model="form.auto_margin_rate"
style="width: 200px"
autocomplete="off"
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="商户姓名" :label-width="formLabelWidth" prop="real_name"> <el-form-item
<el-input v-model="form.real_name" autocomplete="off" placeholder="请输入商户姓名"></el-input> label="商户姓名"
:label-width="formLabelWidth"
prop="real_name"
>
<el-input
v-model="form.real_name"
autocomplete="off"
placeholder="请输入商户姓名"
></el-input>
</el-form-item> </el-form-item>
<div class="dis"> <div class="dis">
<el-form-item label="商户手机号" :label-width="formLabelWidth" prop="mer_phone" class="mer_phone"> <el-form-item
<el-input v-model="form.mer_phone" autocomplete="off" placeholder="请输入商户手机号"></el-input> label="商户手机号"
:label-width="formLabelWidth"
prop="mer_phone"
class="mer_phone"
>
<el-input
v-model="form.mer_phone"
autocomplete="off"
placeholder="请输入商户手机号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手续费(%)" :label-width="formLabelWidth" prop="commission_rate"> <el-form-item
<el-input-number v-model="form.commission_rate" @change="handleChange" :min="0" :max="10" label="描述文字" aria-placeholder="请输入手续费"></el-input-number> label="手续费(%)"
:label-width="formLabelWidth"
prop="commission_rate"
>
<el-input-number
v-model="form.commission_rate"
@change="handleChange"
:min="0"
:max="10"
label="描述文字"
aria-placeholder="请输入手续费"
></el-input-number>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="商户关键字" :label-width="formLabelWidth" prop="mer_keyword"> <el-form-item
<el-input v-model="form.mer_keyword" autocomplete="off" placeholder="请输入商户关键字"></el-input> label="商户关键字"
:label-width="formLabelWidth"
prop="mer_keyword"
>
<el-input
v-model="form.mer_keyword"
autocomplete="off"
placeholder="请输入商户关键字"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商户地址" :label-width="formLabelWidth" prop="mer_address"> <el-form-item
<el-input v-model="form.mer_address" autocomplete="off" placeholder="请输入商户地址"></el-input> label="商户地址"
:label-width="formLabelWidth"
prop="mer_address"
>
<el-input
v-model="form.mer_address"
autocomplete="off"
placeholder="请输入商户地址"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="微信分账商户号" :label-width="formLabelWidth" prop="sub_mchid"> <el-form-item
<el-input v-model="form.sub_mchid" autocomplete="off" placeholder="请输入微信分账商户号"></el-input> label="微信分账商户号"
:label-width="formLabelWidth"
prop="sub_mchid"
>
<el-input
v-model="form.sub_mchid"
autocomplete="off"
placeholder="请输入微信分账商户号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth" prop="mark"> <el-form-item label="备注" :label-width="formLabelWidth" prop="mark">
<el-input type="textarea" placeholder="请输入备注" maxlength="130" v-model="form.mark" autocomplete="off"></el-input> <el-input
type="textarea"
placeholder="请输入备注"
maxlength="130"
v-model="form.mark"
autocomplete="off"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" :label-width="formLabelWidth" prop="sort"> <el-form-item label="排序" :label-width="formLabelWidth" prop="sort">
<el-input-number v-model="form.sort" @change="handleChange" :min="0" :max="10"></el-input-number> <el-input-number
v-model="form.sort"
@change="handleChange"
:min="0"
:max="10"
></el-input-number>
</el-form-item> </el-form-item>
<div class="switch_btn"> <div class="switch_btn">
<el-form-item class="mini_btn" label="直播间审核" prop="value1" :label-width="formLabelWidth"> <el-form-item
<el-switch v-model="form.value1" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch> class="mini_btn"
label="直播间审核"
prop="value1"
:label-width="formLabelWidth"
>
<el-switch
v-model="form.value1"
active-color="#3390ff"
active-text="开"
inactive-text="关"
inactive-color="#DCDFE6"
></el-switch>
</el-form-item> </el-form-item>
<el-form-item class="mini_btn" label="产品审核" prop="value2" :label-width="formLabelWidth"> <el-form-item
<el-switch v-model="form.value2" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch> class="mini_btn"
label="产品审核"
prop="value2"
:label-width="formLabelWidth"
>
<el-switch
v-model="form.value2"
active-color="#3390ff"
active-text="开"
inactive-text="关"
inactive-color="#DCDFE6"
></el-switch>
</el-form-item> </el-form-item>
<el-form-item class="mini_btn" label="直播间商品审核" prop="value3" :label-width="formLabelWidth"> <el-form-item
<el-switch v-model="form.value3" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch> class="mini_btn"
label="直播间商品审核"
prop="value3"
:label-width="formLabelWidth"
>
<el-switch
v-model="form.value3"
active-color="#3390ff"
active-text="开"
inactive-text="关"
inactive-color="#DCDFE6"
></el-switch>
</el-form-item> </el-form-item>
<el-form-item class="mini_btn" label="是否推荐" prop="value4" :label-width="formLabelWidth"> <el-form-item
<el-switch v-model="form.value4" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch> class="mini_btn"
label="是否推荐"
prop="value4"
:label-width="formLabelWidth"
>
<el-switch
v-model="form.value4"
active-color="#3390ff"
active-text="开"
inactive-text="关"
inactive-color="#DCDFE6"
></el-switch>
</el-form-item> </el-form-item>
<el-form-item class="mini_btn" label="是否自营" prop="value5" :label-width="formLabelWidth"> <el-form-item
<el-switch v-model="form.value5" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch> class="mini_btn"
label="是否自营"
prop="value5"
:label-width="formLabelWidth"
>
<el-switch
v-model="form.value5"
active-color="#3390ff"
active-text="开"
inactive-text="关"
inactive-color="#DCDFE6"
></el-switch>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -266,6 +622,7 @@ export default {
// //
popFormVisible: false, popFormVisible: false,
merid: "", merid: "",
edit: 0,
form: { form: {
mer_name: "", // mer_name: "", //
category_id: "", // category_id: "", //

View File

@ -2,88 +2,238 @@
<div class="divBox"> <div class="divBox">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-tabs v-model="tableFrom.type" @tab-click="getList(1),getLstFilterApi()"> <el-tabs
<el-tab-pane v-for="(item,index) in headeNum" :key="index" :name="item.type.toString()" :label="item.name +'('+item.count +')' " /> v-model="tableFrom.type"
@tab-click="getList(1), getLstFilterApi()"
>
<el-tab-pane
v-for="(item, index) in headeNum"
:key="index"
:name="item.type.toString()"
:label="item.name + '(' + item.count + ')'"
/>
</el-tabs> </el-tabs>
<div class="container"> <div class="container">
<div class="demo-input-suffix acea-row"> <div class="demo-input-suffix acea-row">
<el-form inline size="small" label-width="120px"> <el-form inline size="small" label-width="120px">
<el-form-item label="商品分类:"> <el-form-item label="商品分类:">
<el-cascader v-model="tableFrom.pid" class="selWidth" :options="merCateList" :props="{ checkStrictly: true, emitPath:false }" clearable @change="getList(1)" /> <el-cascader
v-model="tableFrom.pid"
class="selWidth"
:options="merCateList"
:props="{ checkStrictly: true, emitPath: false }"
clearable
@change="getList(1)"
/>
</el-form-item> </el-form-item>
<el-form-item label="商户名称:"> <el-form-item label="商户名称:">
<el-select v-model="tableFrom.mer_id" clearable filterable placeholder="请选择" class="selWidth" @change="getList(1)"> <el-select
<el-option v-for="item in merSelect" :key="item.mer_id" :label="item.mer_name" :value="item.mer_id" /> v-model="tableFrom.mer_id"
clearable
filterable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option
v-for="item in merSelect"
:key="item.mer_id"
:label="item.mer_name"
:value="item.mer_id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商户类别:"> <el-form-item label="商户类别:">
<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="1" />
<el-option label="非自营" value="0" /> <el-option label="非自营" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品状态:"> <el-form-item label="商品状态:">
<el-select v-model="tableFrom.us_status" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)"> <el-select
<el-option v-for="item in productStatusList" :key="item.value" :label="item.label" :value="item.value" /> v-model="tableFrom.us_status"
placeholder="请选择"
class="filter-item selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in productStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="推荐级别:"> <el-form-item label="推荐级别:">
<el-select v-model="tableFrom.star" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)"> <el-select
<el-option v-for="item in recommendedLevelStatus" :key="item.value" :label="item.label" :value="item.value" /> v-model="tableFrom.star"
placeholder="请选择"
class="filter-item selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in recommendedLevelStatus"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标签:"> <el-form-item label="标签:">
<el-select v-model="tableFrom.sys_labels" placeholder="请选择" class="filter-item selWidth" clearable filterable @change="getList(1)"> <el-select
<el-option v-for="item in labelList" :key="item.id" :label="item.name" :value="item.id" /> v-model="tableFrom.sys_labels"
placeholder="请选择"
class="filter-item selWidth"
clearable
filterable
@change="getList(1)"
>
<el-option
v-for="item in labelList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="会员价设置:"> <!-- <el-form-item label="会员价设置:">
<el-select v-model="tableFrom.svip_price_type" placeholder="请选择" class="selWidth" clearable @change="getList(1)"> <el-select
v-model="tableFrom.svip_price_type"
placeholder="请选择"
class="selWidth"
clearable
@change="getList(1)"
>
<el-option label="未设置" value="0" /> <el-option label="未设置" value="0" />
<el-option label="默认设置" value="1" /> <el-option label="默认设置" value="1" />
<el-option label="自定义设置" value="2" /> <el-option label="自定义设置" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="商品推荐:"> <el-form-item label="商品推荐:">
<el-select v-model="tableFrom.hot_type" placeholder="请选择" class="filter-item selWidth" clearable filterable @change="getList(1)"> <el-select
<el-option v-for="item in recommendList" :key="item.value" :label="item.name" :value="item.value" /> v-model="tableFrom.hot_type"
placeholder="请选择"
class="filter-item selWidth"
clearable
filterable
@change="getList(1)"
>
<el-option
v-for="item in recommendList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品搜索:"> <el-form-item label="商品搜索:">
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList(1)" placeholder="请输入商品名称,关键字,产品编号" class="selWidth"> <el-input
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)" /> v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入商品名称,关键字,产品编号"
class="selWidth"
>
<el-button
slot="append"
icon="el-icon-search"
class="el-button-solt"
@click="getList(1)"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
<el-button v-show="tableFrom.type === '6'" size="mini" :disabled="multipleSelection.length==0" @click="batch">批量审核</el-button> <el-button
<el-button size="mini" :disabled="multipleSelection.length==0 " @click="batchOff">批量强制下架</el-button> v-show="tableFrom.type === '6'"
<el-button size="mini" :disabled="multipleSelection.length==0 " @click="batchShow(0)">批量不显示</el-button> size="mini"
<el-button size="mini" :disabled="multipleSelection.length==0 " @click="batchShow(1)">批量显示</el-button> :disabled="multipleSelection.length == 0"
<el-button :disabled="multipleSelection.length==0" size="mini" @click="batchLabel">批量设置标签</el-button> @click="batch"
<el-button :disabled="multipleSelection.length==0" size="mini" @click="batchRecommend">批量设置推荐</el-button> >批量审核</el-button
>
<el-button
size="mini"
:disabled="multipleSelection.length == 0"
@click="batchOff"
>批量强制下架</el-button
>
<el-button
size="mini"
:disabled="multipleSelection.length == 0"
@click="batchShow(0)"
>批量不显示</el-button
>
<el-button
size="mini"
:disabled="multipleSelection.length == 0"
@click="batchShow(1)"
>批量显示</el-button
>
<el-button
:disabled="multipleSelection.length == 0"
size="mini"
@click="batchLabel"
>批量设置标签</el-button
>
<el-button
:disabled="multipleSelection.length == 0"
size="mini"
@click="batchRecommend"
>批量设置推荐</el-button
>
</div> </div>
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini" @selection-change="handleSelectionChange"> <el-table
<el-table-column v-if="Number(tableFrom.type)<7" key="2" type="selection" width="55" /> v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
@selection-change="handleSelectionChange"
>
<el-table-column
v-if="Number(tableFrom.type) < 7"
key="2"
type="selection"
width="55"
/>
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand"> <el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="平台分类:"> <el-form-item label="平台分类:">
<span>{{ props.row.storeCategory?props.row.storeCategory.cate_name:'-' }}</span> <span>{{
props.row.storeCategory
? props.row.storeCategory.cate_name
: "-"
}}</span>
</el-form-item> </el-form-item>
<el-form-item label="商户类别:"> <el-form-item label="商户类别:">
<!-- <span>{{ props.row.storeCategory?props.row.storeCategory.cate_name:'-' }}</span> --> <!-- <span>{{ props.row.storeCategory?props.row.storeCategory.cate_name:'-' }}</span> -->
<span v-if="props.row.merchant" class="spBlock">{{ props.row.merchant .is_trader ? '自营' : '非自营' }}</span> <span v-if="props.row.merchant" class="spBlock">{{
props.row.merchant.is_trader ? "自营" : "非自营"
}}</span>
</el-form-item> </el-form-item>
<el-form-item label="商品分类:"> <el-form-item label="商品分类:">
<template v-if="props.row.merCateId.length"> <template v-if="props.row.merCateId.length">
<span v-for="(item, index) in props.row.merCateId" :key="index" class="mr10">{{ item.category ? item.category.cate_name : '-' }}</span> <span
v-for="(item, index) in props.row.merCateId"
:key="index"
class="mr10"
>{{ item.category ? item.category.cate_name : "-" }}</span
>
</template> </template>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
<el-form-item label="品牌:"> <el-form-item label="品牌:">
<span>{{ props.row.brand ? props.row.brand.brand_name: '-' }}</span> <span>{{
props.row.brand ? props.row.brand.brand_name : "-"
}}</span>
</el-form-item> </el-form-item>
<el-form-item label="市场价格:"> <el-form-item label="市场价格:">
<span>{{ props.row.ot_price | filterEmpty }}</span> <span>{{ props.row.ot_price | filterEmpty }}</span>
@ -110,27 +260,40 @@
<el-table-column label="商品图" min-width="80"> <el-table-column label="商品图" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="demo-image__preview"> <div class="demo-image__preview">
<el-image style="width: 36px; height: 36px" :src="scope.row.image" :preview-src-list="[scope.row.image]" /> <el-image
style="width: 36px; height: 36px"
:src="scope.row.image"
:preview-src-list="[scope.row.image]"
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="store_name" label="商品名称" min-width="200" /> <el-table-column prop="store_name" label="商品名称" min-width="200" />
<el-table-column label="商户名称" min-width="150"> <el-table-column label="商户名称" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name : '' }}</span> <span>{{
scope.row.merchant ? scope.row.merchant.mer_name : ""
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mer_name" label="商户类别" min-width="90"> <el-table-column prop="mer_name" label="商户类别" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.merchant" class="spBlock">{{ scope.row.merchant .is_trader ? '自营' : '非自营' }}</span> <span v-if="scope.row.merchant" class="spBlock">{{
scope.row.merchant.is_trader ? "自营" : "非自营"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="商品售价" min-width="90" /> <el-table-column prop="price" label="商品售价" min-width="90" />
<el-table-column prop="svip_price" label="会员价" min-width="90"> <el-table-column prop="svip_price" label="批发价" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.svip_price || '-' }}</span> <span>{{ scope.row.procure_price || "-" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="svip_price" label="会员价" min-width="90">
<template slot-scope="scope">
<span>{{ scope.row.svip_price || "-" }}</span>
</template>
</el-table-column> -->
<el-table-column prop="sales" label="销量" min-width="90" /> <el-table-column prop="sales" label="销量" min-width="90" />
<!-- <el-table-column prop="integral_total" label="抵扣积分" min-width="90" /> <!-- <el-table-column prop="integral_total" label="抵扣积分" min-width="90" />
<el-table-column prop="integral_price_total" label="积分抵扣金额" min-width="90" /> --> <el-table-column prop="integral_price_total" label="积分抵扣金额" min-width="90" /> -->
@ -146,7 +309,14 @@
<el-table-column prop="rank" label="排序" min-width="70" /> <el-table-column prop="rank" label="排序" min-width="70" />
<el-table-column prop="status" label="是否显示" min-width="100"> <el-table-column prop="status" label="是否显示" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.is_used" :active-value="1" :inactive-value="0" active-text="显示" inactive-text="隐藏" @change="onchangeIsShow(scope.row)" /> <el-switch
v-model="scope.row.is_used"
:active-value="1"
:inactive-value="0"
active-text="显示"
inactive-text="隐藏"
@change="onchangeIsShow(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="stock" label="商品状态" min-width="90"> <el-table-column prop="stock" label="商品状态" min-width="90">
@ -154,63 +324,190 @@
<span>{{ scope.row.us_status | productStatusFilter }}</span> <span>{{ scope.row.us_status | productStatusFilter }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="stock" label="标签" max-height="120" min-width="90" show-overflow-tooltip> <el-table-column
prop="stock"
label="标签"
max-height="120"
min-width="90"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in scope.row.sys_labels" :key="index" class="label-list">{{ item.name }}</span> <span
v-for="(item, index) in scope.row.sys_labels"
:key="index"
class="label-list"
>{{ item.name }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="150" /> <el-table-column prop="create_time" label="创建时间" min-width="150" />
<el-table-column v-if="Number(tableFrom.type) < 7" key="8" label="操作" min-width="160" fixed="right" align="center"> <el-table-column
v-if="Number(tableFrom.type) < 7"
key="8"
label="操作"
min-width="160"
fixed="right"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="Number(tableFrom.type) < 7" type="text" size="small" @click="onEdit(scope.row.product_id)">编辑</el-button> <el-button
<el-button type="text" size="small" @click="handlePreview(scope.row.product_id)">预览</el-button> v-if="Number(tableFrom.type) < 7"
<router-link v-if="tableFrom.type != 5" :to="{path: roterPre + '/product/comment/?product_id=' + scope.row.product_id}"> type="text"
<el-button type="text" size="small" class="mr10">查看评价</el-button> size="small"
@click="onEdit(scope.row.product_id)"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="handlePreview(scope.row.product_id)"
>预览</el-button
>
<router-link
v-if="tableFrom.type != 5"
:to="{
path:
roterPre +
'/product/comment/?product_id=' +
scope.row.product_id,
}"
>
<el-button type="text" size="small" class="mr10"
>查看评价</el-button
>
</router-link> </router-link>
<el-button v-if="tableFrom.type !== '5'" type="text" size="small" @click="onEditLabel(scope.row)">编辑标签</el-button> <el-button
<el-button v-if="tableFrom.type === '6' || tableFrom.type === '1'" type="text" size="small" @click="toVirtualSales(scope.row.product_id)">已售数量</el-button> v-if="tableFrom.type !== '5'"
<el-button v-if="tableFrom.type === '6'" type="text" size="small" @click="toExamine(scope.row.product_id)">审核</el-button> type="text"
<el-button v-if="Number(tableFrom.type) < 3" type="text" size="small" @click="toOff([scope.row.product_id])">强制下架</el-button> size="small"
@click="onEditLabel(scope.row)"
>编辑标签</el-button
>
<el-button
v-if="tableFrom.type === '6' || tableFrom.type === '1'"
type="text"
size="small"
@click="toVirtualSales(scope.row.product_id)"
>已售数量</el-button
>
<el-button
v-if="tableFrom.type === '6'"
type="text"
size="small"
@click="toExamine(scope.row.product_id)"
>审核</el-button
>
<el-button
v-if="Number(tableFrom.type) < 3"
type="text"
size="small"
@click="toOff([scope.row.product_id])"
>强制下架</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page" layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange" @current-change="pageChange" /> <el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div> </div>
</el-card> </el-card>
<info-from ref="infoFrom" :is-show="isShow" :ids="OffId" @subSuccess="subSuccess" /> <info-from
<el-dialog title="商品编辑" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose" :append-to-body='append'> ref="infoFrom"
<el-form ref="formValidate" v-loading="fullscreenLoading" class="formValidate mt20" :rules="ruleValidate" :model="formValidate" label-width="100px" @submit.native.prevent> :is-show="isShow"
:ids="OffId"
@subSuccess="subSuccess"
/>
<el-dialog
title="商品编辑"
:visible.sync="dialogVisible"
width="1000px"
:before-close="handleClose"
:append-to-body="append"
>
<el-form
ref="formValidate"
v-loading="fullscreenLoading"
class="formValidate mt20"
:rules="ruleValidate"
:model="formValidate"
label-width="100px"
@submit.native.prevent
>
<el-form-item label="商品名称:" prop="store_name"> <el-form-item label="商品名称:" prop="store_name">
<el-input v-model="formValidate.store_name" placeholder="请输入商品名称" /> <el-input
v-model="formValidate.store_name"
placeholder="请输入商品名称"
/>
</el-form-item> </el-form-item>
<el-form-item label="星级推荐:"> <el-form-item label="星级推荐:">
<el-rate class="rate_star" v-model="formValidate.star" :colors="colors" style="margin-top: 4px;"></el-rate> <el-rate
<span style="margin-top: 4px; font-size: 12px;">备注5星为最高推荐级别1星为最低推荐级别设置后会在商城商品列表搜索商品列表中体现</span> class="rate_star"
v-model="formValidate.star"
:colors="colors"
style="margin-top: 4px"
></el-rate>
<span style="margin-top: 4px; font-size: 12px"
>备注5星为最高推荐级别1星为最低推荐级别设置后会在商城商品列表搜索商品列表中体现</span
>
</el-form-item> </el-form-item>
<el-form-item label="商品推荐:"> <el-form-item label="商品推荐:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup"> <el-checkbox-group
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox> v-model="checkboxGroup"
size="small"
@change="onChangeGroup"
>
<el-checkbox
v-for="(item, index) in recommend"
:key="index"
:label="item.value"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="排序:"> <el-form-item label="排序:">
<el-input-number v-model="formValidate.rank" placeholder="请输入排序序号" style="width: 200px;" /> <el-input-number
v-model="formValidate.rank"
placeholder="请输入排序序号"
style="width: 200px"
/>
</el-form-item> </el-form-item>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品详情:"> <el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" /> <ueditor-from
v-model="formValidate.content"
:content="formValidate.content"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-form-item style="margin-top:30px;"> <el-form-item style="margin-top: 30px">
<el-button type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</el-button> <el-button
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
<!--预览商品--> <!--预览商品-->
<div v-if="previewVisible"> <div v-if="previewVisible">
<div class="bg" @click.stop="previewVisible = false" /> <div class="bg" @click.stop="previewVisible = false" />
<preview-box v-if="previewVisible" ref="previewBox" :goods-id="goodsId" :product-type="0" :preview-key="previewKey" /> <preview-box
v-if="previewVisible"
ref="previewBox"
:goods-id="goodsId"
:product-type="0"
:preview-key="previewKey"
/>
</div> </div>
<!--编辑标签--> <!--编辑标签-->
<el-dialog <el-dialog
@ -222,7 +519,14 @@
> >
<el-form ref="labelForm" :model="labelForm" @submit.native.prevent> <el-form ref="labelForm" :model="labelForm" @submit.native.prevent>
<el-form-item> <el-form-item>
<el-select v-model="labelForm.sys_labels" clearable filterable multiple placeholder="请选择" class="selWidth"> <el-select
v-model="labelForm.sys_labels"
clearable
filterable
multiple
placeholder="请选择"
class="selWidth"
>
<el-option <el-option
v-for="item in labelList" v-for="item in labelList"
:key="item.id" :key="item.id"
@ -233,7 +537,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm('labelForm')">提交</el-button> <el-button type="primary" @click="submitForm('labelForm')"
>提交</el-button
>
</span> </span>
</el-dialog> </el-dialog>
<!--编辑推荐--> <!--编辑推荐-->
@ -246,8 +552,17 @@
> >
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-form-item label="商品推荐:"> <el-form-item label="商品推荐:">
<el-checkbox-group v-model="recommendGroup" @change="onChangeRecommend" size="small"> <el-checkbox-group
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox> v-model="recommendGroup"
@change="onChangeRecommend"
size="small"
>
<el-checkbox
v-for="(item, index) in recommend"
:key="index"
:label="item.value"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -753,5 +1068,4 @@ table .el-image {
.seachTiele { .seachTiele {
line-height: 35px; line-height: 35px;
} }
</style> </style>