Commit ba9a97b8 by zhangquan

积分联调完成

1 parent e4819ff6
......@@ -1895,51 +1895,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -1948,28 +1903,6 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -13414,6 +13347,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
import { http } from '@/main'
const payPointsListApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsDetailApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsExportApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 用户积分转出的所有门店信息
const getMerchantList = params => {
params.method = 'scrm.api.shopmall.integral.out.merchant.list'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { payPointsListApi, payPointsDetailApi, payPointsExportApi, getMerchantList }
<template>
<div>
<GLTabs v-model="tabId" :tabPaneList="tabPaneList"></GLTabs>
<div class="main-wrap">
<GLCombiForm ref="pointerWriteOffSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="exportBtn">
<el-button :size="size" @click="handleExport" class="default-blue-btn" type="default">导出</el-button>
</div>
<GLTable ref="pointerWriteOffRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="merchantNameSlot" slot-scope="scope">{{ getMerchantName(scope.scope.merchantId) }}</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
<GLDialog title="查看" mode="mid" :hasFooter="false" :visible.sync="dialogVisible" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose">
<ul class="detail-wrap">
<template v-for="item in detailList">
<li class="detail-li" v-if="!item.hasOwnProperty('include') || item.include == tabId" :key="item.key">
<label class="detail-label" for="">{{ item.label }}:</label>
<span v-if="item.key !== 'merchantId'" class="detail-key">{{ detailObj[item.key] || '--' }}</span>
<span v-else class="detail-key">{{ getMerchantName(detailObj[item.key]) }}</span>
</li>
</template>
</ul>
</GLDialog>
</div>
</template>
<script>
import { exportFn } from '@/common/constant'
const TABLE_COL = [
// {
// label: '批次号',
// prop: 'bizRelName'
// },
{
label: '门店名称',
addHtml: 'merchantNameSlot'
},
{
label: '客户姓名',
prop: 'customerName'
},
{
label: '客户手机号',
prop: 'customerPhone'
},
// {
// label: '保单号',
// prop: 'customerPhone',
// width: 200,
// line: 1
// },
{
label: '油卡面值',
prop: 'verificationStaffName',
width: 150,
show: true
},
{
label: '油卡数量',
prop: 'verificationStaffName',
width: 150,
show: true
},
{
label: '消耗积分',
prop: 'integralValue'
},
{
label: '消耗积分时间',
prop: 'createdDate'
}
]
const DETAIL_LIST = [
{ label: '门店名称', key: 'merchantId' },
// { label: '批次号', key: '' },
{ label: '消耗积分', key: 'integralValue' },
{ label: '客户名称', key: 'customerName' },
{ label: '客户手机号', key: 'customerPhone' },
// { label: '保单号', key: '' },
{ label: '商品名称', key: '', include: '3' },
{ label: '商品数量', key: '', include: '3' },
{ label: '商品价格/元', key: '', include: '3' },
{ label: '油卡面值', key: '', include: '2' },
{ label: '油卡数量', key: '', include: '2' },
{ label: '收款人身份证', key: 'idCardNo', include: '1' },
{ label: '收款银行卡号', key: 'recvBankCardNo', include: '1' },
{ label: '收款银行', key: 'recvBank', include: '1' },
{ label: '消耗积分类型', key: 'ruleDesc' },
{ label: '消耗积分时间', key: 'createdDate' }
]
export default {
name: 'index',
data() {
return {
size: 'small',
tabId: '1',
tabPaneList: [
{ name: '1', label: '积分转出明细' }
// { name: '2', label: '油卡兑换明细' },
// { name: '3', label: '商品兑换明细' }
],
detailList: DETAIL_LIST,
detailObj: {},
dialogVisible: false,
merchantList: [],
searchForm: {
ruleType: 'TRANSFER_OUT',
merchantId: '',
customerName: '',
customerPhone: '',
createDate: ''
},
searchFormData: [
// {
// label: '批次号',
// name: 'bizRelName',
// type: 'input'
// },
{
label: '客户手机号',
name: 'customerPhone',
isClear: true,
type: 'input'
},
{
label: '客户姓名',
name: 'customerName',
isClear: true,
type: 'input'
},
// {
// label: '保单号',
// name: 'bizRelName',
// type: 'input'
// },
{
label: '门店名称',
name: 'merchantId',
type: 'select',
optionList: [],
isClear: true,
optionId: 'merchantId',
optionLabel: 'merchantName'
},
{
label: '消耗积分时间',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
getListApi: this.$apis.pointWriteOff.payPointsListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: []
},
tableButtonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
// condition: row => {
// return row.sopStatus != 1
// },
listeners: {
click: row => this.viewDetail(row)
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
watch: {
tabId: {
handler: function(nVal, oVal) {
this.tableParams.tableColumns = TABLE_COL.filter(item => (nVal == 1 && !item.show) || nVal != 1)
},
immediate: true
}
},
created() {
this.getMerchantList()
},
mounted() {},
methods: {
getMerchantName(merchantId) {
console.log(merchantId, 'merchantId')
const _target = this.merchantList.find(item => item.merchantId == merchantId)
return _target ? _target.merchantName : '--'
},
getMerchantList() {
this.$apis.pointWriteOff
.getMerchantList({
parameterType: 2
})
.then(res => {
console.log(res, 'list')
if (res?.length) {
const _target = this.searchFormData.find(e => e.name == 'merchantId')
_target && (_target.optionList = res)
this.merchantList = res
}
})
},
viewDetail({ id }) {
this.$apis.pointWriteOff.payPointsDetailApi({ id }).then(res => {
if (res) {
this.detailObj = res
this.dialogVisible = true
}
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate?.length) {
params.createdDateBegin = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
handleReset() {
this.searchForm = {
ruleType: 'TRANSFER_OUT',
customerName: '',
customerPhone: '',
merchantId: '',
createDate: ''
}
this.handleSearch()
},
handleSearch() {
this.$refs.pointerWriteOffRef.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
// delete this.searchForm.createDate
resolve()
})
},
handleExport() {
var params = this.getParams()
this.$apis.pointWriteOff.payPointsExportApi(params).then(res => {
exportFn(res)
})
}
}
}
</script>
<style lang="scss" scoped>
.main-wrap {
background-color: #fff;
padding: 20px;
margin-top: 16px;
}
.detail-wrap {
padding: 0 12px;
font-size: 14px;
line-height: 20px;
.detail-li {
&:first-child {
margin-top: 0;
}
margin-top: 20px;
}
.detail-label {
width: 154px;
display: inline-block;
text-align: right;
color: #666666;
}
.detail-key {
color: #333;
}
}
.exportBtn {
float: right;
margin-bottom: 10px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!