|
@@ -1,5 +1,11 @@
|
|
|
<template>
|
|
|
<a-card :bordered="false">
|
|
|
+ <v-select
|
|
|
+ v-show="false"
|
|
|
+ ref="orderFlag"
|
|
|
+ code="PAY_STATUS"
|
|
|
+ placeholder="请选择订单状态"
|
|
|
+ allowClear></v-select>
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" :form="form" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="48">
|
|
@@ -9,10 +15,6 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
- <!-- <a-form-item label="下单时间" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <a-range-picker style="width:100%" :disabledDate="disabledDate" v-model="queryOrderDate" format="YYYY-MM-DD"
|
|
|
- :placeholder="['开始时间', '结束时间']" id="SettlementRecordsList-queryOrderDate" />
|
|
|
- </a-form-item> -->
|
|
|
<a-form-item label="下单时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
|
|
|
<a-range-picker
|
|
|
style="width:100%"
|
|
@@ -25,16 +27,19 @@
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
<a-form-item label="结算状态:" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <v-select ref="payStatus" code="SETTLE_STATUS_ALL" v-model="queryParam.orderFlag" allowClear></v-select>
|
|
|
+ <v-select code="SETTLE_STATUS_ALL" ref="salesChannelSettleStatus" v-model="queryParam.salesChannelSettleStatus" allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
<a-form-item label="销售合作商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <!-- <salesSearch ref="salesSearch" @salesChange="salesChange" placeholder="订单来源"></salesSearch> -->
|
|
|
- <a-select placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" mode="multiple" :showSearch="true" option-filter-prop="children"
|
|
|
- :filter-option="filterOption" @change="handleChange">
|
|
|
- <a-select-option v-for="item in optionData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-select
|
|
|
+ id="purchasedSetmeal-dataSourceNo"
|
|
|
+ allowClear
|
|
|
+ option-filter-prop="children"
|
|
|
+ placeholder="请选择销售合作商"
|
|
|
+ v-model="queryParam.dataSourceNo">
|
|
|
+ <a-select-option v-for="(item,index) in dataSourceNoList" :key="index" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -47,15 +52,9 @@
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
<a-form-item label="服务名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <a-input class="full-width" v-model.trim="queryParam.vehicleNumber" placeholder="服务名称" allowClear />
|
|
|
+ <a-input class="full-width" v-model.trim="queryParam.bundleName" placeholder="服务名称" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!-- <a-col :lg="6" :sm="12">
|
|
|
- <a-form-item label="套餐名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <a-input class="full-width" v-model.trim="queryParam.bundleName" placeholder="套餐名称" allowClear />
|
|
|
- </a-form-item>
|
|
|
- </a-col> -->
|
|
|
-
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
@@ -66,10 +65,14 @@
|
|
|
</div>
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div class="ftext" slot="message">共<span>{{ 0 }}</span>单,收款金额<span>¥{{ 0 }}</span>元</div>
|
|
|
+ <div class="ftext" slot="message">共<span>{{ orderTotal || 0 }}</span>单,收款金额<span>¥{{ totalAmounts || 0 }}</span>元</div>
|
|
|
</a-alert>
|
|
|
<div class="card-container">
|
|
|
<s-table ref="table" size="default" rowKey="id" bordered :columns="columns" :data="loadData">
|
|
|
+ <span slot="orderFlag" slot-scope="text, record">{{ $refs.orderFlag.getNameByCode(record.orderFlag) }}</span>
|
|
|
+ <!-- 结算状态 -->
|
|
|
+ <span slot="salesChannelSettleStatus" slot-scope="text, record">{{ $refs.salesChannelSettleStatus.getNameByCode(record.salesChannelSettleStatus) }}</span>
|
|
|
+ <!-- 操作 -->
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
<a-button type="primary" style="margin: 5px;" @click="handleDetail(record)">详情</a-button>
|
|
|
<!-- <span v-if="!$hasPermissions('CustomerBundleDetail_1')">--</span> -->
|
|
@@ -90,13 +93,8 @@ import {
|
|
|
STable,
|
|
|
VSelect
|
|
|
} from '@/components'
|
|
|
-import {
|
|
|
- listCustomerBundle,
|
|
|
- queryBankPayStatus,
|
|
|
- salesChannelList,
|
|
|
- countListBundle,
|
|
|
- exportBundle
|
|
|
-} from '@/api/customerBundle'
|
|
|
+import { salesChannelList } from '@/api/FinancialManagement'
|
|
|
+import {listCustomerBundle,queryBankPayStatus,countListBundle,exportBundle} from '@/api/customerBundle'
|
|
|
// import salesSearch from '@/components/salesQuery/salesSearch'
|
|
|
export default {
|
|
|
name: 'OrderList',
|
|
@@ -135,16 +133,18 @@ export default {
|
|
|
],
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
queryParam: {
|
|
|
- number: '',
|
|
|
+ number:'', // 订单编号
|
|
|
+ bundleName: '', // 服务名称
|
|
|
beginDate: null,
|
|
|
endDate: null,
|
|
|
- orderFlag: '',
|
|
|
- custMobile: '',
|
|
|
- bundleName: '',
|
|
|
- vehicleNumber: '',
|
|
|
- dataSourceNo: undefined
|
|
|
+ custMobile: '', // 用户信息
|
|
|
+ bundleName: '', // 套餐名称
|
|
|
+ dataSourceNo: undefined, // 合作商
|
|
|
+ salesChannelSettleStatus:"" // 结算状态
|
|
|
},
|
|
|
- optionData: [],
|
|
|
+ dataSourceNoList: [],
|
|
|
+ orderTotal:'', // 订单总数
|
|
|
+ totalAmounts:'',
|
|
|
columns: [{
|
|
|
title: '序号',
|
|
|
dataIndex: 'no',
|
|
@@ -183,15 +183,21 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '服务名称',
|
|
|
- dataIndex: 'bundleName',
|
|
|
+ dataIndex: 'itemName',
|
|
|
align: 'center',
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
+ customRender: function (text) {
|
|
|
+ return (text || '--')
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '购买数量',
|
|
|
- dataIndex: '',
|
|
|
+ dataIndex: 'times',
|
|
|
align: 'center',
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
+ customRender: function (text) {
|
|
|
+ return (text || '--')
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '收款金额',
|
|
@@ -204,30 +210,18 @@ export default {
|
|
|
dataIndex: 'orderFlag',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
- customRender: (text) => {
|
|
|
- const payStatus = this.$refs.payStatus.getOptionDatas()
|
|
|
- if (payStatus) {
|
|
|
- if (_.find(payStatus, ['code', text])) {
|
|
|
- return _.find(payStatus, ['code', text]).dispName
|
|
|
- }
|
|
|
- }
|
|
|
- return text
|
|
|
- }
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'orderFlag'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '结算状态',
|
|
|
dataIndex: '',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
- // customRender: (text) => {
|
|
|
- // const payStatus = this.$refs.payStatus.getOptionDatas()
|
|
|
- // if (payStatus) {
|
|
|
- // if (_.find(payStatus, ['code', text])) {
|
|
|
- // return _.find(payStatus, ['code', text]).dispName
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return text
|
|
|
- // }
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'salesChannelSettleStatus'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -240,6 +234,9 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ this.getSalesChannel()
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 禁止不可选日期
|
|
|
disabledDate (current) {
|
|
@@ -252,6 +249,17 @@ export default {
|
|
|
this.queryParam.endDate = dateStrings[1]
|
|
|
}
|
|
|
},
|
|
|
+ // 获取渠道商下的合作商信息
|
|
|
+ getSalesChannel () {
|
|
|
+ salesChannelList().then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ console.log(res,'-=--销售商')
|
|
|
+ this.dataSourceNoList = res.data
|
|
|
+ } else {
|
|
|
+ this.dataSourceNoList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleChange (value) {
|
|
|
console.log(`selected ${value}`)
|
|
|
},
|
|
@@ -266,51 +274,41 @@ export default {
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
)
|
|
|
},
|
|
|
- // 合计
|
|
|
- getTotal () {
|
|
|
- const params = {
|
|
|
- beginDate: this.searchForm.beginDate,
|
|
|
- endDate: this.searchForm.endDate,
|
|
|
- bundleName: this.searchForm.bundleName,
|
|
|
- number: this.searchForm.number,
|
|
|
- custMobile: this.searchForm.custMobile,
|
|
|
- orderFlag: this.searchForm.orderFlag,
|
|
|
- salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus,
|
|
|
- partner: this.searchForm.partner
|
|
|
+ // 合计
|
|
|
+ getTotal () {
|
|
|
+ const params = {
|
|
|
+ beginDate: this.queryParam.beginDate,
|
|
|
+ endDate: this.queryParam.endDate,
|
|
|
+ bundleName: this.queryParam.bundleName,
|
|
|
+ number: this.queryParam.number,
|
|
|
+ custMobile: this.queryParam.custMobile,
|
|
|
+ dataSourceNo: this.queryParam.dataSourceNo,
|
|
|
+ salesChannelSettleStatus: this.queryParam.salesChannelSettleStatus,
|
|
|
+ freeChoiceFlag: 1
|
|
|
+ }
|
|
|
+ params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
|
+ params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
|
+ countListBundle(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ if (res.data) {
|
|
|
+ this.orderTotal = res.data.cnt || 0
|
|
|
+ this.totalAmounts = res.data.totalAmounts || 0
|
|
|
+ } else {
|
|
|
+ this.orderTotal = 0
|
|
|
+ this.totalAmounts = 0
|
|
|
}
|
|
|
- params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
|
- params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
|
- countListBundle(params).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- if (res.data) {
|
|
|
- this.orderTotal = res.data.cnt || 0
|
|
|
- this.totalAmounts = res.data.totalAmounts || 0
|
|
|
- } else {
|
|
|
- this.orderTotal = 0
|
|
|
- this.totalAmounts = 0
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.orderTotal = 0
|
|
|
- this.totalAmounts = 0
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ } else {
|
|
|
+ this.orderTotal = 0
|
|
|
+ this.totalAmounts = 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 查看详情、
|
|
|
handleDetail(row){
|
|
|
this.$router.push({
|
|
|
path: `/Service/PurchasedService/detail/${row.id}`
|
|
|
})
|
|
|
},
|
|
|
- // getSalesListData () {
|
|
|
- // salesChannelList().then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // this.optionData = res.data || []
|
|
|
- // const obj = { salesChannelName: '自有', salesChannelNo: 0 }
|
|
|
- // const a = this.optionData.unshift(obj)
|
|
|
- // console.log(this.optionData, '---------------添加自有')
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
reloadRow (row) {
|
|
|
queryBankPayStatus({
|
|
|
tradeNo: row.tradeNo
|
|
@@ -321,7 +319,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 重置
|
|
|
+ // 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryOrderDate = undefined
|
|
|
this.queryOrderDate = [
|
|
@@ -329,22 +327,21 @@ export default {
|
|
|
moment(getDate.getRecentday().endtime, this.dateFormat)
|
|
|
]
|
|
|
this.queryParam = {
|
|
|
- number: '',
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
- orderFlag: '',
|
|
|
+ dataSourceNo: '',
|
|
|
custMobile: '',
|
|
|
bundleName: '',
|
|
|
- vehicleNumber: '',
|
|
|
- dataSourceNo: undefined
|
|
|
+ dataSourceNo: undefined,
|
|
|
+ salesChannelSettleStatus: ''
|
|
|
}
|
|
|
// this.$refs.salesSearch.setVal(undefined)
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 来源change
|
|
|
- salesChange (data) {
|
|
|
- this.queryParam.dataSourceNo = data ? data.salesChannelNo : ''
|
|
|
- },
|
|
|
+ // // 来源change
|
|
|
+ // salesChange (data) {
|
|
|
+ // this.queryParam.dataSourceNo = data ? data.salesChannelNo : ''
|
|
|
+ // },
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
const params = {
|
|
@@ -353,9 +350,9 @@ export default {
|
|
|
bundleName: this.queryParam.bundleName,
|
|
|
number: this.queryParam.number,
|
|
|
custMobile: this.queryParam.custMobile,
|
|
|
- orderFlag: this.queryParam.orderFlag,
|
|
|
- vehicleNumber: this.queryParam.vehicleNumber,
|
|
|
- dataSourceNo: this.queryParam.dataSourceNo
|
|
|
+ dataSourceNo: this.queryParam.dataSourceNo,
|
|
|
+ salesChannelSettleStatus: this.queryParam.salesChannelSettleStatus,
|
|
|
+ freeChoiceFlag: 1
|
|
|
}
|
|
|
if (!params.beginDate && !params.endDate) {
|
|
|
this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
|
|
@@ -384,64 +381,12 @@ export default {
|
|
|
document.body.appendChild(link)
|
|
|
link.click()
|
|
|
}
|
|
|
-
|
|
|
- // 导出
|
|
|
- // handleExport () {
|
|
|
- // this.form.validateFields((err, values) => {
|
|
|
- // if (!err) {
|
|
|
- // this.queryParam = values.queryParam
|
|
|
- // this.queryOrderDate = values.queryOrderDate
|
|
|
- // this.queryParam.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
|
|
|
- // this.queryParam.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
|
|
|
- // // 获取距开始日期3个月后的时间戳
|
|
|
- // const tVal = getThreeMonthsAfter(this.queryParam.beginDate)
|
|
|
- // // 获取结束时间时间戳
|
|
|
- // const endVal = new Date(this.queryParam.endDate.replace(/-/g, '/'))
|
|
|
- // if (endVal.valueOf() > tVal - 86400000) {
|
|
|
- // return this.$message.warning('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
|
|
|
- // }
|
|
|
- // const params = _.cloneDeep(this.queryParam)
|
|
|
- // let requestObj = null
|
|
|
- // // 按核销服务量进行结算
|
|
|
- // if (this.settleType == 'ITEM_VERIFY') {
|
|
|
- // params.bundName = params.bundleName
|
|
|
- // params.bizNum = params.orderBundleNo
|
|
|
- // delete params.bundleName
|
|
|
- // delete params.orderBundleNo
|
|
|
- // requestObj = exportByItem
|
|
|
- // } else {
|
|
|
- // requestObj = exportByBundle
|
|
|
- // }
|
|
|
- // this.exportLoading = true
|
|
|
- // exportBundle(params).then(res => {
|
|
|
- // console.log(res, 'rrrrrrrrrrr')
|
|
|
- // this.exportLoading = false
|
|
|
- // this.download(res)
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
- // download (data) {
|
|
|
- // if (!data) {
|
|
|
- // return
|
|
|
- // }
|
|
|
- // const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
- // const link = document.createElement('a')
|
|
|
-
|
|
|
- // link.style.display = 'none'
|
|
|
- // link.href = url
|
|
|
- // const a = moment().format('YYYYMMDDhhmmss')
|
|
|
- // const fname = '应收结算-' + a
|
|
|
- // console.log(fname, '111111')
|
|
|
- // link.setAttribute('download', fname + '.xlsx')
|
|
|
- // document.body.appendChild(link)
|
|
|
- // link.click()
|
|
|
- // },
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.resetSearchForm()
|
|
|
- // vm.getSalesListData()
|
|
|
+ vm.getSalesChannel()
|
|
|
+ vm.getTotal()
|
|
|
})
|
|
|
}
|
|
|
}
|