Commit ea97cf4e by 前端

4.25.1的大拿

1 parent e31572c7
import {http} from '@/main'
const getListApi = params => {
params.method = `scrm.api.shopmall.integralorder.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const pointWriteOffExportApi = params => {
params.method = `scrm.api.shopmall.integralorder.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const pointWriteOffDetail = params => {
params.method = `scrm.api.shopmall.integralorder.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {getListApi, pointWriteOffExportApi, pointWriteOffDetail}
...@@ -128,7 +128,9 @@ const orderSourceList = [ ...@@ -128,7 +128,9 @@ const orderSourceList = [
{ confId: '1', confName: '商城订单' }, { confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' }, { confId: '2', confName: '直播订单' },
{ confId: '3', confName: '秒杀订单' }, { confId: '3', confName: '秒杀订单' },
{ confId: '4', confName: '众筹订单' } { confId: '4', confName: '众筹订单' },
{ confId: '6', confName: '配置升级订单' },
{ confId: '7', confName: '车主优选订单' }
] ]
const deliveryTypeList = [ const deliveryTypeList = [
......
...@@ -611,6 +611,12 @@ export default { ...@@ -611,6 +611,12 @@ export default {
width: 280 width: 280
}, },
{ {
label: '赠送积分',
prop: 'giveIntegral',
line: 1,
width: 150
},
{
label: '订单类型', label: '订单类型',
prop: 'orderSource', prop: 'orderSource',
width: '100', width: '100',
......
<template>
<div class="marketing">
<div class="wa-container">
<div class="big-title">查看详情</div>
<div class="details-content">
<div class="content" v-for="(item,index) in detailsList" :key="index">
<div class="list-text">
<span class="label">{{ item.label }}:</span>
<span class="prop" v-if="detailsRes">{{ detailsRes[item.prop] || '--' }}</span>
</div>
</div>
</div>
</div>
<el-button type="primary" class="back-btn" @click="handleBack">返回</el-button>
</div>
</template>
<script>
export default {
name: "details",
data() {
return {
detailsList: [
{
label: '项目名称',
prop: 'bizRelName'
},
{
label: '消费积分',
prop: 'integralValue'
},
{
label: '客户昵称',
prop: 'customerWechatName'
},
{
label: '手机号',
prop: 'customerPhone'
},
{
label: '核销员工',
prop: 'verificationStaff'
},
{
label: '结算状态',
prop: 'settlementStatus'
},
{
label: '核销日期',
prop: 'verificationTime'
},
{
label: '订单编号',
prop: 'orderCode'
}
],
detailsRes: null
}
},
methods: {
getDetails(id) {
let params = {
id
}
this.$apis.pointWriteOff.pointWriteOffDetail(params).then(res => {
res.settlementStatus = res.settlementStatus == 0 ? '未结算' : '已结算'
this.detailsRes = res
})
},
handleBack() {
this.$router.back()
}
},
created() {
let id = this.$route.query.id || ''
this.getDetails(id)
}
}
</script>
<style lang="scss" scoped>
.wa-container {
background: #FFFFFF;
min-height: 80vh;
.big-title {
font-size: 16px;
font-weight: 600;
padding: 15px 20px;
color: #333;
border-bottom: 1px solid #E5E5E5;
}
.details-content {
padding: 50px 120px;
display: grid;
grid-template-columns: 33.3% 33.3% 33.3%;
.list-text {
margin-bottom: 20px;
font-size: 14px;
.label {
color: #666666;
}
.prop{
color: #333333;
}
}
}
}
.back-btn {
margin: 16px auto;
display: flex;
}
</style>
<template>
<div class=" marketing pointerWriteOff">
<div class="container">
<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 class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import {exportFn} from "@/common/constant";
export default {
name: "index",
data() {
return {
size: 'small',
searchForm: {
// merchantId: this.$globalState.session.merchantId,
// merchantName: this.$globalState.session.merchantName
},
searchFormData: [
{
label: '项目名称',
name: 'bizRelName',
type: 'input',
placeholder: '请输入项目名称'
},
{
label: '核销日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
// pickerOptions: 'beforeRangePickerOptions'
},
{
label: '结算状态',
name: 'settlementStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'waiteOffStatusList'
}
],
baseData: {
waiteOffStatusList: [
{
confId: '0',
confName: '未结算'
},
{
confId: '1',
confName: '已结算'
}
],
},
getListApi: this.$apis.pointWriteOff.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '项目名称',
prop: 'bizRelName',
width: 280
},
{
label: '消费积分',
prop: 'integralValue',
width: 150
},
{
label: '客户昵称',
width: 150,
prop: 'customerWechatName'
},
{
label: '手机号',
prop: 'customerPhone',
width: 200,
line: 1
},
{
label: '核销员工',
prop: 'verificationStaff',
width: 150
},
{
label: '结算状态',
prop: 'settlementStatus',
width: 100,
formatter: cellValue => {
return this.baseData.waiteOffStatusList.find(item => item.confId == cellValue.settlementStatus).confName
}
},
{
label: '核销日期',
width: 200,
prop: 'verificationTime'
},
{
label: '订单编号',
prop: 'orderCode',
width: 220
}
],
},
tableButtonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
// condition: row => {
// return row.sopStatus != 1
// },
listeners: {
click: row => this.$router.push({
path: '/pointWriteOff/details',
query: row ? { id: row.id } : ''
})
}
},
],
pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate?.length) {
params.verificationStartTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.verificationEndTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
handleReset() {
this.searchForm = {
bizRelName: '',
settlementStatus: '',
createDate: []
}
this.handleSearch()
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
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.pointWriteOffExportApi(params).then(res => {
exportFn(res)
})
},
}
}
</script>
<style lang="scss" scoped>
.exportBtn {
float: right;
margin-bottom: 10px;
}
</style>
...@@ -86,10 +86,10 @@ export default { ...@@ -86,10 +86,10 @@ export default {
handleRates() { handleRates() {
const {marketingCustomerCount, reachCustomerCount, potentialCustomerCount, dealCustomerCount} = this.list const {marketingCustomerCount, reachCustomerCount, potentialCustomerCount, dealCustomerCount} = this.list
this.rates.reachRate = parseFloat(((reachCustomerCount / marketingCustomerCount) * 100).toFixed(2)) this.rates.reachRate = !marketingCustomerCount ? '-' : parseFloat(((reachCustomerCount / marketingCustomerCount) * 100).toFixed(2))
this.rates.percentConversion this.rates.percentConversion
= parseFloat(((potentialCustomerCount / reachCustomerCount)*100).toFixed(2)) = !reachCustomerCount ? '-' : parseFloat(((potentialCustomerCount / reachCustomerCount) * 100).toFixed(2))
this.rates.turnoverRatio = parseFloat(((dealCustomerCount / potentialCustomerCount)*100).toFixed(2)) this.rates.turnoverRatio = !potentialCustomerCount ? '-' : parseFloat(((dealCustomerCount / potentialCustomerCount) * 100).toFixed(2))
} }
} }
} }
...@@ -175,7 +175,8 @@ export default { ...@@ -175,7 +175,8 @@ export default {
//position: relative; //position: relative;
.sort-box { .sort-box {
margin: 38px 0; margin: 38px 0;
.sort-title{
.sort-title {
margin-left: 12px; margin-left: 12px;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!