商户分类不必填修改
This commit is contained in:
parent
b7d1f7371d
commit
df1300c23a
@ -5,86 +5,30 @@
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px" :inline="true">
|
||||
<el-form-item label="选择时间:" style="display: inline-block">
|
||||
<el-radio-group
|
||||
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 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-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 label="关键字:" 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-form-item label="关键字:" 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-form-item>
|
||||
<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="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户分类:">
|
||||
<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="店铺类型:">
|
||||
<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="店铺商圈:">
|
||||
@ -102,33 +46,17 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select> -->
|
||||
<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-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-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-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-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button size="small" type="primary" @click="onAdd">添加商户</el-button>
|
||||
</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_name" label="商户名称" min-width="150" />
|
||||
<!--<el-table-column prop="mer_name" label="商户类别" min-width="90">
|
||||
@ -152,36 +80,26 @@
|
||||
<el-table-column prop="mark" label="备注" min-width="200" />
|
||||
<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="否"
|
||||
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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="150" />
|
||||
<el-table-column prop="margin" label="保证金" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.is_margin == 1 ? '未支付' : scope.row.is_margin == 0 ? '无' : '已支付'}}</span>
|
||||
<span>{{
|
||||
scope.row.is_margin == 1
|
||||
? "未支付"
|
||||
: scope.row.is_margin == 0
|
||||
? "无"
|
||||
: "已支付"
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="排序" min-width="100" />
|
||||
|
||||
<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="关闭"
|
||||
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>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="280" fixed="right" align="center">
|
||||
@ -192,31 +110,11 @@
|
||||
>
|
||||
<el-button type="text" size="small" class="mr10">对账</el-button>
|
||||
</router-link>-->
|
||||
<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
|
||||
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 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
|
||||
v-if="tableFrom.status === '1'"
|
||||
type="text"
|
||||
@ -227,105 +125,61 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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>
|
||||
</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-item 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 label="商户分类" :label-width="formLabelWidth" prop="category_id">
|
||||
<el-form-item label="商户分类" :label-width="formLabelWidth" >
|
||||
<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-form-item>
|
||||
<el-form-item label="店铺类型" :label-width="formLabelWidth" prop="type_id">
|
||||
<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-form-item>
|
||||
<el-form-item label="商圈" :label-width="formLabelWidth">
|
||||
<el-cascader v-model="form.info" :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-cascader v-model="form.info2" :options="form.options2" @change="handleChange3($event, form.options2)"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户账号" :label-width="formLabelWidth" prop="mer_account">
|
||||
<el-input
|
||||
v-model="form.mer_account"
|
||||
autocomplete="off"
|
||||
placeholder="请输入商户账号"
|
||||
:disabled="!add"
|
||||
></el-input>
|
||||
<el-input v-model="form.mer_account" autocomplete="off" placeholder="请输入商户账号" :disabled="!add"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="登陆密码" :label-width="formLabelWidth" prop="mer_password">
|
||||
<el-input
|
||||
v-model="form.mer_password"
|
||||
autocomplete="off"
|
||||
placeholder="请输入登陆密码"
|
||||
:disabled="!add"
|
||||
></el-input>
|
||||
<el-input v-model="form.mer_password" autocomplete="off" placeholder="请输入登陆密码" :disabled="!add"></el-input>
|
||||
</el-form-item>
|
||||
<div class="dis">
|
||||
<el-form-item label="已支付的保证金" :label-width="formLabelWidth" class="mer_phone">
|
||||
<el-input
|
||||
v-model="form.paid_margin"
|
||||
style="width:200px"
|
||||
autocomplete="off"
|
||||
placeholder="请输入已支付的保证金"
|
||||
></el-input>
|
||||
<el-form-item 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 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 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>
|
||||
</div>
|
||||
<el-form-item label="首次缴纳保证金" :label-width="formLabelWidth" prop="first_margin">
|
||||
<el-input v-model="form.first_margin" placeholder="请输入首次缴纳保证金" style="width:200px" autocomplete="off"></el-input>
|
||||
<div class="dis">
|
||||
<el-form-item 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 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>
|
||||
</div>
|
||||
<el-form-item label="商户姓名" :label-width="formLabelWidth" prop="real_name">
|
||||
<el-input v-model="form.real_name" autocomplete="off" placeholder="请输入商户姓名"></el-input>
|
||||
</el-form-item>
|
||||
<div class="dis">
|
||||
<el-form-item
|
||||
label="商户手机号"
|
||||
:label-width="formLabelWidth"
|
||||
prop="mer_phone"
|
||||
class="mer_phone"
|
||||
>
|
||||
<el-form-item 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 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-input-number v-model="form.commission_rate" @change="handleChange" :min="0" :max="10" label="描述文字" aria-placeholder="请输入手续费"></el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="商户关键字" :label-width="formLabelWidth" prop="mer_keyword">
|
||||
@ -338,67 +192,26 @@
|
||||
<el-input v-model="form.sub_mchid" autocomplete="off" placeholder="请输入微信分账商户号"></el-input>
|
||||
</el-form-item>
|
||||
<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 label="排序" :label-width="formLabelWidth" prop="sort">
|
||||
<el-input-number v-model="form.sort" @change="handleChange" :min="0" :max="10"></el-input-number>
|
||||
</el-form-item>
|
||||
<div class="switch_btn">
|
||||
<el-form-item 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-switch v-model="form.value1" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item 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-switch v-model="form.value2" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
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 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 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-switch v-model="form.value4" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item 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-switch v-model="form.value5" active-color="#3390ff" active-text="开" inactive-text="关" inactive-color="#DCDFE6"></el-switch>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@ -457,14 +270,15 @@ export default {
|
||||
mer_name: "", //店铺名称
|
||||
category_id: "", //商品分类
|
||||
type_id: "",
|
||||
first_margin:'',//首次支付缴纳保证金
|
||||
info: "", //区
|
||||
info1: "", //街道
|
||||
info2: "", //村
|
||||
area_id: "", //区code
|
||||
street_id: "", //街道code
|
||||
village_id: "", //村id
|
||||
paid_margin: "", //已支付的保证金
|
||||
paid_margin: "", //已缴纳的保证金
|
||||
margin: "", //需缴纳保证金
|
||||
ot_margin: "", //总的保证金额度
|
||||
auto_margin_rate: "", //自动扣除保证金比例
|
||||
options: [],
|
||||
options1: [],
|
||||
@ -492,9 +306,9 @@ export default {
|
||||
{ required: true, message: "请输入商户名称", trigger: "blur" },
|
||||
{ min: 1, max: 30, message: "长度在 1 到 30 个字符", trigger: "blur" }
|
||||
],
|
||||
category_id: [
|
||||
{ required: true, message: "请选择商户分类", trigger: "change" }
|
||||
],
|
||||
// category_id: [
|
||||
// { required: true, message: "请选择商户分类", trigger: "change" }
|
||||
// ],
|
||||
type_id: [
|
||||
{ required: true, message: "请选择商户类型", trigger: "change" }
|
||||
],
|
||||
@ -541,19 +355,18 @@ export default {
|
||||
is_trader: "",
|
||||
category_id: "",
|
||||
type_id: "",
|
||||
area_id:'',
|
||||
street_id:''
|
||||
area_id: '',
|
||||
street_id: ''
|
||||
},
|
||||
autoUpdate: true,
|
||||
timeVal: [],
|
||||
edit:0
|
||||
};
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getshopList();
|
||||
},
|
||||
beforeMount() {},
|
||||
beforeMount() { },
|
||||
mounted() {
|
||||
this.getHeadNum();
|
||||
this.getMerCategory();
|
||||
@ -662,7 +475,11 @@ export default {
|
||||
if (this.add) {
|
||||
//新增商户--merchantCreate
|
||||
try {
|
||||
const res = await merchantCreate(this.form);
|
||||
let f_data = JSON.parse(JSON.stringify(this.form));
|
||||
delete f_data.options;
|
||||
delete f_data.options1;
|
||||
delete f_data.options2;
|
||||
const res = await merchantCreate(f_data);
|
||||
console.log("res", res);
|
||||
if (res.status == 200) {
|
||||
this.open2(res.message);
|
||||
@ -676,7 +493,11 @@ export default {
|
||||
try {
|
||||
console.log(this.form);
|
||||
console.log("id", this.merid);
|
||||
const res = await merchantUpdateA(this.merid, this.form);
|
||||
let f_data = JSON.parse(JSON.stringify(this.form));
|
||||
delete f_data.options;
|
||||
delete f_data.options1;
|
||||
delete f_data.options2;
|
||||
const res = await merchantUpdateA(this.merid, f_data);
|
||||
console.log("res", res);
|
||||
if (res.status == 200) {
|
||||
this.open2(res.message);
|
||||
@ -705,7 +526,7 @@ export default {
|
||||
console.log(value);
|
||||
},
|
||||
//获取商户分类
|
||||
getShopClassify() {},
|
||||
getShopClassify() { },
|
||||
//获取商圈
|
||||
async getshopList() {
|
||||
const data = { city_code: "510500" };
|
||||
@ -748,13 +569,12 @@ export default {
|
||||
},
|
||||
// 获取开启商户数
|
||||
getHeadNum() {
|
||||
console.log('2222222222222')
|
||||
merchantCountApi()
|
||||
.then(res => {
|
||||
this.headeNum[0]["count"] = res.data.valid;
|
||||
this.headeNum[1]["count"] = res.data.invalid;
|
||||
})
|
||||
.catch(res => {});
|
||||
.catch(res => { });
|
||||
},
|
||||
// 商户分类;
|
||||
getMerCategory() {
|
||||
@ -829,16 +649,26 @@ export default {
|
||||
// 添加
|
||||
onAdd() {
|
||||
this.add = true;
|
||||
this.edit=0
|
||||
this.edit = 0;
|
||||
this.popFormVisible = true;
|
||||
this.form.auto_margin_rate = 0; //扣除
|
||||
this.form.paid_margin = "0.00"; //支付的保证金
|
||||
this.form.ot_margin = "0.00"; //总的保证金
|
||||
this.form.margin = ""; //需支付的保证金
|
||||
this.form.area_id = "";
|
||||
this.form.street_id = "";
|
||||
this.form.village_id = "";
|
||||
this.form.info = "";
|
||||
this.form.info1 = "";
|
||||
this.form.info2 = "";
|
||||
// this.$modalForm(merchantCreateApi()).then(() => this.getList(""));
|
||||
},
|
||||
// 编辑
|
||||
async onEdit(id) {
|
||||
this.edit=1
|
||||
//调用获取商圈
|
||||
this.popFormVisible = true; //开启编辑表单
|
||||
this.add = false;
|
||||
this.edit = 1;
|
||||
const promise = await merchantUpdateApi(id);
|
||||
console.log("promise", promise);
|
||||
console.log(this.form);
|
||||
@ -846,7 +676,6 @@ export default {
|
||||
this.merid = res.mer_id;
|
||||
this.form.mer_name = res.mer_name; //商户名称
|
||||
this.form.category_id = res.category_id;
|
||||
this.form.first_margin=res.first_margin;
|
||||
this.form.type_id = res.type_id;
|
||||
this.form.mer_account = res.mer_account;
|
||||
this.form.mer_password = res.mer_password;
|
||||
@ -854,6 +683,8 @@ export default {
|
||||
this.form.mer_phone = res.mer_phone;
|
||||
this.form.auto_margin_rate = res.auto_margin_rate; //扣除
|
||||
this.form.paid_margin = res.paid_margin; //支付的保证金
|
||||
this.form.ot_margin = res.ot_margin; //总的保证金
|
||||
this.form.margin = res.margin; //需支付的保证金
|
||||
this.form.area_id = res.geo_address.area_id;
|
||||
this.form.street_id = res.geo_address.street_id;
|
||||
this.form.village_id = res.geo_address.village_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user