edit
This commit is contained in:
parent
fcf256ea16
commit
adcf52bbac
|
@ -74,6 +74,12 @@ export function merchantDeleteApi(id) {
|
|||
export function merchantDeleteForm(id) {
|
||||
return request.get(`system/merchant/delete/${id}/form`)
|
||||
}
|
||||
/**
|
||||
* @description 商户列表 -- 缴费(表单)
|
||||
*/
|
||||
export function merchantPayForm(id) {
|
||||
return request.get(`margin/offline_money/${id}/form`)
|
||||
}
|
||||
/**
|
||||
* @description 商户列表 -- 修改开启状态
|
||||
*/
|
||||
|
|
|
@ -166,13 +166,14 @@ export function cancelOrderStatusFilter(status) {
|
|||
|
||||
export function orderPayType(type) {
|
||||
const typeMap = {
|
||||
'0': '余额支付',
|
||||
'0': '消费券支付',
|
||||
'1': '微信支付',
|
||||
'2': '小程序',
|
||||
'3': '微信支付',
|
||||
'4': '支付宝',
|
||||
'5': '支付宝扫码',
|
||||
'6': '微信扫码'
|
||||
'6': '微信扫码',
|
||||
'7': '铸源星支付'
|
||||
}
|
||||
return typeMap[type]
|
||||
}
|
||||
|
|
|
@ -51,7 +51,31 @@ export function parseTime(time, cFormat) {
|
|||
})
|
||||
return time_str
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {json} json
|
||||
* @returns {string}
|
||||
*/
|
||||
export function syntaxHighlight(json) {
|
||||
if (typeof json != 'string') {
|
||||
json = JSON.stringify(json, undefined, 2);
|
||||
}
|
||||
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
||||
var cls = 'number';
|
||||
if (/^"/.test(match)) {
|
||||
if (/:$/.test(match)) {
|
||||
cls = 'key';
|
||||
} else {
|
||||
cls = 'string';
|
||||
}
|
||||
} else if (/true|false/.test(match)) {
|
||||
cls = 'boolean';
|
||||
} else if (/null/.test(match)) {
|
||||
cls = 'null';
|
||||
}
|
||||
return '<span class="' + cls + '">' + match + '</span>';
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {number} time
|
||||
* @param {string} option
|
||||
|
|
|
@ -236,6 +236,7 @@
|
|||
</el-radio-group>
|
||||
<span v-if="merData.is_margin != 0">
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="merData.margin"
|
||||
placeholder="请填写保证金"
|
||||
style="width:120px;margin-left: 8px;"
|
||||
|
@ -260,6 +261,7 @@
|
|||
</el-radio-group>
|
||||
<span v-if="merData.is_service != 0">
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="merData.service_cost"
|
||||
placeholder="请填写技术服务费"
|
||||
style="width:120px;margin-left: 8px;"
|
||||
|
@ -284,6 +286,7 @@
|
|||
</el-radio-group>
|
||||
<span v-if="merData.is_goods != 0">
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="merData.goods_cost"
|
||||
placeholder="请填写上架费"
|
||||
style="width:120px;margin-left: 8px;"
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
<el-table-column prop="sort" label="排序" min-width="100" />
|
||||
<el-table-column prop="mark" label="备注" min-width="200" />
|
||||
|
||||
<el-table-column label="操作" min-width="150" fixed="right">
|
||||
<el-table-column label="操作" min-width="180" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="tableFrom.status === '1'"
|
||||
|
@ -210,6 +210,7 @@
|
|||
@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="setPayment(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'"
|
||||
|
@ -259,6 +260,7 @@ import {
|
|||
merchantCountApi,
|
||||
merchantIsCloseApi,
|
||||
getstoreTypeApi,
|
||||
merchantPayForm,
|
||||
getMerCateApi, marginDeductionForm
|
||||
} from "@/api/merchant";
|
||||
import merDetail from './handle/merDetails.vue';
|
||||
|
@ -460,6 +462,10 @@ export default {
|
|||
closeDrawer() {
|
||||
this.drawer = false;
|
||||
},
|
||||
// 缴费
|
||||
setPayment(id){
|
||||
this.$modalForm(merchantPayForm(id)).then(() => this.getList(""));
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id) {
|
||||
this.$modalForm(merchantDeleteForm(id)).then(() => this.getList(""));
|
||||
|
|
|
@ -105,9 +105,10 @@
|
|||
class="selWidth"
|
||||
@change="getList(1),getCardList()"
|
||||
>
|
||||
<el-option label="余额" value="0" />
|
||||
<el-option label="消费券" value="0" />
|
||||
<el-option label="微信" value="1" />
|
||||
<el-option label="支付宝" value="2" />
|
||||
<el-option label="铸源星" value="7" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货方式:" prop="filter_delivery">
|
||||
|
@ -280,7 +281,7 @@
|
|||
<p v-if="scope.row.finalOrder">尾款:{{ scope.row.finalOrder.pay_price }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付类型" min-width="80">
|
||||
<el-table-column label="支付方式" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.paid === 1">{{ scope.row.pay_type | orderPayType }}</span>
|
||||
<span v-else>--</span>
|
||||
|
|
|
@ -66,6 +66,20 @@
|
|||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付方式:" prop="pay_type">
|
||||
<el-select
|
||||
v-model="tableFrom.pay_type"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="selWidth"
|
||||
@change="getList(1)"
|
||||
>
|
||||
<el-option label="消费券" value="0" />
|
||||
<el-option label="微信" value="1" />
|
||||
<el-option label="支付宝" value="2" />
|
||||
<el-option label="铸源星" value="7" />
|
||||
</el-select>
|
||||
</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>
|
||||
|
@ -117,6 +131,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="refund_price" label="退款金额" min-width="130" />
|
||||
<el-table-column label="支付方式" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.paid === 1">{{ scope.row.pay_type | orderPayType }}</span>
|
||||
<span v-else>--</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nickname" label="商品信息" min-width="330">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
|
@ -139,6 +159,7 @@
|
|||
</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>
|
||||
|
@ -229,7 +250,8 @@ export default {
|
|||
date: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
is_trader: ''
|
||||
is_trader: '',
|
||||
pay_type:''
|
||||
},
|
||||
orderChartType: {},
|
||||
timeVal: [],
|
||||
|
|
|
@ -5,6 +5,15 @@
|
|||
<el-form-item label="管理员ID:" prop="admin_id">
|
||||
<el-input v-model="tableFrom.admin_id" placeholder="请输入" class="selWidth" @keyup.enter.native="getList(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="权限名称:" prop="menu_name">
|
||||
<el-input v-model="tableFrom.menu_name" placeholder="请输入" class="selWidth" @keyup.enter.native="getList(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="请求:" prop="route">
|
||||
<el-input v-model="tableFrom.route" placeholder="请输入" class="selWidth" @keyup.enter.native="getList(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:" prop="route">
|
||||
<el-input v-model="tableFrom.keyword" placeholder="请输入" class="selWidth" @keyup.enter.native="getList(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式:" prop="method">
|
||||
<el-select v-model="tableFrom.method" placeholder="请选择" clearable class="selWidth">
|
||||
<el-option v-for="item in importanceOptions" :key="item" :label="item" :value="item" />
|
||||
|
@ -76,6 +85,11 @@
|
|||
label="操作时间"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="60" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="onDetails(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
|
@ -89,12 +103,25 @@
|
|||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
title="详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
top="4vh"
|
||||
>
|
||||
<pre v-html="preInfo"></pre>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { adminLogApi } from '@/api/setting'
|
||||
import { syntaxHighlight } from '@/utils/index'
|
||||
export default {
|
||||
name: 'SystemLog',
|
||||
data() {
|
||||
|
@ -105,15 +132,20 @@ export default {
|
|||
data: [],
|
||||
total: 0
|
||||
},
|
||||
dialogVisible: false,
|
||||
timeVal: [],
|
||||
section_time: [],
|
||||
importanceOptions: ['POST', 'DELETE'],
|
||||
preInfo:'',
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
admin_id: '',
|
||||
method: '',
|
||||
date: ''
|
||||
date: '',
|
||||
menu_name:'',
|
||||
route:'',
|
||||
keyword:''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -150,6 +182,14 @@ export default {
|
|||
this.tableFrom.limit = val
|
||||
this.getList(1)
|
||||
},
|
||||
// 详情
|
||||
onDetails(row){
|
||||
this.dialogVisible = true
|
||||
console.log(Object.keys(JSON.parse(row.input)).length)
|
||||
|
||||
let info = Object.keys(JSON.parse(row.input)).length?syntaxHighlight(JSON.parse(row.input)):'无'
|
||||
this.preInfo = info
|
||||
},
|
||||
onChange(e) {
|
||||
if (e == null) {
|
||||
this.tableFrom.section_startTime = ''
|
||||
|
|
Loading…
Reference in New Issue