|
@@ -40,7 +40,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="8" :lg="5">
|
|
<a-col :xs="24" :sm="12" :md="8" :lg="5">
|
|
<a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
- <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入用户手机" />
|
|
|
|
|
|
+ <a-input id="allLdDetail-customerMobile" allowClear :maxLength="11" v-model="queryParam.customerMobile" placeholder="请输入用户手机" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="8" :lg="4">
|
|
<a-col :xs="24" :sm="12" :md="8" :lg="4">
|
|
@@ -52,7 +52,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- 总计 -->
|
|
<!-- 总计 -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
- <div class="ftext" slot="message">共<span> {{ }} </span>条,乐豆变动总计<span> {{ }} </span>个</div>
|
|
|
|
|
|
+ <div class="ftext" slot="message">共<span> {{ total }} </span>条,乐豆变动总计<span> {{ ldChangeNum }} </span>个</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -68,11 +68,11 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import { customerGoldLogDetail } from '@/api/userInfo.js'
|
|
|
|
|
|
+import { offPartnerGoldLog, getStatistic } from '@/api/userInfo.js'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
export default {
|
|
export default {
|
|
- name: 'ShopOrder',
|
|
|
|
|
|
+ name: 'AllLdDetail',
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -80,49 +80,53 @@ export default {
|
|
labelCol: { span: 7 },
|
|
labelCol: { span: 7 },
|
|
wrapperCol: { span: 17 }
|
|
wrapperCol: { span: 17 }
|
|
},
|
|
},
|
|
- // 将默认近七天时间日期回显在时间选择框中
|
|
|
|
- time: [
|
|
|
|
- moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
- dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
|
+ // 将默认近七天时间日期回显在时间选择框中
|
|
|
|
+ time: [
|
|
|
|
+ moment(getDate.getRecentday().starttime, this.dateFormat),
|
|
|
|
+ moment(getDate.getRecentday().endtime, this.dateFormat)
|
|
|
|
+ ],
|
|
|
|
+ total: 0, // 总条数
|
|
|
|
+ ldChangeNum: 0, // 乐豆变动量总计
|
|
|
|
+ dateFormat: 'YYYY-MM-DD',
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
beginDate: null, // 开始时间
|
|
beginDate: null, // 开始时间
|
|
endDate: null, // 结束时间
|
|
endDate: null, // 结束时间
|
|
|
|
+ customerMobile: '', // 用户手机
|
|
changeType: '', // 类型
|
|
changeType: '', // 类型
|
|
operateType: '' // 原因
|
|
operateType: '' // 原因
|
|
},
|
|
},
|
|
- info: '',
|
|
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
|
|
- { title: '用户手机', dataIndex: '', width: 200, align: 'center' },
|
|
|
|
|
|
+ { title: '用户手机', dataIndex: 'customerMobile', width: 200, align: 'center' },
|
|
{ title: '变动类型', dataIndex: 'changeTypeDictValue', width: 200, align: 'center' },
|
|
{ title: '变动类型', dataIndex: 'changeTypeDictValue', width: 200, align: 'center' },
|
|
{ title: '变动原因', dataIndex: 'operateTypeDictValue', width: 200, align: 'center' },
|
|
{ title: '变动原因', dataIndex: 'operateTypeDictValue', width: 200, align: 'center' },
|
|
{ title: '乐豆变动量(个)', dataIndex: 'changeNum', width: 200, align: 'center' }
|
|
{ title: '乐豆变动量(个)', dataIndex: 'changeNum', width: 200, align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- const searchData = Object.assign(parameter, this.queryParam)
|
|
|
|
- if (this.time && this.time.length) {
|
|
|
|
- searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
- searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- searchData.beginDate = ''
|
|
|
|
- searchData.endDate = ''
|
|
|
|
- }
|
|
|
|
- return customerGoldLogDetail(Object.assign(parameter, searchData)).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
|
- for (let i = 0; i < res.data.list.length; i++) {
|
|
|
|
- const _item = res.data.list[i]
|
|
|
|
- _item.no = no + i + 1
|
|
|
|
- }
|
|
|
|
- return res.data
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const searchData = Object.assign(parameter, this.queryParam)
|
|
|
|
+ if (this.time && this.time.length) {
|
|
|
|
+ searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
+ searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
+ } else {
|
|
|
|
+ searchData.beginDate = null
|
|
|
|
+ searchData.endDate = null
|
|
|
|
+ }
|
|
|
|
+ return offPartnerGoldLog(Object.assign(parameter, searchData)).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
|
+ for (let i = 0; i < res.data.list.length; i++) {
|
|
|
|
+ const _item = res.data.list[i]
|
|
|
|
+ _item.no = no + i + 1
|
|
|
|
+ }
|
|
|
|
+ // 总条数
|
|
|
|
+ this.total = res.data.count
|
|
|
|
+ return res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -141,30 +145,75 @@ export default {
|
|
// 查询
|
|
// 查询
|
|
refresh () {
|
|
refresh () {
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
|
+ this.getTotal()
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
handleReset () {
|
|
handleReset () {
|
|
- this.time = [moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')]
|
|
|
|
- this.queryParam.changeType = ''
|
|
|
|
- this.queryParam.operateType = ''
|
|
|
|
|
|
+ this.time = [
|
|
|
|
+ moment(getDate.getRecentday().starttime, this.dateFormat),
|
|
|
|
+ moment(getDate.getRecentday().endtime, this.dateFormat)
|
|
|
|
+ ]
|
|
|
|
+ this.queryParam = {
|
|
|
|
+ beginDate: null, // 开始时间
|
|
|
|
+ endDate: null, // 结束时间
|
|
|
|
+ customerMobile: '', // 用户手机
|
|
|
|
+ changeType: '', // 类型
|
|
|
|
+ operateType: '' // 原因
|
|
|
|
+ }
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
|
+ this.getTotal()
|
|
|
|
+ },
|
|
|
|
+ // 总计
|
|
|
|
+ getTotal () {
|
|
|
|
+ const params = this.queryParam
|
|
|
|
+ if (this.time && this.time.length) {
|
|
|
|
+ params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
+ params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
+ } else {
|
|
|
|
+ params.beginDate = null
|
|
|
|
+ params.endDate = null
|
|
|
|
+ }
|
|
|
|
+ getStatistic(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.ldChangeNum = res.data || 0
|
|
|
|
+ } else {
|
|
|
|
+ this.ldChangeNum = 0
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ this.getTotal()
|
|
|
|
+ },
|
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
|
+ next(vm => {
|
|
|
|
+ vm.time = [
|
|
|
|
+ moment(getDate.getRecentday().starttime, this.dateFormat),
|
|
|
|
+ moment(getDate.getRecentday().endtime, this.dateFormat)
|
|
|
|
+ ]
|
|
|
|
+ vm.queryParam = {
|
|
|
|
+ beginDate: null, // 开始时间
|
|
|
|
+ endDate: null, // 结束时间
|
|
|
|
+ customerMobile: '', // 用户手机
|
|
|
|
+ changeType: '', // 类型
|
|
|
|
+ operateType: '' // 原因
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
- .allLdDetail-page-info{
|
|
|
|
- .page-header{
|
|
|
|
- margin-bottom: 15px;
|
|
|
|
- span{
|
|
|
|
- margin-left: 20px;
|
|
|
|
- }
|
|
|
|
- .page-header-info{
|
|
|
|
- margin-left:0;
|
|
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .allLdDetail-page-info{
|
|
|
|
+ .page-header{
|
|
|
|
+ margin-bottom: 15px;
|
|
|
|
+ span{
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ }
|
|
|
|
+ .page-header-info{
|
|
|
|
+ margin-left:0;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.allLdDetail-searchForm{
|
|
.allLdDetail-searchForm{
|
|
.ant-form-inline .ant-form-item{
|
|
.ant-form-inline .ant-form-item{
|
|
width: 100%;
|
|
width: 100%;
|