Commit 2e0f85e5 by 周子尧

1

1 parent 0b314b9e
......@@ -60,8 +60,8 @@ const getReceivedGiftInfoApi = params => {
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
sign: true
// returnAll: true
})
}
// 导出已领取礼包
......@@ -72,7 +72,6 @@ const exportGiftInfoApi = params => {
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
......
......@@ -13,11 +13,11 @@ import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) {
// console.log(1111111)
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
......
......@@ -18,11 +18,15 @@
</div>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :hasNum="true" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="nickName" slot-scope="scope">
<el-button type="text" @click="customerDetail(scope.scope)">{{ scope.scope.nickName }}</el-button>
</span>
<span slot="directionalGiftName" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">{{ scope.scope.directionalGiftName }}</el-button>
</span>
<div slot="giftInfo" slot-scope="scope">
<div>礼包明细</div>
<div>{{ scope.scope }}</div>
<!-- <GLTable ref="giftListRef" :getListApi="getGiftListApi" :hasNum="false" :noDataImg="url" :searchForm="scope.scope" :tableParams="giftParams" :pageConf="giftPageConf"></GLTable> -->
<GLTable ref="giftListRef" :hasNum="false" :noDataImg="url" :tableParams="giftParams" :pageConf="giftPageConf" :tableData="scope.scope.couponList"></GLTable>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -33,6 +37,7 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant'
export default {
name: 'giftList',
data() {
......@@ -44,7 +49,6 @@ export default {
wechatUserFlag: '',
giftName: '',
staffName: '',
orderCode: '',
createDate: []
},
tableSearchForm: {},
......@@ -53,12 +57,14 @@ export default {
{
label: '领用客户',
name: 'nickName',
type: 'input'
type: 'input',
placeholder: '请输入客户名称或手机号'
},
{
label: '礼包名称',
name: 'giftName',
type: 'input'
type: 'input',
placeholder: '请输入礼包名称或备注名称'
},
{
label: '是否为企微客户',
......@@ -67,18 +73,20 @@ export default {
optionList: [],
optionId: 'Id',
optionLabel: 'Name',
optionsName: 'List'
optionsName: 'List',
placeholder: '请选择'
}
],
searchFormData1: [
{
label: '发放员工',
name: 'staffName',
type: 'input'
type: 'input',
placeholder: '请输入'
},
{
label: '领取用日期',
name: 'receiveDate',
name: 'createDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions'
}
......@@ -107,10 +115,10 @@ export default {
},
{
label: '礼包数量',
name: 'discountType',
name: 'couponAmount',
width: '100px',
formatter: cellValue => {
return 'X' + cellValue.numBer
return 'X' + cellValue.couponAmount
}
},
{
......@@ -145,8 +153,13 @@ export default {
addHtml: 'giftInfo'
},
{
label: '序号',
prop: 'idx',
width: '60'
},
{
label: '领取客户',
prop: 'nickName'
addHtml: 'nickName'
},
{
label: '是否为企微客户',
......@@ -163,8 +176,8 @@ export default {
{
label: '礼包名称',
prop: 'directionalGiftName',
width: '200'
width: '200',
addHtml: 'directionalGiftName'
},
{
label: '礼包备注名称',
......@@ -207,6 +220,21 @@ export default {
},
methods: {
//客户
customerDetail(row) {
this.$router.push({
path: 'http://scrm.test.glsx.com.cn/custom/clientManage/clientDetail?id==' + row.id
})
},
// 查看
handleDetail(row) {
this.$router.push({
path: '/giftBag/giftDetail',
query: {
id: row.id
}
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
......@@ -257,9 +285,9 @@ export default {
handleExport() {
var params = this.getParams()
// this.$apis.couponManage.couponExportApi(params).then(res => {
// exportFn(res)
// })
this.$apis.giftBag.exportGiftInfoApi(params).then(res => {
aToExport(res)
})
},
handleDelete(row) {
......@@ -306,23 +334,29 @@ export default {
}
},
setTableFinishFun() {
var page = this.$refs.giftListRef.page
var page = this.$refs.receivedGiftListRef.page
console.log(this.$refs.receivedGiftListRef)
// 添加序号
this.$refs.giftListRef.data.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
})
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
if (this.$refs.receivedGiftListRef.data) {
this.$refs.receivedGiftListRef.data.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
})
//接收到的数据为空
this.$refs.receivedGiftListRef.data.length ? (this.$refs.receivedGiftListRef.tableHeightValues = '') : this.$refs.receivedGiftListRef.setTableHeightFun()
}
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
this.$refs.receivedGiftListRef.refreshTable()
},
handleReset() {
this.searchForm = {
orderCode: '',
commentStatus: '',
nickName: '',
wechatUserFlag: '',
giftName: '',
staffName: '',
createDate: []
}
this.handleSearch()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!