Commit 56c1cfe2 by zhangquan

Merge branch 'v3.22.2' of http://192.168.3.233:8090/saas/scrm-micro-points into v3.22.2

2 parents 97f8f6d5 38dcdc83
......@@ -59,6 +59,7 @@ export default {
},
methods: {
handleClose () {
this.checked = false
this.$emit('update:auditObj', {})
},
async handleConfirm () {
......@@ -69,11 +70,11 @@ export default {
try {
const res = await this.$apis.points.auditIntegral({ id })
if (res) {
this.$loading().close()
this.handleClose()
this.$message.success('操作成功')
this.$parent.handleSearch()
}
this.$loading().close()
} catch (error) {
this.$loading().close()
if (error) this.$message.error(error)
......
......@@ -23,18 +23,23 @@
<template v-if="scope.scope.oilList && scope.scope.oilList.length">
<div class="flex">
<div class="list">
<template v-for="(i,index) in scope.scope.oilList">
<template>
<div
:key="index"
class="item flex"
>
{{i.aliasName}}*{{i.amount}} ({{NP.times(i.amount, i.faceValue)}}积分)
</div>
</template>
</template>
</div>
<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>
......@@ -47,18 +52,23 @@
>
<template v-if="scope.scope.couponList && scope.scope.couponList.length">
<div class="flex">
<div class="list">
<template v-for="(i,index) in scope.scope.couponList">
<template>
<div
:key="index"
class="item flex"
>
{{i.couponName}}*{{i.amount}}
</div>
</template>
</template>
</div>
<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>
......@@ -94,7 +104,7 @@ export default {
{
label: '保单号',
prop: 'policyNo',
minWidth: 100
minWidth: 200
},
{
label: '用户姓名',
......@@ -103,7 +113,7 @@ export default {
},
{
label: '身份证号',
minWidth: 100,
minWidth: 200,
prop: 'idCardNo',
},
{
......@@ -123,12 +133,12 @@ export default {
},
{
label: '赠送油券',
minWidth: 150,
minWidth: 260,
addHtml: 'oilList'
},
{
label: '赠送自店服务',
minWidth: 150,
minWidth: 260,
addHtml: 'couponList'
},
{
......@@ -150,17 +160,27 @@ export default {
methods: {
beforeSearchFn () {
return new Promise(resolve => {
this.searchForm.batchNo = this.detailObj.batchNo
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.faceValue)}积分)` : `${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
......@@ -35,7 +35,7 @@
<el-input-number
size="small"
:min="1"
:max="10"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'oilCouponId')"
......@@ -112,8 +112,10 @@ export default {
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
......
......@@ -4,7 +4,6 @@
class="points-panel"
bigTitle="选择"
okText="提交"
:before-close="handleGiftClose"
@onCancel="handleGiftClose"
@onOk="handleConfirm"
:visible.sync="configParams.show"
......@@ -19,13 +18,13 @@
v-show="currentComponent == 'gas'"
ref="gasRef"
:merchantId="merchantId"
:selectedGasList="configParams.row.oilList || []"
:selectedGasList="configParams.oilList"
/>
<service
v-show="currentComponent == 'service'"
ref="serviceRef"
:merchantId="merchantId"
:selectedServiceList="configParams.row.couponList || []"
:selectedServiceList="configParams.couponList"
/>
</div>
</template>
......
......@@ -74,7 +74,7 @@
<el-input-number
size="small"
:min="1"
:max="10"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'couponId')"
......@@ -185,12 +185,14 @@ export default {
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')
......@@ -214,7 +216,7 @@ export default {
}[row.useType]
},
addCoupon () {
util.openTab('/tools/couponManage/index')
window.open('/login?redirect=tools%2FcouponManage%2Findex')
},
}
}
......
......@@ -13,8 +13,9 @@
type="default"
plain
@click="jump"
size="small"
>门店客户积分充值</el-button>
<el-button @click="handleExport">导出
<el-button @click="handleExport" size="small">导出
</el-button>
</div>
<div class="tabelList">
......@@ -31,7 +32,7 @@
>
<div
class="link"
@click="openDetail(scope.scope.batchNo)"
@click="openDetail(scope.scope.id)"
>{{scope.scope.customerNumber}}</div>
</template>
<template
......@@ -282,10 +283,10 @@ export default {
}
})
},
openDetail (batchNo) {
openDetail (recordId) {
this.detailObj = {
show: true,
batchNo
recordId
}
},
editForm (row, type = '') {
......
......@@ -110,7 +110,7 @@ export default {
label: '提现金额',
name: 'payAmount',
addHtml: obj => {
return (obj.payAmount / 100).toFixed(2)
return obj.payAmount?(obj.payAmount / 100).toFixed(2):'--'
}
},
{
......@@ -165,7 +165,10 @@ export default {
},
{
label: '结算金额',
name: 'settleAmount'
name: 'settleAmount',
addHtml: obj => {
return obj.settleAmount?(obj.settleAmount / 100).toFixed(2):'--'
}
},
{
label: '到账时间',
......
......@@ -331,7 +331,7 @@ export default {
prop: 'payAmount',
width: 100,
formatter: cellValue => {
return (cellValue.payAmount / 100).toFixed(2)
return cellValue.payAmount?(cellValue.payAmount / 100).toFixed(2):'--'
}
},
{
......@@ -393,6 +393,9 @@ export default {
{
label: '结算金额/元',
prop: 'settleAmount',
formatter: cellValue => {
return cellValue.settleAmount?(cellValue.settleAmount / 100).toFixed(2):'--'
},
width: '150px'
},
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!