Commit 9aa7c14c by chenwq

feat(商户): 添加getMerchantList1接口并优化商户选择组件

- 在common.js中添加新的商户列表接口getMerchantList1
- 修改selectStore.vue组件使用新接口并优化表单重置逻辑
- 在userDetail.vue中注释掉详情按钮并调整积分类型显示
- 修复时间格式化显示问题(HH:MM:ss)
1 parent eb77a364
......@@ -9,6 +9,18 @@ const getMerchantList = params => {
})
}
const getMerchantList1 = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageByCurMerchant1'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMerchantList
getMerchantList,
getMerchantList1
}
\ No newline at end of file
......@@ -28,7 +28,7 @@
<GLTable ref="pointTable" :search-form="searchFormSearch" :table-params="tableParams" :get-list-api="getListApi" :pageConf="pageConf" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> -->
<el-button type="text" v-if="channelSource == 1 && !scope.scope.relateId && scope.scope.infoName == '手动抵扣'" @click="handleRevocation(scope.scope)">撤销</el-button>
</div>
</GLTable>
......@@ -129,15 +129,15 @@ export default {
confLabel: "售后返回"
},
{
confId: "购物抵扣",
confLabel: "购物抵扣"
confId: "购物兑换",
confLabel: "购物兑换"
}
]
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: true,
tableOption: false,
tableColumns: [
{
label: "积分类型",
......@@ -174,7 +174,7 @@ export default {
label: "积分变化时间",
prop: 'updatedTime',
formatter: (cell) => {
return dayjs(cell.updatedTime).format('YYYY-MM-DD HH:MM:SS')
return dayjs(cell.updatedTime).format('YYYY-MM-DD HH:MM:ss')
}
},
{
......@@ -268,10 +268,10 @@ export default {
})
},
// 查看详情
handleDetail(data) {
this.recordInfo = data
this.detailVisible = true
},
// handleDetail(data) {
// this.recordInfo = data
// this.detailVisible = true
// },
//撤销
handleRevocation(data) {
this.recordInfo = data
......@@ -310,8 +310,8 @@ export default {
confLabel: "积分兑换"
},
{
confId: "购物抵扣",
confLabel: "购物抵扣"
confId: "购物兑换",
confLabel: "购物兑换"
},
{
confId: "售后返还",
......
<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"
>
<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>
<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>
<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>
......@@ -55,7 +16,7 @@
<script>
export default {
name: 'selectStore',
data () {
data() {
return {
searchForm: {
merchantId: '',
......@@ -151,26 +112,26 @@ export default {
// }
},
watch: {
dialogVisible (n) {
dialogVisible(n) {
if (n) this.init()
}
},
mounted () {
mounted() {
},
methods: {
init () {
init() {
this.merchantId = String(this.merchantInfo.merchantId)
this.merchantName = this.merchantInfo.merchantName
this.getList()
},
getList (pageCon) {
getList(pageCon) {
pageCon && (this.pageConfig = pageCon)
var params = {
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
}
this.$apis.common.getMerchantList(params).then(res => {
this.$apis.common.getMerchantList1(params).then(res => {
this.storeList = res.list
this.total = res.total
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.currentPage - 1)
......@@ -179,26 +140,29 @@ export default {
})
})
},
getTable () {
getTable() {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
setTableFinishFun () {
setTableFinishFun() {
//接收到的数据为空
this.$refs.staffRef.tableHeightValues = '460px'
},
handleClick (val) {
handleClick(val) {
this.merchantId = val.merchantNo
this.merchantName = val.merchantName
},
resetTable () {
this.searchForm = {}
resetTable() {
this.searchForm = {
merchantId: '',
merchantName: ''
}
this.getTable()
},
handleClose () {
handleClose() {
this.$emit('handleRelateStoreClose')
},
handleConfirm () {
handleConfirm() {
const { merchantId, merchantName } = this
if (merchantId && merchantName) this.$emit('handleRelateStoreConfirm', {
merchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!