Commit d344e2d0 by 前端

Merge branch 'v3.22.2' into 'master'

V3.22.2

See merge request !6
2 parents 624c7c61 b2f0bb37
...@@ -8858,6 +8858,11 @@ ...@@ -8858,6 +8858,11 @@
"integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
"dev": true "dev": true
}, },
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"oauth-sign": { "oauth-sign": {
"version": "0.9.0", "version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^2.0.9", "glsx-common": "^2.0.9",
"glsx-components": "^1.5.7", "glsx-components": "^1.5.7",
"number-precision": "^1.6.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
......
import { http } from '@/main'
const getMerchantList = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMerchantList
}
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,26 @@ const payPointsListApi = params => { ...@@ -10,6 +10,26 @@ const payPointsListApi = params => {
}) })
} }
const exchangeOilListApi = params => {
params.method = `scrm.api.shopmall.integral.recharge.oil.coupon.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const exchangeGoodListApi = params => {
params.method = `scrm.api.shopmall.integral.recharge.goods.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsDetailApi = params => { const payPointsDetailApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail` params.method = `scrm.api.shopmall.integral.out.detail`
return http({ return http({
...@@ -20,6 +40,25 @@ const payPointsDetailApi = params => { ...@@ -20,6 +40,25 @@ const payPointsDetailApi = params => {
}) })
} }
const exchangeGoodExportApi = params => {
params.method = `scrm.api.shopmall.integral.recharge.goods.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const exchangeOilExportApi = params => {
params.method = `scrm.api.shopmall.integral.recharge.oil.coupon.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsExportApi = params => { const payPointsExportApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail.export` params.method = `scrm.api.shopmall.integral.out.detail.export`
return http({ return http({
...@@ -41,4 +80,4 @@ const getMerchantList = params => { ...@@ -41,4 +80,4 @@ const getMerchantList = params => {
}) })
} }
export default { payPointsListApi, payPointsDetailApi, payPointsExportApi, getMerchantList } export default { payPointsListApi, exchangeOilListApi, exchangeGoodListApi, payPointsDetailApi, payPointsExportApi, exchangeGoodExportApi, exchangeOilExportApi, getMerchantList }
...@@ -113,4 +113,152 @@ const getIntegralDetailExport = params => { ...@@ -113,4 +113,152 @@ const getIntegralDetailExport = params => {
sign: true sign: true
}) })
} }
export default { getList, getOrderDetail, orderExport, orderImport, integralorderSettle, getIntegralCustomerList, getIntegralCustomerExport, getIntegralDetailList, customerDetail, getIntegralDetailExport }
/**自店服务 */
const getghDirectionalGiftListApi = params => {
params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
/**
* 客户积分导入
*/
const importCustomerIntegral = params => {
params.method = 'scrm.api.shopmall.integral.import.excel.analysis'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file'],
returnAll: true
})
}
/**
* 客户积分充值
*/
const updateCustomerIntegral = params => {
params.method = 'scrm.api.shopmall.integral.import.save.or.update'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
/**
* 获取油劵列表
*/
const getOilCouponList = params => {
params.method = 'scrm.api.shopmall.goods.oil.coupon.list'
params.status = 1
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 查询门店的通道手续费和油卡费率设置
*/
const getMerchantCharge = params => {
params.method = 'scrm.api.shopmall.integral.import.charge.config.query'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
/**
* 客户积分导入记录分页查询
*/
const getIntegralList = params => {
params.method = 'scrm.api.shopmall.integral.import.record.page'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 客户积分导入数据详情
*/
const getIntegralDetail = params => {
params.method = 'scrm.api.shopmall.integral.import.record.detail'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 客户积分导入明细数据分页查询
*/
const getCustomerIntegralList = params => {
params.method = 'scrm.api.shopmall.integral.import.detail.page'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 客户积分导入记录导出
*/
const exportIntegralList = params => {
params.method = 'scrm.api.shopmall.integral.import.record.export'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 客户积分审核
*/
const auditIntegral = params => {
params.method = 'scrm.api.shopmall.integral.import.audit'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
/**
* 获取所有的积分规则记录
*/
const getTypeListApi = params => {
params.method = 'scrm.api.shopmall.integral.rule.list'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
export default {
getList,
getOrderDetail,
orderExport,
orderImport,
integralorderSettle,
getIntegralCustomerList,
getIntegralCustomerExport,
getIntegralDetailList,
customerDetail,
getIntegralDetailExport,
getghDirectionalGiftListApi,
importCustomerIntegral,
updateCustomerIntegral,
getOilCouponList,
getMerchantCharge,
getIntegralList,
exportIntegralList,
getIntegralDetail,
getCustomerIntegralList,
auditIntegral,
getTypeListApi
}
...@@ -135,4 +135,20 @@ const handleSaveImport =params => { ...@@ -135,4 +135,20 @@ const handleSaveImport =params => {
returnAll:true returnAll:true
}) })
} }
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails,uploadXlsx,handleSaveImport } /*第三方余额查询 */
const getBalance = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.balance.get'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
// 获取总结算金额
const getSettleAmount = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.settle.amount.get'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails,uploadXlsx,handleSaveImport,getBalance,getSettleAmount }
...@@ -73,4 +73,8 @@ p{ ...@@ -73,4 +73,8 @@ p{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
}
.el-message{
z-index: 9999999 !important;
} }
\ No newline at end of file \ No newline at end of file
function debounce(func, wait = 200) { function debounce (func, wait = 200) {
let timeout let timeout
return function(event) { return function (event) {
clearTimeout(timeout) clearTimeout(timeout)
timeout = setTimeout(() => { timeout = setTimeout(() => {
func.call(this, event) func.call(this, event)
...@@ -8,7 +8,7 @@ function debounce(func, wait = 200) { ...@@ -8,7 +8,7 @@ function debounce(func, wait = 200) {
} }
} }
function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') { function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') {
const date = new Date(dateTime) const date = new Date(dateTime)
const config = { const config = {
YYYY: date.getFullYear(), YYYY: date.getFullYear(),
...@@ -26,7 +26,7 @@ function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') { ...@@ -26,7 +26,7 @@ function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') {
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
function checkPhone(mobile) { function checkPhone (mobile) {
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/ const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile) return myreg.test(mobile)
} }
...@@ -37,7 +37,7 @@ function checkPhone(mobile) { ...@@ -37,7 +37,7 @@ function checkPhone(mobile) {
* hasAll Boolean 是否需要添加“全部”属性 * hasAll Boolean 是否需要添加“全部”属性
* refreshSigle String 更新特定的属性的options * refreshSigle String 更新特定的属性的options
*/ */
function getOptionsList(that, formName, hasAll = true, refreshSigle) { function getOptionsList (that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = that[formName].find(k => k.name == refreshSigle) var item = that[formName].find(k => k.name == refreshSigle)
var index = that[formName].findIndex(k => k.name == refreshSigle) var index = that[formName].findIndex(k => k.name == refreshSigle)
...@@ -64,7 +64,7 @@ function getOptionsList(that, formName, hasAll = true, refreshSigle) { ...@@ -64,7 +64,7 @@ function getOptionsList(that, formName, hasAll = true, refreshSigle) {
} }
/** 二次确认封装 */ /** 二次确认封装 */
function secondConfirm(that, title, txt, apiModule, apiName, apiParams, type = 'warning', fn) { function secondConfirm (that, title, txt, apiModule, apiName, apiParams, type = 'warning', fn) {
that.$confirm(txt, title, { that.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -86,7 +86,7 @@ function secondConfirm(that, title, txt, apiModule, apiName, apiParams, type = ' ...@@ -86,7 +86,7 @@ function secondConfirm(that, title, txt, apiModule, apiName, apiParams, type = '
}) })
} }
function aToExport(url) { function aToExport (url) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('id', 'exportToExport') a.setAttribute('id', 'exportToExport')
a.setAttribute('href', url) a.setAttribute('href', url)
...@@ -100,6 +100,14 @@ function aToExport(url) { ...@@ -100,6 +100,14 @@ function aToExport(url) {
return arr1.includes(item) return arr1.includes(item)
}) })
} }
function openTab (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
export default { export default {
debounce, debounce,
dateFormat, dateFormat,
...@@ -107,5 +115,6 @@ export default { ...@@ -107,5 +115,6 @@ export default {
getOptionsList, getOptionsList,
secondConfirm, secondConfirm,
aToExport, aToExport,
openTab,
getArrayIsSubset getArrayIsSubset
} }
...@@ -46,9 +46,8 @@ export default { ...@@ -46,9 +46,8 @@ export default {
name: 'ruleType', name: 'ruleType',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'ruleType',
optionLabel: 'confLabel', optionLabel: 'ruleDesc'
optionsName: 'ruleTypeList'
} }
], ],
detailData: {}, detailData: {},
...@@ -102,45 +101,27 @@ export default { ...@@ -102,45 +101,27 @@ export default {
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据 ruleTypeList: []
baseData: {
ruleTypeList: [
{
confId: 'SHOPPING_GIVE',
confLabel: '购物赠送'
},
{
confId: 'SHOPPING_DEDUCT',
confLabel: '购物抵扣'
},
{
confId: 'SHOP_VERIFY',
confLabel: '门店核销'
},
{
confId: 'GIVE_BACK',
confLabel: '退还积分'
},
{
confId: 'GR_SEND',
confLabel: '保险返现'
},
{
confId: 'CANCLE_GIVE',
confLabel: '售后扣减'
}
]
}
} }
}, },
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
this.getTypeList()
}, },
mounted() { mounted() {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
this.customerDetail() this.customerDetail()
}, },
methods: { methods: {
getTypeList() {
this.$apis.points.getTypeListApi({}).then(res => {
if (res?.length) {
this.ruleTypeList = res
const target = this.showFormData.find(item => item.name == 'ruleType')
target.optionList = res
}
})
},
customerDetail() { customerDetail() {
const params = { const params = {
customerId: this.routeInfo.id customerId: this.routeInfo.id
......
<template>
<div v-if="auditObj.show">
<GLDialog
mode="small"
title="批次审核"
:visible.sync="auditObj.show"
:before-close="handleClose"
>
<template #default>
<div class="audit-content flex">
<div class="title">请和财务确认是否已收到以下门店积分打款</div>
<div class="info flex">{{auditObj.row.merchantName}}:
<div class="price flex">
{{auditObj.row.totalIntegral}}<div class="unit">元</div>
</div>
</div>
<el-checkbox
v-model="checked"
class="check-box"
>
已确认收款
</el-checkbox>
<div class="tips">审核通过后客户积分将实时发放,无法撤销。</div>
</div>
</template>
<template #footer>
<el-button
size="small"
@click="handleClose"
>否,未收到款项,关闭弹窗</el-button>
<el-button
type="primary"
size="small"
@click="handleConfirm"
>是,已确认收到款项,赠送积分</el-button>
</template>
</GLDialog>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
props: {
auditObj: {
type: Object,
default: () => { }
}
},
data () {
return {
loading: false,
checked: false
}
},
mounted () {
},
methods: {
handleClose () {
this.checked = false
this.$emit('update:auditObj', {})
},
async handleConfirm () {
const { checked } = this,
{ id } = this.auditObj.row
if (checked) {
this.$loading()
try {
const res = await this.$apis.points.auditIntegral({ id })
if (res) {
this.handleClose()
this.$message.success('操作成功')
this.$parent.handleSearch()
}
this.$loading().close()
} catch (error) {
this.$loading().close()
if (error) this.$message.error(error)
}
} else this.$message.error('请先勾选确认收款')
}
}
}
</script>
<style scoped lang='scss'>
.audit-content {
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 16px;
color: #333333;
}
.check-box {
font-size: 14px;
color: #333333;
}
.info {
align-items: center;
font-size: 16px;
color: #333333;
margin: 16px 0 10px;
.price {
align-items: center;
font-weight: 600;
font-size: 26px;
color: #eb4e4e;
.unit {
font-weight: 400;
font-size: 16px;
}
}
}
.tips {
font-size: 14px;
color: #999999;
margin-top: 10px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div v-if="detailObj.show">
<GLDialog
mode="big"
bigTitle="查看"
:visible.sync="detailObj.show"
:hasFooter="false"
:before-close="handleClose"
>
<GLTable
v-loading="loading"
ref="serviceRef"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<template
slot="oilList"
slot-scope="scope"
>
<template v-if="scope.scope.oilList && scope.scope.oilList.length">
<div class="flex">
<span>{{ filterData(scope.scope.oilList,'oilList').slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div
v-for="(item,index) in filterData(scope.scope.oilList,'oilList')"
:key="index"
>
{{item}}
</div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.oilList.length }})</span>
</el-popover>
</div>
</template>
<template v-else>
无
</template>
</template>
<template
slot="couponList"
slot-scope="scope"
>
<template v-if="scope.scope.couponList && scope.scope.couponList.length">
<div class="flex">
<span>{{ filterData(scope.scope.couponList,'couponList').slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div
v-for="(item,index) in filterData(scope.scope.couponList,'couponList')"
:key="index"
>
{{item}}
</div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope.couponList.length }})</span>
</el-popover>
</div>
</template>
<template v-else>
无
</template>
</template>
</GLTable>
</GLDialog>
</div>
</template>
<script type='text/ecmascript-6'>
import NP from 'number-precision'
export default {
name: '',
props: {
detailObj: {
type: Object,
default: () => { }
}
},
data () {
return {
NP,
loading: false,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
getListApi: this.$apis.points.getCustomerIntegralList,
searchForm: {},
tableParams: {
listName: 'list',
tableColumns: [
{
label: '保单号',
prop: 'policyNo',
minWidth: 200
},
{
label: '用户姓名',
prop: 'customerName',
minWidth: 100
},
{
label: '身份证号',
minWidth: 200,
prop: 'idCardNo',
},
{
label: '用户手机号',
minWidth: 150,
prop: 'customerPhone',
},
{
label: '返现金额',
minWidth: 150,
prop: 'cashBackValue'
},
{
label: '商品兑换积分',
prop: 'buyValue',
minWidth: 150,
},
{
label: '赠送油券',
minWidth: 260,
addHtml: 'oilList'
},
{
label: '赠送自店服务',
minWidth: 260,
addHtml: 'couponList'
},
{
label: '充值积分小计',
minWidth: 150,
formatter: cell => {
const { oilList, cashBackValue, buyValue } = cell
let total = NP.plus((cashBackValue || 0), (buyValue || 0))
oilList && oilList.map(i => total += NP.times(i.amount, i.salesPrice, 0.01))
return total
}
},
]
},
}
},
mounted () {
},
methods: {
beforeSearchFn () {
return new Promise(resolve => {
this.searchForm.recordId = this.detailObj.recordId
this.loading = false
resolve()
})
},
handleClose () {
this.$emit('update:detailObj', {})
},
filterData (list, name) {
return list?.map(i => {
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.salesPrice, 0.01)}积分)` : `${i.couponName}*${i.amount}`
}) || []
},
}
}
</script>
<style scoped lang='scss'>
.more-info {
white-space: nowrap;
color: #5850ff;
cursor: pointer;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<GLTable
v-loading="loading"
ref="serviceRef"
:tableData="serviceList"
:tableParams="tableParams"
@refreshTable="getServiceList"
@select="handleSelectionServiceTable(...arguments, 'oilCouponId')"
@select-all="handleSelectionServiceTableAll(...arguments, 'oilCouponId')"
>
<template
slot="gasImageSlot"
slot-scope="scope"
>
<el-popover
placement="top"
trigger="hover"
>
<img
class="img-plus"
:src="scope.scope.aliasUrl"
/>
<template slot="reference">
<img
:src="scope.scope.aliasUrl"
class="img"
>
</template>
</el-popover>
</template>
<template
slot="amount"
slot-scope="scope"
>
<el-input-number
size="small"
:min="1"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'oilCouponId')"
></el-input-number>
</template>
</GLTable>
</template>
<script type='text/ecmascript-6'>
import selectedMixin from '../mixins/selectedMixin'
export default {
name: 'gas',
mixins: [selectedMixin],
props: {
selectedGasList: {
type: Array,
default: () => []
}
},
data () {
return {
loading: false,
serviceList: [],
tableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'id',
checkSelectVal: '',
checkSelectable: null,
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '商品图片',
addHtml: 'gasImageSlot',
width: 100
},
{
label: '名称',
prop: 'aliasName',
},
{
label: '油卡面额/元',
prop: 'faceValue',
},
{
label: '售价/元',
formatter: cellValue => {
return cellValue.salesPrice ? Number(cellValue.salesPrice / 100).toFixed(2) : '--'
}
},
{
label: '选择数量',
addHtml: 'amount'
}
]
},
selectedList: [],
}
},
mounted () {
this.selectedList = this.selectedGasList
this.getServiceList()
},
methods: {
getServiceList () {
const { page: { pageNum, pageSize } } = this.$refs.serviceRef,
params = {
pageNum,
pageSize
}
this.loading = true
this.$apis.points.getOilCouponList(params).then(res => {
this.loading = false
res.list.map(e => {
let maxStock = e.stock - e.usedStock
e.amount = 1
e.oilCouponId = e.id
e.maxStock = maxStock > 10 ? 10 : maxStock
})
// 重置分页组件
this.serviceList = res.list
this.$refs.serviceRef.tableTotal = res.total
this.selectedPreExisting(this.selectedList, this.serviceList, 'oilCouponId', this.$refs.serviceRef)
this.setAmount(this.selectedList, this.serviceList, 'oilCouponId')
}).finally(() => {
this.loading = false
})
},
}
}
</script>
<style scoped lang='scss'>
.img {
width: 36px;
height: 36px;
// img{
// width: 100%;
// height: 100%;
// }
}
.img-plus {
width: 200px;
height: 200px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<GLDialog
mode="small"
title="操作结果"
:visible.sync="importObj.show"
:before-close="handleClose"
>
<template #default>
<div class="importObj-content flex">
<div class="success item">
<div class="num">{{importObj.successCount}}</div>
有效数据
</div>
<div class="line"></div>
<div class="error item">
<div class="num">{{importObj.errorCount}}</div>
异常数据
</div>
</div>
</template>
<template #footer>
<el-button
size="small"
@click="handleClose"
>确定</el-button>
<el-button
type="primary"
size="small"
@click="handleConfirm"
>导出错误结果</el-button>
</template>
</GLDialog>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
props: {
importObj: {
type: Object,
default: () => { }
}
},
data () {
return {
loading: false,
checked: false
}
},
mounted () {
},
methods: {
handleClose () {
this.$emit('update:importObj', {})
},
handleConfirm () {
this.$utils.aToExport(this.importObj.errorUrl)
this.handleClose()
}
}
}
</script>
<style scoped lang='scss'>
.importObj-content {
height: 100%;
align-items: center;
.item {
flex: 1;
text-align: center;
.num {
font-weight: 700;
font-size: 26px;
line-height: 32px;
margin-bottom: 10px;
}
}
.error{
.num{
color: #EB4E4E;
}
}
.success{
.num{
color: #2CCA74;
}
}
.line {
width: 1px;
height: 56px;
background: #e8e8ea;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<GLDialog
mode="big"
class="points-panel"
bigTitle="选择"
okText="提交"
@onCancel="handleGiftClose"
@onOk="handleConfirm"
:visible.sync="configParams.show"
>
<GLTabs
v-model="currentComponent"
:tabPaneList="tabPaneList"
></GLTabs>
<template v-if="configParams.show">
<div class="component">
<gas
v-show="currentComponent == 'gas'"
ref="gasRef"
:merchantId="merchantId"
:selectedGasList="configParams.oilList"
/>
<service
v-show="currentComponent == 'service'"
ref="serviceRef"
:merchantId="merchantId"
:selectedServiceList="configParams.couponList"
/>
</div>
</template>
</GLDialog>
</template>
<script type='text/ecmascript-6'>
import service from './service.vue'
import gas from './gas.vue'
export default {
name: '',
components: {
service,
gas
},
props: {
configParams: {
type: Object,
default: () => { }
},
merchantId: [Number, String]
},
data () {
return {
giftVisible: true,
currentComponent: 'gas',
tabPaneList: [
{
label: '油卡',
name: 'gas'
},
{
label: '自店服务',
name: 'service'
}
]
}
},
watch: {
'configParams.show' (n) {
if (n) this.currentComponent = this.configParams.type == 1 ? 'service' : 'gas'
}
},
mounted () {
},
methods: {
handleGiftClose () {
this.$emit('update:configParams', {})
},
handleConfirm () {
const { gasRef, serviceRef } = this.$refs,
oilList = gasRef.selectedList?.map(e => {
return {
oilCouponId: e.oilCouponId,
amount: e.amount,
salesPrice: e.salesPrice,
aliasName: e.aliasName
}
}) || [],
couponList = serviceRef.selectedList?.map(e => {
return {
couponId: e.couponId,
amount: e.amount,
couponName: e.couponName
}
}) || []
this.$emit('confirm', {
oilList,
couponList
})
}
}
}
</script>
<style scoped lang='scss'>
.points-panel {
/deep/.el-dialog__wrapper {
.el-dialog__body {
padding-top: 0;
}
}
}
.component {
padding-top: 20px;
}
</style>
<template>
<GLDialog
bigTitle="选择商户"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose"
class="select-store"
>
<glsx-combi-form
ref="showSearch"
labelWidth="105px"
:formObj="searchForm"
:formData="searchFormData"
>
<span slot="footer">
<el-button
:size="size"
type="primary"
@click="getTable"
>查询</el-button>
<el-button
:size="size"
@click="resetTable"
>重置</el-button>
</span>
</glsx-combi-form>
<GLTable
ref="storeRef"
:tableTotal="total"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
@refreshTable="getList"
:tableData="storeList"
:hasNum="false"
:setTableFinishFun="setTableFinishFun"
>
<div
slot="radioHtml"
class="store-table"
slot-scope="scope"
>
<el-radio
v-model="merchantId"
:label="scope.scope.merchantNo"
@click.native="handleClick(scope.scope)"
></el-radio>
</div>
</GLTable>
</GLDialog>
</template>
<script>
export default {
name: 'selectStore',
data () {
return {
searchForm: {
merchantId: '',
merchantName: ''
},
total: 0,
storeList: [],
merchantId: '',
merchantName: '',
// 搜索
searchFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
placeholder: '请输入商户名称',
width: '300px',
labelWidth: '10px'
},
{
label: '商户ID',
name: 'merchantId',
type: 'input',
inputType: 'number',
placeholder: '请输入商户ID',
width: '300px',
labelWidth: '10px'
}
],
pageConfig: {
pageSize: 10,
currentPage: 1
},
tableParams: {
listName: 'list',
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
// checkSelectKey: 'staffId',
// checkSelectVal: [],
// 多选ref的名称
// mutiSelectName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '序号',
prop: 'idx',
width: 80
},
{
label: '商户名称',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '商户id',
prop: 'merchantNo',
formatter: cellValue => {
return cellValue.merchantNo || '-'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
storeSearchForm: {
type: Object
},
merchantInfo: {
required: true
}
// merchantId: {
// type: String,
//
// }
// orderCode: {
// type: String,
// required: true
// }
},
watch: {
dialogVisible (n) {
if (n) this.init()
}
},
mounted () {
},
methods: {
init () {
this.merchantId = String(this.merchantInfo.merchantId)
this.merchantName = this.merchantInfo.merchantName
this.getList()
},
getList (pageCon) {
pageCon && (this.pageConfig = pageCon)
var params = {
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
}
this.$apis.common.getMerchantList(params).then(res => {
this.storeList = res.list
this.total = res.total
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.currentPage - 1)
this.storeList.forEach((item, index) => {
item.idx = index + 1 + nowIndex
})
})
},
getTable () {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
setTableFinishFun () {
//接收到的数据为空
this.$refs.staffRef.tableHeightValues = '460px'
},
handleClick (val) {
this.merchantId = val.merchantNo
this.merchantName = val.merchantName
},
resetTable () {
this.searchForm = {}
this.getTable()
},
handleClose () {
this.$emit('handleRelateStoreClose')
},
handleConfirm () {
const { merchantId, merchantName } = this
if (merchantId && merchantName) this.$emit('handleRelateStoreConfirm', {
merchantId,
merchantName
})
else this.handleClose()
}
}
}
</script>
<style lang="scss">
.select-store {
.storeDailog {
width: 500px;
}
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
.store-table .el-radio__label {
display: none;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="service-box">
<div class="service-flex">
<div class="service-tab">
<template v-for="(item) in serviceTabList">
<template>
<div
:class="['tab-item',{ active: discountType == item.type }]"
:key="item.type"
@click="discountType = item.type"
>
{{ item.label }}
</div>
</template>
</template>
<div
class="tab-border"
:style="setLeft"
></div>
</div>
<!-- <div class="service-tip">(仅支持引用无限库存券)</div> -->
<div class="tab-right">
<div
class="refresh-btn"
@click="getServiceList"
>
<i class="el-icon-refresh-right"></i>
刷新列表
</div>
<div
class="add-btn"
@click="addCoupon"
>
<i class="el-icon-plus"></i>
新建
</div>
</div>
</div>
<template v-for="(item, index) in serviceTabList">
<template>
<div :key="index">
<GLTable
v-loading="loading"
v-show="discountType == item.type"
:ref="'serviceRef' + item.type"
:tableData="serviceList"
:tableParams="tableParams"
@refreshTable="getServiceList"
@select="handleSelectionServiceTable(...arguments, 'couponId')"
@select-all="handleSelectionServiceTableAll(...arguments, 'couponId')"
>
<template
slot="effectiveType"
slot-scope="scope"
>
<span>{{ toLabelText(scope.scope) }}</span>
</template>
<template
slot="stock"
slot-scope="scope"
>
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</template>
<template
slot="useType"
slot-scope="scope"
>
<span>{{ toRestrictLabelText(scope.scope) }}</span>
</template>
<template
slot="amount"
slot-scope="scope"
>
<el-input-number
size="small"
:min="1"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'couponId')"
></el-input-number>
</template>
</GLTable>
</div>
</template>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
import util from '@/utils/index'
import selectedMixin from '../mixins/selectedMixin'
export default {
name: 'service',
mixins: [selectedMixin],
props: {
merchantId: [Number, String],
selectedServiceList: {
type: Array,
default: () => []
}
},
data () {
return {
serviceTabList: [
{ label: '门店服务', type: 7 },
{ label: '折扣券', type: 2 },
{ label: '代金券', type: 3 },
{ label: '兑换券', type: 4 }
],
discountType: 7,
loading: false,
serviceList: [],
tableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'id',
checkSelectVal: '',
checkSelectable: null,
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '名称',
prop: 'couponName',
width: 180
},
{
label: '车主展示价/元',
prop: 'anticipatedCost',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
}
},
{
label: '有效期',
prop: 'effectiveType',
addHtml: 'effectiveType'
},
{
label: '使用限制',
prop: 'useType',
addHtml: 'useType'
},
{
label: '选择数量',
prop: 'amount',
addHtml: 'amount'
}
]
},
selectedList: []
}
},
watch: {
discountType () {
this.serviceList = []
this.getServiceList()
}
},
computed: {
setLeft () {
const { discountType } = this
return { left: (discountType == 7 ? 0 : discountType - 1) * 88 + 2 + 'px' }
}
},
mounted () {
this.selectedList = this.selectedServiceList
this.getServiceList()
},
methods: {
getServiceList () {
const { discountType, merchantId } = this,
{ page: { pageNum, pageSize } } = this.$refs[`serviceRef${discountType}`][0],
params = {
status: 2,
discountType,
merchantId,
limitStockFlag: 2,
pageNum,
pageSize
}
this.loading = true
this.$apis.points.getghDirectionalGiftListApi(params).then(res => {
this.loading = false
res.list.map(e => {
let maxStock = e.residueAmount
e.amount = 1
e.couponId = e.id
e.maxStock = maxStock > 10 ? 10 : maxStock
})
// 重置分页组件
this.serviceList = res.list
this.$refs['serviceRef' + discountType][0].tableTotal = res.total
this.selectedPreExisting(this.selectedList, this.serviceList, 'couponId', this.$refs['serviceRef' + this.discountType][0])
this.setAmount(this.selectedList, this.serviceList, 'couponId')
}).finally(() => {
this.loading = false
})
},
//格式化数据
toLabelText (row) {
return {
3: '永久有效',
2: row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '',
1: row.effectiveDays + '天'
}[row.effectiveType]
},
toRestrictLabelText (row) {
return {
0: '无限制',
1: '有效期内可使用' + row.useAmount + '次',
2: '每' + row.useLimitDays + '天可以使用' + row.useAmount + '次'
}[row.useType]
},
addCoupon () {
window.open('/login?redirect=tools%2FcouponManage%2Findex')
},
}
}
</script>
<style scoped lang='scss'>
.service-flex {
display: flex;
align-items: center;
margin-bottom: 10px;
.service-tip {
color: #999;
margin-left: 8px;
}
.tab-right {
display: flex;
margin-left: auto;
.refresh-btn {
cursor: pointer;
color: #666666;
}
.add-btn {
cursor: pointer;
margin-left: 10px;
color: #5850ff;
}
}
.service-tab {
height: 36px;
background: #f8f8f8;
border-radius: 4px;
display: flex;
// max-width: 352px;
position: relative;
.tab-border {
position: absolute;
left: 2px;
top: 2px;
z-index: 1;
width: 84px;
height: 32px;
background: #ffffff;
transition: all 0.25s;
border-radius: 4px;
}
.tab-item {
width: 88px;
z-index: 2;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
&.active {
border-radius: 3px;
color: #5850ff;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="container">
<GLCombiForm
ref="showSearch"
:rowNumber="2"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="sticky-btns">
<el-button
type="default"
plain
@click="jump"
size="small"
>门店客户积分充值</el-button>
<el-button @click="handleExport" size="small">导出
</el-button>
</div>
<div class="tabelList">
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<template
slot="customerNumber"
slot-scope="scope"
>
<div
class="link"
@click="openDetail(scope.scope.id)"
>{{scope.scope.customerNumber}}</div>
</template>
<template
slot="status"
slot-scope="scope"
>
<div class="status-box">
<span :class="['status',`status-${scope.scope.status}`]"></span>
{{{0:'待充值',1:'充值成功'}[scope.scope.status]}}
</div>
</template>
<template
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</template>>
</GLTable>
</div>
<detail-dialog :detailObj.sync="detailObj" />
<audit-dialog :auditObj.sync="auditObj" />
</div>
</template>
<script type='text/ecmascript-6'>
import detailDialog from './components/detailDialog.vue'
import * as dayjs from 'dayjs'
import auditDialog from './components/auditDialog.vue'
export default {
name: '',
components: {
detailDialog,
auditDialog
},
data () {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
searchForm: {
batchNo: '',
merchantName: '',
customerName: '',
customerPhone: '',
createdDate: [],
auditDate: [],
status: ''
},
searchFormData: [
{
label: '批次',
name: 'batchNo',
type: 'input',
maxlength: 100
},
{
label: '商户名称',
name: 'merchantName',
type: 'input',
maxlength: 100
},
{
label: '用户姓名',
name: 'customerName',
type: 'input',
maxlength: 100
},
{
label: '用户手机号',
name: 'customerPhone',
type: 'input',
maxlength: 13
},
{
label: '创建时间',
name: 'createdDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate (date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
},
{
label: '状态',
name: 'status',
type: 'select',
maxlength: 100,
optionList: [
{ text: '全部', id: '' },
{ text: '待充值 ', id: '0' },
{ text: '充值成功', id: '1' }
],
optionId: 'id',
optionLabel: 'text'
},
{
label: '审核时间',
name: 'auditDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate (date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
},
],
getListApi: this.$apis.points.getIntegralList,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '商户名称',
prop: 'merchantName',
minWidth: 150
},
{
label: '批次',
prop: 'batchNo',
minWidth: 120
},
{
label: '客户数量',
addHtml: 'customerNumber',
minWidth: 100
},
{
label: '充值积分数',
minWidth: 120,
prop: 'totalIntegral',
},
{
label: '状态',
minWidth: 120,
addHtml: 'status',
},
{
label: '创建时间',
minWidth: 150,
formatter: cell => dayjs(cell.createdDate).format('YYYY/MM/DD hh:mm:ss')
},
{
label: '审核人',
prop: 'auditBy',
minWidth: 150,
},
{
label: '审核时间',
minWidth: 150,
formatter: cell => cell.auditDate ? dayjs(cell.auditDate).format('YYYY/MM/DD hh:mm:ss') : ''
},
]
},
tableButtonList: [
{
type: 'el-button',
name: '审核',
attrs: {
type: 'text',
},
condition: row => row.status == 0,
listeners: {
click: row => this.auditObj = {
show: true,
row
}
}
},
{
type: 'el-button',
name: '详情',
attrs: {
type: 'text',
},
condition: row => row.status == 1,
listeners: {
click: row => this.editForm(row)
}
},
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
},
condition: row => row.status == 0,
listeners: {
click: row => this.editForm(row, 'edit')
}
},
],
showImportRecord: false,
tableSearchForm: {},
detailObj: {},
auditObj: {}
}
},
mounted () {
},
methods: {
handleSearch () {
this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable()
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
handleExport () {
const params = this.getParams()
this.$apis.points.exportIntegralList({ ...params, ...this.$refs.listRef.page }).then(res => {
this.$utils.aToExport(res)
})
},
getParams () {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.setTimeFormat(params, 'createdDate', 'createdDateBegin', 'createdDateEnd')
this.setTimeFormat(params, 'auditDate', 'auditDateBegin', 'auditDateEnd')
return params
},
setTimeFormat (target, name, start, end) {
if (target[name] && target[name].length) {
target[start] = `${dayjs(target[name][0]).format('YYYY-MM-DD')} 00:00:00`
target[end] = `${dayjs(target[name][1]).format('YYYY-MM-DD')} 23:59:59`
delete target[name]
}
},
jump () {
this.$router.push({
path: '/storeCredit/add',
query: {
$title: '门店客户积分充值',
}
})
},
openDetail (recordId) {
this.detailObj = {
show: true,
recordId
}
},
editForm (row, type = '') {
this.$router.push({
path: '/storeCredit/add',
query: {
$title: type ? '编辑门店客户积分充值' : '查看门店客户积分充值',
id: row.id,
type
}
})
}
}
}
</script>
<style scoped lang='scss'>
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.sticky-btns {
margin-bottom: 10px;
display: flex;
justify-content: flex-end;
.el-button {
min-width: 60px;
}
.el-button + .el-button {
margin-left: 10px;
}
}
.link {
color: #5850ff;
cursor: pointer;
}
}
.status-box {
display: flex;
align-items: center;
.status {
width: 6px;
height: 6px;
border-radius: 4px;
background: #fdb757;
margin-right: 8px;
}
.status-1 {
background: #2cca74;
}
}
</style>
export default {
methods: {
handleSelectionServiceTable (selection, row, id) {
if (selection && selection.find(item => item && item[id] == row[id])) {
this.addRows(this.selectedList, [row], id)
} else {
this.selectedList = this.deleteRows(this.selectedList, [row], id)
}
},
handleSelectionServiceTableAll (selected, id) {
if (selected.length > 0) {
this.addRows(this.selectedList, selected, id)
} else {
this.selectedList = this.deleteRows(this.selectedList, this.serviceList, id)
}
},
//添加选中
addRows (selectedItems, rows, val) {
rows.forEach(row => {
//过滤,当selectedItems有此条数据时,则直接返回,不执行添加
if (selectedItems.find(item => item[val] == row[val])) {
return
}
selectedItems.push(row)
})
},
//取消选中
deleteRows (selectedItems, rows, val) {
//当selectedItems为空数组时,不执行删除
if (selectedItems.length == 0) {
return
}
rows.forEach(row => {
selectedItems = selectedItems.filter(item => item[val] != row[val])
})
return selectedItems
},
//选中table已有数据
selectedPreExisting (rows, list, val, refTabel) {
refTabel.$refs['listMutiTable'].clearSelection()
if (rows?.length) {
//这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
this.$nextTick(() => {
rows.forEach(row => {
//判断row是存在当前tableData
list.forEach(i => {
if (i[val] == row[val]) {
refTabel.$refs['listMutiTable'].toggleRowSelection(i, true)
}
})
})
})
} else {
refTabel.$refs['listMutiTable'].clearSelection()
}
},
setAmount (rows, list, val) {
if (rows?.length) {
this.$nextTick(() => {
rows.forEach(row => {
list.forEach(i => {
if (i[val] == row[val]) this.$set(i, 'amount', row.amount)
})
})
})
}
},
changeAmount () {
const [amount, , row, id] = arguments,
{ selectedList } = this,
that = selectedList.find(e => e[id] == row[id])
that.amount = amount
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -100,6 +100,20 @@ export default { ...@@ -100,6 +100,20 @@ export default {
name: 'outSettleOrderId' name: 'outSettleOrderId'
}, },
{ {
label: '提现类型',
name: 'transferType',
addHtml: obj => {
return obj.transferType ==0?'积分提现':'普通提现'
}
},
{
label: '提现金额',
name: 'payAmount',
addHtml: obj => {
return obj.payAmount?(obj.payAmount / 100).toFixed(2):'--'
}
},
{
label: '客户名称', label: '客户名称',
name: 'customerName' name: 'customerName'
}, },
...@@ -111,13 +125,7 @@ export default { ...@@ -111,13 +125,7 @@ export default {
label: '提现积分', label: '提现积分',
name: 'integralAmount' name: 'integralAmount'
}, },
{
label: '提现金额',
name: 'payAmount',
addHtml: obj => {
return (obj.payAmount / 100).toFixed(2)
}
},
{ {
label: '所属门店', label: '所属门店',
name: 'merchantName' name: 'merchantName'
...@@ -156,6 +164,17 @@ export default { ...@@ -156,6 +164,17 @@ export default {
} }
}, },
{ {
label: '结算金额',
name: 'settleAmount',
addHtml: obj => {
return obj.settleAmount?(obj.settleAmount / 100).toFixed(2):'--'
}
},
{
label: '到账时间',
name: 'receiptDate'
},
{
label: '状态', label: '状态',
name: 'status', name: 'status',
addStyle: obj => { addStyle: obj => {
...@@ -195,7 +214,7 @@ export default { ...@@ -195,7 +214,7 @@ export default {
{ {
// label: ['审核人', '付款人', '操作人'], // label: ['审核人', '付款人', '操作人'],
label: obj => { label: obj => {
let arr = ['审核人', '付款人'], let arr = ['审核人', '付款人','受理人'],
label label
if (obj.result == 0) { if (obj.result == 0) {
label = arr[obj.type] label = arr[obj.type]
...@@ -208,7 +227,7 @@ export default { ...@@ -208,7 +227,7 @@ export default {
}, },
{ {
label: obj => { label: obj => {
let arr = ['审核时间', '付款时间'], let arr = ['审核时间', '付款时间','受理时间'],
label label
if (obj.result == 0) { if (obj.result == 0) {
label = arr[obj.type] label = arr[obj.type]
......
...@@ -3,22 +3,12 @@ ...@@ -3,22 +3,12 @@
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>积分提现列表</h2> <!-- <h2>积分提现列表</h2> -->
<!-- <div class="statistics"> <div class="statistics">
累计结算金额:熠轩 累计结算金额:熠轩
<span class="price">xxx.xx</span> <span class="price">{{settleAmount.yiXuanSettleAmount}}</span>
元,拓博 元
<span class="price">xxx.xx</span> </div>
元,远行
<span class="price">xxx.xx</span>
元;账户余额:熠轩
<span class="price">xxx.xx</span>
元,拓博
<span class="price">xxx.xx</span>
元,远行
<span class="price">xxx.xx</span>
元;
</div> -->
<div> <div>
<div class="flex"> <div class="flex">
<el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button> <el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button>
...@@ -57,10 +47,10 @@ ...@@ -57,10 +47,10 @@
<!-- 付款 --> <!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay"> <GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule"> <glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<tempalte slot="money"> <tempalte slot="balance">
<div class="channelMoney"> <div class="channelMoney">
可用余额: 可用余额:
<span class="price">xx.xx</span> <span class="price">{{this.payForm.balance}}</span>
元 元
</div> </div>
</tempalte> </tempalte>
...@@ -145,6 +135,7 @@ export default { ...@@ -145,6 +135,7 @@ export default {
tableStatus, tableStatus,
size: 'small', size: 'small',
url: url, url: url,
settleAmount:{},
searchForm: { searchForm: {
outSettleOrderId: '', outSettleOrderId: '',
customerName: '', customerName: '',
...@@ -220,6 +211,13 @@ export default { ...@@ -220,6 +211,13 @@ export default {
optionsName: 'merchantList' optionsName: 'merchantList'
}, },
{ {
label: '到账时间',
name: 'receiptDateStr',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '提现类型', label: '提现类型',
name: 'transferType', name: 'transferType',
type: 'select', type: 'select',
...@@ -265,7 +263,7 @@ export default { ...@@ -265,7 +263,7 @@ export default {
fn: '驳回' fn: '驳回'
}, },
condition: row => { condition: row => {
return row.status == 0 || row.status == 1 return row.status == 0 || row.status == 1|| row.status == 6
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -281,7 +279,7 @@ export default { ...@@ -281,7 +279,7 @@ export default {
fn: '付款' fn: '付款'
}, },
condition: row => { condition: row => {
return row.status == 1 return row.status == 1||row.status == 6
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -333,7 +331,7 @@ export default { ...@@ -333,7 +331,7 @@ export default {
prop: 'payAmount', prop: 'payAmount',
width: 100, width: 100,
formatter: cellValue => { formatter: cellValue => {
return (cellValue.payAmount / 100).toFixed(2) return cellValue.payAmount?(cellValue.payAmount / 100).toFixed(2):'--'
} }
}, },
{ {
...@@ -386,7 +384,20 @@ export default { ...@@ -386,7 +384,20 @@ export default {
let arr = this.baseData.channelList.filter(item => item.confId == cellValue.channel) let arr = this.baseData.channelList.filter(item => item.confId == cellValue.channel)
return arr.length > 0 ? arr[0].confLabel : '--' return arr.length > 0 ? arr[0].confLabel : '--'
} }
} },
{
label: '到账时间',
prop: 'receiptDate',
width: '200px'
},
{
label: '结算金额/元',
prop: 'settleAmount',
formatter: cellValue => {
return cellValue.settleAmount?(cellValue.settleAmount / 100).toFixed(2):'--'
},
width: '150px'
},
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
...@@ -417,6 +428,10 @@ export default { ...@@ -417,6 +428,10 @@ export default {
{ {
confId: '5', confId: '5',
confLabel: '驳回' confLabel: '驳回'
},
{
confId: '6',
confLabel: '受理失败'
} }
], ],
channelList: [ channelList: [
...@@ -452,7 +467,8 @@ export default { ...@@ -452,7 +467,8 @@ export default {
admin: '', admin: '',
channel: 'TXIAT', channel: 'TXIAT',
captcha: '', captcha: '',
remark: '' remark: '',
balance:''
}, },
payFormData: [ payFormData: [
{ {
...@@ -474,12 +490,12 @@ export default { ...@@ -474,12 +490,12 @@ export default {
} }
] ]
}, },
// { {
// label: '', label: '',
// name: 'admin', name: 'admin',
// type: 'input', type: 'input',
// addHtml: 'money' addHtml: 'balance'
// }, },
{ {
label: '管理员', label: '管理员',
name: 'admin', name: 'admin',
...@@ -529,8 +545,14 @@ export default { ...@@ -529,8 +545,14 @@ export default {
mounted() { mounted() {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
this.getMerchantList() this.getMerchantList()
this.getSettleAmount()
}, },
methods: { methods: {
getSettleAmount(){
this.$apis.withdraw.getSettleAmount({}).then(res => {
this.settleAmount =res
})
},
getMerchantList() { getMerchantList() {
this.$apis.withdraw.getMerchantList({}).then(res => { this.$apis.withdraw.getMerchantList({}).then(res => {
this.baseData.merchantList = res.map(item => { this.baseData.merchantList = res.map(item => {
...@@ -551,8 +573,13 @@ export default { ...@@ -551,8 +573,13 @@ export default {
params.payDateStart = dayjs(this.searchForm.payTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:01' 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' params.payDateEnd = dayjs(this.searchForm.payTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
if (this.searchForm.receiptDateStr) {
params.receiptDateStart = dayjs(this.searchForm.receiptDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.receiptDateEnd = dayjs(this.searchForm.receiptDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.payTimeStr, delete params.applyDateStr delete params.payTimeStr, delete params.applyDateStr,
delete params.receiptDateStr
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -605,7 +632,7 @@ export default { ...@@ -605,7 +632,7 @@ export default {
reader.onload = event => { reader.onload = event => {
const imgFile = event.target.result const imgFile = event.target.result
const arrBase64 = imgFile.split(',') const arrBase64 = imgFile.split(',')
this.importForm.fileUrl = file.name.split('.')[1] + '@' + arrBase64[1] this.importForm.fileUrl = file.name.split('.').pop() + '@' + arrBase64[1]
this.importForm.fileName = file.name this.importForm.fileName = file.name
} }
} }
...@@ -769,6 +796,7 @@ export default { ...@@ -769,6 +796,7 @@ export default {
this.getAllpayAmount() this.getAllpayAmount()
} }
this.getAdmin() this.getAdmin()
this.getBalance()
this.isPay = true this.isPay = true
}, },
//获取批量付款的金额 //获取批量付款的金额
...@@ -782,6 +810,12 @@ export default { ...@@ -782,6 +810,12 @@ export default {
this.payForm.admin = `${res.name} ${res.phone}` this.payForm.admin = `${res.name} ${res.phone}`
}) })
}, },
getBalance(){
this.$apis.withdraw.getBalance({ channel: this.payForm.channel }).then(res => {
console.log(res)
this.payForm.balance=res
})
},
comfirmCheck() { comfirmCheck() {
// console.log(this.ids) // console.log(this.ids)
if (this.isRefuse == 2 && this.form.remark == '') { if (this.isRefuse == 2 && this.form.remark == '') {
...@@ -857,7 +891,8 @@ export default { ...@@ -857,7 +891,8 @@ export default {
admin: '', admin: '',
channel: 'TXIAT', channel: 'TXIAT',
captcha: '', captcha: '',
remark: '' remark: '',
balance:''
} }
this.$refs.withdrawRef.clearMutiSelect() this.$refs.withdrawRef.clearMutiSelect()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!