17 changed files with 4214 additions and 6 deletions
@ -0,0 +1,138 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 回款返利核对(待核对)查询分页列表
|
|||
listPage: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebate/checkApplyGetCollectionRebate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
|
|||
// 回款返利核对(待核对)列表上传一致
|
|||
stayCheckUpAgre: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebate/stayCheckUpAgre', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 单车返利核对(待核对)列表调整修改记录
|
|||
adjustment: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmvehrebate/adjustment', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 回款返利核对申请--点击添加--选择已核对单车返利信息
|
|||
checkApplyGetAlreadyUploadCollectionRebate: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebate/checkApplyGetAlreadyUploadCollectionRebate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 核对审核申请分页列表
|
|||
pagelist: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/listPage', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 删除
|
|||
delete: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/delBySids', |
|||
method: 'DELETE', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchDetailsBySid: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
// 回款返利核对审核申请保存
|
|||
save: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查看明细
|
|||
collectionRebateWithDetails: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatewith/collectionRebateWithDetails/' + data, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
// 提交流程
|
|||
submitVehicleApply: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/submitCollectionRebateCheckApply', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 代办任务同意办理
|
|||
complete: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/complete', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
// 代办任务驳回任务
|
|||
reject: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/reject', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
// 代办任务终止任务
|
|||
breakProcess: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/breakProcess', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
// 代办任务撤回任务
|
|||
revokeProcess: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/revokeProcess', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
|
|||
getNextNodesForSubmit: function(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/getNextNodesForSubmit', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
}, |
|||
getPreviousNodesForReject(data) { |
|||
return request({ |
|||
url: '/scm/v1/scmcollectionrebatecheckapply/getNextNodesForSubmit', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,364 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="回款返利核对审核申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="switch_btn"> |
|||
<el-button class="" @click="handleClick">待核对</el-button> |
|||
<el-button :class="{btn_style:viewState === 1}">核对审批申请</el-button> |
|||
</div> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="品牌"> |
|||
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable> |
|||
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="申请标题"> |
|||
<el-input v-model="listQuery.params.checkApply" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="创建日期"> |
|||
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">回款返利核对申请审批列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50px"/> |
|||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/> |
|||
<el-table-column fixed label="操作" align="center" width="180px" > |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" width="180px" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span> |
|||
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="分公司" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createOrgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="名称" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.checkApply }}回款返利核对审核申请</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="250"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="250"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="250"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="创建日期" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="创建人" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createByName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<collectionrebatecheckedAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|||
<collectionrebatecheckedInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/> |
|||
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> |
|||
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import { brandDown, getPathSidByUserSid } from '@/api/cheliang/dictcommons' |
|||
import collectionrebatecheckedAdd from './collectionrebatecheckedAdd' |
|||
import collectionrebatecheckedInfo from './collectionrebatecheckedInfo' |
|||
import {getStorage} from "@/utils/auth"; |
|||
|
|||
export default { |
|||
name: 'huikuanfanlihedui', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
collectionrebatecheckedAdd, |
|||
collectionrebatecheckedInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
url: '', |
|||
dialogHeight: '80%', |
|||
centerDialogVisible: false, |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
brand_list: '', |
|||
listQuery: { |
|||
params: { |
|||
brandSid: '', |
|||
checkApply: '', |
|||
createOrgSid: '', |
|||
createEndTime: '', |
|||
createStartTime: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 加载列表 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
|||
window.addEventListener('message', this.handleMessage) |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
async handleMessage(event) { |
|||
var code = '' |
|||
if (event.data.params !== null && event.data.params !== undefined) { |
|||
code = event.data.params.code |
|||
} |
|||
if (code === 1) { |
|||
this.init() |
|||
this.centerDialogVisible = false |
|||
} else if (code === 2) { |
|||
this.dialogHeight = event.data.params.data |
|||
this.setIframeHeight(document.getElementById('iframe')) |
|||
} |
|||
}, |
|||
closeIt() { |
|||
this.url = '' |
|||
this.centerDialogVisible = false |
|||
}, |
|||
setIframeHeight(iframe) { |
|||
iframe.height = this.dialogHeight |
|||
}, |
|||
flowRecord(row) { |
|||
this.centerDialogVisible = true |
|||
var params = { |
|||
deployId: row.procDefId, |
|||
procInsId: row.procInstId, |
|||
token: getStorage() |
|||
} |
|||
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) |
|||
}, |
|||
init() { |
|||
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.listQuery.params.createOrgSid = resp.data |
|||
brandDown({ useOrg: this.listQuery.params.createOrgSid }).then((res) => { |
|||
if (res.success) { |
|||
this.brand_list = res.data |
|||
} |
|||
}) |
|||
this.getList() |
|||
} |
|||
}) |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
console.log('sids', this.sids) |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.pagelist(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
brandSid: '', |
|||
checkApply: '', |
|||
createOrgSid: '', |
|||
createEndTime: '', |
|||
createStartTime: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
} |
|||
this.init() |
|||
}, |
|||
handleClick() { |
|||
this.$parent.resetState() |
|||
}, |
|||
toEdit(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showEdit(row) |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.delete(this.sids).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.switch_btn { |
|||
padding: 15px 0 10px 0; |
|||
} |
|||
.btn_style { |
|||
background-color: #018ad2; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
</style> |
@ -0,0 +1,449 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>{{ formobj.checkApply }}回款返利核对审核申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="2" class="tleftb colOneStyle"> |
|||
<span>品牌:</span> |
|||
</el-col> |
|||
<el-col :span="4" class="colOneStyle"> |
|||
<el-form-item> |
|||
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand"> |
|||
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18" class="tleftb colOneStyle"> |
|||
<el-button size="small" type="primary" @click="handleSelect()">添加</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :key="tableKey" :data="formobj.scmWhenCollectionrebateCheckapplydetailDetails" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="回款方式" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="明细" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="2" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>预提返利本月核对情况</div> |
|||
</div> |
|||
<el-table :key="lastVehrebateKey" :data="formobj.scmLastCollectionrebateCheckapplydetailDetails" border style="width: 100%"> |
|||
<el-table-column label="预提年月" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notUploadedCost }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<yiheduihiukuanfanli v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState"/> |
|||
<heduishenpiAdd v-show="viewState == 3" ref="divAdd" @backAdd="backAdd" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons' |
|||
import yiheduihiukuanfanli from './relation/yiheduihiukuanfanli' |
|||
import heduishenpiAdd from './relation/heduishenpiAdd' |
|||
|
|||
export default { |
|||
name: 'collectionrebatecheckAdd', |
|||
components: { |
|||
yiheduihiukuanfanli, |
|||
heduishenpiAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
index: 0, |
|||
tableKey: 0, |
|||
lastVehrebateKey: 1, |
|||
dialogStatus: '', |
|||
brand_list: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
createByName: '', |
|||
createBySid: '', |
|||
brandName: '', |
|||
brandSid: '', |
|||
checkApply: '', |
|||
createOrgName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
remarks: '', |
|||
instanceId: '', // 流程实例ID |
|||
taskId: '', // 任务ID |
|||
scmWhenCollectionrebateCheckapplydetailDetails: [], |
|||
scmLastCollectionrebateCheckapplydetailDetails: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
// 获取制单日期 |
|||
newDate() { |
|||
let date = new Date() |
|||
let year = date.getFullYear() // 年 |
|||
let month = date.getMonth() // 月 |
|||
this.formobj.checkApply = year + '年' + month + '月' |
|||
}, |
|||
init() { |
|||
fetchBySid(this.formobj.createOrgSid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgName = res.data.name |
|||
this.formobj.useOrgName = res.data.name |
|||
} |
|||
}) |
|||
brandDown({ useOrg: this.formobj.createOrgSid }).then((res) => { |
|||
if (res.success) { |
|||
this.brand_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
showAdd(createOrgSid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
this.init() |
|||
this.newDate() |
|||
}) |
|||
this.dialogStatus = 'add' |
|||
this.formobj.createOrgSid = createOrgSid |
|||
this.formobj.useOrgSid = createOrgSid |
|||
this.formobj.createByName = window.sessionStorage.getItem('name') |
|||
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|||
this.viewTitle = '【新增】回款返利核对审核申请' |
|||
}, |
|||
showEdit(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '【编辑】回款返利核对审核申请' |
|||
console.log('编辑回显', row.sid) |
|||
req.fetchDetailsBySid(row.sid).then((resp) => { |
|||
this.formobj = resp.data |
|||
this.formobj.instanceId = resp.data.procInstId |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
changeBrand(value) { |
|||
let bb = null |
|||
this.brand_list.forEach((e) => { |
|||
if (e.brandName === value) { |
|||
bb = { |
|||
name: e.brandName, |
|||
sid: e.sid |
|||
} |
|||
} |
|||
}) |
|||
this.formobj.brandSid = bb.sid |
|||
}, |
|||
// 明细表添加一行数据 |
|||
handleSelect() { |
|||
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) { |
|||
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' }) |
|||
return |
|||
} |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].showData(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails, this.formobj.scmLastCollectionrebateCheckapplydetailDetails, this.formobj.createOrgSid, this.formobj.brandSid) |
|||
}, |
|||
backData(value, val) { |
|||
this.viewState = 1 |
|||
if (value.length > 0) { |
|||
for (var i in value) { |
|||
let cval = value[i] |
|||
if (!this.formobj.scmWhenCollectionrebateCheckapplydetailDetails || this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length === 0) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails = [] |
|||
} |
|||
let v = 0 |
|||
for (var j in this.formobj.scmWhenCollectionrebateCheckapplydetailDetails) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionTypeValue === cval.collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionMoney) + parseInt(cval.collectionMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].estimateRebate = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].estimateRebate) + parseInt(cval.estimateRebate) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].uploadMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].uploadMoney) + parseInt(cval.uploadMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].adjustmentMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].adjustmentMoney) + parseInt(cval.adjustmentMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionRebateSids.push(cval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.push({ |
|||
collectionTypeKey: cval.collectionTypeKey, |
|||
collectionTypeValue: cval.collectionTypeValue, |
|||
collectionMoney: cval.collectionMoney, |
|||
estimateRebate: cval.estimateRebate, |
|||
brandName: cval.brandName, |
|||
brandSid: cval.brandSid, |
|||
uploadMoney: cval.uploadMoney, |
|||
adjustmentMoney: cval.adjustmentMoney, |
|||
collectionRebateSids: [cval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
if (val.length > 0) { |
|||
for (var p in val) { |
|||
let bval = val[p] |
|||
if (!this.formobj.scmLastCollectionrebateCheckapplydetailDetails || this.formobj.scmLastCollectionrebateCheckapplydetailDetails.length === 0) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails = [] |
|||
} |
|||
let v = 0 |
|||
for (var l in this.formobj.scmLastCollectionrebateCheckapplydetailDetails) { |
|||
if (this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].withholdingDate === bval.withholdingDate) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionMoney) + parseInt(bval.collectionMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].estimateRebate = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].estimateRebate) + parseInt(bval.estimateRebate) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].uploadMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].uploadMoney) + parseInt(bval.uploadMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].adjustmentMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].adjustmentMoney) + parseInt(bval.adjustmentMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionRebateSids.push(bval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails.push({ |
|||
withholdingDate: bval.withholdingDate, |
|||
collectionMoney: bval.collectionMoney, |
|||
estimateRebate: bval.estimateRebate, |
|||
uploadMoney: bval.uploadMoney, |
|||
adjustmentMoney: bval.adjustmentMoney, |
|||
notUploadedCost: '', |
|||
collectionRebateSids: [bval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showInfo(row) |
|||
}, |
|||
backAdd(value, collectionTypeValue) { |
|||
this.viewState = 1 |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i in value) { |
|||
let cval = value[i] |
|||
let v = 0 |
|||
for (var j in aa) { |
|||
if (aa[j].collectionTypeValue === cval.collectionTypeValue) { |
|||
aa[j].collectionMoney = parseInt(aa[j].collectionMoney) + parseInt(cval.collectionMoney) |
|||
aa[j].estimateRebate = parseInt(aa[j].estimateRebate) + parseInt(cval.estimateRebate) |
|||
aa[j].uploadMoney = parseInt(aa[j].uploadMoney) + parseInt(cval.uploadMoney) |
|||
aa[j].adjustmentMoney = parseInt(aa[j].adjustmentMoney) + parseInt(cval.adjustmentMoney) |
|||
aa[j].collectionRebateSids.push(cval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
aa.push({ |
|||
collectionTypeKey: cval.collectionTypeKey, |
|||
collectionTypeValue: cval.collectionTypeValue, |
|||
collectionMoney: cval.collectionMoney, |
|||
estimateRebate: cval.estimateRebate, |
|||
brandName: cval.brandName, |
|||
brandSid: cval.brandSid, |
|||
uploadMoney: cval.uploadMoney, |
|||
adjustmentMoney: cval.adjustmentMoney, |
|||
collectionRebateSids: [cval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
for (var k = 0; k < this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length; k++) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeValue === collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeKey = aa[0].collectionTypeKey |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeValue = aa[0].collectionTypeValue |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].estimateRebate = aa[0].estimateRebate |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].brandName = aa[0].brandName |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].brandSid = aa[0].brandSid |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].uploadMoney = aa[0].uploadMoney |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].adjustmentMoney = aa[0].adjustmentMoney |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionRebateSids = aa[0].collectionRebateSids |
|||
break |
|||
} |
|||
} |
|||
} else if (value.length === 0) { |
|||
for (var l = 0; l < this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length; l++) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[l].collectionTypeValue === collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.splice(l, 1) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
save() { |
|||
console.log(this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.save(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submit() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submitVehicleApply(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
sid: '', |
|||
createByName: '', |
|||
createBySid: '', |
|||
brandName: '', |
|||
brandSid: '', |
|||
checkApply: '', |
|||
createOrgName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
remarks: '', |
|||
instanceId: '', // 流程实例ID |
|||
taskId: '', // 任务ID |
|||
scmWhenCollectionrebateCheckapplydetailDetails: [], |
|||
scmLastCollectionrebateCheckapplydetailDetails: [] |
|||
} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,174 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>{{ formobj.checkApply }}回款返利核对审核申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="2" class="tleftb colOneStyle"> |
|||
<span>品牌:</span> |
|||
</el-col> |
|||
<el-col :span="20" class="colOneStyle"> |
|||
<el-form-item> |
|||
<span>{{ formobj.brandName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :key="tableKey" :data="formobj.scmWhenCollectionrebateCheckapplydetailDetails" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="回款方式" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="明细" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="2" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>预提返利本月核对情况</div> |
|||
</div> |
|||
<el-table :key="lastVehrebateKey" :data="formobj.scmLastCollectionrebateCheckapplydetailDetails" border style="width: 100%"> |
|||
<el-table-column label="预提年月" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notUploadedCost }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<heduishenpiInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import heduishenpiInfo from './relation/heduishenpiInfo' |
|||
|
|||
export default { |
|||
name: 'collectionrebatecheckInfo', |
|||
components: { |
|||
heduishenpiInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
lastVehrebateKey: 1, |
|||
viewState: 1, |
|||
// 表单数据 |
|||
formobj: {}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请详情' |
|||
console.log('编辑回显', row.sid) |
|||
req.fetchDetailsBySid(row.sid).then((resp) => { |
|||
this.formobj = resp.data |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = {} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,379 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="待核对回款返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="switch_btn"> |
|||
<el-button :class="{btn_style:viewState === 1}">待核对</el-button> |
|||
<el-button class="" @click="handleClick">核对审批申请</el-button> |
|||
</div> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="回款方式"> |
|||
<el-select v-model="listQuery.params.collectionTypeKey" placeholder="请选择" filterable clearable> |
|||
<el-option v-for="item in collectionType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="回款日期"> |
|||
<el-date-picker v-model="listQuery.params.collectionStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.collectionEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="预提日期"> |
|||
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">待核对回款返利列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="60"/> |
|||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80"/> |
|||
<el-table-column fixed label="操作" align="center" width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" :disabled="scope.row.uploadState === '3'" size="mini" @click="toEdit(scope.row)">编辑</el-button> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<collectionrebatetobecheckedAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|||
<collectionrebatetobecheckedInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/> |
|||
<collectionrebatechecked v-show="viewState == 4" ref="divCheck" @doback="resetState"/> |
|||
<collectionrebatecheckedAdd v-show="viewState == 5" ref="divCheckAdd" @doback="resetState"/> |
|||
<el-dialog center :visible.sync="dialogVisible" width="40%"> |
|||
<el-form v-model="formobj" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>上传日期</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item><el-date-picker v-model="formobj.upDate" type="date" class="addinputw" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" size="small" @click="handleConfirm()">确定</el-button> |
|||
<el-button size="small" @click="handleClose()">取消</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import Pagination from '@/components/pagination' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import collectionrebatechecked from './collectionrebatechecked' |
|||
import collectionrebatecheckedAdd from './collectionrebatecheckedAdd' |
|||
import collectionrebatetobecheckedAdd from './collectionrebatetobecheckedAdd' |
|||
import collectionrebatetobecheckedInfo from './collectionrebatetobecheckedInfo' |
|||
import { getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons' |
|||
|
|||
export default { |
|||
name: 'huikuanfanlidaihedui', |
|||
components: { |
|||
Pagination, |
|||
ButtonBar, |
|||
collectionrebatechecked, |
|||
collectionrebatecheckedAdd, |
|||
collectionrebatetobecheckedAdd, |
|||
collectionrebatetobecheckedInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
dialogVisible: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'toClick', |
|||
btnLabel: '上传一致' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '核对审批申请' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
FormLoading: false, |
|||
collectionType_list: [], |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
brandSid: '', |
|||
collectionEndDate: '', |
|||
collectionStartDate: '', |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
collectionTypeKey: '', |
|||
createOrgSid: '', |
|||
state: '', |
|||
sidList: [] |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
}, |
|||
formobj: { |
|||
upDate: '', |
|||
sids: [] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 加载列表 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'paymentType' }).then((res) => { |
|||
if (res.success) { |
|||
this.collectionType_list = res.data |
|||
} |
|||
}) |
|||
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.listQuery.params.createOrgSid = resp.data |
|||
this.getList() |
|||
} |
|||
}) |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toClick': |
|||
this.toClick() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
this.formobj.sids = aa |
|||
console.log('sids', this.sids) |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listPage(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
brandSid: '', |
|||
collectionEndDate: '', |
|||
collectionStartDate: '', |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
collectionTypeKey: '', |
|||
createOrgSid: '', |
|||
state: '', |
|||
sidList: [] |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
} |
|||
this.init() |
|||
}, |
|||
toClick() { |
|||
if (this.formobj.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行上传一致操作' }) |
|||
return |
|||
} |
|||
this.dialogVisible = true |
|||
}, |
|||
handleConfirm() { |
|||
if (this.formobj.upDate === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '上传日期不能为空' }) |
|||
return |
|||
} |
|||
req.stayCheckUpAgre(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.sids = [] |
|||
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|||
this.handleClose() |
|||
} |
|||
}) |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
this.formobj.upDate = '' |
|||
}, |
|||
handleClick() { |
|||
this.viewState = 4 |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 5 |
|||
this.$refs['divCheckAdd'].showAdd(this.listQuery.params.createOrgSid) |
|||
}, |
|||
toEdit(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showEdit(row) |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.switch_btn { |
|||
padding: 15px 0 10px 0; |
|||
} |
|||
.btn_style { |
|||
background-color: #018ad2; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
</style> |
@ -0,0 +1,252 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>回款返利</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款方式</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionTypeValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionMoney }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款日期</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>预计返利</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<span>{{ formobj.estimateRebate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>上传金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><el-input v-model="formobj.uploadMoney" class="addinputw" placeholder="" @keyup.native="UpNumber" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>上传日期</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><el-date-picker v-model="formobj.uploadDate" type="date" class="addinputw" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>调整金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ adjustmentMoney() }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>调整说明</span> |
|||
</el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item><el-input v-model="formobj.remarks" class="addinputw" placeholder="" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>车辆回款返利列表</div> |
|||
<div> |
|||
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleRebate()">上传金额分配</el-button> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.carModelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车架号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.vinNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.costPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预计返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatemanagement' |
|||
|
|||
export default { |
|||
name: 'huikuanfanlidaiheduiAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
collectionTypeKey: '', |
|||
collectionTypeValue: '', |
|||
manufaSaleChannel: '', |
|||
collectionMoney: '', |
|||
collectionDate: '', |
|||
freight: '', |
|||
calculationStandard: '', |
|||
estimateRebate: '', |
|||
useOrgSid: '', |
|||
useOrgName: '', |
|||
createOrgName: '', |
|||
createOrgSid: '', |
|||
scmCollectionRebateVehs: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
UpNumber(e) { |
|||
e.target.value = e.target.value.replace(/[^\d]/g, '') // 清除“数字”和“.”"-"以外的字符 |
|||
e.target.value = e.target.value.replace(/^00/, '0') // 开头不能有两个0 |
|||
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { |
|||
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
|||
console.log(e.target.value) |
|||
e.target.value = parseFloat(e.target.value) |
|||
} |
|||
}, |
|||
adjustmentMoney() { |
|||
if (this.formobj.uploadMoney !== '') { |
|||
this.formobj.adjustmentMoney = parseFloat(this.formobj.uploadMoney) - parseFloat(this.formobj.estimateRebate) |
|||
return this.formobj.adjustmentMoney |
|||
} |
|||
}, |
|||
showEdit(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(row.sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
this.viewTitle = '【新增】回款返利' |
|||
}, |
|||
// 明细表添加一行数据 |
|||
handleRebate() { |
|||
if (this.formobj.scmCollectionRebateVehs.length !== 0) { |
|||
for (var i = 0; i < this.formobj.scmCollectionRebateVehs.length; i++) { |
|||
this.formobj.scmCollectionRebateVehs[i].uploadMoney = parseFloat(this.formobj.scmCollectionRebateVehs[i].estimateRebate) / parseFloat(this.formobj.estimateRebate) * parseFloat(this.formobj.uploadMoney) |
|||
this.formobj.scmCollectionRebateVehs[i].adjustmentMoney = parseFloat(this.formobj.scmCollectionRebateVehs[i].uploadMoney) - parseFloat(this.formobj.scmCollectionRebateVehs[i].estimateRebate) |
|||
} |
|||
} |
|||
}, |
|||
save() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.save(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
rebateTypeKey: '', |
|||
rebateTypeValue: '', |
|||
rebateName: '', |
|||
palceGenDate: '', |
|||
calculationModeKey: '', |
|||
calculationModeValue: '', |
|||
calculationStandard: '', |
|||
sid: '', |
|||
createOrgSid: '', |
|||
createOrgName: '', |
|||
useOrgSid: '', |
|||
useOrgName: '', |
|||
scmCollectionRebateVehs: [] |
|||
} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.title { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,190 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>回款返利核对</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款方式</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionTypeValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.collectionMoney }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>回款日期</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.collectionDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>预计返利</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.estimateRebate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>上传金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.uploadMoney }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>上传日期</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.uploadDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>调整金额</span> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><span>{{ formobj.adjustmentMoney }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"> |
|||
<span>调整说明</span> |
|||
</el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>车辆回款返利列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.carModelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车架号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.vinNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.costPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预计返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatemanagement' |
|||
|
|||
export default { |
|||
name: 'huikuanfanlidaiheduiInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
rebateType_list: [], // 返利类型 |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
collectionTypeKey: '', |
|||
collectionTypeValue: '', |
|||
manufaSaleChannel: '', |
|||
collectionMoney: '', |
|||
collectionDate: '', |
|||
freight: '', |
|||
calculationStandard: '', |
|||
estimateRebate: '', |
|||
useOrgSid: '', |
|||
useOrgName: '', |
|||
createOrgName: '', |
|||
createOrgSid: '', |
|||
scmCollectionRebateVehs: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
this.viewTitle = '回款返利核对详情' |
|||
}, |
|||
|
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
rebateTypeKey: '', |
|||
rebateTypeValue: '', |
|||
rebateName: '', |
|||
palceGenDate: '', |
|||
calculationModeKey: '', |
|||
calculationModeValue: '', |
|||
calculationStandard: '', |
|||
sid: '', |
|||
createOrgSid: '', |
|||
createOrgName: '', |
|||
useOrgSid: '', |
|||
useOrgName: '', |
|||
scmCollectionRebateVehs: [] |
|||
} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,171 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="handleDelete">删除</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" class="formadd"> |
|||
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50px"/> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
|
|||
export default { |
|||
name: 'heduishenpiAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
collectionTypeValue: '', |
|||
sids: [], |
|||
// 表单数据 |
|||
list: [], |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
console.log('sids', this.sids) |
|||
}, |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请明细' |
|||
this.collectionTypeValue = row.collectionTypeValue |
|||
console.log('编辑回显', row) |
|||
req.collectionRebateWithDetails(row.collectionRebateSids).then((resp) => { |
|||
this.list = resp.data |
|||
}).catch((e) => { |
|||
this.list = [] |
|||
}) |
|||
}, |
|||
handleDelete() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择至少一条记录进行删除操作' |
|||
}) |
|||
return |
|||
} |
|||
for (var i = 0; i < this.list.length; i++) { |
|||
for (var j = 0; j < this.sids.length; j++) { |
|||
if (this.list[i].sid === this.sids[j]) { |
|||
this.list.splice(i, 1) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn() { |
|||
// 表单数据 |
|||
const data_list = [] |
|||
for (var i = 0; i < this.list.length; i++) { |
|||
data_list.push({ |
|||
sid: this.list[i].sid, |
|||
collectionTypeValue: this.list[i].collectionTypeValue, |
|||
collectionTypeKey: this.list[i].collectionTypeKey, |
|||
collectionMoney: this.list[i].collectionMoney, |
|||
estimateRebate: this.list[i].estimateRebate, |
|||
brandName: this.list[i].brandName, |
|||
brandSid: this.list[i].brandSid, |
|||
uploadMoney: this.list[i].uploadMoney, |
|||
adjustmentMoney: this.list[i].adjustmentMoney |
|||
}) |
|||
} |
|||
this.$emit('backAdd', data_list, this.collectionTypeValue) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,130 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" class="formadd"> |
|||
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
|
|||
export default { |
|||
name: 'heduishenpiInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
sids: [], |
|||
// 表单数据 |
|||
list: [], |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请明细' |
|||
console.log('编辑回显', row) |
|||
req.collectionRebateWithDetails(row.collectionRebateSids).then((resp) => { |
|||
this.list = resp.data |
|||
}).catch((e) => { |
|||
this.list = [] |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn() { |
|||
// 表单数据 |
|||
this.list = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,294 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div> |
|||
<button-bar view-title="待核对回款返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="listtop"> |
|||
<div class="tit">待核对回款返利列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50px"/> |
|||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import Pagination from '@/components/pagination' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
|
|||
export default { |
|||
name: 'yiheduihuikuanfanli', |
|||
components: { |
|||
Pagination, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doConfirm', |
|||
btnLabel: '确定' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
sids_list: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
brandSid: '', |
|||
createOrgSid: '', |
|||
sidList: [] |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 加载列表 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doConfirm': |
|||
this.doConfirm() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
var dateTime = '' |
|||
let date = new Date() |
|||
let year = date.getFullYear() // 年 |
|||
let month = date.getMonth() + 1 // 月 |
|||
dateTime = year + '年' + month + '月' |
|||
const aa = [] |
|||
const bb = [] |
|||
row.forEach((element) => { |
|||
if (element.withholdingDateCopy === dateTime) { |
|||
aa.push({ |
|||
sid: element.sid, |
|||
collectionTypeValue: element.collectionTypeValue, |
|||
collectionTypeKey: element.collectionTypeKey, |
|||
collectionMoney: element.collectionMoney, |
|||
estimateRebate: element.estimateRebate, |
|||
brandName: element.brandName, |
|||
brandSid: element.brandSid, |
|||
uploadMoney: element.uploadMoney, |
|||
adjustmentMoney: element.adjustmentMoney |
|||
}) |
|||
} else { |
|||
bb.push({ |
|||
sid: element.sid, |
|||
withholdingDate: element.withholdingDateCopy, |
|||
collectionMoney: element.collectionMoney, |
|||
estimateRebate: element.estimateRebate, |
|||
uploadMoney: element.uploadMoney, |
|||
adjustmentMoney: element.adjustmentMoney |
|||
}) |
|||
} |
|||
}) |
|||
this.sids = aa |
|||
this.sids_list = bb |
|||
console.log('sids', this.sids, bb, 99999999) |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.checkApplyGetAlreadyUploadCollectionRebate(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
showData(value, val, createOrgSid, brandSid) { |
|||
this.listQuery.params.createOrgSid = createOrgSid |
|||
this.listQuery.params.brandSid = brandSid |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
for (var j = 0; j < value[i].collectionRebateSids.length; j++) { |
|||
aa.push(value[i].collectionRebateSids[j]) |
|||
} |
|||
} |
|||
} |
|||
const bb = [] |
|||
if (val.length > 0) { |
|||
for (var k = 0; k < val.length; k++) { |
|||
for (var l = 0; l < val[k].collectionRebateSids.length; l++) { |
|||
bb.push(val[k].collectionRebateSids[l]) |
|||
} |
|||
} |
|||
} |
|||
if (aa.length > 0 && bb.length > 0) { |
|||
this.listQuery.params.sidList = aa |
|||
for (var p = 0; p < bb.length; p++) { |
|||
this.listQuery.params.sidList.push(bb[p]) |
|||
} |
|||
} else if (aa.length > 0 && bb.length === 0) { |
|||
this.listQuery.params.sidList = aa |
|||
} else if (aa.length === 0 && bb.length > 0) { |
|||
this.listQuery.params.sidList = bb |
|||
} else if (aa.length === 0 && bb.length === 0) { |
|||
this.listQuery.params.sidList = [] |
|||
} |
|||
this.getList() |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
createBySid: '', |
|||
createEndTime: '', |
|||
createStartTime: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
doConfirm() { |
|||
if (this.sids.length > 0 || this.sids_list.length > 0) { |
|||
this.$emit('backData', this.sids, this.sids_list) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,367 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class=""> |
|||
<div class="titwu"><span>{{ formobj.checkApply }}回款返利核对审核申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="2" class="tleftb colOneStyle"> |
|||
<span>品牌:</span> |
|||
</el-col> |
|||
<el-col :span="20" class="colOneStyle"> |
|||
<el-form-item> |
|||
<span>{{ formobj.brandName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :key="tableKey" :data="formobj.scmWhenCollectionrebateCheckapplydetailDetails" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="回款方式" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="明细" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="2" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>预提返利本月核对情况</div> |
|||
</div> |
|||
<el-table :key="lastVehrebateKey" :data="formobj.scmLastCollectionrebateCheckapplydetailDetails" border style="width: 100%"> |
|||
<el-table-column label="预提年月" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notUploadedCost }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<heduishenpiInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formaddcopy02" > |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty spanTwoWidth"><span>当前环节:</span></div> |
|||
<el-form-item><span class="addinputInfo addinputOne">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{ rowClass:!currentLink }"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty spanTwoWidth"><span>意见:</span></div> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw addinputOne" clearable ></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import heduishenpiInfo from './relation/heduishenpiInfo' |
|||
|
|||
export default { |
|||
name: 'collectionrebatecheckInfo', |
|||
components: { |
|||
heduishenpiInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
lastVehrebateKey: 1, |
|||
viewState: 1, |
|||
// 表单数据 |
|||
formobj: {}, |
|||
rules: {}, |
|||
submitdisabled: false, |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
this.linkByParameter.businessSid = obj.businessSid |
|||
this.linkByParameter.instanceId = obj.instanceId |
|||
this.linkByParameter.taskId = obj.taskId |
|||
this.linkByParameter.taskDefKey = obj.taskDefKey |
|||
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|||
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|||
this.current.taskDefKey = obj.taskDefKey |
|||
this.current.taskName = obj.taskName |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 450 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请详情' |
|||
console.log('编辑回显', sid) |
|||
req.fetchDetailsBySid(sid).then((resp) => { |
|||
this.formobj = resp.data |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,440 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交 |
|||
</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class=""> |
|||
<div class="titwu"><span>{{ formobj.checkApply }}回款返利核对审核申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="2" class="tleftb colOneStyle"> |
|||
<span>品牌:</span> |
|||
</el-col> |
|||
<el-col :span="4" class="colOneStyle"> |
|||
<el-form-item> |
|||
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand"> |
|||
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18" class="tleftb colOneStyle"> |
|||
<el-button size="small" type="primary" @click="handleSelect()">添加</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :key="tableKey" :data="formobj.scmWhenCollectionrebateCheckapplydetailDetails" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="回款方式" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="明细" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="2" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>预提返利本月核对情况</div> |
|||
</div> |
|||
<el-table :key="lastVehrebateKey" :data="formobj.scmLastCollectionrebateCheckapplydetailDetails" border style="width: 100%"> |
|||
<el-table-column label="预提年月" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notUploadedCost }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<yiheduihiukuanfanli v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState"/> |
|||
<heduishenpiAdd v-show="viewState == 3" ref="divAdd" @backAdd="backAdd" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/bikerebate/bicyclerebatecheck' |
|||
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons' |
|||
import yiheduihiukuanfanli from './relation/yiheduihiukuanfanli' |
|||
import heduishenpiAdd from './relation/heduishenpiAdd' |
|||
|
|||
export default { |
|||
name: 'collectionrebatecheckAdd', |
|||
components: { |
|||
yiheduihiukuanfanli, |
|||
heduishenpiAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
index: 0, |
|||
tableKey: 0, |
|||
lastVehrebateKey: 1, |
|||
dialogStatus: '', |
|||
brand_list: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
createByName: '', |
|||
createBySid: '', |
|||
brandName: '', |
|||
brandSid: '', |
|||
checkApply: '', |
|||
createOrgName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
remarks: '', |
|||
instanceId: '', // 流程实例ID |
|||
taskId: '', // 任务ID |
|||
scmWhenCollectionrebateCheckapplydetailDetails: [], |
|||
scmLastCollectionrebateCheckapplydetailDetails: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 450 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
init() { |
|||
fetchBySid(this.formobj.createOrgSid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgName = res.data.name |
|||
this.formobj.useOrgName = res.data.name |
|||
} |
|||
}) |
|||
brandDown({ useOrg: this.formobj.createOrgSid }).then((res) => { |
|||
if (res.success) { |
|||
this.brand_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '【编辑】回款返利核对审核申请' |
|||
console.log('编辑回显', sid) |
|||
req.fetchDetailsBySid(sid).then((resp) => { |
|||
this.formobj = resp.data |
|||
this.formobj.instanceId = resp.data.procInstId |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
changeBrand(value) { |
|||
let bb = null |
|||
this.brand_list.forEach((e) => { |
|||
if (e.brandName === value) { |
|||
bb = { |
|||
name: e.brandName, |
|||
sid: e.sid |
|||
} |
|||
} |
|||
}) |
|||
this.formobj.brandSid = bb.sid |
|||
}, |
|||
// 明细表添加一行数据 |
|||
handleSelect() { |
|||
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) { |
|||
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' }) |
|||
return |
|||
} |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].showData(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails, this.formobj.scmLastCollectionrebateCheckapplydetailDetails, this.formobj.createOrgSid, this.formobj.brandSid) |
|||
}, |
|||
backData(value, val) { |
|||
this.viewState = 1 |
|||
if (value.length > 0) { |
|||
for (var i in value) { |
|||
let cval = value[i] |
|||
if (!this.formobj.scmWhenCollectionrebateCheckapplydetailDetails || this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length === 0) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails = [] |
|||
} |
|||
let v = 0 |
|||
for (var j in this.formobj.scmWhenCollectionrebateCheckapplydetailDetails) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionTypeValue === cval.collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionMoney) + parseInt(cval.collectionMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].estimateRebate = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].estimateRebate) + parseInt(cval.estimateRebate) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].uploadMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].uploadMoney) + parseInt(cval.uploadMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].adjustmentMoney = parseInt(this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].adjustmentMoney) + parseInt(cval.adjustmentMoney) |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[j].collectionRebateSids.push(cval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.push({ |
|||
collectionTypeKey: cval.collectionTypeKey, |
|||
collectionTypeValue: cval.collectionTypeValue, |
|||
collectionMoney: cval.collectionMoney, |
|||
estimateRebate: cval.estimateRebate, |
|||
brandName: cval.brandName, |
|||
brandSid: cval.brandSid, |
|||
uploadMoney: cval.uploadMoney, |
|||
adjustmentMoney: cval.adjustmentMoney, |
|||
collectionRebateSids: [cval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
if (val.length > 0) { |
|||
for (var p in val) { |
|||
let bval = val[p] |
|||
if (!this.formobj.scmLastCollectionrebateCheckapplydetailDetails || this.formobj.scmLastCollectionrebateCheckapplydetailDetails.length === 0) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails = [] |
|||
} |
|||
let v = 0 |
|||
for (var l in this.formobj.scmLastCollectionrebateCheckapplydetailDetails) { |
|||
if (this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].withholdingDate === bval.withholdingDate) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionMoney) + parseInt(bval.collectionMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].estimateRebate = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].estimateRebate) + parseInt(bval.estimateRebate) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].uploadMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].uploadMoney) + parseInt(bval.uploadMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].adjustmentMoney = parseInt(this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].adjustmentMoney) + parseInt(bval.adjustmentMoney) |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails[l].collectionRebateSids.push(bval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
this.formobj.scmLastCollectionrebateCheckapplydetailDetails.push({ |
|||
withholdingDate: bval.withholdingDate, |
|||
collectionMoney: bval.collectionMoney, |
|||
estimateRebate: bval.estimateRebate, |
|||
uploadMoney: bval.uploadMoney, |
|||
adjustmentMoney: bval.adjustmentMoney, |
|||
notUploadedCost: '', |
|||
collectionRebateSids: [bval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showInfo(row) |
|||
}, |
|||
backAdd(value, collectionTypeValue) { |
|||
this.viewState = 1 |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i in value) { |
|||
let cval = value[i] |
|||
let v = 0 |
|||
for (var j in aa) { |
|||
if (aa[j].collectionTypeValue === cval.collectionTypeValue) { |
|||
aa[j].estimateRebate = parseInt(aa[j].estimateRebate) + parseInt(cval.estimateRebate) |
|||
aa[j].collectionMoney = parseInt(aa[j].collectionMoney) + parseInt(cval.collectionMoney) |
|||
aa[j].uploadMoney = parseInt(aa[j].uploadMoney) + parseInt(cval.uploadMoney) |
|||
aa[j].adjustmentMoney = parseInt(aa[j].adjustmentMoney) + parseInt(cval.adjustmentMoney) |
|||
aa[j].collectionRebateSids.push(cval.sid) |
|||
v = 1 |
|||
break |
|||
} |
|||
} |
|||
if (v === 0) { |
|||
aa.push({ |
|||
collectionTypeKey: cval.collectionTypeKey, |
|||
collectionTypeValue: cval.collectionTypeValue, |
|||
collectionMoney: cval.collectionMoney, |
|||
estimateRebate: cval.estimateRebate, |
|||
brandName: cval.brandName, |
|||
brandSid: cval.brandSid, |
|||
uploadMoney: cval.uploadMoney, |
|||
adjustmentMoney: cval.adjustmentMoney, |
|||
collectionRebateSids: [cval.sid], |
|||
sid: '', |
|||
mainSid: '' |
|||
}) |
|||
} |
|||
} |
|||
for (var k = 0; k < this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length; k++) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeValue === collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeKey = aa[0].collectionTypeKey |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionTypeValue = aa[0].collectionTypeValue |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].estimateRebate = aa[0].estimateRebate |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].brandName = aa[0].brandName |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].brandSid = aa[0].brandSid |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].uploadMoney = aa[0].uploadMoney |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].adjustmentMoney = aa[0].adjustmentMoney |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[k].collectionRebateSids = aa[0].collectionRebateSids |
|||
break |
|||
} |
|||
} |
|||
} else if (value.length === 0) { |
|||
for (var l = 0; l < this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.length; l++) { |
|||
if (this.formobj.scmWhenCollectionrebateCheckapplydetailDetails[l].collectionTypeValue === collectionTypeValue) { |
|||
this.formobj.scmWhenCollectionrebateCheckapplydetailDetails.splice(l, 1) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
save() { |
|||
console.log(this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.save(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submit() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submitVehicleApply(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,243 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class=""> |
|||
<div class="titwu"><span>{{ formobj.checkApply }}回款返利核对审核申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="2" class="tleftb colOneStyle"> |
|||
<span>品牌:</span> |
|||
</el-col> |
|||
<el-col :span="20" class="colOneStyle"> |
|||
<el-form-item> |
|||
<span>{{ formobj.brandName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :key="tableKey" :data="formobj.scmWhenCollectionrebateCheckapplydetailDetails" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="回款方式" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="明细" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="2" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="22"> |
|||
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>预提返利本月核对情况</div> |
|||
</div> |
|||
<el-table :key="lastVehrebateKey" :data="formobj.scmLastCollectionrebateCheckapplydetailDetails" border style="width: 100%"> |
|||
<el-table-column label="预提年月" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未上传金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notUploadedCost }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<heduishenpiInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import heduishenpiInfo from './relation/heduishenpiInfo' |
|||
|
|||
export default { |
|||
name: 'huikuanfanliheduiDaiBanInfo', |
|||
components: { |
|||
heduishenpiInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
lastVehrebateKey: 1, |
|||
viewState: 1, |
|||
// 表单数据 |
|||
formobj: {}, |
|||
rules: {}, |
|||
submitdisabled: false, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
this.linkByParameter.businessSid = obj.businessSid |
|||
this.linkByParameter.instanceId = obj.instanceId |
|||
this.linkByParameter.taskId = obj.taskId |
|||
this.linkByParameter.taskDefKey = obj.taskDefKey |
|||
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|||
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 450 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请详情' |
|||
console.log('编辑回显', sid) |
|||
req.fetchDetailsBySid(sid).then((resp) => { |
|||
this.formobj = resp.data |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,171 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="handleDelete">删除</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" class="formadd"> |
|||
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50px"/> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
|
|||
export default { |
|||
name: 'heduishenpiAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
collectionTypeValue: '', |
|||
sids: [], |
|||
// 表单数据 |
|||
list: [], |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
console.log('sids', this.sids) |
|||
}, |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请明细' |
|||
this.collectionTypeValue = row.collectionTypeValue |
|||
console.log('编辑回显', row) |
|||
req.collectionRebateWithDetails(row.collectionRebateSids).then((resp) => { |
|||
this.list = resp.data |
|||
}).catch((e) => { |
|||
this.list = [] |
|||
}) |
|||
}, |
|||
handleDelete() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择至少一条记录进行删除操作' |
|||
}) |
|||
return |
|||
} |
|||
for (var i = 0; i < this.list.length; i++) { |
|||
for (var j = 0; j < this.sids.length; j++) { |
|||
if (this.list[i].sid === this.sids[j]) { |
|||
this.list.splice(i, 1) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn() { |
|||
// 表单数据 |
|||
const data_list = [] |
|||
for (var i = 0; i < this.list.length; i++) { |
|||
data_list.push({ |
|||
sid: this.list[i].sid, |
|||
collectionTypeValue: this.list[i].collectionTypeValue, |
|||
collectionTypeKey: this.list[i].collectionTypeKey, |
|||
collectionMoney: this.list[i].collectionMoney, |
|||
estimateRebate: this.list[i].estimateRebate, |
|||
brandName: this.list[i].brandName, |
|||
brandSid: this.list[i].brandSid, |
|||
uploadMoney: this.list[i].uploadMoney, |
|||
adjustmentMoney: this.list[i].adjustmentMoney |
|||
}) |
|||
} |
|||
this.$emit('backAdd', data_list, this.collectionTypeValue) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,130 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" class="formadd"> |
|||
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
|
|||
export default { |
|||
name: 'heduishenpiInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
viewState: 1, |
|||
sids: [], |
|||
// 表单数据 |
|||
list: [], |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '回款返利核对审核申请明细' |
|||
console.log('编辑回显', row) |
|||
req.collectionRebateWithDetails(row.collectionRebateSids).then((resp) => { |
|||
this.list = resp.data |
|||
}).catch((e) => { |
|||
this.list = [] |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn() { |
|||
// 表单数据 |
|||
this.list = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,294 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div> |
|||
<button-bar view-title="待核对回款返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="listtop"> |
|||
<div class="tit">待核对回款返利列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50px"/> |
|||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/> |
|||
<el-table-column label="品牌" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款方式" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家收款账号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.manufaBankAccount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="回款日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.collectionDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="计算标准" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.calculationStandard }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提返利" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.estimateRebate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预提日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.withholdingDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传金额" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="调整金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.adjustmentMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/manufacturerrebates/collectionrebatecheck' |
|||
import Pagination from '@/components/pagination' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
|
|||
export default { |
|||
name: 'yiheduihuikuanfanli', |
|||
components: { |
|||
Pagination, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doConfirm', |
|||
btnLabel: '确定' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
sids_list: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
brandSid: '', |
|||
createOrgSid: '', |
|||
sidList: [] |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 加载列表 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doConfirm': |
|||
this.doConfirm() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
var dateTime = '' |
|||
let date = new Date() |
|||
let year = date.getFullYear() // 年 |
|||
let month = date.getMonth() + 1 // 月 |
|||
dateTime = year + '年' + month + '月' |
|||
const aa = [] |
|||
const bb = [] |
|||
row.forEach((element) => { |
|||
if (element.withholdingDateCopy === dateTime) { |
|||
aa.push({ |
|||
sid: element.sid, |
|||
collectionTypeValue: element.collectionTypeValue, |
|||
collectionTypeKey: element.collectionTypeKey, |
|||
collectionMoney: element.collectionMoney, |
|||
estimateRebate: element.estimateRebate, |
|||
brandName: element.brandName, |
|||
brandSid: element.brandSid, |
|||
uploadMoney: element.uploadMoney, |
|||
adjustmentMoney: element.adjustmentMoney |
|||
}) |
|||
} else { |
|||
bb.push({ |
|||
sid: element.sid, |
|||
withholdingDate: element.withholdingDateCopy, |
|||
collectionMoney: element.collectionMoney, |
|||
estimateRebate: element.estimateRebate, |
|||
uploadMoney: element.uploadMoney, |
|||
adjustmentMoney: element.adjustmentMoney |
|||
}) |
|||
} |
|||
}) |
|||
this.sids = aa |
|||
this.sids_list = bb |
|||
console.log('sids', this.sids, bb, 99999999) |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.checkApplyGetAlreadyUploadCollectionRebate(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
showData(value, val, createOrgSid, brandSid) { |
|||
this.listQuery.params.createOrgSid = createOrgSid |
|||
this.listQuery.params.brandSid = brandSid |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
for (var j = 0; j < value[i].collectionRebateSids.length; j++) { |
|||
aa.push(value[i].collectionRebateSids[j]) |
|||
} |
|||
} |
|||
} |
|||
const bb = [] |
|||
if (val.length > 0) { |
|||
for (var k = 0; k < val.length; k++) { |
|||
for (var l = 0; l < val[k].collectionRebateSids.length; l++) { |
|||
bb.push(val[k].collectionRebateSids[l]) |
|||
} |
|||
} |
|||
} |
|||
if (aa.length > 0 && bb.length > 0) { |
|||
this.listQuery.params.sidList = aa |
|||
for (var p = 0; p < bb.length; p++) { |
|||
this.listQuery.params.sidList.push(bb[p]) |
|||
} |
|||
} else if (aa.length > 0 && bb.length === 0) { |
|||
this.listQuery.params.sidList = aa |
|||
} else if (aa.length === 0 && bb.length > 0) { |
|||
this.listQuery.params.sidList = bb |
|||
} else if (aa.length === 0 && bb.length === 0) { |
|||
this.listQuery.params.sidList = [] |
|||
} |
|||
this.getList() |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
createBySid: '', |
|||
createEndTime: '', |
|||
createStartTime: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
doConfirm() { |
|||
if (this.sids.length > 0 || this.sids_list.length > 0) { |
|||
this.$emit('backData', this.sids, this.sids_list) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue