Commit a6e0b998 by 前端

Merge branch 'SAAS+V5.8.5' into 'master'

上线合并

See merge request !24
2 parents 8b72b029 50e91c6f
...@@ -10,6 +10,70 @@ const getList = params => { ...@@ -10,6 +10,70 @@ const getList = params => {
sign: true sign: true
}) })
} }
// 积分提现记录打标签
const bindTag = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.tag.bind'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除积分提现标签
const deleteTag = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.tag.delete'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询积分提现标签树
const getTagTree = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.tag.tree'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 保存积分提现标签
const saveTag = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.tag.save'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现获取可选主营品牌列表
const getBrandList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.options.brand.list`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现获取可选省份列表
const getProvinceList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.options.province.list`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//付款渠道树形接口 //付款渠道树形接口
const getChannelTree = params => { const getChannelTree = params => {
params.method = `scrm.api.shopmall.integral.transfer.channel.config.tree` params.method = `scrm.api.shopmall.integral.transfer.channel.config.tree`
...@@ -76,6 +140,17 @@ const integralOut = params => { ...@@ -76,6 +140,17 @@ const integralOut = params => {
returnAll: true returnAll: true
}) })
} }
// 用户积分提现批量驳回
const batchReject = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.batch.reject`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现一键审核 // 积分提现一键审核
const integralAllOut = params => { const integralAllOut = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.all.approve` params.method = `scrm.api.shopmall.integral.transfer.out.all.approve`
...@@ -98,6 +173,16 @@ const integralAllpay = params => { ...@@ -98,6 +173,16 @@ const integralAllpay = params => {
returnAll: true returnAll: true
}) })
} }
// 积分提现一键支付限制门店校验
const checkAllPayLimitStore = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.all.pay.limit.store.check`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现向管理员发送验证码 // 积分提现向管理员发送验证码
const getSms = params => { const getSms = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms` params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms`
...@@ -360,4 +445,4 @@ const getAdmin = (params={}) => { ...@@ -360,4 +445,4 @@ const getAdmin = (params={}) => {
sign: true sign: true
}) })
} }
export default {getListPayLevy,getListPaymentEntity,getChannelList,getChannelTree,payApprovalAgain,getChannelAccount,approvalDetail,removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType} export default {getListPayLevy,getListPaymentEntity,getChannelList,getChannelTree,payApprovalAgain,getChannelAccount,approvalDetail,removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, checkAllPayLimitStore, getList, bindTag, deleteTag, getTagTree, saveTag, getBrandList, getProvinceList, getAdmin, orderExport, integralpay, integralApprove, integralOut, batchReject, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType}
import Vue from 'vue' import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container } from 'element-ui' import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Cascader, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, Drawer, MessageBox, Upload, Tooltip, Popover, Tabs, TabPane, Container } from 'element-ui'
Vue.use(Button) Vue.use(Button)
Vue.use(ButtonGroup) Vue.use(ButtonGroup)
Vue.use(Form) Vue.use(Form)
...@@ -15,6 +15,7 @@ Vue.use(Option) ...@@ -15,6 +15,7 @@ Vue.use(Option)
Vue.use(TimePicker) Vue.use(TimePicker)
Vue.use(Col) Vue.use(Col)
Vue.use(DatePicker) Vue.use(DatePicker)
Vue.use(Cascader)
Vue.use(Tree) Vue.use(Tree)
Vue.use(Card) Vue.use(Card)
Vue.use(Table) Vue.use(Table)
...@@ -22,9 +23,13 @@ Vue.use(TableColumn) ...@@ -22,9 +23,13 @@ Vue.use(TableColumn)
Vue.use(Pagination) Vue.use(Pagination)
Vue.use(Loading) Vue.use(Loading)
Vue.use(Dialog) Vue.use(Dialog)
Vue.use(Drawer)
Vue.use(Upload) Vue.use(Upload)
Vue.use(Tooltip) Vue.use(Tooltip)
Vue.use(Popover)
Vue.use(Tabs) Vue.use(Tabs)
Vue.use(TabPane) Vue.use(TabPane)
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
export const message = Message export const message = Message
export const messageBox = MessageBox export const messageBox = MessageBox
<template>
<GLDialog class="batch-tag-dialog" title="批量配置二/三标签" mode="mid" :visible.sync="isVisible" :close-on-click-modal="false" :before-close="handleClose" append-to-body :z-index="3000">
<div v-loading="loading" class="batch-tag-content">
<div class="batch-tag-tip">
您已勾选
<span>{{ ids.length }}</span>
条明细,请选择统一覆盖的目标二/三级标签路径:
</div>
<el-cascader v-model="tagPath" class="batch-tag-cascader" :options="tagOptions" :props="cascaderProps" placeholder="请选择二/三级标签" separator=" / " clearable filterable></el-cascader>
<div class="batch-tag-desc">提示:标签路径需在「自定义标签」中已补全至二级或三级后方可使用。</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取消</el-button>
<el-button type="primary" size="small" :loading="saving" @click="handleConfirm">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
name: 'BatchTagDialog',
props: {
visible: {
type: Boolean,
default: false
},
ids: {
type: Array,
default: () => []
}
},
data() {
return {
isVisible: false,
loading: false,
saving: false,
tagPath: [],
tagOptions: [],
cascaderProps: {
value: 'id',
label: 'name',
children: 'children',
emitPath: true
}
}
},
watch: {
visible: {
immediate: true,
handler(val) {
this.isVisible = val
if (val) {
this.tagPath = []
this.getTagTree()
}
}
}
},
methods: {
getTagTree() {
this.loading = true
this.$apis.withdraw
.getTagTree({ onlyComplete: true })
.then(res => {
const list = Array.isArray(res) ? res : res && Array.isArray(res.data) ? res.data : []
this.tagOptions = this.formatTree(list)
})
.finally(() => {
this.loading = false
})
},
formatTree(list) {
return (list || []).map(item => {
const sourceChildren = item.children || item.child || item.childList || []
const children = this.formatTree(sourceChildren)
const option = {
...item,
id: item.id,
name: item.name || item.label || item.tagName || ''
}
if (children.length) {
option.children = children
} else {
delete option.children
delete option.child
delete option.childList
}
return option
})
},
handleClose() {
this.$emit('update:visible', false)
},
handleConfirm() {
this.saving = true
this.$apis.withdraw
.bindTag({
ids: this.ids,
transferOutTagId: this.tagPath.length ? this.tagPath[this.tagPath.length - 1] : ''
})
.then(res => {
if (res) {
this.$message.success('保存成功')
this.$emit('success')
this.handleClose()
}
})
.finally(() => {
this.saving = false
})
}
}
}
</script>
<style lang="scss" scoped>
.batch-tag-dialog {
/deep/ {
.el-dialog {
width: 520px;
}
.el-dialog__body {
padding: 28px 24px 22px;
}
}
}
.batch-tag-content {
min-height: 94px;
}
.batch-tag-tip {
margin-bottom: 16px;
color: #606266;
font-size: 14px;
span {
color: #5850ff;
font-weight: 600;
}
}
.batch-tag-cascader {
width: 100%;
}
.batch-tag-desc {
margin-top: 10px;
color: #909399;
font-size: 12px;
line-height: 18px;
}
</style>
<template>
<el-drawer class="custom-tag-drawer" title="自定义标签" :visible.sync="isVisible" direction="rtl" size="680px" :before-close="handleClose" :append-to-body="true">
<div class="tag-tree-panel" v-loading="loading">
<div class="tag-tree-title">
<span>标签列表</span>
</div>
<div class="tag-tree-body">
<div class="tag-root-node">
<span class="tag-root-name" @click="toggleRoot">
<i :class="rootExpanded ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"></i>
全部
</span>
<i class="el-icon-plus tag-root-add" @click="handleAddRoot"></i>
</div>
<el-tree v-show="rootExpanded" ref="tagTree" :data="tagTree" :props="treeProps" node-key="id" default-expand-all :expand-on-click-node="false" :highlight-current="true" empty-text="暂无标签">
<div class="tag-tree-node" slot-scope="{ node, data }">
<span class="tag-node-name" :title="data.name">{{ data.name }}</span>
<el-popover v-model="data.popoverVisible" placement="bottom-end" width="128" trigger="click" popper-class="tag-node-popover">
<div class="tag-node-menu">
<div v-if="node.level < 3" class="tag-menu-item tag-menu-add" @click="handleAdd(data)">
<span>新增子标签</span>
</div>
<div class="tag-menu-item" @click="handleEdit(data)">编辑</div>
<div class="tag-menu-item danger" @click="handleDelete(data)">删除</div>
</div>
<i slot="reference" class="el-icon-more tag-node-more"></i>
</el-popover>
</div>
</el-tree>
</div>
</div>
<tag-form-dialog :visible.sync="tagDialogVisible" :tagInfo="tagFormInfo" @success="getTagTree"></tag-form-dialog>
</el-drawer>
</template>
<script>
import TagFormDialog from './tagFormDialog.vue'
export default {
name: 'CustomTagDrawer',
components: {
TagFormDialog
},
props: {
visible: {
type: Boolean,
default: false
}
},
data() {
return {
isVisible: false,
loading: false,
tagTree: [],
rootExpanded: true,
tagDialogVisible: false,
tagFormInfo: {},
treeProps: {
children: 'children',
label: 'name'
}
}
},
watch: {
visible: {
immediate: true,
handler(val) {
this.isVisible = val
if (val) {
this.getTagTree()
}
}
}
},
methods: {
handleClose() {
this.$emit('update:visible', false)
this.$emit('drawerClose')
},
getTagTree() {
this.loading = true
this.$apis.withdraw
.getTagTree({})
.then(res => {
const list = Array.isArray(res) ? res : res && Array.isArray(res.data) ? res.data : []
this.tagTree = this.formatTree(list)
})
.finally(() => {
this.loading = false
})
},
formatTree(list) {
return (list || []).map(item => {
const children = item.children || item.child || item.childList || []
return {
...item,
name: item.name || item.label || item.tagName || '',
popoverVisible: false,
children: this.formatTree(children)
}
})
},
handleAddRoot() {
this.tagFormInfo = {
parentId: '',
name: ''
}
this.tagDialogVisible = true
},
toggleRoot() {
this.rootExpanded = !this.rootExpanded
},
handleAdd(data) {
data.popoverVisible = false
this.tagFormInfo = {
parentId: data.id,
name: ''
}
this.$nextTick(() => {
this.tagDialogVisible = true
})
},
handleEdit(data) {
data.popoverVisible = false
this.tagFormInfo = {
id: data.id,
parentId: data.parentId || '',
name: data.name
}
this.$nextTick(() => {
this.tagDialogVisible = true
})
},
handleDelete(data) {
data.popoverVisible = false
this.$confirm('确定删除该标签?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
return this.$apis.withdraw.deleteTag({ id: data.id })
})
.then(res => {
console.log(res)
if (res) {
this.$message.success('删除成功')
this.getTagTree()
}
})
.catch(() => {})
}
}
}
</script>
<style lang="scss" scoped>
.custom-tag-drawer {
/deep/ {
.el-drawer__header {
margin-bottom: 0;
padding: 20px 24px 16px;
color: #333333;
font-size: 16px;
font-weight: 600;
}
.el-drawer__body {
padding: 0 24px 24px;
overflow: hidden;
}
}
}
.tag-tree-panel {
width: 100%;
height: calc(100vh - 84px);
border: 1px solid #e5e9f2;
background: #ffffff;
box-sizing: border-box;
overflow: hidden;
}
.tag-tree-title {
height: 44px;
line-height: 44px;
padding: 0 16px;
color: #333333;
font-size: 14px;
box-sizing: border-box;
}
.tag-tree-body {
height: calc(100% - 44px);
overflow: auto;
padding: 0 8px 12px;
box-sizing: border-box;
}
.tag-root-node {
height: 30px;
line-height: 30px;
padding: 0 8px 0 0;
display: flex;
align-items: center;
justify-content: space-between;
color: #333333;
font-size: 13px;
box-sizing: border-box;
}
.tag-root-name {
display: flex;
align-items: center;
cursor: pointer;
user-select: none;
i {
margin-right: 6px;
color: #b7c0ca;
font-size: 12px;
}
}
.tag-root-add {
color: #8993a4;
font-size: 14px;
cursor: pointer;
}
.tag-tree-body {
/deep/ {
.el-tree {
color: #333333;
font-size: 13px;
}
.el-tree-node__content {
height: 30px;
line-height: 30px;
position: relative;
}
.el-tree-node__content:hover,
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
background-color: #edf3ff;
}
.el-tree-node__expand-icon {
color: #b7c0ca;
font-size: 12px;
}
.el-tree-node__expand-icon.is-leaf {
color: transparent;
}
}
}
.tag-tree-node {
min-width: 0;
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
height: 30px;
padding-right: 8px;
}
.tag-node-name {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 8px;
}
.tag-node-more {
color: #8993a4;
font-size: 14px;
cursor: pointer;
transform: rotate(90deg);
}
</style>
<style lang="scss">
.tag-node-popover {
min-width: 128px;
padding: 6px 0;
box-sizing: border-box;
border-radius: 3px;
box-shadow: 0 4px 14px rgba(31, 45, 61, 0.14);
border: 0;
.tag-node-menu {
font-size: 14px;
color: #606266;
}
.tag-menu-item {
height: 34px;
line-height: 34px;
padding: 0 14px;
cursor: pointer;
white-space: nowrap;
&:hover {
background: #f5f7fa;
}
i {
margin-right: 7px;
font-size: 14px;
}
}
.tag-menu-add {
color: #5850ff;
}
.tag-menu-item.danger {
color: #f56c6c;
}
}
</style>
<template>
<GLDialog class="gl-form-page gl-form-min tag-form-dialog" :title="dialogTitle" mode="mid" :visible.sync="isVisible" :close-on-click-modal="false" :before-close="handleClose" append-to-body>
<glsx-combi-form ref="tagFormRef" formRef="tagChildRef" defaultWidth="432px" :formObj="tagForm" :formData="tagFormData" :formRules="tagRule"></glsx-combi-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="handleConfirm">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
name: 'TagFormDialog',
props: {
visible: {
type: Boolean,
default: false
},
tagInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
isVisible: false,
loading: false,
tagForm: {
id: '',
parentId: '',
name: ''
},
tagFormData: [
{
label: '标签名称',
name: 'name',
type: 'input',
maxlength: 50
}
],
tagRule: {
name: [
{ required: true, message: '请输入标签名称', trigger: 'blur' },
{ min: 1, max: 50, message: '标签名称长度为1-50个字符', trigger: 'blur' }
]
}
}
},
computed: {
dialogTitle() {
return this.tagForm.id ? '编辑标签' : '新增标签'
}
},
watch: {
visible: {
immediate: true,
handler(val) {
this.isVisible = val
if (val) {
this.initForm()
}
}
}
},
methods: {
initForm() {
this.tagForm = {
id: this.tagInfo.id || '',
parentId: this.tagInfo.parentId || '',
name: this.tagInfo.name || ''
}
this.$nextTick(() => {
const formRef = this.$refs.tagFormRef && this.$refs.tagFormRef.$refs.tagChildRef
formRef && formRef.clearValidate()
})
},
handleClose() {
this.$emit('update:visible', false)
this.$emit('close')
},
handleConfirm() {
const formRef = this.$refs.tagFormRef && this.$refs.tagFormRef.$refs.tagChildRef
if (!formRef) return
formRef.validate(valid => {
if (!valid) return
this.loading = true
const params = {
name: this.tagForm.name,
parentId: this.tagForm.parentId
}
if (this.tagForm.id) {
params.id = this.tagForm.id
}
this.$apis.withdraw
.saveTag(params)
.then(res => {
if (res) {
this.$message.success('保存成功')
this.$emit('success')
this.handleClose()
}
})
.finally(() => {
this.loading = false
})
})
}
}
}
</script>
<style lang="scss" scoped>
.tag-form-dialog {
/deep/ {
.el-form--inline .el-form-item {
display: block;
}
.el-form .el-input {
width: 100%;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!