|
@@ -1,33 +1,37 @@
|
|
<template>
|
|
<template>
|
|
- <div class="categorySet-wrap">
|
|
|
|
|
|
+ <div class="dealerAccountDetail-wrap">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<div>
|
|
<div>
|
|
<a-page-header :ghost="false" :backIcon="false" class="header-bar">
|
|
<a-page-header :ghost="false" :backIcon="false" class="header-bar">
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
- <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
- <span class="subTitle-word text-overflow" style="margin:0 15px;">轮胎补贴金额(箭冠汽配东莞店):<span style="font-size:20px;">11212121</span></span>
|
|
|
|
- <a-button type="danger" style="margin-right:15px;" ghost id="settingsIndex-addArea" @click="openCheckAccountModal=true">调账</a-button>
|
|
|
|
- <a-button type="primary" class="button-info" ghost id="settingsIndex-addArea" @click="openCheckRecordModal=true">调整记录</a-button>
|
|
|
|
|
|
+ <a id="dealerAccountDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
+ <span class="subTitle-word text-overflow" style="margin:0 15px;">轮胎补贴金额({{ $route.params.name }}):<span style="vertical-align: middle;">¥</span><span style="font-size:20px;vertical-align: text-bottom;">{{ toThousands($route.params.num) }}</span></span>
|
|
|
|
+ <a-button type="danger" style="margin-right:15px;" ghost id="dealerAccountDetail-checkAccount" @click="openCheckAccountModal = true">调账</a-button>
|
|
|
|
+ <a-button type="primary" class="button-info" ghost id="dealerAccountDetail-checkRecord" @click="openCheckRecordModal=true">调账记录</a-button>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
</div>
|
|
</div>
|
|
<a-card size="small" :bordered="false">
|
|
<a-card size="small" :bordered="false">
|
|
<div ref="tableSearch" class="table-page-search-wrapper newTableSearchName" >
|
|
<div ref="tableSearch" class="table-page-search-wrapper newTableSearchName" >
|
|
- <a-form layout="inline" id="settingsIndex-form" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
|
|
+ <a-form-model
|
|
|
|
+ layout="inline"
|
|
|
|
+ :model="queryParam"
|
|
|
|
+ id="dealerAccountDetail-form"
|
|
|
|
+ @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-item label="时间" prop="time">
|
|
|
|
- <rangeDate ref="rangeDate" id="actualSalesReportList-time" :value="queryParam.time" @change="dateChange" />
|
|
|
|
|
|
+ <a-form-model-item label="时间">
|
|
|
|
+ <rangeDate ref="rangeDate" id="dealerAccountDetail-time" :value="time" @change="dateChange" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="业务类型">
|
|
<a-form-model-item label="业务类型">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.dealerLevel"
|
|
|
|
- ref="dealerLevel"
|
|
|
|
- id="actualSalesReportList-dealerLevel"
|
|
|
|
- code="DEALER_LEVEL"
|
|
|
|
|
|
+ v-model="queryParam.flowBizType"
|
|
|
|
+ ref="flowBizType"
|
|
|
|
+ id="dealerAccountDetail-flowBizType"
|
|
|
|
+ code="FLOW_BIZ_TYPE"
|
|
placeholder="请选择业务类型"
|
|
placeholder="请选择业务类型"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -35,17 +39,17 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="入账类型">
|
|
<a-form-model-item label="入账类型">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.dealerLevel"
|
|
|
|
- ref="dealerLevel"
|
|
|
|
- id="actualSalesReportList-dealerLevel"
|
|
|
|
- code="DEALER_LEVEL"
|
|
|
|
|
|
+ v-model="queryParam.amountType"
|
|
|
|
+ ref="amountType"
|
|
|
|
+ id="dealerAccountDetail-amountType"
|
|
|
|
+ code="DEALER_AMOUNT_TYPE"
|
|
placeholder="请选择入账类型"
|
|
placeholder="请选择入账类型"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="settingsIndex-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="settingsIndex-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerAccountDetail-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountDetail-reset">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -54,10 +58,10 @@
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
v-if="$hasPermissions('B_actualSalesReport_export')"
|
|
v-if="$hasPermissions('B_actualSalesReport_export')"
|
|
- id="actualSalesReportList-export">导出</a-button>
|
|
|
|
|
|
+ id="dealerAccountDetail-export">导出</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
- </a-form>
|
|
|
|
|
|
+ </a-form-model>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -76,7 +80,7 @@
|
|
</a-card>
|
|
</a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 调账 -->
|
|
<!-- 调账 -->
|
|
- <check-account-modal v-drag :openModal="openCheckAccountModal" @ok="$refs.table.refresh(true)" @close="openCheckAccountModal = false" />
|
|
|
|
|
|
+ <check-account-modal v-drag ref="checkAccountModal" :openModal="openCheckAccountModal" @ok="$refs.table.refresh(true)" @close="openCheckAccountModal = false" />
|
|
<!-- 调账记录 -->
|
|
<!-- 调账记录 -->
|
|
<check-record-modal v-drag :openModal="openCheckRecordModal" @ok="$refs.table.refresh(true)" @close="openCheckRecordModal = false" />
|
|
<check-record-modal v-drag :openModal="openCheckRecordModal" @ok="$refs.table.refresh(true)" @close="openCheckRecordModal = false" />
|
|
</div>
|
|
</div>
|
|
@@ -89,41 +93,44 @@ import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import checkAccountModal from './checkAccountModal.vue'
|
|
import checkAccountModal from './checkAccountModal.vue'
|
|
import checkRecordModal from './checkRecordModal.vue'
|
|
import checkRecordModal from './checkRecordModal.vue'
|
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
// 接口
|
|
// 接口
|
|
-import { queryDealerScopePage, bizuserScopeDelete, findById, queryAreaScope, queryDealerScope, saveAreaScope, saveDealerScope } from '@/api/bizuser'
|
|
|
|
|
|
+import { dealerAccountFlowList, dealerAccountFlowExport } from '@/api/dealerAccount'
|
|
export default {
|
|
export default {
|
|
- name: 'SettingsIndex',
|
|
|
|
|
|
+ name: 'DealerAccountDetail',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
components: { STable, VSelect, rangeDate, checkAccountModal, checkRecordModal },
|
|
components: { STable, VSelect, rangeDate, checkAccountModal, checkRecordModal },
|
|
data () {
|
|
data () {
|
|
|
|
+ const _this = this
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
tableHeight: 0, // 表格高度
|
|
tableHeight: 0, // 表格高度
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
+ exportLoading: false, // 导出时加载状态
|
|
openCheckAccountModal: false, // 打开调账弹窗
|
|
openCheckAccountModal: false, // 打开调账弹窗
|
|
openCheckRecordModal: false, // 打开调账记录弹窗
|
|
openCheckRecordModal: false, // 打开调账记录弹窗
|
|
// 查询参数
|
|
// 查询参数
|
|
|
|
+ time: [],
|
|
queryParam: {
|
|
queryParam: {
|
|
- hasDetail: 0,
|
|
|
|
- bizType: undefined, // 区域分区区别
|
|
|
|
- bizSn: undefined, // 当前行sn
|
|
|
|
- dealerName: '', // 经销商
|
|
|
|
- dealerLevel: undefined
|
|
|
|
|
|
+ beginDate: '', // 开始时间
|
|
|
|
+ endDate: '', // 结束时间
|
|
|
|
+ flowBizType: undefined, // 业务类型
|
|
|
|
+ amountType: undefined // 入账类型
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '记账日期', dataIndex: 'createDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '业务类型', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '入账类型', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '金额(¥)', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '备注', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
|
|
|
+ { title: '记账日期', dataIndex: 'accountDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务类型', dataIndex: 'flowBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '入账类型', dataIndex: 'amountTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '金额(¥)', dataIndex: 'flowAmount', width: '16%', align: 'center', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
|
|
|
|
+ { title: '备注', dataIndex: 'remark', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
],
|
|
],
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- this.queryParam.userSn = this.$route.query.sn
|
|
|
|
|
|
+ this.queryParam.dealerSn = this.$route.params.sn
|
|
// 获取列表数据 有分页
|
|
// 获取列表数据 有分页
|
|
- return queryDealerScopePage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ return dealerAccountFlowList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -144,157 +151,35 @@ export default {
|
|
// 时间 change
|
|
// 时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
if (date[0] && date[1]) {
|
|
if (date[0] && date[1]) {
|
|
- this.queryParam.time = date
|
|
|
|
|
|
+ this.time = date
|
|
} else {
|
|
} else {
|
|
- this.queryParam.time = []
|
|
|
|
|
|
+ this.time = []
|
|
}
|
|
}
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
},
|
|
},
|
|
- // 选择区域>分区
|
|
|
|
- handleArea (con) {
|
|
|
|
- const chooseData = con.checked
|
|
|
|
- const newData = []
|
|
|
|
- chooseData.forEach(item => {
|
|
|
|
- const obj = {}
|
|
|
|
- obj.userSn = this.$route.query.sn
|
|
|
|
- obj.bizUserSn = this.infoObj.bizUserSn
|
|
|
|
- if (item.indexOf('_') != -1) { // 分区获取数据带_ 区域不带下划线
|
|
|
|
- obj.bizType = 'subarea_area'
|
|
|
|
- obj.bizSn = item.replace('_', '')
|
|
|
|
- newData.push(obj)
|
|
|
|
- } else {
|
|
|
|
- obj.bizType = 'subarea'
|
|
|
|
- obj.bizSn = item
|
|
|
|
- newData.push(obj)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.saveChooseArea(newData)
|
|
|
|
- },
|
|
|
|
- // 保存区域分区数据
|
|
|
|
- saveChooseArea (list) {
|
|
|
|
- const _this = this
|
|
|
|
- const newAjaxData = {}
|
|
|
|
- newAjaxData.userSn = _this.$route.query.sn
|
|
|
|
- newAjaxData.bizUserScopeList = list
|
|
|
|
- saveAreaScope(newAjaxData).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.openChooseArea = false
|
|
|
|
- _this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // tabs 选择
|
|
|
|
- handleTabs (val) {
|
|
|
|
- this.activeKeyVal = val
|
|
|
|
- if (val == 2) {
|
|
|
|
- this.$refs.setCategory.pageInit()
|
|
|
|
- } else if (val == 3) {
|
|
|
|
- this.$refs.setSupplier.pageInit()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 所在区域分区查询
|
|
|
|
- subareaChange (val) {
|
|
|
|
- if (val.length == 1) {
|
|
|
|
- this.queryParam.bizSn = val[0]
|
|
|
|
- this.queryParam.bizType = 'subarea'
|
|
|
|
- } else if (val.length == 2) {
|
|
|
|
- this.queryParam.bizSn = val[1]
|
|
|
|
- this.queryParam.bizType = 'subarea_area'
|
|
|
|
- } else {
|
|
|
|
- this.queryParam.bizSn = undefined
|
|
|
|
- this.queryParam.bizType = undefined
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
- bizSn: undefined,
|
|
|
|
- bizType: undefined,
|
|
|
|
- dealerName: '',
|
|
|
|
- hasDetail: 0
|
|
|
|
|
|
+ beginDate: '', // 开始时间
|
|
|
|
+ endDate: '', // 结束时间
|
|
|
|
+ flowBizType: undefined, // 业务类型
|
|
|
|
+ amountType: undefined // 入账类型
|
|
}
|
|
}
|
|
- this.$refs.subarea.clearData()
|
|
|
|
|
|
+ this.time = []
|
|
|
|
+ this.$refs.rangeDate.resetDate()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- // 选择区域
|
|
|
|
- async openAreaModal () {
|
|
|
|
- const _this = this
|
|
|
|
- const checkedArr = []
|
|
|
|
- const dataList = await queryAreaScope({ userSn: this.$route.query.sn, hasDetail: 0 })
|
|
|
|
- if (dataList.data && dataList.data.length > 0) {
|
|
|
|
- dataList.data.forEach(item => {
|
|
|
|
- if (item.bizType == 'subarea_area') {
|
|
|
|
- item.bizSn = item.bizSn + '_'
|
|
|
|
- }
|
|
|
|
- checkedArr.push(item.bizSn)
|
|
|
|
- })
|
|
|
|
- const newCheckedArr = [...new Set(checkedArr)]
|
|
|
|
- console.log('end choose:', newCheckedArr)
|
|
|
|
- this.newChooseData.checked = newCheckedArr
|
|
|
|
- } else {
|
|
|
|
- this.newChooseData.checked = []
|
|
|
|
- }
|
|
|
|
- this.$refs.partQuery.pageInit()
|
|
|
|
- _this.$nextTick(() => {
|
|
|
|
- _this.openChooseArea = true
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 打开经销商弹窗
|
|
|
|
- async openDealerModal (params = {}) {
|
|
|
|
- const _this = this
|
|
|
|
- const arr = []
|
|
|
|
- const dataList = await queryDealerScope({ userSn: this.$route.query.sn, hasDetail: 0 })
|
|
|
|
- if (dataList.data && dataList.data.length > 0) {
|
|
|
|
- dataList.data.forEach(con => {
|
|
|
|
- arr.push(con.bizSn)
|
|
|
|
- })
|
|
|
|
- _this.chooseInfo = [...new Set(arr)]
|
|
|
|
- } else {
|
|
|
|
- _this.chooseInfo = []
|
|
|
|
- }
|
|
|
|
- const dataInfo = {
|
|
|
|
- list: _this.chooseInfo,
|
|
|
|
- sn: _this.$route.query.sn
|
|
|
|
- }
|
|
|
|
- _this.openChooseDealer = true
|
|
|
|
- if (_this.openChooseDealer) {
|
|
|
|
- _this.$refs.dealerChoose.pageInit(dataInfo)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 经销商
|
|
|
|
- handleAddDealer (list) {
const newData = []
list.forEach(con => {
const obj = {}
|
|
|
|
- obj.userSn = this.$route.query.sn
|
|
|
|
- obj.bizUserSn = this.infoObj.bizUserSn
obj.bizType = 'dealer'
obj.bizSn = con
newData.push(obj)
})
this.saveChooseDealer(newData)
},
|
|
|
|
- // 保存所选区域或经销商
|
|
|
|
- saveChooseDealer (list) {
|
|
|
|
|
|
+ // 导出
|
|
|
|
+ handleExport () {
|
|
const _this = this
|
|
const _this = this
|
|
- const ajaxData = {}
|
|
|
|
- ajaxData.userSn = _this.$route.query.sn
|
|
|
|
- ajaxData.bizUserScopeList = list
|
|
|
|
- saveDealerScope(ajaxData).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.openChooseDealer = false
|
|
|
|
- _this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
|
|
+ _this.exportLoading = true
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ hdExportExcel(dealerAccountFlowExport, _this.queryParam, '轮胎补贴金额列表', function () {
|
|
|
|
+ _this.exportLoading = false
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 删除
|
|
|
|
- handleDel (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确认要删除吗?删除后当前用户权限以最新权限为准',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- bizuserScopeDelete({ id: row.bizUserScopeSn }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 返回
|
|
// 返回
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ name: 'dealerAccountList' })
|
|
this.$router.push({ name: 'dealerAccountList' })
|
|
@@ -309,7 +194,6 @@ export default {
|
|
},
|
|
},
|
|
// 计算列表高度
|
|
// 计算列表高度
|
|
setTableH () {
|
|
setTableH () {
|
|
- console.log('1111:', this.$refs)
|
|
|
|
const searchHeight = this.$refs.tableSearch.offsetHeight
|
|
const searchHeight = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - searchHeight - 240
|
|
this.tableHeight = window.innerHeight - searchHeight - 240
|
|
}
|
|
}
|