Commit 2e0f85e5 by 周子尧

1

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