This commit is contained in:
faiz 2024-05-11 14:28:50 +08:00
parent 929407342b
commit 28b1955a3f
17 changed files with 3794 additions and 1951 deletions

View File

@ -228,6 +228,12 @@ export function updateStoreTypeApi(type, data) {
export function merchantIsCloseApi(id, status) { export function merchantIsCloseApi(id, status) {
return request.post(`system/merchant/close/${id}`, { status }) return request.post(`system/merchant/close/${id}`, { status })
} }
/**
* @description 商户列表 -- 退店开关
*/
export function merchantIsLockApi(id, lock) {
return request.post(`system/merchant/lock/${id}`, { lock })
}
/** /**
* @description 商户列表 -- 开启商户数 * @description 商户列表 -- 开启商户数
*/ */

View File

@ -157,6 +157,12 @@ export function categoryListApi(data) {
export function exportProductApi(data) { export function exportProductApi(data) {
return request.get(`store/product/export`, data) return request.get(`store/product/export`, data)
} }
/**
* @description 导出用户操作记录
*/
export function exportOperate(id = '0', data) {
return request.get(`store/product/export_operate/${id}`, data)
}
/** /**
* @description 商户分类 -- 列表 * @description 商户分类 -- 列表
*/ */
@ -185,6 +191,12 @@ export function seckillProductDetailApi(id) {
export function productStatusFirstApi(data) { export function productStatusFirstApi(data) {
return request.post(`store/product/status_first`, data) return request.post(`store/product/status_first`, data)
} }
/**
* @description 商品审核 -- 初步审核
*/
export function productStatusFirstTwoApi(data) {
return request.post(`store/product/status_first2`, data)
}
/** /**
* @description 商品审核 -- 二次审核 * @description 商品审核 -- 二次审核
*/ */
@ -299,6 +311,18 @@ export function seckillChangeApi(id, status) {
export function toVirtualSalesApi(id) { export function toVirtualSalesApi(id) {
return request.get(`store/product/ficti/form/${id}`) return request.get(`store/product/ficti/form/${id}`)
} }
/**
* @description 商品列表 -- 锁定/解锁
*/
export function productLockApi(id) {
return request.get(`store/product/lock/form/${id}`)
}
/**
* @description 商品列表 -- 返回
*/
export function productBackApi(id) {
return request.get(`store/product/back/form/${id}`)
}
/** /**
* @description 商品列表 -- 标记标记 * @description 商品列表 -- 标记标记
*/ */
@ -491,6 +515,10 @@ export function productGetTempKeysApi() {
export function batchesLabelsApi(data) { export function batchesLabelsApi(data) {
return request.post(`store/product/batch_labels`, data) return request.post(`store/product/batch_labels`, data)
} }
/** 商品列表 -- 批量设置标记 */
export function batchesTagNameApi(data) {
return request.post(`store/product/batch_tag_name`, data)
}
/** 商品列表 -- 批量设置推荐 */ /** 商品列表 -- 批量设置推荐 */
export function batchesRecommendApi(data) { export function batchesRecommendApi(data) {
return request.post(`store/product/batch_hot`, data) return request.post(`store/product/batch_hot`, data)

View File

@ -1,78 +1,83 @@
import { startDrag } from './drags.js'
export default { export default {
bind(el, binding, vnode) { bind(el, binding, vnode) {
const dialogHeaderEl = el.querySelector('.el-dialog__header') startDrag(el.querySelector('.el-dialog__header'), el.querySelector('.el-dialog'), binding.value);
const dragDom = el.querySelector('.el-dialog') // const dialogHeaderEl = el.querySelector('.el-dialog__header')
dialogHeaderEl.style.cssText += ';cursor:move;' // var dialogBodyEl = ''
dragDom.style.cssText += ';top:0px;' // const dragDom = el.querySelector('.el-dialog')
// dialogHeaderEl.style.cssText += ';cursor:move;'
// dragDom.style.cssText += ';top:0px;'
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); // // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const getStyle = (function () { // const getStyle = (function () {
if (window.document.currentStyle) { // if (window.document.currentStyle) {
return (dom, attr) => dom.currentStyle[attr] // return (dom, attr) => dom.currentStyle[attr]
} else { // } else {
return (dom, attr) => getComputedStyle(dom, false)[attr] // return (dom, attr) => getComputedStyle(dom, false)[attr]
} // }
})() // })()
dialogHeaderEl.onmousedown = (e) => { // dialogHeaderEl.onmousedown = (e) => {
// 鼠标按下,计算当前元素距离可视区的距离 // dialogBodyEl = el.querySelector('.el-dialog__body')
const disX = e.clientX - dialogHeaderEl.offsetLeft // dialogBodyEl.style.cssText += '-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;'
const disY = e.clientY - dialogHeaderEl.offsetTop // // 鼠标按下,计算当前元素距离可视区的距离
// const disX = e.clientX - dialogHeaderEl.offsetLeft
// const disY = e.clientY - dialogHeaderEl.offsetTop
const dragDomWidth = dragDom.offsetWidth // const dragDomWidth = dragDom.offsetWidth
const dragDomHeight = dragDom.offsetHeight // const dragDomHeight = dragDom.offsetHeight
const screenWidth = document.body.clientWidth // const screenWidth = document.body.clientWidth
const screenHeight = document.body.clientHeight // const screenHeight = document.body.clientHeight
const minDragDomLeft = dragDom.offsetLeft // const minDragDomLeft = dragDom.offsetLeft
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth // const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
const minDragDomTop = dragDom.offsetTop // const minDragDomTop = dragDom.offsetTop
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight // const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight
// 获取到的值带px 正则匹配替换 // // 获取到的值带px 正则匹配替换
let styL = getStyle(dragDom, 'left') // let styL = getStyle(dragDom, 'left')
let styT = getStyle(dragDom, 'top') // let styT = getStyle(dragDom, 'top')
if (styL.includes('%')) { // if (styL.includes('%')) {
styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100) // styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100) // styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
} else { // } else {
styL = +styL.replace(/\px/g, '') // styL = +styL.replace(/\px/g, '')
styT = +styT.replace(/\px/g, '') // styT = +styT.replace(/\px/g, '')
} // }
document.onmousemove = function (e) { // document.onmousemove = function (e) {
// 通过事件委托,计算移动的距离 // // 通过事件委托,计算移动的距离
let left = e.clientX - disX // let left = e.clientX - disX
let top = e.clientY - disY // let top = e.clientY - disY
// 边界处理 // // 边界处理
if (-(left) > minDragDomLeft) { // if (-(left) > minDragDomLeft) {
left = -minDragDomLeft // left = -minDragDomLeft
} else if (left > maxDragDomLeft) { // } else if (left > maxDragDomLeft) {
left = maxDragDomLeft // left = maxDragDomLeft
} // }
if (-(top) > minDragDomTop) { // if (-(top) > minDragDomTop) {
top = -minDragDomTop // top = -minDragDomTop
} else if (top > maxDragDomTop) { // } else if (top > maxDragDomTop) {
top = maxDragDomTop // top = maxDragDomTop
} // }
// 移动当前元素 // // 移动当前元素
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` // dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
// emit onDrag event // // emit onDrag event
vnode.child.$emit('dragDialog') // vnode.child.$emit('dragDialog')
} // }
document.onmouseup = function (e) { // document.onmouseup = function (e) {
document.onmousemove = null // dialogBodyEl.style.cssText = ''
document.onmouseup = null // document.onmousemove = null
} // document.onmouseup = null
} // }
// }
} }
} }

View File

@ -0,0 +1,106 @@
/**
* 拖拽移动
* @param {elementObjct} bar 鼠标点击控制拖拽的元素
* @param {elementObjct} target 移动的元素
* @param {function} callback 移动后的回调
*/
export function startDrag(bar, target, callback) {
var params = {
top: 0,
left: 0,
currentX: 0,
currentY: 0,
flag: false,
cWidth: 0,
cHeight: 0,
tWidth: 0,
tHeight: 0
};
// 给拖动块添加样式
bar.style.cursor = 'move';
// 获取相关CSS属性
// o是移动对象
// var getCss = function (o, key) {
// return o.currentStyle ? o.currentStyle[key] : document.defaultView.getComputedStyle(o, false)[key];
// };
bar.onmousedown = function (event) {
// 按下时初始化params
var e = event ? event : window.event;
params = {
top: target.offsetTop,
left: target.offsetLeft,
currentX: e.clientX,
currentY: e.clientY,
flag: true,
cWidth: document.body.clientWidth,
cHeight: document.body.clientHeight,
tWidth: target.offsetWidth,
tHeight: target.offsetHeight
};
// 给被拖动块初始化样式
target.style.margin = 0;
target.style.top = params.top + 'px';
target.style.left = params.left + 'px';
if (!event) {
// 防止IE文字选中
bar.onselectstart = function () {
return false;
}
}
document.onmousemove = function (event) {
// 防止文字选中
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
var e = event ? event : window.event;
if (params.flag) {
var nowX = e.clientX;
var nowY = e.clientY;
// 差异距离
var disX = nowX - params.currentX;
var disY = nowY - params.currentY;
// 最终移动位置
var zLeft = 0;
var zTop = 0;
zLeft = parseInt(params.left) + disX;
// 限制X轴范围
if (zLeft <= -parseInt(params.tWidth / 2)) {
zLeft = -parseInt(params.tWidth / 2);
}
if (zLeft >= params.cWidth - parseInt(params.tWidth * 0.5)) {
zLeft = params.cWidth - parseInt(params.tWidth * 0.5);
}
zTop = parseInt(params.top) + disY;
// 限制Y轴范围
if (zTop <= 0) {
zTop = 0;
}
if (zTop >= params.cHeight - parseInt(params.tHeight * 0.5)) {
zTop = params.cHeight - parseInt(params.tHeight * 0.5);
}
// 执行移动
target.style.left = zLeft + 'px';
target.style.top = zTop + 'px';
}
if (typeof callback == "function") {
callback(zLeft, zTop);
}
}
document.onmouseup = function () {
params.flag = false;
document.onmousemove = null;
document.onmouseup = null;
};
};
}

View File

@ -166,7 +166,7 @@ export function cancelOrderStatusFilter(status) {
export function orderPayType(type) { export function orderPayType(type) {
const typeMap = { const typeMap = {
'0': '消费券支付', '0': '余额支付',
'1': '微信支付', '1': '微信支付',
'2': '小程序', '2': '小程序',
'3': '微信支付', '3': '微信支付',

View File

@ -87,6 +87,15 @@ const productRouter =
}, },
component: () => import('@/views/product/priceDescription/index.vue') component: () => import('@/views/product/priceDescription/index.vue')
}, },
{
path: 'operate',
name: 'operate',
meta: {
title: '商品操作日志',
noCache: true
},
component: () => import('@/views/product/operate/index.vue')
},
{ {
path: 'band', path: 'band',
name: 'ProductBand', name: 'ProductBand',

View File

@ -1,9 +1,19 @@
<template> <template>
<div class="divBox"> <div class="divBox">
<div class="selCard"> <div class="selCard">
<el-form :model="tableFrom" ref="searchForm" size="small" inline label-width="85px"> <el-form
:model="tableFrom"
ref="searchForm"
size="small"
inline
label-width="85px"
>
<el-form-item label="订单状态:" class="width100" prop="order_type"> <el-form-item label="订单状态:" class="width100" prop="order_type">
<el-radio-group v-model="tableFrom.order_type" type="button" @change="getList(1)"> <el-radio-group
v-model="tableFrom.order_type"
type="button"
@change="getList(1)"
>
<el-radio-button label="">全部 </el-radio-button> <el-radio-button label="">全部 </el-radio-button>
<el-radio-button label="1">待付款</el-radio-button> <el-radio-button label="1">待付款</el-radio-button>
<el-radio-button label="2">待发货</el-radio-button> <el-radio-button label="2">待发货</el-radio-button>
@ -22,7 +32,7 @@
type="daterange" type="daterange"
placement="bottom-end" placement="bottom-end"
placeholder="自定义时间" placeholder="自定义时间"
style="width: 280px;" style="width: 280px"
clearable clearable
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="onchangeTime" @change="onchangeTime"
@ -46,20 +56,20 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="开票状态:" prop="status"> <el-form-item label="开票状态:" prop="status">
<el-select <el-select
v-model="tableFrom.status" v-model="tableFrom.status"
placeholder="请选择" placeholder="请选择"
class="selWidth" class="selWidth"
clearable clearable
@change="getList" @change="getList"
> >
<el-option <el-option
v-for="item in invoiceStatusList" v-for="item in invoiceStatusList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="用户信息:" prop="username"> <el-form-item label="用户信息:" prop="username">
<el-input <el-input
@ -80,8 +90,10 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button> <el-button type="primary" size="small" @click="getList(1)"
<el-button size="small" @click="searchReset()">重置</el-button> >搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -93,51 +105,89 @@
size="small" size="small"
class="table" class="table"
> >
<el-table-column prop="storeOrder.order_sn" label="订单号" min-width="170"/> <el-table-column
<el-table-column prop="merchant.mer_name" label="商户名称" min-width="160" /> prop="storeOrder.order_sn"
label="订单号"
min-width="170"
/>
<el-table-column
prop="merchant.mer_name"
label="商户名称"
min-width="160"
/>
<el-table-column prop="user.nickname" label="用户昵称" min-width="90" /> <el-table-column prop="user.nickname" label="用户昵称" min-width="90" />
<el-table-column prop="order_price" label="订单金额" min-width="90" /> <el-table-column prop="order_price" label="订单金额" min-width="90" />
<el-table-column label="订单状态" min-width="90"> <el-table-column label="订单状态" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.storeOrder && scope.row.storeOrder.paid === 0 && scope.row.storeOrder.status === 0">待付款</span> <span
<span v-else>{{ scope.row.storeOrder && scope.row.storeOrder.status | orderStatusFilter }}</span> v-if="
scope.row.storeOrder &&
scope.row.storeOrder.paid === 0 &&
scope.row.storeOrder.status === 0
"
>待付款</span
>
<span v-else>{{
scope.row.storeOrder &&
scope.row.storeOrder.status | orderStatusFilter
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="receipt_price" label="发票金额" min-width="90"/> <el-table-column prop="receipt_price" label="发票金额" min-width="90" />
<el-table-column prop="receipt_sn" label="发票单号" min-width="120"/> <el-table-column prop="receipt_sn" label="申请单号" min-width="120" />
<el-table-column label="发票类型" min-width="100"> <el-table-column label="发票类型" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.receipt_info">{{scope.row.receipt_info.receipt_type == 1 ? '普通发票' : '专用发票' }}</span> <span v-if="scope.row.receipt_info">{{
scope.row.receipt_info.receipt_type == 1 ? "普通发票" : "专用发票"
}}</span>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发票抬头" min-width="90"> <el-table-column label="发票抬头" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.receipt_info.receipt_title_type === '1' ? "个人" : "企业" }}</span> <span>{{
scope.row.receipt_info.receipt_title_type === "1"
? "个人"
: "企业"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发票联系人" min-width="100"> <el-table-column label="发票联系人" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.storeOrder && scope.row.storeOrder.real_name }}</span> <span>{{
scope.row.storeOrder && scope.row.storeOrder.real_name
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发票联系信息" min-width="150"> <el-table-column label="发票联系信息" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.delivery_info.email ? scope.row.delivery_info.email : scope.row.delivery_info.user_address && scope.row.delivery_info.user_address + scope.row.delivery_info.user_phone && scope.row.delivery_info.user_phone}}</span> <span>{{
scope.row.delivery_info.email
? scope.row.delivery_info.email
: scope.row.delivery_info.user_address &&
scope.row.delivery_info.user_address +
scope.row.delivery_info.user_phone &&
scope.row.delivery_info.user_phone
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="下单时间" min-width="150"/> <el-table-column prop="create_time" label="下单时间" min-width="150" />
<el-table-column label="开票状态" min-width="100"> <el-table-column label="开票状态" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.status == 1 ? '已开' : '未开' }}</span> <span>{{ scope.row.status == 1 ? "已开" : "未开" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mer_mark" label="发票备注" min-width="100"/> <el-table-column prop="mer_mark" label="发票备注" min-width="100" />
<el-table-column label="操作" min-width="100" fixed="right"> <el-table-column label="操作" min-width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="getInvoiceInfo(scope.row.order_receipt_id)">详情</el-button> <el-button
type="text"
size="small"
@click="getInvoiceInfo(scope.row.order_receipt_id)"
>详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination
@ -152,38 +202,118 @@
</div> </div>
</el-card> </el-card>
<!--开票--> <!--开票-->
<el-dialog v-if="dialogVisible" :title="invoiceInfo.title" :visible.sync="dialogVisible" width="600px"> <el-dialog
v-if="dialogVisible"
:title="invoiceInfo.title"
:visible.sync="dialogVisible"
width="600px"
>
<div v-loading="loading"> <div v-loading="loading">
<div class="box-container"> <div class="box-container">
<div class="title">发票详情</div> <div class="title">发票详情</div>
<div class="acea-row"> <div class="acea-row">
<div class="list sp"><label class="name" style="color: #333;">发票申请单号</label>{{ invoiceInfo.receipt_sn }}</div> <div class="list sp">
<label class="name" style="color: #333">发票申请单号</label
>{{ invoiceInfo.receipt_sn }}
</div>
</div> </div>
<div class="title">发票信息</div> <div class="title">发票信息</div>
<div class="acea-row"> <div class="acea-row">
<div class="list sp"><label class="name">发票抬头</label>{{ invoiceInfo.receipt_info.receipt_title }}</div> <div class="list sp">
<div class="list sp"><label class="name">发票类型</label>{{ invoiceInfo.receipt_info.receipt_type == 1 ? '普通发票' : '专用发票' }}</div> <label class="name">发票抬头</label
<div class="list sp"><label class="name">发票抬头类型</label>{{ invoiceInfo.receipt_info.receipt_title_type == '1' ? '个人' : '企业' }}</div> >{{ invoiceInfo.receipt_info.receipt_title }}
<div class="list sp"><label class="name">发票金额</label>{{ invoiceInfo.receipt_price }}</div> </div>
<div v-if="invoiceInfo.receipt_info.receipt_title_type == '2'" class="list sp"><label class="name">企业税号</label>{{ invoiceInfo.receipt_info.duty_paragraph }}</div> <div class="list sp">
<div v-if="invoiceInfo.receipt_info.receipt_type == 2" class="list sp"><label class="name">开户银行</label>{{ invoiceInfo.receipt_info.bank_name }}</div> <label class="name">发票类型</label
<div v-if="invoiceInfo.receipt_info.receipt_type == 2" class="list sp"><label class="name">银行账号</label>{{ invoiceInfo.receipt_info.bank_code }}</div> >{{
<div v-if="invoiceInfo.receipt_info.receipt_type == 2" class="list sp"><label class="name">企业地址</label>{{ invoiceInfo.receipt_info.address }}</div> invoiceInfo.receipt_info.receipt_type == 1
<div v-if="invoiceInfo.receipt_info.receipt_type == 2" class="list sp"><label class="name">企业电话</label>{{ invoiceInfo.receipt_info.tel }}</div> ? "普通发票"
: "专用发票"
}}
</div>
<div class="list sp">
<label class="name">发票抬头类型</label
>{{
invoiceInfo.receipt_info.receipt_title_type == "1"
? "个人"
: "企业"
}}
</div>
<div class="list sp">
<label class="name">发票金额</label
>{{ invoiceInfo.receipt_price }}
</div>
<div
v-if="invoiceInfo.receipt_info.receipt_title_type == '2'"
class="list sp"
>
<label class="name">企业税号</label
>{{ invoiceInfo.receipt_info.duty_paragraph }}
</div>
<div
v-if="invoiceInfo.receipt_info.receipt_type == 2"
class="list sp"
>
<label class="name">开户银行</label
>{{ invoiceInfo.receipt_info.bank_name }}
</div>
<div
v-if="invoiceInfo.receipt_info.receipt_type == 2"
class="list sp"
>
<label class="name">银行账号</label
>{{ invoiceInfo.receipt_info.bank_code }}
</div>
<div
v-if="invoiceInfo.receipt_info.receipt_type == 2"
class="list sp"
>
<label class="name">企业地址</label
>{{ invoiceInfo.receipt_info.address }}
</div>
<div
v-if="invoiceInfo.receipt_info.receipt_type == 2"
class="list sp"
>
<label class="name">企业电话</label
>{{ invoiceInfo.receipt_info.tel }}
</div>
</div> </div>
<div class="title">联系信息</div> <div class="title">联系信息</div>
<div v-if="invoiceInfo.receipt_info.receipt_type == 1" class="acea-row"> <div
<div class="list sp"><label class="name">联系邮箱</label>{{ invoiceInfo.delivery_info.email }}</div> v-if="invoiceInfo.receipt_info.receipt_type == 1"
class="acea-row"
>
<div class="list sp">
<label class="name">联系邮箱</label
>{{ invoiceInfo.delivery_info.email }}
</div>
</div> </div>
<div v-else class="acea-row"> <div v-else class="acea-row">
<div class="list sp"><label class="name">联系人姓名</label>{{ invoiceInfo.delivery_info.user_name }}</div> <div class="list sp">
<div class="list sp"><label class="name">联系人电话</label>{{ invoiceInfo.delivery_info.user_phone }}</div> <label class="name">联系人姓名</label
<div class="list sp"><label class="name">联系人地址</label>{{ invoiceInfo.delivery_info.user_address }}</div> >{{ invoiceInfo.delivery_info.user_name }}
</div>
<div class="list sp">
<label class="name">联系人电话</label
>{{ invoiceInfo.delivery_info.user_phone }}
</div>
<div class="list sp">
<label class="name">联系人地址</label
>{{ invoiceInfo.delivery_info.user_address }}
</div>
</div> </div>
<div class="acea-row"> <div class="acea-row">
<div class="list sp"><label class="name">开票状态</label>{{ invoiceInfo.status == 1 ? '已开' : '未开' }}</div> <div class="list sp">
<div v-if="invoiceInfo.status == 1" class="list sp100"><label class="name">发票号码</label>{{ invoiceInfo.receipt_no }}</div> <label class="name">开票状态</label
<div class="list sp100"><label class="name">发票备注</label>{{ invoiceInfo.mer_mark }}</div> >{{ invoiceInfo.status == 1 ? "已开" : "未开" }}
</div>
<div v-if="invoiceInfo.status == 1" class="list sp100">
<label class="name">发票号码</label>{{ invoiceInfo.receipt_no }}
</div>
<div class="list sp100">
<label class="name">发票备注</label>{{ invoiceInfo.mer_mark }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -192,78 +322,77 @@
</template> </template>
<script> <script>
import { invoiceListApi, invoiceDetailApi } from "@/api/accounts";
import { invoiceListApi, invoiceDetailApi } from '@/api/accounts' import { merSelectApi } from "@/api/product";
import { merSelectApi } from '@/api/product' import timeOptions from "@/utils/timeOptions";
import timeOptions from '@/utils/timeOptions';
export default { export default {
name: 'AccountsReceipt', name: "AccountsReceipt",
data() { data() {
return { return {
pickerOptions: timeOptions, pickerOptions: timeOptions,
logisticsName: 'refund', logisticsName: "refund",
dialogVisible: false, dialogVisible: false,
id: 0, id: 0,
type: '', type: "",
tableData: { tableData: {
data: [], data: [],
total: 0 total: 0,
}, },
merSelect: [], merSelect: [],
invoiceStatusList: [ invoiceStatusList: [
{ label: "已开票", value: 1 }, { label: "已开票", value: 1 },
{ label: "未开票", value: 0 } { label: "未开票", value: 0 },
], ],
listLoading: true, listLoading: true,
tableFrom: { tableFrom: {
username: '', username: "",
type: '', type: "",
date: '', date: "",
page: 1, page: 1,
limit: 20, limit: 20,
receipt_sn: '', receipt_sn: "",
order_type: '', order_type: "",
keyword: '', keyword: "",
status: '', status: "",
mer_id: '' mer_id: "",
}, },
orderChartType: {}, orderChartType: {},
timeVal: [], timeVal: [],
fromList: { fromList: {
title: '选择时间', title: "选择时间",
custom: true, custom: true,
fromTxt: [ fromTxt: [
{ text: '全部', val: '' }, { text: "全部", val: "" },
{ text: '今天', val: 'today' }, { text: "今天", val: "today" },
{ text: '昨天', val: 'yesterday' }, { text: "昨天", val: "yesterday" },
{ text: '最近7天', val: 'lately7' }, { text: "最近7天", val: "lately7" },
{ text: '最近30天', val: 'lately30' }, { text: "最近30天", val: "lately30" },
{ text: '本月', val: 'month' }, { text: "本月", val: "month" },
{ text: '本年', val: 'year' } { text: "本年", val: "year" },
] ],
}, },
loading: false, loading: false,
invoiceInfo: {}, invoiceInfo: {},
} };
}, },
mounted() { mounted() {
this.getList(1) this.getList(1);
this.getMerSelect(); this.getMerSelect();
}, },
methods: { methods: {
/**重置 */ /**重置 */
searchReset(){ searchReset() {
this.timeVal = [] this.timeVal = [];
this.tableFrom.date = "" this.tableFrom.date = "";
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields();
this.getList(1) this.getList(1);
}, },
// //
onchangeTime(e) { onchangeTime(e) {
this.timeVal = e this.timeVal = e;
this.tableFrom.date = e ? this.timeVal.join('-') : '' this.tableFrom.date = e ? this.timeVal.join("-") : "";
this.getList(1) this.getList(1);
}, },
// //
getMerSelect() { getMerSelect() {
@ -276,50 +405,50 @@ export default {
}); });
}, },
// //
getInvoiceInfo(id){ getInvoiceInfo(id) {
this.loading = true this.loading = true;
invoiceDetailApi(id) invoiceDetailApi(id)
.then(res => { .then((res) => {
this.invoiceInfo = res.data this.invoiceInfo = res.data;
this.dialogVisible = true this.dialogVisible = true;
this.loading = false this.loading = false;
})
.catch(res => {
this.$message.error(res.message)
this.loading = false
this.dialogVisible = false
}) })
.catch((res) => {
this.$message.error(res.message);
this.loading = false;
this.dialogVisible = false;
});
}, },
// //
getList(num) { getList(num) {
this.listLoading = true this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page; this.tableFrom.page = num ? num : this.tableFrom.page;
invoiceListApi(this.tableFrom) invoiceListApi(this.tableFrom)
.then(res => { .then((res) => {
this.orderChartType = res.data.stat this.orderChartType = res.data.stat;
this.tableData.data = res.data.list this.tableData.data = res.data.list;
this.tableData.total = res.data.count this.tableData.total = res.data.count;
this.listLoading = false this.listLoading = false;
})
.catch(res => {
this.$message.error(res.message)
this.listLoading = false
}) })
.catch((res) => {
this.$message.error(res.message);
this.listLoading = false;
});
}, },
pageChange(page) { pageChange(page) {
this.tableFrom.page = page this.tableFrom.page = page;
this.getList() this.getList();
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.tableFrom.limit = val this.tableFrom.limit = val;
this.getList() this.getList();
}, },
handleClose() { handleClose() {
this.dialogLogistics = false this.dialogLogistics = false;
}, },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -327,7 +456,7 @@ export default {
overflow: hidden; overflow: hidden;
padding: 0 10px; padding: 0 10px;
} }
.box-container .title{ .box-container .title {
color: #17233d; color: #17233d;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
@ -341,10 +470,10 @@ export default {
margin-top: 15px; margin-top: 15px;
font-size: 13px; font-size: 13px;
} }
.box-container .list .info{ .box-container .list .info {
display: block; display: block;
.el-textarea{ .el-textarea {
margin-top: 10px; margin-top: 10px;
} }
} }
@ -362,5 +491,4 @@ export default {
width: 100px; width: 100px;
color: #606266; color: #606266;
} }
</style> </style>

View File

@ -16,7 +16,7 @@
<el-option label="审核未通过" value="2"/> <el-option label="审核未通过" value="2"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择时间:"> <el-form-item label="申请时间:">
<el-date-picker <el-date-picker
v-model="timeVal" v-model="timeVal"
type="daterange" type="daterange"
@ -28,22 +28,6 @@
style="width: 280px" style="width: 280px"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="商户分类:" prop="category_id">
<el-select
v-model="tableFrom.category_id"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option
v-for="item in merCateList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> -->
<el-form-item label="店铺类型:" prop="type_id"> <el-form-item label="店铺类型:" prop="type_id">
<el-select <el-select
v-model="tableFrom.type_id" v-model="tableFrom.type_id"
@ -61,17 +45,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属城市:" prop="city_code"> <el-form-item label="所属城市:" prop="city_code">
<el-cascader <el-input
ref="cascader" v-model="tableFrom.city_code"
v-model="tableFrom.city_code" @keyup.enter.native="getList(1)"
:options="cityOptions" placeholder="请输入所属城市"
:show-all-levels="false" class="selWidth"
:props="{ emitPath: false }" clearable
class="selWidth" />
@change="handleCascader"
clearable
>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="商户关键字:" prop="keyword"> <el-form-item label="商户关键字:" prop="keyword">
<el-input <el-input
@ -82,6 +62,15 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="mark">
<el-input
v-model="tableFrom.mark"
@keyup.enter.native="getList(1)"
placeholder="请输入备注"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button> <el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button> <el-button size="small" @click="searchReset()">重置</el-button>

View File

@ -1,7 +1,13 @@
<template> <template>
<div class="divBox"> <div class="divBox">
<div class="selCard"> <div class="selCard">
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="105px" :inline="true"> <el-form
:model="tableFrom"
ref="searchForm"
size="small"
label-width="105px"
:inline="true"
>
<el-form-item label="选择时间:"> <el-form-item label="选择时间:">
<el-date-picker <el-date-picker
v-model="timeVal" v-model="timeVal"
@ -10,7 +16,7 @@
format="yyyy/MM/dd" format="yyyy/MM/dd"
value-format="yyyy/MM/dd" value-format="yyyy/MM/dd"
range-separator="-" range-separator="-"
style="width:280px;" style="width: 280px"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="onchangeTime" @change="onchangeTime"
/> />
@ -27,46 +33,38 @@
<el-option label="非自营" value="0" /> <el-option label="非自营" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="商户分类:" prop="category_id"> <el-form-item label="是否惠美乡村:" prop="is_huimei">
<el-select <el-select
v-model="tableFrom.category_id" v-model="tableFrom.is_huimei"
clearable
placeholder="请选择" placeholder="请选择"
class="selWidth" class="filter-item selWidth"
clearable
@change="getList(1)" @change="getList(1)"
> >
<el-option
v-for="item in merCateList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> -->
<el-form-item label="是否惠美乡村:" prop="is_huimei">
<el-select v-model="tableFrom.is_huimei" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)">
<el-option label="是" value="1" /> <el-option label="是" value="1" />
<el-option label="否" value="0" /> <el-option label="否" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否退伍军人:" prop="is_soldier"> <el-form-item label="是否退伍军人:" prop="is_soldier">
<el-select v-model="tableFrom.is_soldier" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)"> <el-select
v-model="tableFrom.is_soldier"
placeholder="请选择"
class="filter-item selWidth"
clearable
@change="getList(1)"
>
<el-option label="是" value="1" /> <el-option label="是" value="1" />
<el-option label="否" value="0" /> <el-option label="否" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属城市:" prop="city_code"> <el-form-item label="所属城市:" prop="city_code">
<el-cascader <el-input
ref="cascader" v-model="tableFrom.city_code"
v-model="tableFrom.city_code" @keyup.enter.native="getList(1)"
:options="cityOptions" placeholder="请输入所属城市"
:show-all-levels="false" class="selWidth"
:props="{ emitPath: false,label:'label' }" clearable
class="selWidth" />
@change="handleCascader"
clearable
>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="店铺类型:" prop="type_id"> <el-form-item label="店铺类型:" prop="type_id">
<el-select <el-select
@ -92,37 +90,95 @@
class="selWidth" class="selWidth"
@change="getList(1)" @change="getList(1)"
> >
<el-option key="1" label="是" value="1"/> <el-option key="1" label="是" value="1" />
<el-option key="0" label="否" value="0"/> <el-option key="0" label="否" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关键字:" prop="keyword"> <el-form-item label="企业关键字:" prop="keyword">
<el-input <el-input
v-model="tableFrom.keyword" v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)" @keyup.enter.native="getList(1)"
placeholder="请输入店铺关键字/店铺名/联系电话" placeholder="请输入店铺/企业名称关键字"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="姓名关键字:" prop="keyword">
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入法人/对接人姓名"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="对接人电话:" prop="keyword">
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入对接人电话"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="对接人身份证:" prop="keyword">
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入对接人身份证"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="是否店长店:" prop="is_store_mgr">
<el-select
v-model="tableFrom.is_store_mgr"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option key="1" label="是" value="1" />
<el-option key="0" label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="备注:" prop="mark">
<el-input
v-model="tableFrom.mark"
@keyup.enter.native="getList(1)"
placeholder="请输入备注"
class="selWidth" class="selWidth"
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button> <el-button type="primary" size="small" @click="getList(1)"
<el-button size="small" @click="searchReset()">重置</el-button> >搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-card class="mt14"> <el-card class="mt14">
<div class="mb20"> <div class="mb20">
<el-tabs v-if="headeNum.length > 0" v-model="tableFrom.status" @tab-click="getList(1),getHeadNum()"> <el-tabs
v-if="headeNum.length > 0"
v-model="tableFrom.status"
@tab-click="getList(1), getHeadNum()"
>
<el-tab-pane <el-tab-pane
v-for="(item,index) in headeNum" v-for="(item, index) in headeNum"
:key="index" :key="index"
:name="item.type.toString()" :name="item.type.toString()"
:label="item.title +'('+item.count +')' " :label="item.title + '(' + item.count + ')'"
/> />
</el-tabs> </el-tabs>
<el-button size="small" type="primary" class="mt5" @click="onAdd">添加商户</el-button> <el-button size="small" type="primary" class="mt5" @click="onAdd"
<el-button size="small" type="primary" class="mt5" @click="exports">导出列表</el-button> >添加商户</el-button
>
<el-button size="small" type="primary" class="mt5" @click="exports"
>导出列表</el-button
>
</div> </div>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
@ -133,23 +189,31 @@
<el-table-column prop="mer_id" label="ID" min-width="60" /> <el-table-column prop="mer_id" label="ID" min-width="60" />
<el-table-column prop="mer_name" label="店铺名称" min-width="150" /> <el-table-column prop="mer_name" label="店铺名称" min-width="150" />
<el-table-column prop="ext.com.name" label="企业名称" min-width="150" /> <el-table-column prop="ext.com.name" label="企业名称" min-width="150" />
<el-table-column prop="merchantType.type_name" label="店铺类型" min-width="150" /> <el-table-column
prop="merchantType.type_name"
label="店铺类型"
min-width="150"
/>
<el-table-column prop="is_huimei" label="是否惠美乡村" min-width="100"> <el-table-column prop="is_huimei" label="是否惠美乡村" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.is_huimei == 1 ? '是' : '否'}}</span> <span>{{ scope.row.is_huimei == 1 ? "是" : "否" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="is_soldier" label="是否军人" min-width="80"> <el-table-column prop="is_soldier" label="是否军人" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.is_soldier == 1 ? '是' : '否'}}</span> <span>{{ scope.row.is_soldier == 1 ? "是" : "否" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="is_soldier" label="是否店长店" min-width="90"> <el-table-column prop="is_store_mgr" label="是否店长店" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.is_store_mgr == 1 ? '是' : '否'}}</span> <span>{{ scope.row.is_store_mgr == 1 ? "是" : "否" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ext.idcard.name" label="法人姓名" min-width="150" /> <el-table-column
prop="ext.idcard.name"
label="法人姓名"
min-width="150"
/>
<el-table-column prop="status" label="推荐" min-width="100"> <el-table-column prop="status" label="推荐" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@ -163,7 +227,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="开启/关闭" min-width="100"> <el-table-column prop="status" label="开启/关闭" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.status"
@ -176,32 +240,53 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="lock" label="退店(开启/关闭)" min-width="120">
<template slot-scope="scope">
<el-switch
v-model="scope.row.lock"
:active-value="1"
:inactive-value="0"
active-text="开启"
inactive-text="关闭"
:width="55"
@click.native="onchangeIsClose(scope.row, 'lock')"
/>
</template>
</el-table-column> -->
<el-table-column prop="real_name" label="对接人姓名" min-width="100" /> <el-table-column prop="real_name" label="对接人姓名" min-width="100" />
<el-table-column prop="mer_phone" label="对接人电话" min-width="100" /> <el-table-column prop="mer_phone" label="对接人电话" min-width="100" />
<el-table-column prop="ext.com.number" label="对接人身份证号" min-width="120" /> <el-table-column
prop="ext.com.number"
label="对接人身份证号"
min-width="120"
/>
<!-- <el-table-column prop="ext.com.initiator" label="发起人姓名" min-width="100" /> <!-- <el-table-column prop="ext.com.initiator" label="发起人姓名" min-width="100" />
<el-table-column prop="ext.com.inti_number" label="发起人编号" min-width="100" /> <el-table-column prop="ext.com.inti_number" label="发起人编号" min-width="100" />
<el-table-column prop="ext.com.inti_mobile" label="发起人电话" min-width="100" /> --> <el-table-column prop="ext.com.inti_mobile" label="发起人电话" min-width="100" /> -->
<el-table-column prop="ext.biz.cityInfo" label="所属城市" min-width="100" /> <el-table-column
prop="ext.biz.cityInfo"
label="所属城市"
min-width="100"
/>
<el-table-column prop="create_time" label="创建时间" min-width="150" /> <el-table-column prop="create_time" label="创建时间" min-width="150" />
<el-table-column prop="margin" label="保证金" min-width="150"> <el-table-column prop="margin" label="保证金" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getNumber(scope.row,'margin')}}</span> <span>{{ getNumber(scope.row, "margin") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="service" label="技术服务费" min-width="150"> <el-table-column prop="service" label="技术服务费" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getNumber(scope.row,'service')}}</span> <span>{{ getNumber(scope.row, "service") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goods" label="上架费" min-width="150"> <el-table-column prop="goods" label="上架费" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getNumber(scope.row,'goods')}}</span> <span>{{ getNumber(scope.row, "goods") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sort" label="排序" min-width="100" /> <el-table-column prop="sort" label="排序" min-width="100" />
<el-table-column prop="mark" label="备注" min-width="200" /> <el-table-column prop="mark" label="备注" min-width="200" />
<el-table-column label="操作" min-width="180" fixed="right"> <el-table-column label="操作" min-width="180" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -209,16 +294,33 @@
type="text" type="text"
size="small" size="small"
@click="onLogo(scope.row.mer_id)" @click="onLogo(scope.row.mer_id)"
>登录</el-button> >登录</el-button
<el-button type="text" size="small" @click="onEdit(scope.row.mer_id)">编辑</el-button> >
<el-button type="text" size="small" @click="setPayment(scope.row.mer_id)">缴费</el-button> <el-button
<el-button type="text" size="small" @click="onDetails(scope.row.mer_id)">详情</el-button> type="text"
size="small"
@click="onEdit(scope.row.mer_id)"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="setPayment(scope.row.mer_id)"
>缴费</el-button
>
<el-button
type="text"
size="small"
@click="onDetails(scope.row.mer_id)"
>详情</el-button
>
<el-button <el-button
v-if="tableFrom.status === '0'" v-if="tableFrom.status === '0'"
type="text" type="text"
size="small" size="small"
@click="handleDelete(scope.row.mer_id, scope.$index)" @click="handleDelete(scope.row.mer_id, scope.$index)"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -250,7 +352,6 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
merchantListApi, merchantListApi,
merchantDeleteForm, merchantDeleteForm,
@ -260,19 +361,21 @@ import {
changeCopyApi, changeCopyApi,
merchantCountApi, merchantCountApi,
merchantIsCloseApi, merchantIsCloseApi,
merchantIsLockApi,
getstoreTypeApi, getstoreTypeApi,
merchantPayForm, merchantPayForm,
exportMerchantApi, exportMerchantApi,
getMerCateApi, marginDeductionForm getMerCateApi,
marginDeductionForm,
} from "@/api/merchant"; } from "@/api/merchant";
import merDetail from './handle/merDetails.vue'; import merDetail from "./handle/merDetails.vue";
import { fromList } from "@/libs/constants.js"; 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 createWorkBook from '@/utils/newToExcel.js'; import createWorkBook from "@/utils/newToExcel.js";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import timeOptions from '@/utils/timeOptions'; import timeOptions from "@/utils/timeOptions";
import cityOptions from '@/utils/city'; import cityOptions from "@/utils/city";
export default { export default {
name: "MerchantList", name: "MerchantList",
components: { merDetail }, components: { merDetail },
@ -284,23 +387,28 @@ export default {
isChecked: false, isChecked: false,
listLoading: true, listLoading: true,
merCateList: [], merCateList: [],
cityOptions:cityOptions, cityOptions: cityOptions,
storeType: [], storeType: [],
headeNum: [ headeNum: [
{ {
count: '', count: "",
type: "1", type: "1",
title: "正常开启的商户" title: "正常开启的商户",
}, },
{ {
count: '', count: "",
type: "0", type: "0",
title: "已关闭商户" title: "已关闭商户",
} },
// {
// count: "",
// type: "2",
// title: "退",
// },
], ],
tableData: { tableData: {
data: [], data: [],
total: 0 total: 0,
}, },
tableFrom: { tableFrom: {
page: 1, page: 1,
@ -310,15 +418,15 @@ export default {
keyword: "", keyword: "",
is_trader: "", is_trader: "",
is_best: "", is_best: "",
category_id: '', category_id: "",
type_id: "", type_id: "",
city_code:'', city_code: "",
city:'', city: "",
}, },
autoUpdate: true, autoUpdate: true,
merId: "", merId: "",
drawer: false, drawer: false,
timeVal: [] timeVal: [],
}; };
}, },
mounted() { mounted() {
@ -328,56 +436,70 @@ export default {
this.getList(""); this.getList("");
}, },
methods: { methods: {
getNumber(row,name){ getNumber(row, name) {
if(name=='margin'){ if (name == "margin") {
return row[`is_${name}`] == 0?'无':row[`ot_${name}`]-row[`${name}`]>0 ? '待缴' : '已缴' return row[`is_${name}`] == 0
}else{ ? "无"
return row[`is_${name}`] == 0?'无':row[`ot_${name}_cost`]-row[`${name}_cost`]>0 ? '待缴' : '已缴' : row[`ot_${name}`] - row[`${name}`] > 0
} ? "待缴"
: "已缴";
}, } else {
handleCascader(){ return row[`is_${name}`] == 0
this.tableFrom.city = this.$refs["cascader"]?.getCheckedNodes()[0]?.label ? "无"
this.getList(1) : row[`ot_${name}_cost`] - row[`${name}_cost`] > 0
}, ? "待缴"
async exports() { : "已缴";
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = [] }
excelData.page = 1 },
let pageCount = 1 handleCascader() {
this.tableFrom.city = this.$refs["cascader"]?.getCheckedNodes()[0]?.label;
this.getList(1);
},
async exports() {
let excelData = JSON.parse(JSON.stringify(this.tableFrom)),
data = [];
excelData.page = 1;
let pageCount = 1;
let lebData = {}; let lebData = {};
for (let i = 0; i < pageCount; i++) { for (let i = 0; i < pageCount; i++) {
lebData = await this.downData(excelData) lebData = await this.downData(excelData);
pageCount = Math.ceil(lebData.count/excelData.limit) pageCount = Math.ceil(lebData.count / excelData.limit);
if (lebData.export.length) { if (lebData.export.length) {
data = data.concat(lebData.export) data = data.concat(lebData.export);
excelData.page++ excelData.page++;
} }
} }
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); createWorkBook(
return lebData.header,
lebData.title,
data,
lebData.foot,
lebData.filename
);
return;
}, },
/**订单列表 */ /**订单列表 */
downData(excelData) { downData(excelData) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
exportMerchantApi(excelData).then((res) => { exportMerchantApi(excelData).then((res) => {
return resolve(res.data) return resolve(res.data);
}) });
}) });
}, },
/**重置 */ /**重置 */
searchReset(){ searchReset() {
this.timeVal = [] this.timeVal = [];
this.tableFrom.date = "" this.tableFrom.date = "";
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields();
this.getList(1) this.getList(1);
}, },
onLogo(id) { onLogo(id) {
merchantLoginApi(id) merchantLoginApi(id)
.then(res => { .then((res) => {
Cookies.set("merchantToken", res.data.token); Cookies.set("merchantToken", res.data.token);
window.open(`${location.origin}${res.data.url}`); window.open(`${location.origin}${res.data.url}`);
}) })
.catch(res => { .catch((res) => {
this.$message.error(res.message); this.$message.error(res.message);
}); });
}, },
@ -391,38 +513,42 @@ export default {
// //
getHeadNum() { getHeadNum() {
merchantCountApi() merchantCountApi()
.then(res => { .then((res) => {
this.headeNum[0]["count"] = res.data.valid; this.headeNum[0]["count"] = res.data.valid;
this.headeNum[1]["count"] = res.data.invalid; this.headeNum[1]["count"] = res.data.invalid;
}) })
.catch(res => {}); .catch((res) => {});
}, },
// //
getMerCategory() { getMerCategory() {
getMerCateApi().then(res => { getMerCateApi()
this.merCateList = res.data .then((res) => {
}).catch(res => { this.merCateList = res.data;
this.$message.error(res.message)
}) })
.catch((res) => {
this.$message.error(res.message);
});
}, },
getStoreType(){ getStoreType() {
getstoreTypeApi().then(res => { getstoreTypeApi()
this.storeType = res.data .then((res) => {
}).catch(res => { this.storeType = res.data;
this.$message.error(res.message)
}) })
.catch((res) => {
this.$message.error(res.message);
});
}, },
// //
getList(num) { getList(num) {
this.listLoading = true; this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page; this.tableFrom.page = num ? num : this.tableFrom.page;
merchantListApi(this.tableFrom) merchantListApi(this.tableFrom)
.then(res => { .then((res) => {
this.tableData.data = res.data.list; this.tableData.data = res.data.list;
this.tableData.total = res.data.count; this.tableData.total = res.data.count;
this.listLoading = false; this.listLoading = false;
}) })
.catch(res => { .catch((res) => {
this.listLoading = false; this.listLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}); });
@ -450,17 +576,27 @@ export default {
}); });
}); });
}, },
// // 退
onchangeIsClose(row) { onchangeIsClose(row, type) {
merchantIsCloseApi(row.mer_id, row.status) type == "lock"
.then(({ message }) => { ? merchantIsLockApi(row.mer_id, row.lock)
this.$message.success(message); .then(({ message }) => {
this.getList(""); this.$message.success(message);
this.getHeadNum(); this.getList("");
}) this.getHeadNum();
.catch(({ message }) => { })
this.$message.error(message); .catch(({ message }) => {
}); this.$message.error(message);
})
: merchantIsCloseApi(row.mer_id, row.status)
.then(({ message }) => {
this.$message.success(message);
this.getList("");
this.getHeadNum();
})
.catch(({ message }) => {
this.$message.error(message);
});
}, },
// //
onAdd() { onAdd() {
@ -474,7 +610,6 @@ export default {
this.$refs.merDetail.isEdit = true; this.$refs.merDetail.isEdit = true;
this.$refs.merDetail.getInfo(id); this.$refs.merDetail.getInfo(id);
this.drawer = true; this.drawer = true;
}, },
// //
onDetails(id) { onDetails(id) {
@ -490,11 +625,11 @@ export default {
this.drawer = false; this.drawer = false;
}, },
// //
setPayment(id){ setPayment(id) {
this.$modalForm(merchantPayForm(id)).then(() => this.getList("")); this.$modalForm(merchantPayForm(id)).then(() => this.getList(""));
}, },
// //
handleDelete(id) { handleDelete(id) {
this.$modalForm(merchantDeleteForm(id)).then(() => this.getList("")); this.$modalForm(merchantDeleteForm(id)).then(() => this.getList(""));
}, },
// //
@ -509,10 +644,9 @@ export default {
// //
onPassword(id) { onPassword(id) {
this.$modalForm(merchantPasswordApi(id)); this.$modalForm(merchantPasswordApi(id));
} },
} },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>

View File

@ -105,7 +105,7 @@
class="selWidth" class="selWidth"
@change="getList(1),getCardList()" @change="getList(1),getCardList()"
> >
<el-option label="消费券" value="0" /> <el-option label="余额" value="0" />
<el-option label="微信" value="1" /> <el-option label="微信" value="1" />
<el-option label="支付宝" value="2" /> <el-option label="支付宝" value="2" />
<el-option label="铸源星" value="7" /> <el-option label="铸源星" value="7" />

View File

@ -74,7 +74,7 @@
class="selWidth" class="selWidth"
@change="getList(1)" @change="getList(1)"
> >
<el-option label="消费券" value="0" /> <el-option label="余额" value="0" />
<el-option label="微信" value="1" /> <el-option label="微信" value="1" />
<el-option label="支付宝" value="2" /> <el-option label="支付宝" value="2" />
<el-option label="铸源星" value="7" /> <el-option label="铸源星" value="7" />

View File

@ -0,0 +1,237 @@
<template>
<div class="divBox">
<div class="selCard">
<el-form
size="small"
:model="tableFrom"
ref="searchForm"
label-width="85px"
inline
>
<el-form-item label="时间选择:" prop="date">
<el-date-picker
v-model="timeVal"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
:picker-options="pickerOptions"
style="width: 280px"
@change="onchangeTime"
/>
</el-form-item>
<el-form-item label="操作端:">
<el-select
v-model="tableFrom.type"
placeholder="请选择"
class="selWidth mr10"
clearable
filterable
@change="getList(1)"
>
<el-option label="平台端" value="1" />
<el-option label="商户端" value="2" />
</el-select>
</el-form-item>
<el-form-item label="商品id:" prop="nickname">
<el-input
v-model="tableFrom.id"
@keyup.enter.native="getList(1)"
placeholder="请输入id"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="操作人:" prop="nickname">
<el-input
v-model="tableFrom.operator_nickname"
@keyup.enter.native="getList(1)"
placeholder="请输入操作人"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)"
>搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-card class="mt14">
<el-button class="mb20" type="primary" size="small" @click="exports"
>导出列表</el-button
>
<el-table
border
ref="productRecords"
:data="tableData.data"
row-key="operate_log_id"
size="small"
v-loading="listLoading"
class="ones"
>
<el-table-column
align="center"
label="序号"
min-width="60"
prop="operate_log_id"
/>
<el-table-column align="center" label="操作记录" min-width="120">
<template slot-scope="scope">
<span>{{ scope.row.category_name }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作端" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.type }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作角色" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.operator_role_nickname }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作人" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.operator_nickname }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作时间"
min-width="100"
prop="create_time"
/>
</el-table>
<div class="block">
<el-pagination
background
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
</div>
</template>
<script>
import { operateRecordList, exportOperate } from "@/api/product";
import timeOptions from "@/utils/timeOptions";
import createWorkBook from "@/utils/newToExcel.js";
export default {
name: "ProductComment",
data() {
return {
pickerOptions: timeOptions,
tableData: {
data: [],
total: 0,
},
timeVal: [],
listLoading: true,
tableFrom: {
page: 1,
limit: 20,
type: "",
date: "",
},
};
},
mounted() {
this.getList(1);
},
methods: {
async exports() {
let excelData = JSON.parse(JSON.stringify(this.tableFrom)),
data = [];
excelData.page = 1;
let pageCount = 1;
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData = await this.downData(excelData);
pageCount = Math.ceil(lebData.count / excelData.limit);
if (lebData.export.length) {
data = data.concat(lebData.export);
excelData.page++;
}
}
createWorkBook(
lebData.header,
lebData.title,
data,
lebData.foot,
lebData.filename
);
return;
},
/**订单列表 */
downData(excelData) {
return new Promise((resolve, reject) => {
let id = this.tableFrom.id;
exportOperate(id ? id : "0", excelData).then((res) => {
return resolve(res.data);
});
});
},
/**重置 */
searchReset() {
this.timeVal = [];
this.tableFrom.date = "";
this.$refs.searchForm.resetFields();
this.getList(1);
},
//
selectChange(tab) {
this.tableFrom.date = tab;
this.timeVal = [];
// this.tableFrom.page = 1;
this.getList(1);
},
//
onchangeTime(e) {
this.timeVal = e;
// this.tableFrom.date = this.timeVal ? this.timeVal.join("-") : "";
this.tableFrom.date = e ? this.timeVal.join("-") : "";
// this.tableFrom.page = 1;
this.getList(1);
},
//
getList(num) {
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
let id = this.tableFrom.id;
operateRecordList(id ? id : "0", this.tableFrom)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
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.getList("");
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-rate {
margin-top: 9px;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -250,7 +250,7 @@
<span>{{ row.user_type === 'routine' ? '小程序' : row.user_type === 'wechat' ? '公众号' : row.user_type === 'app' || row.user_type === 'App' ? 'App' : row.user_type === 'pc' ? 'PC' : 'H5' }}</span> <span>{{ row.user_type === 'routine' ? '小程序' : row.user_type === 'wechat' ? '公众号' : row.user_type === 'app' || row.user_type === 'App' ? 'App' : row.user_type === 'pc' ? 'PC' : 'H5' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="now_money" label="消费卷" sortable min-width="100" :sort-method="(a,b)=>{return a.now_money - b.now_money}"/> <el-table-column prop="now_money" label="余额" sortable min-width="100" :sort-method="(a,b)=>{return a.now_money - b.now_money}"/>
<el-table-column prop="integral" label="铸源星" min-width="100" /> <el-table-column prop="integral" label="铸源星" min-width="100" />
<el-table-column label="操作" min-width="150" fixed="right"> <el-table-column label="操作" min-width="150" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -264,7 +264,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item @click.native="onEdit(scope.row.uid)">编辑信息</el-dropdown-item> --> <!-- <el-dropdown-item @click.native="onEdit(scope.row.uid)">编辑信息</el-dropdown-item> -->
<el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setMoney(scope.row)">设置余额</el-dropdown-item> <el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setMoney(scope.row)">设置余额</el-dropdown-item>
<el-dropdown-item v-if="!scope.row.cancel_time" @click.native="changeIntegral(scope.row)">设置积分</el-dropdown-item> <el-dropdown-item v-if="!scope.row.cancel_time" @click.native="changeIntegral(scope.row)">设置铸源星</el-dropdown-item>
<el-dropdown-item v-if="scope.row.vip_name && !scope.row.cancel_time">清除等级</el-dropdown-item> <el-dropdown-item v-if="scope.row.vip_name && !scope.row.cancel_time">清除等级</el-dropdown-item>
<el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setGroup(scope.row)">设置分组</el-dropdown-item> <el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setGroup(scope.row)">设置分组</el-dropdown-item>
<el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setLabel(scope.row)">设置标签</el-dropdown-item> <el-dropdown-item v-if="!scope.row.cancel_time" @click.native="setLabel(scope.row)">设置标签</el-dropdown-item>

View File

@ -46,7 +46,7 @@
<el-dropdown @command="handleCommand" class="ml10"> <el-dropdown @command="handleCommand" class="ml10">
<el-button icon="el-icon-more" size="small"></el-button> <el-button icon="el-icon-more" size="small"></el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="integral">设置积分</el-dropdown-item> <el-dropdown-item command="integral">设置铸源星</el-dropdown-item>
<el-dropdown-item command="balance">设置余额</el-dropdown-item> <el-dropdown-item command="balance">设置余额</el-dropdown-item>
<el-dropdown-item command="group">设置分组</el-dropdown-item> <el-dropdown-item command="group">设置分组</el-dropdown-item>
<el-dropdown-item command="label">设置标签</el-dropdown-item> <el-dropdown-item command="label">设置标签</el-dropdown-item>
@ -75,7 +75,7 @@
<div>{{psInfo.pay_price}}</div> <div>{{psInfo.pay_price}}</div>
</li> </li>
<li class="item"> <li class="item">
<div class="title">积分</div> <div class="title">铸源星余额</div>
<div>{{psInfo.integral}}</div> <div>{{psInfo.integral}}</div>
</li> </li>
<li class="item"> <li class="item">
@ -451,7 +451,7 @@
</div> </div>
</template> </template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="积分明细" name="detailed"> <el-tab-pane label="铸源星明细" name="detailed">
<template v-if="activeName == 'detailed'"> <template v-if="activeName == 'detailed'">
<el-table :data="tableData.data" size="small"> <el-table :data="tableData.data" size="small">
<el-table-column <el-table-column