Commit 013ddf25 by 李长胜

1.0.2改版

1 parent eb74d0fe
...@@ -48,4 +48,13 @@ const updateCardContent = params => { ...@@ -48,4 +48,13 @@ const updateCardContent = params => {
}) })
} }
export { getCenterListApi,getMoreMerchant ,updateCardContent,getCardContent}
\ No newline at end of file \ No newline at end of file
const memberExportApi = params =>{
params.method=`scrm.api.equity.card.merchant.record.export`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export { getCenterListApi,getMoreMerchant ,updateCardContent,getCardContent,memberExportApi}
\ No newline at end of file \ No newline at end of file
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -121,8 +122,8 @@ ...@@ -121,8 +122,8 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent } from '@/api/modules/center' import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent,memberExportApi } from '@/api/modules/center'
import { statusList, memberTypeList } from '@/common/constant' import { statusList, memberTypeList,exportFn } from '@/common/constant'
export default { export default {
components: { components: {
glsxDialog glsxDialog
...@@ -353,19 +354,40 @@ mounted () { ...@@ -353,19 +354,40 @@ mounted () {
}) })
}) })
}, },
beforeSearchFn() { getParams() {
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.startTime = this.searchForm.daterange[0] + ' 00:00:00'
this.searchFormTable.startTime = this.searchForm.daterange[0] + ' 00:00:00' params.endTime = this.searchForm.daterange[1] + ' 23:59:59'
this.searchFormTable.endTime = this.searchForm.daterange[1] + ' 23:59:59'
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete this.searchFormTable.daterange delete params.daterange
return params
},
beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.startTime = this.searchForm.daterange[0] + ' 00:00:00'
// this.searchFormTable.endTime = this.searchForm.daterange[1] + ' 23:59:59'
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// delete this.searchFormTable.daterange
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
handleExport(row) {
var params = this.getParams()
memberExportApi(params).then(res => {
exportFn(res)
})
},
handleReset() { handleReset() {
this.searchForm = {} this.searchForm = {}
......
...@@ -34,6 +34,32 @@ ...@@ -34,6 +34,32 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="计价器" prop="switchStatus">
<el-switch v-model="ruleForm.switchStatus" active-color="#5850ff" active-text="开" inactive-text="关"></el-switch>
<span class="calcValueMsg">开启后,小程序端套餐详情将展示该信息</span>
</el-form-item>
<template v-if="ruleForm.switchStatus">
<div class="shopValuePanel">
<div class="setmealName">套餐服务</div>
<div class="rowMsg" v-for="(item, index) in choseItemList" :key="index">
<span>
{{ item.couponName }}
<span style="color: #4a4a4a">×{{ item.serviceQuantity }}</span>
</span>
<span>
价值约:
<span style="color: #ff5151">{{ item.shopPrice * item.serviceQuantity }}元</span>
</span>
</div>
</div>
<div class="allPrice" v-if="choseItemList.length > 0">
套餐内服务实际价值总计约:
<span class="price">{{ totalShopPrice }}元</span>
</div>
</template>
<el-form-item size="small" label="说明" prop="notes" style="width: 670px"> <el-form-item size="small" label="说明" prop="notes" style="width: 670px">
<el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input>
</el-form-item> </el-form-item>
...@@ -120,6 +146,7 @@ export default { ...@@ -120,6 +146,7 @@ export default {
ruleForm: { ruleForm: {
packageName: '', packageName: '',
packagePrice: '', packagePrice: '',
switchStatus: true,
notes: '' notes: ''
}, },
copyRuleForm: {}, //用于检查页面信息是否改动 copyRuleForm: {}, //用于检查页面信息是否改动
...@@ -143,6 +170,18 @@ export default { ...@@ -143,6 +170,18 @@ export default {
id: this.$route.query.id || 0 id: this.$route.query.id || 0
} }
}, },
computed: {
totalShopPrice() {
var sum = 0
if (this.choseItemList.length > 0) {
this.choseItemList.forEach(item => {
sum = ((sum * 100 + item.shopPrice * item.serviceQuantity * 100) / 100).toFixed(2)
})
return sum
}
return 0
}
},
created() { created() {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
...@@ -193,6 +232,7 @@ export default { ...@@ -193,6 +232,7 @@ export default {
getServiceInfo({ id: this.id }).then(res => { getServiceInfo({ id: this.id }).then(res => {
if (res.code == '0') { if (res.code == '0') {
this.ruleForm = res.data this.ruleForm = res.data
this.ruleForm.switchStatus = res.data.switchStatus == 1 ? true : false
this.choseItemList = res.data.list || [] this.choseItemList = res.data.list || []
this.totalPrice = res.data.referencePrice this.totalPrice = res.data.referencePrice
...@@ -200,6 +240,7 @@ export default { ...@@ -200,6 +240,7 @@ export default {
for (let i = 0; i < this.allItemList.length; i++) { for (let i = 0; i < this.allItemList.length; i++) {
if (item.serviceId == this.allItemList[i].id) { if (item.serviceId == this.allItemList[i].id) {
item.vipPrice = this.allItemList[i].vipPrice item.vipPrice = this.allItemList[i].vipPrice
item.shopPrice = this.allItemList[i].shopPrice
} }
} }
}) })
...@@ -293,6 +334,7 @@ export default { ...@@ -293,6 +334,7 @@ export default {
param.packageName = this.ruleForm.packageName param.packageName = this.ruleForm.packageName
param.packagePrice = this.ruleForm.packagePrice param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let lists = this.choseItemList let lists = this.choseItemList
for (var k in lists) { for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].serviceQuantity param[`lists[${k}].serviceQuantity`] = lists[k].serviceQuantity
...@@ -316,6 +358,7 @@ export default { ...@@ -316,6 +358,7 @@ export default {
params.packageName = this.ruleForm.packageName params.packageName = this.ruleForm.packageName
params.packagePrice = this.ruleForm.packagePrice params.packagePrice = this.ruleForm.packagePrice
params.notes = this.ruleForm.notes params.notes = this.ruleForm.notes
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let list = this.choseItemList let list = this.choseItemList
for (var i in list) { for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].serviceQuantity params[`list[${i}].serviceQuantity`] = list[i].serviceQuantity
...@@ -449,7 +492,7 @@ export default { ...@@ -449,7 +492,7 @@ export default {
} }
} }
.container { .container {
margin: 0 0px 20px; margin: 0 0px 100px;
position: relative; position: relative;
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
.allChoseWrap { .allChoseWrap {
...@@ -524,6 +567,53 @@ export default { ...@@ -524,6 +567,53 @@ export default {
color: #ff5151; color: #ff5151;
} }
} }
.calcValueMsg {
margin-left: -8px;
font-size: 14px;
font-weight: 400;
color: #999999;
}
.shopValuePanel {
margin-left: 120px;
margin-bottom: 15px;
width: 550px;
min-height: 140px;
border: 1px solid #e8e8ea;
border-radius: 2px;
.setmealName {
padding-left: 10px;
height: 28px;
line-height: 28px;
background: #fafafa;
border-radius: 2px 2px 0px 0px;
border-bottom: 1px solid #e8e8ea;
font-size: 14px;
font-weight: 400;
color: #666666;
}
.rowMsg {
font-size: 14px;
font-weight: 400;
color: #666666;
margin-top: 10px;
> span:first-child {
display: inline-block;
min-width: 165px;
text-align: right;
margin-right: 10px;
}
}
}
.allPrice {
margin: 0 0 20px 120px;
font-size: 14px;
font-weight: 400;
color: #666666;
.price {
color: #ff5151;
}
}
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!