添加:管理后台 - 供应商信息
This commit is contained in:
parent
9a67e86658
commit
f97158e9e7
|
|
@ -1,10 +1,13 @@
|
||||||
import request from './request'
|
import request from './request'
|
||||||
|
|
||||||
// 账号管理 - 添加账号
|
// 供应商信息 - 添加供应商
|
||||||
export function accountCreate(data) {
|
export function accountCreate(data) {
|
||||||
return request.post(`system/supplier/accountCreate`,data)
|
return request.post(`system/supplier/edit_info`,data)
|
||||||
|
}
|
||||||
|
// 供应商信息 - 获取信息
|
||||||
|
export function getSupplierInfo(id) {
|
||||||
|
return request.post(`system/supplier/info/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,79 +3,20 @@
|
||||||
<el-drawer :with-header="false" :size="1000" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
|
<el-drawer :with-header="false" :size="1000" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<!--顶部内容-->
|
<!--顶部内容-->
|
||||||
<div v-if="!isAdd" class="head">
|
<div class="head">
|
||||||
<div class="full">
|
|
||||||
<img class="order_icon" :src="orderImg" alt="" />
|
|
||||||
<div class="text">
|
|
||||||
<div class="title">
|
|
||||||
<span class="bold">{{ merData.mer_name }}</span>
|
|
||||||
<el-tag v-if="merData.is_trader" type="danger" class="tags_name" effect="dark" size="mini">自营</el-tag>
|
|
||||||
<el-tag v-if="merData.merchantType" type="warning" class="tags_name" effect="dark" size="mini">{{merData.merchantType.type_name}}</el-tag>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="mr20">{{ merData.mer_address }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-button
|
|
||||||
v-if="isEdit"
|
|
||||||
size="small"
|
|
||||||
@click="cancelEdit"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="!isEdit"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="merEdit"
|
|
||||||
>编辑</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="isEdit"
|
|
||||||
type="success"
|
|
||||||
size="small"
|
|
||||||
@click="saveInfo"
|
|
||||||
>完成</el-button
|
|
||||||
>
|
|
||||||
<el-dropdown @command="handleCommand">
|
|
||||||
<el-button icon="el-icon-more" size="small"></el-button>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item command="password">修改管理员密码</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item">
|
|
||||||
<div class="title">联系人</div>
|
|
||||||
<div>{{merData.real_name}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div class="title">联系电话</div>
|
|
||||||
<div>{{ merData.mer_phone }}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div class="title">状态</div>
|
|
||||||
<div>{{ merData.status==1 ? '开启' : '关闭' }}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div class="title">入驻时间</div>
|
|
||||||
<div>{{ merData.create_time }}</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div v-else class="head">
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="bold">添加供应商</span>
|
<span class="bold" v-if="isAdd">添加供应商</span>
|
||||||
|
<span class="bold" v-else-if="isEdit">编辑供应商</span>
|
||||||
|
<span class="bold" v-else>查看供应商信息</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--具体内容-->
|
<!--具体内容-->
|
||||||
<supplierEditForm ref="editForm" :supplierId="supplierId" :isAdd="isAdd" :merData="merData" @success="editSuccess" v-if="isEdit || isAdd"></supplierEditForm>
|
<supplierEditForm ref="editForm" :supplierId="supplierId" :isAdd="isAdd" :supplierData="supplierData" @success="editSuccess" v-if="isEdit || isAdd"></supplierEditForm>
|
||||||
<supplierInfo ref="supplierInfo" :merData="merData" v-else-if="!isEdit && !isAdd"></supplierInfo>
|
<supplierInfo ref="supplierInfo" :supplierData="supplierData" v-else-if="!isEdit && !isAdd"></supplierInfo>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isAdd" class="footer">
|
<div class="footer">
|
||||||
<el-button size="small" @click="handleClose">取消</el-button>
|
<el-button size="small" @click="handleClose">取消</el-button>
|
||||||
<el-button type="primary" size="small" @click="submitInfo">提交</el-button>
|
<el-button type="primary" size="small" @click="submitInfo">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -84,9 +25,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { merchantDetail } from '@/api/merchant';
|
|
||||||
import supplierInfo from './supplierInfo';
|
import supplierInfo from './supplierInfo';
|
||||||
import supplierEditForm from './supplierEditForm';
|
import supplierEditForm from './supplierEditForm';
|
||||||
|
import {getSupplierInfo} from "@/api/supplier";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
drawer: {
|
drawer: {
|
||||||
|
|
@ -103,13 +44,13 @@ export default {
|
||||||
isAdd: false,
|
isAdd: false,
|
||||||
direction: 'rtl',
|
direction: 'rtl',
|
||||||
activeName: 'detail',
|
activeName: 'detail',
|
||||||
merData: {},
|
supplierData: {},
|
||||||
orderImg: require('@/assets/images/store_icon.png'),
|
orderImg: require('@/assets/images/store_icon.png'),
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {},
|
filters: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 关闭弹框
|
||||||
handleClose() {
|
handleClose() {
|
||||||
if(this.isEdit || this.isAdd) {
|
if(this.isEdit || this.isAdd) {
|
||||||
this.$refs.editForm.resetData();
|
this.$refs.editForm.resetData();
|
||||||
|
|
@ -119,36 +60,30 @@ export default {
|
||||||
}
|
}
|
||||||
this.$emit('closeDrawer');
|
this.$emit('closeDrawer');
|
||||||
},
|
},
|
||||||
getInfo(id) {
|
// 提交编辑信息
|
||||||
this.supplierId = id
|
submitInfo(){
|
||||||
this.isAdd = false;
|
this.$refs.editForm.submitInfo();
|
||||||
merchantDetail(id)
|
|
||||||
.then((res) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.drawer = true;
|
|
||||||
this.merData = res.data;
|
|
||||||
})
|
|
||||||
.catch((res) => {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
// 信息初始化
|
||||||
initData(){
|
initData(){
|
||||||
this.merData = {
|
this.supplierData = {
|
||||||
is_trader:0
|
is_trader:0
|
||||||
}
|
}
|
||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
this.isAdd = true;
|
this.isAdd = true;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
merEdit(){
|
// 获取供应商信息
|
||||||
this.isEdit = true;
|
getInfo(id) {
|
||||||
this.$nextTick(()=>{
|
this.supplierId = id
|
||||||
this.$refs.editForm.getCategorySelect();
|
this.isAdd = false;
|
||||||
this.getInfo(this.supplierId);
|
getSupplierInfo(id).then((res) => {
|
||||||
})
|
this.loading = false;
|
||||||
},
|
this.drawer = true;
|
||||||
cancelEdit() {
|
this.supplierData = res.data;
|
||||||
this.isEdit = false
|
}).catch((res) => {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 编辑成功回调
|
// 编辑成功回调
|
||||||
editSuccess(){
|
editSuccess(){
|
||||||
|
|
@ -159,19 +94,6 @@ export default {
|
||||||
}
|
}
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
},
|
},
|
||||||
//下拉
|
|
||||||
handleCommand() {
|
|
||||||
this.$emit('onPassword',this.supplierId);
|
|
||||||
},
|
|
||||||
saveInfo(){
|
|
||||||
this.$refs.editForm.onSubmit(this.supplierId);
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.getInfo(this.supplierId);
|
|
||||||
},500)
|
|
||||||
},
|
|
||||||
submitInfo(){
|
|
||||||
this.$refs.editForm.handleCreate();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,194 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form ref="merDataField" size="small" :rules="ruleValidate" :model="merData" label-width="130px" @submit.native.prevent>
|
<div>
|
||||||
<el-tabs v-loading="loading" type="border-card" v-model="activeName">
|
<!--表单-->
|
||||||
<div class="section">
|
<el-form ref="supplierDataField" size="small" :rules="ruleValidate" :model="supplierData" label-width="130px" @submit.native.prevent>
|
||||||
<div class="title">基础信息</div>
|
<el-tabs v-loading="loading" type="border-card" v-model="activeName">
|
||||||
<el-row>
|
<div class="section">
|
||||||
<el-col :span="12">
|
<div class="title">邀请人</div>
|
||||||
<el-form-item label="供应商名称:" prop="supplier_name">
|
<el-row :gutter="24" class="mt20">
|
||||||
<el-input v-model="merData.supplier_name" placeholder="请填写供应商名称" class="selWidth" />
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="选择邀请人:">
|
||||||
</el-col>
|
<el-button size="small" type="primary" @click="showSelectAgent(1)">{{ supplierData.inviteUser ? '变更邀请人' : '选择邀请人' }}</el-button>
|
||||||
<el-col :span="12">
|
</el-form-item>
|
||||||
<el-form-item label="供应商地址:" prop="detailed_address">
|
<el-form-item label="">
|
||||||
<el-input v-model="merData.detailed_address" placeholder="请填写详细地址" class="selWidth" />
|
<div class="user-content" v-if="supplierData.inviteUser">
|
||||||
</el-form-item>
|
<div class="user-avatar">
|
||||||
</el-col>
|
<img :src="supplierData.inviteUser.avatar || moren" />
|
||||||
<el-col :span="12">
|
</div>
|
||||||
<el-form-item label="联系人姓名:" prop="name">
|
<div class="user-info">
|
||||||
<el-input type="text" placeholder="请填写联系人姓名" v-model="merData.name" class="selWidth" />
|
<div class="nickname">{{ supplierData.inviteUser.nickname }}</div>
|
||||||
</el-form-item>
|
<div class="agent-type-text">
|
||||||
</el-col>
|
<el-tag type="info" effect="dark" size="small">{{ supplierData.inviteUser.uid }}</el-tag>
|
||||||
<el-col :span="12">
|
</div>
|
||||||
<el-form-item label="联系电话:" prop="phone">
|
</div>
|
||||||
<el-input placeholder="请填写联系电话" v-model="merData.phone" class="selWidth" />
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
</el-row>
|
||||||
<el-form-item label="供应商邮箱:" prop="email">
|
<div class="title">基础信息</div>
|
||||||
<el-input v-model="merData.email" placeholder="请填写邮箱地址" class="selWidth" />
|
<el-row :gutter="24" class="mt20">
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item label="供应商名称:" prop="supplier_name">
|
||||||
<el-col :span="12">
|
<el-input v-model="supplierData.supplier_name" placeholder="请填写供应商名称" />
|
||||||
<el-form-item label="排序:" prop="sort">
|
</el-form-item>
|
||||||
<el-input-number v-model="merData.sort" controls-position="right" placeholder="请输入排序"/>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item label="供应商地址:" prop="detailed_address">
|
||||||
<el-col :span="12">
|
<el-input v-model="supplierData.detailed_address" placeholder="请填写详细地址" />
|
||||||
<el-form-item label="状态:" prop="is_show">
|
</el-form-item>
|
||||||
<el-switch v-model="merData.is_show" :active-value="1" :inactive-value="0" :width="55" active-text="开启" inactive-text="关闭" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item label="联系人姓名:" prop="name">
|
||||||
<el-col :span="12">
|
<el-input type="text" placeholder="请填写联系人姓名" v-model="supplierData.name" />
|
||||||
<el-form-item label="商品审核:" prop="is_examine">
|
</el-form-item>
|
||||||
<el-switch v-model="merData.is_examine" :active-value="1" :inactive-value="0" :width="50" active-text="是" inactive-text="否" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item label="联系电话:" prop="phone">
|
||||||
<el-col :span="24">
|
<el-input placeholder="请填写联系电话" v-model="supplierData.phone" />
|
||||||
<el-form-item label="备注:" prop="mark">
|
</el-form-item>
|
||||||
<el-input type="textarea" v-model="merData.mark" placeholder="请填写备注" class="selWidth" :maxlength="250" autosize :rows="5" resize="none" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item label="供应商邮箱:" prop="email">
|
||||||
</el-row>
|
<el-input v-model="supplierData.email" placeholder="请填写邮箱地址" />
|
||||||
<div class="title">账号密码</div>
|
</el-form-item>
|
||||||
<el-row :gutter="24" class="mt20">
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="商户账号:" prop="supplier_account">
|
<el-form-item label="排序:" prop="sort">
|
||||||
<el-input type="text" v-model="merData.supplier_account" :disabled="!isAdd" class="selWidth" />
|
<el-input-number v-model="supplierData.sort" controls-position="right" placeholder="请输入排序"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="登陆密码:" prop="supplier_password">
|
<el-form-item label="状态:" prop="is_show">
|
||||||
<el-input type="password" v-model="merData.supplier_password" :disabled="!isAdd" class="selWidth" />
|
<el-switch v-model="supplierData.is_show" :active-value="1" :inactive-value="0" :width="55" active-text="开启" inactive-text="关闭" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
</div>
|
<el-form-item label="商品审核:" prop="is_examine">
|
||||||
</el-tabs>
|
<el-switch v-model="supplierData.is_examine" :active-value="1" :inactive-value="0" :width="50" active-text="是" inactive-text="否" />
|
||||||
</el-form>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注:" prop="mark">
|
||||||
|
<el-input type="textarea" v-model="supplierData.mark" placeholder="请填写备注" :maxlength="250" autosize :rows="5" resize="none" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="title">账号密码</div>
|
||||||
|
<el-row :gutter="24" class="mt20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商户账号:" :prop="isAdd ? 'supplier_account' : ''">
|
||||||
|
<el-input type="text" v-model="supplierData.supplier_account" :disabled="!isAdd"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="登陆密码:" :prop="isAdd ? 'supplier_password' : ''">
|
||||||
|
<el-input type="password" v-model="supplierData.supplier_password" :disabled="!isAdd"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-tabs>
|
||||||
|
</el-form>
|
||||||
|
<!-- 邀请人选择器 -->
|
||||||
|
<el-dialog title="负责人选择" :visible.sync="selectAgentPopupVisible" width="80%" :before-close="closeSelectAgent" :append-to-body="true">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<!--顶部搜索栏-->
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<div class="container">
|
||||||
|
<el-form inline size="small" label-width="80px">
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-input v-model="agentTableFrom.uid" placeholder="请输入用户ID" class="selWidth" clearable />
|
||||||
|
<el-input v-model="agentTableFrom.contact_name" placeholder="请输入联系人姓名" class="selWidth" clearable />
|
||||||
|
<el-input v-model="agentTableFrom.contact_phone" placeholder="请输入联系人电话" class="selWidth" clearable />
|
||||||
|
<el-select v-model="agentTableFrom.agent_type" class="selWidth" >
|
||||||
|
<el-option label="发起人" :value="1"></el-option>
|
||||||
|
<el-option label="省公司" :value="2"></el-option>
|
||||||
|
<el-option label="省合伙人(外勤)" :value="3"></el-option>
|
||||||
|
<el-option label="省合伙人(内勤)" :value="4"></el-option>
|
||||||
|
<el-option label="区县运营商" :value="5"></el-option>
|
||||||
|
<!--<el-option label="区县合伙人" :value="6"></el-option>-->
|
||||||
|
<!--<el-option label="餐厅" :value="7"></el-option>-->
|
||||||
|
<!--<el-option label="配送商" :value="8"></el-option>-->
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button size="small" type="primary" @click="getAgentList(1)">搜索</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--表格信息-->
|
||||||
|
<el-table v-loading="selectAgentLoading" :data="agentTableData.data" style="width: 100%" size="mini">
|
||||||
|
<el-table-column label="负责人" min-width="300" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="user-content">
|
||||||
|
<div class="user-avatar">
|
||||||
|
<img :src="scope.row.user.avatar || moren" />
|
||||||
|
</div>
|
||||||
|
<div class="user-info">
|
||||||
|
<div class="nickname">{{ scope.row.user.nickname }}</div>
|
||||||
|
<div class="agent-type-text">
|
||||||
|
<el-tag type="info" effect="dark" size="small">{{ scope.row.user.uid }}</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 7 && scope.row.mer" type="success" effect="dark" size="small">{{ scope.row.mer.mer_name }}</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 8 && Object.values(scope.row.merList).length > 0" type="success" effect="dark" size="small">
|
||||||
|
{{ scope.row.merList[0].mer_name }}
|
||||||
|
{{ Object.values(scope.row.merList).length > 1 ? '+'+Object.values(scope.row.merList).length : '' }}
|
||||||
|
</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="代理身份" min-width="200" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 1" type="info" effect="dark" size="small">发起人</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 2" type="info" effect="dark" size="small">省公司</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 3" type="info" effect="dark" size="small">省合伙人(外勤)</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 4" type="info" effect="dark" size="small">省合伙人(内勤)</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 5" type="info" effect="dark" size="small">区县运营商</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 6" type="info" effect="dark" size="small">区县合伙人</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 7" type="info" effect="dark" size="small">餐厅</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 8" type="info" effect="dark" size="small">配送商</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="联系人" min-width="200" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.contact_name }}<br />
|
||||||
|
{{ scope.row.contact_phone }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" min-width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="success" effect="dark" @click="selectedAgent(scope.row)">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页-->
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
:page-sizes="[20, 40, 60, 80]"
|
||||||
|
:page-size="agentTableFrom.limit"
|
||||||
|
:current-page="agentTableFrom.page"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="agentTableData.total"
|
||||||
|
@size-change="handleAgentSizeChange"
|
||||||
|
@current-change="pageAgentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeSelectAgent">关 闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { merchantUpdate } from "@/api/merchant";
|
import { merchantUpdate } from "@/api/merchant";
|
||||||
import {accountCreate} from "@/api/supplier";
|
import {accountCreate} from "@/api/supplier";
|
||||||
|
import {agentList} from "@/api/marketing";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
merData: {
|
supplierData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {},
|
default: {},
|
||||||
},
|
},
|
||||||
|
|
@ -85,6 +199,8 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
moren: require("@/assets/images/f.png"),
|
||||||
|
// 代理信息
|
||||||
loading: false,
|
loading: false,
|
||||||
supplierId: '',
|
supplierId: '',
|
||||||
direction: 'rtl',
|
direction: 'rtl',
|
||||||
|
|
@ -108,6 +224,22 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// 用户选择弹框
|
||||||
|
selectAgentPopupVisible: false,
|
||||||
|
selectAgentLoading: true,
|
||||||
|
userListLoading: false,
|
||||||
|
agentTableFrom: {
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
uid: '',
|
||||||
|
contact_name: '',
|
||||||
|
contact_phone: '',
|
||||||
|
agent_type: '',
|
||||||
|
},
|
||||||
|
agentTableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {},
|
filters: {},
|
||||||
|
|
@ -115,37 +247,14 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
resetData(){
|
resetData(){
|
||||||
this.$refs.merDataField.resetFields();
|
this.$refs.supplierDataField.resetFields();
|
||||||
},
|
},
|
||||||
/*提交信息*/
|
// 提交信息
|
||||||
onSubmit(id){
|
submitInfo(){
|
||||||
|
|
||||||
console.log('onSubmit',id)
|
|
||||||
|
|
||||||
return false;
|
|
||||||
|
|
||||||
this.$refs['merDataField'].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.loading = true;
|
|
||||||
merchantUpdate(id,this.merData)
|
|
||||||
.then(async res => {
|
|
||||||
this.$message.success(res.message);
|
|
||||||
this.loading = false;
|
|
||||||
this.$emit('success');
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$message.error(res.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 插件供应商账号
|
|
||||||
handleCreate(){
|
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.$refs['merDataField'].validate((valid) => {
|
_this.$refs['supplierDataField'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
accountCreate(_this.merData).then(async (res) => {
|
accountCreate(_this.supplierData).then(async (res) => {
|
||||||
_this.$message.success(res.message);
|
_this.$message.success(res.message);
|
||||||
_this.$emit('success');
|
_this.$emit('success');
|
||||||
}).catch((res) => {
|
}).catch((res) => {
|
||||||
|
|
@ -153,91 +262,122 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
// 代理商选择器 - 弹框显示
|
||||||
|
showSelectAgent(){
|
||||||
|
this.getAgentList(1);
|
||||||
|
this.selectAgentPopupVisible = true;
|
||||||
|
},
|
||||||
|
// 代理商选择器 - 弹框关闭
|
||||||
|
closeSelectAgent() {
|
||||||
|
this.selectAgentPopupVisible = false;
|
||||||
|
},
|
||||||
|
// 代理商选择器 - 获取列表及分页
|
||||||
|
getAgentList(num){
|
||||||
|
let _this = this;
|
||||||
|
_this.selectAgentLoading = true;
|
||||||
|
_this.agentTableFrom.page = num ? num : _this.agentTableFrom.page;
|
||||||
|
agentList(_this.agentTableFrom)
|
||||||
|
.then((res) => {
|
||||||
|
_this.agentTableData.data = res.data.list;
|
||||||
|
_this.agentTableData.total = res.data.count;
|
||||||
|
_this.selectAgentLoading = false;
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
_this.selectAgentLoading = false;
|
||||||
|
_this.$message.error(res.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pageAgentChange(page) {
|
||||||
|
this.agentTableFrom.page = page;
|
||||||
|
this.getAgentList('');
|
||||||
|
},
|
||||||
|
handleAgentSizeChange(val) {
|
||||||
|
this.agentTableFrom.limit = val;
|
||||||
|
this.getAgentList('');
|
||||||
|
},
|
||||||
|
// 代理商选择器 - 选中用户
|
||||||
|
selectedAgent(item){
|
||||||
|
this.supplierData.inviteUser = item.user || {};
|
||||||
|
this.supplierData.invite_uid = item.uid;
|
||||||
|
this.supplierData.invite_agent_id = item.id;
|
||||||
|
this.closeSelectAgent();
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.selWidth{
|
.selWidth{
|
||||||
width: 100%;
|
margin-bottom: 10px!important;
|
||||||
}
|
}
|
||||||
.el-tabs--border-card {
|
.user-content{
|
||||||
box-shadow: none;
|
--user-content-height-: 80px;
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.section {
|
|
||||||
padding: 20px 0 5px;
|
|
||||||
border-bottom: 1px dashed #eeeeee;
|
|
||||||
.title {
|
|
||||||
padding-left: 10px;
|
|
||||||
border-left: 3px solid #437FFD;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 15px;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
.list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.item {
|
|
||||||
flex: 0 0 calc(100% / 2);
|
|
||||||
display: flex;
|
|
||||||
margin-top: 16px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #606266;
|
|
||||||
|
|
||||||
&:nth-child(2n + 1) {
|
height: var(--user-content-height-);
|
||||||
padding-right: 20px;
|
width: 100%;
|
||||||
padding-left: 20px;
|
display: inline-flex;
|
||||||
}
|
flex-direction: row;
|
||||||
&:nth-child(2n) {
|
flex-wrap: nowrap;
|
||||||
padding-right: 20px;
|
justify-content: flex-start;
|
||||||
}
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
flex: 1;
|
|
||||||
image {
|
|
||||||
display: inline-block;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
margin: 0 12px 12px 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-red{
|
|
||||||
color: red;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
/deep/.el-input-number.is-controls-right .el-input__inner{
|
|
||||||
padding: 0 40px 0 10px;
|
|
||||||
}
|
|
||||||
/deep/.el-form-item__label{
|
|
||||||
font-weight: normal;
|
|
||||||
color: #282828;
|
|
||||||
}
|
|
||||||
.tab {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.el-image {
|
.user-avatar{
|
||||||
width: 36px;
|
height: var(--user-content-height-);
|
||||||
height: 36px;
|
width: var(--user-content-height-);
|
||||||
margin-right: 10px;
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
height: 80%!important;
|
||||||
|
width: 80%!important;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-info{
|
||||||
|
max-width: calc(100% - var(--user-content-height-));
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
.nickname{
|
||||||
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.user-id{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #409eff;
|
||||||
|
border-color: #409eff;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: max-content!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-id{
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: calc(var(--user-content-height- * 35%));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/deep/.el-drawer__body {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.gary {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
.input-tips{
|
|
||||||
font-size: 12px;
|
|
||||||
margin-left: 180px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: #9d9d9d;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,310 +1,185 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs type="border-card" v-model="activeName">
|
<el-form ref="supplierDataField" size="small" :model="supplierData" label-width="130px" @submit.native.prevent>
|
||||||
<el-tab-pane label="基本信息" name="detail">
|
<el-tabs type="border-card" v-model="activeName">
|
||||||
<div class="section">
|
<el-tab-pane label="基本信息" name="detail">
|
||||||
<div class="title">基础信息</div>
|
<div class="section">
|
||||||
<ul class="list">
|
<div class="title">邀请人</div>
|
||||||
<li class="item">
|
<el-row :gutter="24" class="mt20">
|
||||||
<div>商户名称:</div>
|
<el-col :span="12">
|
||||||
<div class="value">
|
<el-form-item label="邀请人:">
|
||||||
{{merData.mer_name}}
|
<div class="user-content" v-if="supplierData.inviteUser">
|
||||||
</div>
|
<div class="user-avatar">
|
||||||
</li>
|
<img :src="supplierData.inviteUser.avatar || moren" />
|
||||||
<li class="item">
|
</div>
|
||||||
<div>商户类型:</div>
|
<div class="user-info">
|
||||||
<div class="value">{{merData.is_trader == 1 ? "自营" : "非自营"}}</div>
|
<div class="nickname">{{ supplierData.inviteUser.nickname }}</div>
|
||||||
</li>
|
<div class="agent-type-text">
|
||||||
<li class="item">
|
<el-tag type="info" effect="dark" size="small">{{ supplierData.inviteUser.uid }}</el-tag>
|
||||||
<div>商户分类:</div>
|
</div>
|
||||||
<div v-if="merData.merchantCategory" class="value">
|
</div>
|
||||||
{{merData.merchantCategory.category_name}}
|
</div>
|
||||||
<span class="info info-red">(该分类下的商户手续费是{{merData.merchantCategory.commission_rate*100}}%)</span>
|
</el-form-item>
|
||||||
</div>
|
</el-col>
|
||||||
</li>
|
</el-row>
|
||||||
<li class="item">
|
<div class="title">基础信息</div>
|
||||||
<div>推荐商户:</div>
|
<el-row :gutter="24" class="mt20">
|
||||||
<div class="value">{{merData.is_best == 1 ? "是" : "否"}}</div>
|
<el-col :span="12">
|
||||||
</li>
|
<el-form-item label="供应商名称:">
|
||||||
<li v-if="merData.merchantType" class="item">
|
<el-input :value="supplierData.supplier_name" readonly disabled />
|
||||||
<div>店铺类型:</div>
|
</el-form-item>
|
||||||
<div class="value">{{merData.merchantType.type_name}}</div>
|
</el-col>
|
||||||
</li>
|
<el-col :span="12">
|
||||||
<li class="item">
|
<el-form-item label="供应商地址:">
|
||||||
<div>商户状态:</div>
|
<el-input :value="supplierData.detailed_address" readonly disabled />
|
||||||
<div class="value">{{merData.status == 1 ? "开启" : "关闭"}}</div>
|
</el-form-item>
|
||||||
</li>
|
</el-col>
|
||||||
<li class="item">
|
<el-col :span="12">
|
||||||
<div>排序:</div>
|
<el-form-item label="联系人姓名:">
|
||||||
<div class="value">{{merData.sort}}</div>
|
<el-input type="text" :value="supplierData.name" readonly disabled />
|
||||||
</li>
|
</el-form-item>
|
||||||
<li class="item">
|
</el-col>
|
||||||
<div>更新时间:</div>
|
<el-col :span="12">
|
||||||
<div class="value">{{merData.update_time}}</div>
|
<el-form-item label="联系电话:">
|
||||||
</li>
|
<el-input :value="supplierData.phone" readonly disabled/>
|
||||||
<li class="item">
|
</el-form-item>
|
||||||
<div>备注:</div>
|
</el-col>
|
||||||
<div class="value">{{merData.mark}}</div>
|
<el-col :span="12">
|
||||||
</li>
|
<el-form-item label="供应商邮箱:">
|
||||||
<li class="item">
|
<el-input :value="supplierData.email" readonly disabled/>
|
||||||
<div>人均消费额:</div>
|
</el-form-item>
|
||||||
<div class="value">{{merData.avg_consumption}}</div>
|
</el-col>
|
||||||
</li>
|
<el-col :span="12">
|
||||||
<li class="item">
|
<el-form-item label="排序:">
|
||||||
<div>商户标签:</div>
|
<el-input :value="supplierData.sort" readonly disabled/>
|
||||||
<div class="value">{{merData.mer_label}}</div>
|
</el-form-item>
|
||||||
</li>
|
</el-col>
|
||||||
</ul>
|
<el-col :span="12">
|
||||||
</div>
|
<el-form-item label="状态:">
|
||||||
</el-tab-pane>
|
<el-input :value="supplierData.is_show == 1 ? '开启' : '关闭'" readonly disabled/>
|
||||||
<el-tab-pane label="经营信息" name="operate">
|
</el-form-item>
|
||||||
<div class="section">
|
</el-col>
|
||||||
<div class="title">费用信息</div>
|
<el-col :span="12">
|
||||||
<ul class="list">
|
<el-form-item label="商品审核:">
|
||||||
<li class="item item100">
|
<el-input :value="supplierData.is_examine == 1 ? '需要审核' : '无需审核'" readonly disabled/>
|
||||||
<div>商户手续费单独设置:</div>
|
</el-form-item>
|
||||||
<div class="value">
|
</el-col>
|
||||||
{{merData.commission_switch ? "开启" : "关闭"}}
|
<el-col :span="24">
|
||||||
</div>
|
<el-form-item label="备注:">
|
||||||
</li>
|
<el-input type="textarea" :value="supplierData.mark" readonly disabled :maxlength="250" autosize :rows="5" resize="none" />
|
||||||
<li v-if="merData.commission_switch" class="item item100">
|
</el-form-item>
|
||||||
<div>商户手续费:</div>
|
</el-col>
|
||||||
<div class="value">
|
</el-row>
|
||||||
{{ merData.commission_rate}}%
|
</div>
|
||||||
<span class="info info-red">(注:此处如未设置手续费,系统会自动读取商户分类下对应手续费;此处已设置,则优先以此处设置为准)</span>
|
</el-tab-pane>
|
||||||
</div>
|
<el-tab-pane label="账号信息" name="account">
|
||||||
</li>
|
<div class="section">
|
||||||
<li class="item">
|
<div class="title">账号密码</div>
|
||||||
<div>店铺保证金:</div>
|
<el-row :gutter="24" class="mt20">
|
||||||
<div class="value">
|
<el-col :span="12">
|
||||||
{{merData.is_margin == 0 ? '无' : merData.ot_margin}}
|
<el-form-item label="商户账号:">
|
||||||
</div>
|
<el-input type="text" :value="supplierData.supplier_account" readonly disabled/>
|
||||||
</li>
|
</el-form-item>
|
||||||
<li v-if="merData.is_margin != 0" class="item">
|
</el-col>
|
||||||
<div>保证金支付状态:</div>
|
<el-col :span="12">
|
||||||
<div class="value">{{merData.is_margin == 1 ? '待缴' : merData.is_margin == 0 ? '无' : '已缴' }}
|
<el-form-item label="登陆密码:">
|
||||||
<span v-if="(merData.is_margin==10 && merData.margin-merData.ot_margin<0)" class="info-red">(需补缴)</span>
|
<el-input type="password" :value="supplierData.supplier_password" readonly disabled/>
|
||||||
</div>
|
</el-form-item>
|
||||||
</li>
|
</el-col>
|
||||||
<li v-if="merData.is_margin != 0" class="item">
|
</el-row>
|
||||||
<div>保证金余额:</div>
|
</div>
|
||||||
<div class="value">{{merData.margin}}</div>
|
</el-tab-pane>
|
||||||
</li>
|
</el-tabs>
|
||||||
</ul>
|
</el-form>
|
||||||
</div>
|
|
||||||
<div class="section">
|
|
||||||
<div class="title">审核信息</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item">
|
|
||||||
<div>商品审核:</div>
|
|
||||||
<div class="value">{{merData.is_audit == 1 ? '需审核' : '免审核'}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>直播间审核:</div>
|
|
||||||
<div class="value">{{merData.is_bro_room == 1 ? '需审核' : '免审核'}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>直播间商品审核:</div>
|
|
||||||
<div class="value">{{merData.is_bro_goods == 1 ? '需审核' : '免审核'}}</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="section">
|
|
||||||
<div class="title">其他信息</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item item100">
|
|
||||||
<div>搜索商户关键字:</div>
|
|
||||||
<div class="value">{{merData.mer_keyword}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item item100">
|
|
||||||
<div>剩余商品采集数:</div>
|
|
||||||
<div class="value">{{merData.copy_product_num}}次</div>
|
|
||||||
</li>
|
|
||||||
<li class="item item100">
|
|
||||||
<div>商户资质:</div>
|
|
||||||
<div class="value">
|
|
||||||
<el-image
|
|
||||||
v-for="(item, index) in merData.mer_certificate"
|
|
||||||
:key="index"
|
|
||||||
:src="item"
|
|
||||||
@click="lookImg(item)"
|
|
||||||
style="width: 36px;height: 36px;margin-right: 5px;"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="账号信息" name="account">
|
|
||||||
<div class="section">
|
|
||||||
<div class="title">登录账号</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item">
|
|
||||||
<div>商户账号:</div>
|
|
||||||
<div class="value">
|
|
||||||
{{merData.mer_account}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>登录密码:</div>
|
|
||||||
<div class="value">{{merData.mer_password}}</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>联系人:</div>
|
|
||||||
<div class="value">{{merData.real_name}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>联系电话:</div>
|
|
||||||
<div class="value">{{merData.mer_phone}}</div>
|
|
||||||
</li>
|
|
||||||
<!-- <li class="item">
|
|
||||||
<div>绑定手机号:</div>
|
|
||||||
<div class="value">{{merData.real_name}}</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>绑定微信用户昵称/ID:</div>
|
|
||||||
<div class="value">{{merData.real_name}}</div>
|
|
||||||
</li> -->
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div v-if="merData.sub_mchid" class="section">
|
|
||||||
<div class="title">财务帐号</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item">
|
|
||||||
<div>微信分账商户号:</div>
|
|
||||||
<div class="value">{{merData.sub_mchid}}</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="积分设置" name="integral">
|
|
||||||
<div class="section">
|
|
||||||
<div class="title">登录账号</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li class="item">
|
|
||||||
<div>商户积分兑换平台积分比例:</div>
|
|
||||||
<div class="value">
|
|
||||||
1 : {{merData.mer_integral_platform_rate}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="item">
|
|
||||||
<div>平台积分转换商户积分比例:</div>
|
|
||||||
<div class="value">{{merData.mer_integral_merchant_rate}} : 1</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<div class="images" v-show="false" v-viewer="{ movable: false }">
|
|
||||||
<img v-for="(src,index) in merData.mer_certificate" :src="src" :key="index" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
merData: {
|
supplierData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {},
|
default: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
|
||||||
supplierId: '',
|
|
||||||
direction: 'rtl',
|
|
||||||
activeName: 'detail',
|
activeName: 'detail',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {},
|
||||||
},
|
methods: {},
|
||||||
methods: {
|
|
||||||
lookImg(item) {
|
|
||||||
this.imageUrl = item;
|
|
||||||
const viewer = this.$el.querySelector('.images').$viewer;
|
|
||||||
viewer.show();
|
|
||||||
this.$nextTick(() => {
|
|
||||||
let i = this.merData.mer_certificate.findIndex((e) => e === item);
|
|
||||||
viewer.update().view(i);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-tabs--border-card {
|
.selWidth{
|
||||||
box-shadow: none;
|
margin-bottom: 10px!important;
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.section {
|
|
||||||
padding: 20px 0 5px;
|
|
||||||
border-bottom: 1px dashed #eeeeee;
|
|
||||||
.title {
|
|
||||||
padding-left: 10px;
|
|
||||||
border-left: 3px solid #437FFD;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 15px;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
.list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.item {
|
|
||||||
flex: 0 0 calc(100% / 2);
|
|
||||||
display: flex;
|
|
||||||
margin-top: 16px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #606266;
|
|
||||||
padding-right: 20px;
|
|
||||||
padding-left: 20px;
|
|
||||||
&.item100{
|
|
||||||
flex: 0 0 calc(100% / 1);
|
|
||||||
padding-right: 20px;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
&:nth-child(2n + 1) {
|
|
||||||
padding-right: 20px;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
// &:nth-child(2n) {
|
|
||||||
// padding-right: 20px;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
flex: 1;
|
|
||||||
image {
|
|
||||||
display: inline-block;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
margin: 0 12px 12px 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-red{
|
|
||||||
color: red;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.tab {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.el-image {
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/deep/.el-drawer__body {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.gary {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
}
|
||||||
|
.user-content{
|
||||||
|
--user-content-height-: 80px;
|
||||||
|
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: 100%;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.user-avatar{
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
height: 80%!important;
|
||||||
|
width: 80%!important;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-info{
|
||||||
|
max-width: calc(100% - var(--user-content-height-));
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
.nickname{
|
||||||
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.user-id{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #409eff;
|
||||||
|
border-color: #409eff;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: max-content!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-id{
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: calc(var(--user-content-height- * 35%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -26,78 +26,55 @@
|
||||||
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
<el-button size="small" type="primary" @click="getList(1)">搜索</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">
|
||||||
|
<el-table-column prop="id" label="ID" min-width="50" />
|
||||||
|
<el-table-column label="供应商名称" prop="supplier_name" min-width="150" align="center"/>
|
||||||
|
<el-table-column label="联系人" min-width="120" align="center">
|
||||||
|
|
||||||
|
|
||||||
<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="status" label="推荐" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
{{ scope.row.name }}<br />
|
||||||
v-model="scope.row.is_best"
|
{{ scope.row.phone }}
|
||||||
: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="status" label="开启/关闭" min-width="100">
|
<el-table-column label="邀请人信息" min-width="280" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<div class="user-content" v-if="scope.row.inviteUser">
|
||||||
v-model="scope.row.status"
|
<div class="user-avatar">
|
||||||
:active-value="1"
|
<img :src="scope.row.inviteUser.avatar || moren" />
|
||||||
:inactive-value="0"
|
</div>
|
||||||
active-text="开启"
|
<div class="user-info">
|
||||||
inactive-text="关闭"
|
<div class="nickname">
|
||||||
disabled
|
{{ scope.row.inviteUser.nickname }}
|
||||||
@click.native="onchangeIsClose(scope.row)"
|
<div class="user-id">{{ scope.row.inviteUser.uid }}</div>
|
||||||
/>
|
</div>
|
||||||
|
<div class="agent-type-text">
|
||||||
|
<!--角色信息-->
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 1" type="info" effect="dark" size="small">发起人</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 2" type="info" effect="dark" size="small">省公司</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 3" type="info" effect="dark" size="small">省合伙人(外勤)</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 4" type="info" effect="dark" size="small">省合伙人(内勤)</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 5" type="info" effect="dark" size="small">区县运营商</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 6" type="info" effect="dark" size="small">区县合伙人</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 7" type="info" effect="dark" size="small">餐厅</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.agent_type) == 8" type="info" effect="dark" size="small">配送商</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="create_time" label="创建时间" min-width="150" />
|
<el-table-column label="状态" min-width="60" align="center">
|
||||||
<el-table-column prop="margin" label="保证金" min-width="150">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.is_margin == 1 ? '未支付' : scope.row.is_margin == 0 ? '无' : '已支付'}}</span>
|
<el-tag v-if="scope.row.is_show == 1" type="success" effect="dark" size="small">开启</el-tag>
|
||||||
|
<el-tag v-else type="danger" effect="dark" size="small">关闭</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sort" label="排序" min-width="100" />
|
<el-table-column label="创建时间" prop="add_time" min-width="150" align="center"/>
|
||||||
<el-table-column prop="mark" label="备注" min-width="200" />
|
<el-table-column label="排序" prop="sort" min-width="50" align="center"/>
|
||||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
<el-table-column label="操作" min-width="200" fixed="right" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <router-link
|
<!--<el-button v-if="tableFrom.status === '1'" type="text" size="small" @click="onLogo(scope.row.id)">登录</el-button>-->
|
||||||
v-if="tableFrom.status === '1'"
|
<el-button type="text" size="small" @click="onEdit(scope.row.id)">编辑</el-button>
|
||||||
:to="{path: roterPre+ '/merchant/list/reconciliation/' + scope.row.mer_id + '/1' }"
|
<el-button type="text" size="small" @click="onDetails(scope.row.id)">详情</el-button>
|
||||||
>
|
<!--<el-button v-if="tableFrom.status === '0'" type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)">删除</el-button>-->
|
||||||
<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 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 === '1'"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
@click="onDeduct(scope.row.mer_id)"
|
|
||||||
>扣除保证金</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -129,6 +106,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import supplierDetail from './handle/supplierDetails.vue';
|
import supplierDetail from './handle/supplierDetails.vue';
|
||||||
|
import {supplierList} from "@/api/supplier";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -151,7 +130,7 @@ import { fromList } from "@/libs/constants.js";
|
||||||
import { roterPre } from "@/settings";
|
import { roterPre } from "@/settings";
|
||||||
import SettingMer from "@/libs/settingMer";
|
import SettingMer from "@/libs/settingMer";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import {supplierList} from "@/api/supplier";
|
|
||||||
export default {
|
export default {
|
||||||
name: "SupplierList",
|
name: "SupplierList",
|
||||||
components: { supplierDetail },
|
components: { supplierDetail },
|
||||||
|
|
@ -193,7 +172,6 @@ export default {
|
||||||
title: "已关闭商户"
|
title: "已关闭商户"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
autoUpdate: true,
|
autoUpdate: true,
|
||||||
supplierId: "",
|
supplierId: "",
|
||||||
drawer: false,
|
drawer: false,
|
||||||
|
|
@ -201,10 +179,13 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getList("");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.getHeadNum();
|
this.getHeadNum();
|
||||||
this.getMerCategory();
|
this.getMerCategory();
|
||||||
this.getStoreType();
|
this.getStoreType();
|
||||||
this.getList("");
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 添加供应商
|
// 添加供应商
|
||||||
|
|
@ -296,7 +277,7 @@ export default {
|
||||||
onchangeIsShow(row) {
|
onchangeIsShow(row) {
|
||||||
const title = row.is_best === 0 ? "是否开启推荐商户" : "是否关闭推荐商户";
|
const title = row.is_best === 0 ? "是否开启推荐商户" : "是否关闭推荐商户";
|
||||||
this.$modalSure(title).then(() => {
|
this.$modalSure(title).then(() => {
|
||||||
merchantStatuseApi(row.mer_id, row.is_best === 1 ? 0 : 1)
|
merchantStatuseApi(row.id, row.is_best === 1 ? 0 : 1)
|
||||||
.then(({ message }) => {
|
.then(({ message }) => {
|
||||||
this.$message.success(message);
|
this.$message.success(message);
|
||||||
this.getList("");
|
this.getList("");
|
||||||
|
|
@ -308,7 +289,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 开启关闭
|
// 开启关闭
|
||||||
onchangeIsClose(row) {
|
onchangeIsClose(row) {
|
||||||
merchantIsCloseApi(row.mer_id, row.status === 1 ? 0 : 1)
|
merchantIsCloseApi(row.id, row.status === 1 ? 0 : 1)
|
||||||
.then(({ message }) => {
|
.then(({ message }) => {
|
||||||
this.$message.success(message);
|
this.$message.success(message);
|
||||||
this.getList("");
|
this.getList("");
|
||||||
|
|
@ -324,7 +305,6 @@ export default {
|
||||||
this.$refs.supplierDetail.isEdit = true;
|
this.$refs.supplierDetail.isEdit = true;
|
||||||
this.$refs.supplierDetail.getInfo(id);
|
this.$refs.supplierDetail.getInfo(id);
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
|
|
||||||
},
|
},
|
||||||
// 详情
|
// 详情
|
||||||
onDetails(id) {
|
onDetails(id) {
|
||||||
|
|
@ -357,7 +337,74 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.user-content{
|
||||||
|
--user-content-height-: 80px;
|
||||||
|
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: 100%;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.user-avatar{
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
height: 80%!important;
|
||||||
|
width: 80%!important;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-info{
|
||||||
|
max-width: calc(100% - var(--user-content-height-));
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
.nickname{
|
||||||
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.user-id{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #409eff;
|
||||||
|
border-color: #409eff;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: max-content!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-id{
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: calc(var(--user-content-height- * 35%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,624 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="divBox">
|
|
||||||
<el-card class="box-card mb20">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<router-link v-if="$route.params.type === '1'" :to="{path:roterPre+'/merchant/list'}">
|
|
||||||
<el-button size="mini" class="mr20 mb20" icon="el-icon-back">返回</el-button>
|
|
||||||
</router-link>
|
|
||||||
<router-link v-else :to="{path:roterPre+'/accounts/reconciliation'}">
|
|
||||||
<el-button size="mini" class="mr20 mb20" icon="el-icon-back">返回</el-button>
|
|
||||||
</router-link>
|
|
||||||
<div v-if="$route.params.type === '1'" class="filter-container">
|
|
||||||
<el-form :inline="true">
|
|
||||||
<el-form-item label="使用状态:" class="mr20">
|
|
||||||
<el-select v-model="tableFrom.status" placeholder="请选择评价状态" @change="init">
|
|
||||||
<el-option label="全部" value="" />
|
|
||||||
<el-option label="未对账" value="0" />
|
|
||||||
<el-option label="已对账" value="1" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="时间选择:" class="mr10">
|
|
||||||
<el-date-picker v-model="timeVal" type="daterange" align="right" unlink-panels format="yyyy 年 MM 月 dd 日" value-format="yyyy/MM/dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" @change="onchangeTime" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-button v-if="$route.params.type === '1'" size="small" type="primary" @click="onAdd(0)">商户对账</el-button>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini" class="table" highlight-current-row>
|
|
||||||
<el-table-column type="expand">
|
|
||||||
<template slot-scope="props">
|
|
||||||
<el-form label-position="left" inline class="demo-table-expand demo-table-expands">
|
|
||||||
<el-form-item label="收货人:">
|
|
||||||
<span>{{ props.row.real_name | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电话:">
|
|
||||||
<span>{{ props.row.user_phone | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="地址:">
|
|
||||||
<span>{{ props.row.user_address | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品总数:">
|
|
||||||
<span>{{ props.row.total_num | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="支付状态:">
|
|
||||||
<span>{{ props.row.pay_type | payTypeFilter }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="支付时间:">
|
|
||||||
<span>{{ props.row.pay_time | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="对账备注:">
|
|
||||||
<span>{{ props.row.admin_mark }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="$route.params.type === '1'" width="50">
|
|
||||||
<template slot="header" slot-scope="scope">
|
|
||||||
<el-popover placement="top-start" width="100" trigger="hover" class="tabPop">
|
|
||||||
<div>
|
|
||||||
<span class="spBlock onHand" :class="{'check': chkName === 'dan'}" @click="onHandle('dan',scope.$index)">选中本页</span>
|
|
||||||
<span class="spBlock onHand" :class="{'check': chkName === 'duo'}" @click="onHandle('duo')">选中全部</span>
|
|
||||||
</div>
|
|
||||||
<el-checkbox slot="reference" :value="(chkName === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkName === 'duo'" @change="changeType" />
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-checkbox :value="checkedIds.indexOf(scope.row.order_id) > -1 || (chkName === 'duo' && noChecked.indexOf(scope.row.order_id) === -1)" @change="(v)=>changeOne(v,scope.row)" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="order_id" label="ID" width="60" />
|
|
||||||
<el-table-column label="是否对账" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.reconciliation_id | reconciliationFilter }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="order_sn" label="订单编号" min-width="190" />
|
|
||||||
<el-table-column label="商品信息" min-width="330">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div v-for="(val, i ) in scope.row.orderProduct" :key="i" class="tabBox acea-row row-middle">
|
|
||||||
<div class="demo-image__preview">
|
|
||||||
<el-image :src="val.cart_info.product.image" :preview-src-list="[val.cart_info.product.image]" />
|
|
||||||
</div>
|
|
||||||
<span class="tabBox_tit">{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
|
|
||||||
<span class="tabBox_pice">{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品总价" min-width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ getTotal(scope.row.orderProduct) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="pay_price" label="实际支付" min-width="100" />
|
|
||||||
<el-table-column label="佣金金额" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="total_postage" label="邮费" min-width="100" />
|
|
||||||
<el-table-column prop="order_rate" label="手续费" min-width="100" />
|
|
||||||
<el-table-column prop="create_time" label="下单时间" min-width="150" />
|
|
||||||
<el-table-column v-if="$route.params.type === '1'" label="操作" min-width="80" fixed="right" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="text" size="small" @click="addMark(scope.row.order_id)">添加备注</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="block mb20">
|
|
||||||
<el-pagination :page-sizes="[10, 20, 30, 40]" :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-card class="box-card">
|
|
||||||
<el-table v-loading="listLoading" :data="tableDataRefund.data" style="width: 100%" size="mini" class="table" highlight-current-row>
|
|
||||||
<el-table-column type="expand">
|
|
||||||
<template slot-scope="props">
|
|
||||||
<el-form label-position="left" inline class="demo-table-expand">
|
|
||||||
<el-form-item label="订单号:">
|
|
||||||
<span>{{ props.row.order.order_sn }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款商品总价:">
|
|
||||||
<span>{{ getTotalRefund(props.row.refundProduct) }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款商品总数:">
|
|
||||||
<span>{{ props.row.refund_num }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="申请退款时间:">
|
|
||||||
<span>{{ props.row.create_time | filterEmpty }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="对账备注:">
|
|
||||||
<span>{{ props.row.admin_mark }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="$route.params.type === '1'" width="50">
|
|
||||||
<template slot="header" slot-scope="scope">
|
|
||||||
<el-popover placement="top-start" width="100" trigger="hover" class="tabPop">
|
|
||||||
<div>
|
|
||||||
<span class="spBlock onHand" :class="{'check': chkNameRefund === 'dan'}" @click="onHandleRefund('dan',scope.$index)">选中本页</span>
|
|
||||||
<span class="spBlock onHand" :class="{'check': chkNameRefund === 'duo'}" @click="onHandleRefund('duo')">选中全部</span>
|
|
||||||
</div>
|
|
||||||
<el-checkbox slot="reference" :value="(chkNameRefund === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkNameRefund === 'duo'" @change="changeTypeRefund" />
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
<!--:disabled="isDisabled"-->
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-checkbox :value="refundCheckedIds.indexOf(scope.row.refund_order_id) > -1 || (chkNameRefund === 'duo' && refundNoChecked.indexOf(scope.row.refund_order_id) === -1)" @change="(v)=>changeOneRefund(v,scope.row)" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="refund_order_id" label="ID" width="60" />
|
|
||||||
<el-table-column label="退款单号" min-width="170">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="display: block;" v-text="scope.row.refund_order_sn" />
|
|
||||||
<span v-show="scope.row.is_del > 0" style="color: #ED4014;display: block;">用户已删除</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否对账" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.reconciliation_id | reconciliationFilter }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="user.nickname" label="用户信息" min-width="130" />
|
|
||||||
<el-table-column prop="refund_price" label="退款金额" min-width="130" />
|
|
||||||
<el-table-column prop="nickname" label="商品信息" min-width="330">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div v-for="(val, i ) in scope.row.refundProduct" :key="i" class="tabBox acea-row row-middle">
|
|
||||||
<div class="demo-image__preview">
|
|
||||||
<el-image :src="val.product.cart_info.product.image" :preview-src-list="[val.product.cart_info.product.image]" />
|
|
||||||
</div>
|
|
||||||
<span class="tabBox_tit">{{ val.product.cart_info.product.store_name + ' | ' }}{{ val.product.cart_info.productAttr.sku }}</span>
|
|
||||||
<span class="tabBox_pice">{{ '¥'+ val.product.cart_info.productAttr.price + ' x '+ val.product.product_num }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="serviceScore" label="订单状态" min-width="250">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="display: block">{{ scope.row.status | orderRefundFilter }}</span>
|
|
||||||
<span style="display: block">退款原因:{{ scope.row.refund_message }}</span>
|
|
||||||
<!--<p>备注说明:{{scope.row.mark}}</p>-->
|
|
||||||
<span style="display: block">状态变更时间:{{ scope.row.status_time }}</span>
|
|
||||||
<!--<p>备注凭证:{{}}</p>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="$route.params.type === '1'" key="10" label="操作" min-width="80" fixed="right" align="center">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="text" size="small" @click="onOrderMark(scope.row.refund_order_id)">订单备注</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="block">
|
|
||||||
<el-pagination :page-sizes="[10, 20, 30, 40]" :page-size="tableFrom.limit" :current-page="tableFrom.page" layout="total, sizes, prev, pager, next, jumper" :total="tableDataRefund.total" @size-change="handleSizeChangeRefund" @current-change="pageChangeRefund" />
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {
|
|
||||||
merOrderListApi,
|
|
||||||
refundOrderListApi,
|
|
||||||
orderMarkApi,
|
|
||||||
refundMarkApi,
|
|
||||||
reconciliationApi
|
|
||||||
} from '@/api/merchant'
|
|
||||||
import {
|
|
||||||
reconciliationOrderApi,
|
|
||||||
reconciliationRefundApi
|
|
||||||
} from '@/api/accounts'
|
|
||||||
import {
|
|
||||||
roterPre
|
|
||||||
} from '@/settings'
|
|
||||||
export default {
|
|
||||||
name: 'Record',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
roterPre: roterPre,
|
|
||||||
chkName: '',
|
|
||||||
chkNameRefund: '',
|
|
||||||
isIndeterminate: true,
|
|
||||||
resource: [],
|
|
||||||
visible: false,
|
|
||||||
timeVal: [],
|
|
||||||
pickerOptions: {
|
|
||||||
shortcuts: [{
|
|
||||||
text: '最近一周',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date()
|
|
||||||
const start = new Date()
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
||||||
picker.$emit('pick', [start, end])
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
text: '最近一个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date()
|
|
||||||
const start = new Date()
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
||||||
picker.$emit('pick', [start, end])
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
text: '最近三个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date()
|
|
||||||
const start = new Date()
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
||||||
picker.$emit('pick', [start, end])
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
listLoading: true,
|
|
||||||
tableData: {
|
|
||||||
data: [],
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
tableDataRefund: {
|
|
||||||
data: [],
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
tableFrom: {
|
|
||||||
page: 1,
|
|
||||||
limit: 10,
|
|
||||||
date: '',
|
|
||||||
status: ''
|
|
||||||
},
|
|
||||||
ids: [],
|
|
||||||
idsRefund: [],
|
|
||||||
checkedPage: [],
|
|
||||||
checkedIds: [], // 订单当前页选中的数据
|
|
||||||
noChecked: [], // 订单全选状态下当前页不选中的数据
|
|
||||||
refundCheckedIds: [], // 退款单当前页选中的数据
|
|
||||||
refundNoChecked: [] // 退款单全选状态下当前页不选中的数据
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.init()
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.tempRoute = Object.assign({}, this.$route)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isDisabled(row) {
|
|
||||||
if (row.status !== 3) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
init() {
|
|
||||||
this.tableFrom.page = 1
|
|
||||||
this.getList()
|
|
||||||
this.getRefundList()
|
|
||||||
if (this.$route.params.type === 0) {
|
|
||||||
this.setTagsViewTitle()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 订单
|
|
||||||
onHandle(name) {
|
|
||||||
this.chkName = this.chkName === name ? '' : name
|
|
||||||
this.changeType(!(this.chkName === ''))
|
|
||||||
},
|
|
||||||
changeOne(v, order) {
|
|
||||||
if (v) {
|
|
||||||
if (this.chkName === 'duo') {
|
|
||||||
const index = this.noChecked.indexOf(order.order_id)
|
|
||||||
if (index > -1) this.noChecked.splice(index, 1)
|
|
||||||
} else {
|
|
||||||
const index = this.checkedIds.indexOf(order.order_id)
|
|
||||||
if (index === -1) this.checkedIds.push(order.order_id)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.chkName === 'duo') {
|
|
||||||
const index = this.noChecked.indexOf(order.order_id)
|
|
||||||
if (index === -1) this.noChecked.push(order.order_id)
|
|
||||||
} else {
|
|
||||||
const index = this.checkedIds.indexOf(order.order_id)
|
|
||||||
if (index > -1) this.checkedIds.splice(index, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeType(v) {
|
|
||||||
if (v) {
|
|
||||||
if (!this.chkName) {
|
|
||||||
this.chkName = 'dan'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.chkName = ''
|
|
||||||
}
|
|
||||||
const index = this.checkedPage.indexOf(this.tableFrom.page)
|
|
||||||
if (this.chkName === 'dan') {
|
|
||||||
this.checkedPage.push(this.tableFrom.page)
|
|
||||||
} else if (index > -1) {
|
|
||||||
this.checkedPage.splice(index, 1)
|
|
||||||
}
|
|
||||||
this.syncCheckedId()
|
|
||||||
},
|
|
||||||
syncCheckedId() {
|
|
||||||
const ids = this.tableData.data.map(v => v.order_id)
|
|
||||||
if (this.chkName === 'duo') {
|
|
||||||
this.checkedIds = []
|
|
||||||
} else if (this.chkName === 'dan') {
|
|
||||||
ids.forEach(id => {
|
|
||||||
const index = this.checkedIds.indexOf(id)
|
|
||||||
if (index === -1) {
|
|
||||||
this.checkedIds.push(id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ids.forEach(id => {
|
|
||||||
const index = this.checkedIds.indexOf(id)
|
|
||||||
if (index > -1) {
|
|
||||||
this.checkedIds.splice(index, 1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 退款订单
|
|
||||||
onHandleRefund(name) {
|
|
||||||
this.chkNameRefund = this.chkNameRefund === name ? '' : name
|
|
||||||
this.changeTypeRefund(!(this.chkNameRefund === ''))
|
|
||||||
},
|
|
||||||
changeOneRefund(v, order) {
|
|
||||||
if (v) {
|
|
||||||
if (this.chkNameRefund === 'duo') {
|
|
||||||
const index = this.refundNoChecked.indexOf(order.refund_order_id)
|
|
||||||
if (index > -1) this.refundNoChecked.splice(index, 1)
|
|
||||||
} else {
|
|
||||||
const index = this.refundCheckedIds.indexOf(order.refund_order_id)
|
|
||||||
if (index === -1) this.refundCheckedIds.push(order.refund_order_id)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.chkNameRefund === 'duo') {
|
|
||||||
const index = this.refundNoChecked.indexOf(order.refund_order_id)
|
|
||||||
if (index === -1) this.refundNoChecked.push(order.refund_order_id)
|
|
||||||
} else {
|
|
||||||
const index = this.refundCheckedIds.indexOf(order.refund_order_id)
|
|
||||||
if (index > -1) this.refundCheckedIds.splice(index, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeTypeRefund(v) {
|
|
||||||
if (v) {
|
|
||||||
if (!this.chkNameRefund) {
|
|
||||||
this.chkNameRefund = 'dan'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.chkNameRefund = ''
|
|
||||||
}
|
|
||||||
const index = this.checkedPage.indexOf(this.tableFrom.page)
|
|
||||||
if (this.chkNameRefund === 'dan') {
|
|
||||||
this.checkedPage.push(this.tableFrom.page)
|
|
||||||
} else if (index > -1) {
|
|
||||||
this.checkedPage.splice(index, 1)
|
|
||||||
}
|
|
||||||
this.syncCheckedIdRefund()
|
|
||||||
},
|
|
||||||
syncCheckedIdRefund() {
|
|
||||||
const ids = this.tableDataRefund.data.map(v => v.refund_order_id)
|
|
||||||
if (this.chkNameRefund === 'duo') {
|
|
||||||
this.refundCheckedIds = []
|
|
||||||
} else if (this.chkNameRefund === 'dan') {
|
|
||||||
ids.forEach(id => {
|
|
||||||
const index = this.refundCheckedIds.indexOf(id)
|
|
||||||
if (index === -1) {
|
|
||||||
this.refundCheckedIds.push(id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ids.forEach(id => {
|
|
||||||
const index = this.refundCheckedIds.indexOf(id)
|
|
||||||
if (index > -1) {
|
|
||||||
this.refundCheckedIds.splice(index, 1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onAdd() {
|
|
||||||
// if (this.ids.length === 0 || this.idsRefund.length === 0) return this.$message.warning('请先选择对账单')
|
|
||||||
const datas = {
|
|
||||||
order_ids: this.checkedIds,
|
|
||||||
order_out_ids: this.noChecked,
|
|
||||||
order_type: this.chkName === 'duo' ? 1 : 0,
|
|
||||||
refund_order_ids: this.refundCheckedIds,
|
|
||||||
refund_out_ids: this.refundNoChecked,
|
|
||||||
refund_type: this.chkNameRefund === 'duo' ? 1 : 0,
|
|
||||||
date: this.tableFrom.date
|
|
||||||
}
|
|
||||||
this.$modalSure('发起商户对账吗').then(() => {
|
|
||||||
reconciliationApi(this.$route.params.id, datas, ).then(({
|
|
||||||
message
|
|
||||||
}) => {
|
|
||||||
this.$message.success(message)
|
|
||||||
this.tableFrom.page = 1
|
|
||||||
this.getList()
|
|
||||||
this.getRefundList()
|
|
||||||
this.chkName = ''
|
|
||||||
this.chkNameRefund = ''
|
|
||||||
this.refundCheckedIds = []
|
|
||||||
this.checkedIds = []
|
|
||||||
this.noChecked = []
|
|
||||||
this.refundNoChecked = []
|
|
||||||
}).catch(({
|
|
||||||
message
|
|
||||||
}) => {
|
|
||||||
this.$message.error(message)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 具体日期
|
|
||||||
onchangeTime(e) {
|
|
||||||
this.timeVal = e
|
|
||||||
this.tableFrom.date = this.timeVal ? this.timeVal.join('-') : ''
|
|
||||||
this.tableFrom.page = 1
|
|
||||||
this.getList()
|
|
||||||
this.getRefundList()
|
|
||||||
},
|
|
||||||
// 退款备注
|
|
||||||
onOrderMark(id) {
|
|
||||||
this.$modalForm(refundMarkApi(id)).then(() => this.getRefundList())
|
|
||||||
},
|
|
||||||
// 订单备注
|
|
||||||
addMark(id) {
|
|
||||||
this.$modalForm(orderMarkApi(id)).then(() => this.getList())
|
|
||||||
},
|
|
||||||
getTotalRefund(row) {
|
|
||||||
let sum = 0
|
|
||||||
for (let i = 0; i < row.length; i++) {
|
|
||||||
sum += row[i].product.cart_info.productAttr.price * row[i].refund_num
|
|
||||||
}
|
|
||||||
return sum
|
|
||||||
},
|
|
||||||
getTotal(row) {
|
|
||||||
let sum = 0
|
|
||||||
for (let i = 0; i < row.length; i++) {
|
|
||||||
sum += row[i].cart_info.productAttr.price * row[i].product_num
|
|
||||||
}
|
|
||||||
return sum
|
|
||||||
},
|
|
||||||
// 列表
|
|
||||||
getList() {
|
|
||||||
this.listLoading = true
|
|
||||||
this.$route.params.type === '1' ? merOrderListApi(this.$route.params.id, this.tableFrom).then(res => {
|
|
||||||
this.tableData.data = res.data.list
|
|
||||||
this.tableData.total = res.data.count
|
|
||||||
this.tableData.data.map((item) => {
|
|
||||||
this.$set(item, {
|
|
||||||
checked: false
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.listLoading = false
|
|
||||||
}).catch(res => {
|
|
||||||
this.listLoading = false
|
|
||||||
this.$message.error(res.message)
|
|
||||||
}) : reconciliationOrderApi(this.$route.params.id, this.tableFrom).then(res => {
|
|
||||||
this.tableData.data = res.data.list
|
|
||||||
this.tableData.total = res.data.count
|
|
||||||
this.tableData.data.map((item) => {
|
|
||||||
this.$set(item, {
|
|
||||||
checked: false
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.listLoading = false
|
|
||||||
}).catch(res => {
|
|
||||||
this.listLoading = false
|
|
||||||
this.$message.error(res.message)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
pageChange(page) {
|
|
||||||
this.tableFrom.page = page
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.tableFrom.limit = val
|
|
||||||
this.chkName = ''
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 退款列表
|
|
||||||
getRefundList() {
|
|
||||||
this.listLoading = true
|
|
||||||
this.$route.params.type === '1' ? refundOrderListApi(this.$route.params.id, this.tableFrom).then(res => {
|
|
||||||
this.tableDataRefund.data = res.data.list
|
|
||||||
this.tableDataRefund.total = res.data.count
|
|
||||||
this.listLoading = false
|
|
||||||
}).catch(res => {
|
|
||||||
this.listLoading = false
|
|
||||||
this.$message.error(res.message)
|
|
||||||
}) : reconciliationRefundApi(this.$route.params.id, this.tableFrom).then(res => {
|
|
||||||
this.tableDataRefund.data = res.data.list
|
|
||||||
this.tableDataRefund.total = res.data.count
|
|
||||||
this.listLoading = false
|
|
||||||
}).catch(res => {
|
|
||||||
this.listLoading = false
|
|
||||||
this.$message.error(res.message)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
pageChangeRefund(page) {
|
|
||||||
this.tableFrom.page = page
|
|
||||||
this.getRefundList()
|
|
||||||
},
|
|
||||||
handleSizeChangeRefund(val) {
|
|
||||||
this.tableFrom.limit = val
|
|
||||||
this.getRefundList()
|
|
||||||
},
|
|
||||||
setTagsViewTitle() {
|
|
||||||
const title = '查看订单'
|
|
||||||
const route = Object.assign({}, this.tempRoute, {
|
|
||||||
title: `${title}-${this.$route.params.id}`
|
|
||||||
})
|
|
||||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.spBlock {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.check {
|
|
||||||
color: #00a2d4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabPop {
|
|
||||||
/deep/ .el-popover {
|
|
||||||
width: 100px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fang {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
border: 1px solid #DCDFE6;
|
|
||||||
border-radius: 2px;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
background-color: #fff;
|
|
||||||
z-index: 1;
|
|
||||||
-webkit-transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
|
||||||
transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table /deep/.DisabledSelection .cell .el-checkbox__inner {
|
|
||||||
margin-left: -30px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table /deep/.DisabledSelection .cell:before {
|
|
||||||
content: "全选";
|
|
||||||
position: absolute;
|
|
||||||
right: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.demo-table-expands {
|
|
||||||
/deep/ label {
|
|
||||||
width: 84px !important;
|
|
||||||
color: #99a9bf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.selWidth {
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dropdown-link {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #409EFF;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon-arrow-down {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabBox_tit {
|
|
||||||
width: 60%;
|
|
||||||
font-size: 12px !important;
|
|
||||||
margin: 0 2px 0 10px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
padding: 5px 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue