Commit ef918f30 by 王志慧

积分提现管理需求开发

1 parent 4517feb0
import { http } from '@/main'
// 积分提现订单列表
const getList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获分提现获取管理员信息
const getAdmin = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现列表-导出
const orderExport = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现支付
const integralpay = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.batch.pay`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 用户积分提现批量审核
const integralApprove = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.batch.approve`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 用户积分提现审核/驳回
const integralOut = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approve`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现向管理员发送验证码
const getSms = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 用户积分明细详情-客户积分详情
const customerDetail = params => {
params.method = `scrm.api.shopmall.integralcustomer.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut,getSms, customerDetail }
.left{float:left}.right{float:right}.align-right{text-align:right}
.left {
float: left
}
.right {
float: right
}
.align-right {
text-align: right
}
\ No newline at end of file
......@@ -7,11 +7,19 @@ html {
overflow: hidden;
background-color: #f4f5fa;
}
div,
p{
margin:0;
box-sizing: border-box;
}
.flex {
display: flex;
}
.flex_sc{
display: flex;
align-items: center;
}
.points .container {
background: #ffffff;
padding: 20px;
......@@ -60,3 +68,9 @@ html {
.el-cascader-menu__wrap {
height: 204px !important;
}
.ellipsis-1{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-10 16:40:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-22 16:25:00
* @FilePath: \outbound\src\components\glsx-combi-form\common.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const rangetimePickerOptions = {
disabledDate(date) {
let dateHour = new Date()
dateHour.setDate(date.getDate())
dateHour.setHours(8)
dateHour.setMinutes(0)
dateHour.setSeconds(0)
if (dateHour.getTime() < date.getTime() < new Date(2016, 9, 10, 20, 0).getTime()) {
return true
}
return false
}
}
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<!-- 搜索 -->
<template>
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" :width="item.tipsWidth || 200" trigger="hover">
<div>
{{ item.tips }}
<span class="tips-jump" v-if="item.jumpLabel" @click="item.handleJump">{{ item.jumpLabel }}</span>
</div>
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover>
:
</span>
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth || labelWidth }">{{ item.label }}:</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="suffix">{{ item.append }}</span>
</el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- 选择-时间选择框 -->
<template v-else-if="item.type === 'selectTimePicker'">
<el-time-picker is-range v-model="formObj[item.name]" :value-format="item.format || ''" :style="{ width: item.width || defaultWidth }" :picker-options="item.pickerOptions || ''" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</template>
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">
{{ subItem[item.optionLabel] }}
<slot :name="subItem.suffixSonSlot" :scope="subItem"></slot>
</el-radio>
</el-radio-group>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
<slot :name="item.prefixSlot" :scope="item"></slot>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''">
<div class="add" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('addStyle') ? item.uploadStyle.addStyle : ''">+</div>
<!-- <span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }}/{{ item.maxPhotoNum }}</span> -->
<span class="number" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('fontSize') ? item.uploadStyle.fontSize : ''">上传{{ item.uploadType == 'video' ? '视频' : '图片' }}</span>
<input v-if="item.uploadType == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" accept="video/mp4" @change="e => handleUploadChange(e, item)" />
<input v-else type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
</div>
</div>
<template>
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length : formObj[item.name]">
<span v-if="Array.isArray(formObj[item.name])">
<span v-for="(subItem, subIndex) in formObj[item.name]" :key="subIndex" class="muti-imgs img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''">
<video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="typeof subItem == 'object' ? subItem.content : subItem"></video>
<img v-else class="img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="typeof subItem == 'object' ? subItem.content : subItem" />
<span class="img-btns" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''">
<span class="btn-item">
<i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item, subIndex)"></i>
<i class="el-icon-zoom-in" @click="handleImgLook(typeof subItem == 'object' ? subItem.content : subItem, item)"></i>
</span>
</span>
</span>
</span>
<span v-else class="muti-imgs">
<video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="formObj[item.name]"></video>
<img v-else class="img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="formObj[item.name]" />
<span class="img-btns" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''">
<span class="btn-item">
<i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item)"></i>
<i class="el-icon-zoom-in" @click="handleImgLook(formObj[item.name], item)"></i>
</span>
</span>
</span>
</div>
</template>
<slot :name="item.suffixSlot" :scope="item"></slot>
</template>
</el-form-item>
</template>
<slot name="footer"></slot>
</el-form>
</div>
</template>
<script>
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default {
name: 'glsx-combi-form',
data() {
return {
pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions
},
subdistrict: 2,
dialogMapVisible: false,
targetItem: {},
isImgVisible: false,
dialogObj: {
url: '',
uploadType: 'img'
}
}
},
props: {
isBlock: {
type: Boolean,
default: false
},
defaultWidth: {
type: String,
default: '432px'
},
formRef: {
type: String,
default: 'formRef'
},
isEdit: {
type: Boolean,
default: false
},
labelWidth: {
type: String,
// 默认是四个字符长度
default: '154px'
},
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
},
hasTitle: {
type: Boolean,
default: true
},
formRules: {
type: Object,
default: () => {}
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
// 选择框-添加其他属性
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
},
// 图片
handleUploadChange(e, targetItem) {
var reader = new FileReader()
var file = e.srcElement.files[0]
var uploadType = targetItem.uploadType || 'img',
IMGTYPE = ['image/jpeg', 'image/png', 'image/jpg']
if (targetItem.supportGif) IMGTYPE.push('image/gif')
// 默认1MB
const limitSize = targetItem.limitSize || 1
const isLt = file.size / 1024 / 1024 < limitSize
const isType = uploadType == 'img' ? IMGTYPE.includes(file.type) : ['video/mp4'].includes(file.type)
const maxPhotoNum = targetItem.maxPhotoNum || 1
const wdithLt = targetItem.wdithLt || 300
const heightLt = targetItem.heightLt || 300
if (Array.isArray(this.formObj[targetItem.name]) && maxPhotoNum == this.formObj[targetItem.name].length) {
this.$message.error('只能上传' + maxPhotoNum + (uploadType == 'img' ? '张图片' : '个视频'))
document.getElementById(targetItem.name + 'file').value = ''
return true
}
if (!isType) {
this.$message.error(uploadType == 'img' ? '上传图片不是jpg、jpeg或png的格式!' : '上传视频不是MP4的格式!')
document.getElementById(targetItem.name + 'file').value = ''
return true
}
if (!isLt) {
this.$message.error('上传' + (uploadType == 'img' ? '图片' : '视频') + '大小不能超过' + limitSize + 'MB!')
document.getElementById(targetItem.name + 'file').value = ''
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
if (uploadType == 'img') {
var image = new Image()
image.src = e.target.result
image.onload = () => {
var imgWidth = image.width
var imgHeight = image.height
if (targetItem.hasPixel && (imgWidth > wdithLt || imgHeight > heightLt)) {
this.$message.error('图片尺寸最大为' + wdithLt + '像素*' + heightLt + '像素')
} else {
targetItem.handleUpload(e, file, targetItem, this.formObj)
}
}
} else {
targetItem.handleUpload(e, file, targetItem, this.formObj)
}
}
document.getElementById(targetItem.name + 'file').value = ''
},
// 图片删除
handleImgDelete(targetItem, subIndex = -1) {
Array.isArray(this.formObj[targetItem.name]) ? this.formObj[targetItem.name].splice(subIndex, 1) : (this.formObj[targetItem.name] = '')
targetItem.handleDelete && targetItem.handleDelete(subIndex)
// this.$emit('handleImgDelete', targetItem)
},
// 图片查看
handleImgLook(src, targetItem) {
this.isImgVisible = true
this.dialogObj = {
url: src,
uploadType: targetItem.uploadType || 'img'
}
},
// 获取富文本框内容
handleTextBoxChange(val, targetItem) {
this.formObj[targetItem.name] = val
},
handleTextBoxFocus(targetItem) {
this.$refs[targetItem.name + 'TextBox'][0].setEdit(this.formObj[targetItem.name])
},
// 禁用富文本
forbidEdit() {
setTimeout(() => {
this.$refs.textBox.forbidEdit()
}, 2000)
},
// 地图
handleSelectMap(targetItem) {
this.targetItem = targetItem
this.dialogMapVisible = true
this.$nextTick(() => {
if (this.formObj[targetItem.attrObj.fullAddress] && !this.$refs.mapForm.address) {
this.$refs.mapForm.address = this.formObj[targetItem.attrObj.fullAddress]
this.$refs.mapForm.lnglat = this.formObj[targetItem.attrObj.lng] ? [this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]] : []
// this.$refs.mapForm.addMarker([this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]])
}
})
},
getAddress() {
let mapInfo = this.$refs.mapForm
if (!mapInfo.address) {
this.$message({
message: '请选择地址',
type: 'error',
customClass: 'message-Z-zinde'
})
return
}
this.formObj[this.targetItem.attrObj.fullAddress] = mapInfo.address
this.formObj[this.targetItem.attrObj.lat] = mapInfo.lnglat[1]
this.formObj[this.targetItem.attrObj.lng] = mapInfo.lnglat[0]
// var fullAddress = mapInfo.geocoderAddress.addressComponent || this.formObj[this.targetItem.attrObj.fullAddress]
var fullAddress = mapInfo.geocoderAddress.addressComponent
// if (!fullAddress) {
// this.dialogMapVisible = false
// return
// }
var provincecode = mapInfo.geocoderAddress.adcode || this.formObj[this.targetItem.attrObj.provinceCode]
this.formObj[this.targetItem.attrObj.provinceCode] = provincecode
// 获取省市
var province = ''
var city = ''
province = fullAddress.province
city = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province)
if (municipality) {
city = city.slice(0, 2) + '城区'
if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
}
}
// 判断省市是否匹配
if (this.formObj[this.targetItem.attrObj.provinceName]) {
if (this.formObj[this.targetItem.attrObj.provinceName] !== province && this.formObj[this.targetItem.attrObj.cityName] !== city) {
this.$message({
message: '您选择的地址错误,请重新选择',
type: 'error',
customClass: 'message-Z-zinde'
})
this.formObj[this.formObj[this.targetItem.attrObj.fullAddress]] = ''
return
}
}
this.dialogMapVisible = false
this.formObj[this.targetItem.attrObj.provinceName] = province
this.formObj[this.targetItem.attrObj.cityName] = city
// 当直接点击选择地址时,获取省市ID
this.$refs.provinceForm[0].init(province, city)
},
// 获取省
handleSelectProvince(val, targetItem) {
this.formObj[targetItem.attrObj.fullAddress] = ''
this.formObj[targetItem.attrObj.cityName] = ''
this.formObj[targetItem.attrObj.provinceName] = val.provinceName
this.formObj[targetItem.attrObj.provinceCode] = val.provinceCode
},
// 获取市
handleSelectCity(val, targetItem) {
if (val.cityName) {
this.formObj[targetItem.attrObj.cityName] = val.cityName
this.formObj[targetItem.attrObj.cityCode] = val.cityCode
} else {
this.formObj[targetItem.attrObj.cityName] = ''
this.formObj[targetItem.attrObj.cityCode] = ''
}
this.formObj[targetItem.attrObj.fullAddress] = ''
}
}
}
</script>
<style>
/* .glsx-combi-form {
min-width: 922px;
} */
/* .glsx-combi-form .glsx-combi-form-block {
padding: 16px 40px 0;
} */
.glsx-combi-form .isBlock {
display: block !important;
}
/* .glsx-combi-form .el-form-item {
width: 65%;
} */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content {
width: 100%;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0 30px 20px 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px);
} */
.glsx-combi-form .el-col {
margin-bottom: 10px;
}
.glsx-combi-form .el-select {
width: 100%;
}
.glsx-combi-form .item-height {
height: 37px;
}
.glsx-combi-form input::-webkit-outer-spin-button,
.glsx-combi-form input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.glsx-combi-form input[type='number'] {
-moz-appearance: textfield !important;
}
.glsx-combi-form .input-with-select .el-input-group__prepend {
background-color: #fff;
}
/* 提示图标 */
/* .glsx-combi-form .tips-block {
position: relative;
} */
.glsx-combi-form .tips-label {
margin-right: 2px;
}
.glsx-combi-form .tips-icon {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 0px !important;
vertical-align: middle;
cursor: pointer;
}
.glsx-combi-form .combi-form-label {
/* display: inline-block; */
box-sizing: border-box;
}
/* 图片上传 */
.glsx-combi-form .photo-top-tips {
/* height: 36px; */
margin: 0 0;
color: #999999;
}
.glsx-combi-form .img-w-h {
width: 80px;
height: 80px;
}
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
margin-top: 10px;
}
.glsx-combi-form .activity-Input {
position: absolute;
top: 0;
left: 0;
}
.glsx-combi-form .muti-imgs {
display: inline-block;
position: relative;
margin: 10px 8px 0 0;
}
.activity-img .add {
position: absolute;
top: 40%;
font-size: 40px;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
.activity-img .number {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
font-size: 14px;
width: 100%;
text-align: center;
}
.muti-imgs .img-btns {
display: none;
height: 100%;
position: absolute;
width: 80px;
height: 80px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.glsx-combi-form .el-icon-delete,
.glsx-combi-form .el-icon-zoom-in {
cursor: pointer;
}
.muti-imgs .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.muti-imgs .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.muti-imgs:hover .img-btns {
display: block;
}
.glsx-combi-form .dialog-img {
width: 100%;
height: 100%;
}
.glsx-combi-form .dialog-look {
text-align: center;
}
.glsx-combi-form .dialog-video {
width: 50%;
height: 50%;
}
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
.textBox .el-form-item__content {
width: 62%;
/* background: #096; */
}
.tips-jump {
color: #5850ff;
cursor: pointer;
}
</style>
......@@ -10,6 +10,8 @@
import Vue from 'vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
import InputNumRange from '@/components/InputNumRange/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
Vue.component('glsx-dialog', glsxDialog)
Vue.component('input-num-range', InputNumRange)
Vue.component('glsx-combi-form', glsxCombiForm)
<!-- 盘点详情弹窗弹窗 -->
<template>
<GLDialog bigTitle="详细信息" :visible.sync="isVisible" :hasFooter="false" :before-close="handleClose" class="points" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div class="wrap edit-box">
<div>
<p class="edit-title">订单信息</p>
<el-form label-width="154px" :inline="true">
<el-row v-for="(item, index) in withdrawDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div>
<p class="edit-title">付款信息</p>
<el-form label-width="154px" :inline="true">
<el-row v-for="(item, index) in paymentDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div>
<p class="edit-title">操作记录</p>
<el-form label-width="154px" :inline="true">
<el-row v-for="(item, index) in operationDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'DetailDialog',
data() {
return {
withdrawDataRow: [],
paymentDataRow: [],
operationDataRow: [],
withdrawData: [],
paymentData: [],
operationData: [],
isVisible: this.detailVisible
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => {}
}
},
watch: {
detailVisible(newVal) {
this.isVisible = newVal
this.getConfig()
}
},
computed: {},
mounted() {},
methods: {
async getConfig() {
let withdrawData = [
{
label: '提现单号',
name: 'outSettleOrderId'
},
{
label: '客户名称',
name: 'customerName'
},
{
label: '客户手机',
name: 'customerPhone'
},
{
label: '提现积分',
name: 'integralAmount'
},
{
label: '提现金额',
name: 'payAmount'
},
{
label: '所属门店',
name: 'merchantName'
},
{
label: '申请时间',
name: 'createdDate'
}
],
paymentData = [
{
label: '收款人姓名',
name: 'name'
},
{
label: '收款人身份证',
name: 'idCardNo'
},
{
label: '收款银行卡号',
name: 'recvBankCardNo'
},
{
label: '收款银行',
name: 'recvBank',
suffix: '%'
},
{
label: '收款手机号',
name: 'mobile'
},
{
label: '付款渠道',
name: 'channel'
},
{
label: '状态',
name: 'status'
},
{
label: '失败原因',
name: 'crowdFundingPrice'
}
],
operationData = [
{
label: '审核',
name: 'shipAddress'
},
{
label: '审核人',
name: 'weChatName'
},
{
label: '审核时间',
name: 'activityName'
},
{
label: '备注',
name: 'goodsName'
}
]
this.withdrawData = withdrawData
this.paymentData = paymentData
this.operationData = operationData
// this.getInfo()
this.formToRow('withdrawData')
this.formToRow('paymentData')
this.formToRow('operationData')
},
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
for (var j = 0; j < numOfRow; j++) {
if (j == 0) {
this[formName + 'Row'][i] = {
rowList: []
}
}
if (i * numOfRow + j < this[formName].length) {
this[formName + 'Row'][i].rowList.push(this[formName][i * numOfRow + j])
}
}
}
console.log(this[formName + 'Row'])
},
handleClose() {
this.isVisible =false
this.$emit('dialogClose')
}
}
}
</script>
<style scoped lang="scss">
.edit-box .row-item {
width: 28%;
/deep/ {
.el-form-item__content {
height: 30px;
}
}
}
.detail-txt {
display: inline-block;
width: 100px;
}
.edit-title {
font-weight: 600;
font-size: 16px;
color: #000000d9;
line-height: 24px;
}
.m-b-20 {
margin-top: 20px;
}
/deep/ .el-form-item {
margin-bottom:0;
}
</style>
\ No newline at end of file
<template>
<div class="points">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>积分提现列表</h2>
<div>
<div class="flex">
<el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button>
<el-button size="small" @click="handlePay()">批量付款</el-button>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 审核驳回 -->
<GLDialog class="gl-form-page gl-form-min" :title="isRefuse != 2 ? '审核' : '驳回'" mode="mid" :visible.sync="showPassDialog" @onOk="comfirmCheck" @onCancel="clearSelect" :close-on-click-modal="false" :before-close="clearSelect">
<el-form ref="form" :model="form" label-width="154px">
<el-form-item label="备注:">
<el-input type="textarea" v-model="form.remark" :rows="3"></el-input>
</el-form-item>
<span class="describe" v-if="isRefuse != 2">审核通过后,转账业务单据自动流转至财务确认。</span>
</el-form>
</GLDialog>
<!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" @onOk="comfirmPay" @onCancel="cancelPay" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<template slot="captcha">
<div class="captcha-wrap">
<el-input v-model="payForm.captcha" placeholder="请输入"></el-input>
<div class="captcha-text" @click.prevent="getCode">
{{ !isCodeDisabled ? '获取验证码' : count + 's' }}
</div>
</div>
</template>
</glsx-combi-form>
</GLDialog>
<!-- 详情 -->
<detail-dialog :detail-visible="detailVisible" :recordInfo="recordInfo" @dialogClose="dialogClose"></detail-dialog>
</div>
</template>
<script>
import DetailDialog from './detail.vue'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
export default {
components: {
DetailDialog
},
data() {
return {
colors,
tableStatus,
size: 'small',
url: url,
searchForm: {
outSettleOrderId: '',
customerName: '',
customerPhone: '',
status: '',
channel: ''
},
tableSearchForm: {},
showFormData: [
{
label: '提现单号',
name: 'outSettleOrderId',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '客户名称',
name: 'customerName',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '手机号',
name: 'customerPhone',
type: 'input',
isClear: true,
maxlength: 11
},
{
label: '状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'auditStatusStatusList'
},
{
label: '申请时间',
name: 'applyDateStr',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '付款时间',
name: 'payTimeStr',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '付款渠道',
name: 'channel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
}
],
tableButtonList: [
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'el-button',
name: '审核',
attrs: {
type: 'text',
fn: '审核'
},
condition: row => {
return row.status == 0
},
listeners: {
click: row => {
this.handleCheck(row)
}
}
},
{
type: 'el-button',
name: '驳回',
attrs: {
type: 'text',
fn: '驳回'
},
condition: row => {
return row.status == 0
},
listeners: {
click: row => {
this.handleCheck(row, 2)
}
}
},
{
type: 'el-button',
name: '付款',
attrs: {
type: 'text',
fn: '付款'
},
condition: row => {
return row.status == 1
},
listeners: {
click: row => {
this.handlePay(row)
}
}
}
],
// 表格
getListApi: this.$apis.withdraw.getList,
tableParams: {
listName: 'list',
tableOption: true,
mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '提现单号',
prop: 'outSettleOrderId',
line: 1,
width: 180
},
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '客户手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额',
prop: 'payAmount',
width: 100
},
{
label: '收货人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '状态',
prop: 'status',
width: '200px',
addHtml: 'colorStatus'
},
{
label: '申请时间',
prop: 'createdDate',
width: '200px'
},
{
label: '付款时间',
prop: 'payDate',
width: '200px'
},
{
label: '付款渠道',
prop: 'channel',
width: '200px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
auditStatusStatusList: [
{
confId: '0',
confLabel: '待审核'
},
{
confId: '1',
confLabel: '已审核'
},
{
confId: '2',
confLabel: '第三方处理'
},
{
confId: '3',
confLabel: '成功'
},
{
confId: '4',
confLabel: '失败'
},
{
confId: '5',
confLabel: '驳回'
}
],
channelList: [
{
confId: 'LG',
confLabel: '拓博'
},
{
confId: 'TXIAT',
confLabel: '熠轩'
}
]
},
showPassDialog: false,
form: {
remark: ''
},
detailVisible: false,
isRefuse: 1,
recordInfo: '',
isPay: false,
isCodeDisabled: false,
count: '',
timer: null,
payForm: {
payMoney: '',
admin: '',
channel: 'LG',
captcha: '',
remark: ''
},
payFormData: [
{
label: '付款总金额',
name: 'payMoney',
type: 'input',
isDisabled: 'true'
},
{
label: '付款渠道',
type: 'select',
name: 'channel',
optionId: 'id',
optionLabel: 'text',
optionList: [
{
text: '拓博',
id: 'LG'
},
{
text: '熠轩',
id: 'TXIAT'
}
]
},
{
label: '管理员',
name: 'admin',
type: 'input',
isDisabled: 'true'
},
{
label: '验证码',
addHtml: 'captcha',
name: 'captcha'
},
{
label: '备注',
name: 'remark',
type: 'input',
inputType: 'textarea',
maxlength: 50
}
],
payRule: {
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }]
}
}
},
mounted() {
this.$utils.getOptionsList(this, 'showFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.applyDateStr) {
params.applyDateStart = dayjs(this.searchForm.applyDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.applyDateEnd = dayjs(this.searchForm.applyDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (this.searchForm.payTimeStr) {
params.payDateStart = dayjs(this.searchForm.payTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.payDateEnd = dayjs(this.searchForm.payTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.payTimeStr, delete params.applyDateStr
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.verificationTimeStr
resolve()
})
},
handleSearch() {
this.$refs.withdrawRef.refreshTable()
},
handleReset() {
this.searchForm = {
settlementStatus: ''
}
this.handleSearch()
},
handleSettlement(row) {
const params = {
id: row.id,
settlementStatus: row.settlementStatus ? 0 : 1
}
this.$utils.secondConfirm(this, '结算', '是否要' + (row.settlementStatus ? '取消结算' : '结算') + '?', 'points', 'integralorderSettle', params)
},
handleDetail(row) {
// console.log(row)
this.recordInfo = row
this.detailVisible = true
},
handleImport(e) {
var reader = new FileReader()
var file = e.srcElement.files[0]
const isLt = file.size / 1024 / 1024 < 10
if (isLt > 10) {
this.$message({
message: '文件大小不能超过10M',
type: 'error'
})
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.points.orderImport({ file: base64 }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
document.getElementById('fileUpload').value = ''
this.handleSearch()
})
}
},
exportExcel() {
const params = this.getParams()
this.$apis.points.orderExport(params).then(res => {
this.$utils.aToExport(res)
})
},
//获取复选table数据
selectionTable(val) {
this.ids = val.map(item => item.id)
},
//批量审核
handleCheck(row, isRefuse = 0) {
// isRefuse: 0:审批,2:驳回
if (row) {
this.ids = isRefuse == 0 ? [row.id] : row.id
this.$refs.withdrawRef.clearMutiSelect()
} else {
if (!this.ids) {
this.$message({
message: '请选择待审核的提现记录',
type: 'error'
})
return
}
}
//驳回
this.isRefuse = isRefuse
this.showPassDialog = true
},
//付款
handlePay(row) {
if (row) {
this.ids = [row.id]
this.$refs.withdrawRef.clearMutiSelect()
} else {
if (!this.ids) {
this.$message({
message: '请选择已审核的提现记录',
type: 'error'
})
return
}
}
this.getAdmin()
this.isPay = true
},
getAdmin() {
this.$apis.withdraw.getAdmin({}).then(res => {
this.payForm.admin = `${res.name} ${res.phone}`
console.log(this.payForm)
})
},
comfirmCheck() {
let { isRefuse } = this,
Methods = this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
params = {
remark: this.form.remark,
[isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse
}
if (!this.form.remark) return
this.$apis.withdraw[Methods](params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
.finally(() => {
this.handleSearch()
this.clearSelect()
})
},
clearSelect() {
this.ids = ''
this.form.remark = ''
this.showPassDialog = false
this.$refs.withdrawRef.clearMutiSelect()
},
dialogClose() {
this.detailVisible = false
},
//付款
comfirmPay() {
this.$refs.payFormRef.$refs.payChildRef.validate(valid => {
if (valid) {
let params = {
ids: this.ids,
channel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
this.$apis.withdraw
.integralpay(params)
.then(res => {
this.$message({
message: res.code == '0' ? '付款成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
.finally(() => {
this.handleSearch()
this.cancelPay()
})
}
})
},
cancelPay() {
this.ids = ''
this.isPay = false
this.payForm = {
payMoney: '',
admin: '',
channel: 'LG',
captcha: '',
remark: ''
}
this.$refs.withdrawRef.clearMutiSelect()
},
getCode() {
if (this.isCodeDisabled) return
if (!this.timer) {
this.count = 60
// var params = {
// phoneType: 'RG',
// phone: this.ruleForm.registerPhone
// }
this.$apis.withdraw.getSms({}).then(res => {
if (res.code == 200) {
this.$message.success('短信验证码发送成功')
}
})
this.isCodeDisabled = true
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= 60) {
this.count--
} else {
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
}
}, 1000)
}
}
}
}
</script>
<style scoped lang='scss'>
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.describe {
font-size: 12px;
color: #999999;
margin-left: 154px;
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.captcha-wrap {
.captcha-text {
font-size: 12px;
color: #5850ff;
position: absolute;
right: 0;
top: 2px;
margin-right: 10px;
cursor: pointer;
width: 100px;
height: 32px;
text-align: right;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!