Browse Source

完善金融贴息差异调整

master
yunuo970428 5 months ago
parent
commit
775f16c3ea
  1. 9
      anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js
  2. 135
      anrui-scm/anrui-scm-ui/src/api/financialDiscount/financialDiscount.js
  3. 51
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  4. 352
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagement.vue
  5. 436
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementAdd.vue
  6. 203
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementInfo.vue
  7. 227
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/relation/chooseAdjustment.vue
  8. 266
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/varianceDetail.vue
  9. 251
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue
  10. 463
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue
  11. 405
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue
  12. 249
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue
  13. 227
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/relation/chooseAdjustment.vue

9
anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js

@ -139,6 +139,15 @@ export function selectOrgList(data) {
})
}
// 根据当前登录用户sid获取本分公司下的销售专员
export function selectStaffListByUseOrgSid(data) {
return request({
url: '/portal/v1/sysorganization/selectStaffListByUseOrgSid',
method: 'get',
params: data
})
}
// 根据选择的销售专员获取客户
export function selectCustomerList(data) {
return request({

135
anrui-scm/anrui-scm-ui/src/api/financialDiscount/financialDiscount.js

@ -0,0 +1,135 @@
import request from '@/utils/request'
export default {
// 查询分页列表 -- 金融差异调整管理
finAdjustList: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/finAdjustList',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融差异调整申请
listPage: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融贴息差异调整申请选择车辆
getAdjustVehList: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getAdjustVehList',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融贴息差异调整申请选择车辆
adjustDetail: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustdetails/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delete: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/delBySids',
method: 'DELETE',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 新增保存修改记录
save: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 提交流程
submit: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/submit',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/complete',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/delegate',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/reject',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/breakProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/revokeProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

51
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -1054,7 +1054,35 @@ const codemenu = [{
}
]
},
// 金融贴息差异调整
{
path: '/financialDiscount',
component: Layout,
redirect: '/financialDiscount',
meta: {
title: '金融贴息差异调整'
},
children: [
{
path: '/financialDiscount/differentialAdjustment',
component: () => import('@/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue'),
name: 'DifferentialAdjustment',
meta: {
title: '差异调整管理',
noCache: true
}
},
{
path: '/financialDiscount/differenceManagement',
component: () => import('@/views/financialDiscount/differenceManagement/differenceManagement.vue'),
name: 'DifferenceManagement',
meta: {
title: '差异调整申请',
noCache: true
}
}
]
},
// 流程审批
// 入库管理编辑
{
@ -1571,6 +1599,27 @@ const codemenu = [{
component: () =>
import('@/views/workFlow/chaijianpankuiFlow/inventoryLossesYiBan.vue'),
name: 'InventoryLossesYiBan'
},
// 金融贴息差异调整申请待办详情页面
{
path: '/chayitiaozhengFlow/differenceManagementDaiBan',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue'),
name: 'differenceManagementDaiBan'
},
// 金融贴息差异调整申请已办详情
{
path: '/chayitiaozhengFlow/differenceManagementEdit',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue'),
name: 'DifferenceManagementEdit'
},
// 金融贴息差异调整申请办理
{
path: '/chayitiaozhengFlow/differenceManagementYiBan',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue'),
name: 'DifferenceManagementYiBan'
}
]
export default codemenu

352
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagement.vue

@ -0,0 +1,352 @@
<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-input v-model="listQuery.params.useOrgName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请部门">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请人">
<el-input v-model="listQuery.params.createByName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="调整方式">
<el-input v-model="listQuery.params.adjustWay" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请日期">
<el-date-picker v-model="listQuery.params.createStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="办结日期">
<el-date-picker v-model="listQuery.params.closeStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.closeEndDate" 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="50" />
<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" 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="180" 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 prop="billNo" label="申请编号" align="center" min-width="180" />
<el-table-column prop="useOrgName" label="分公司" align="center" width="150" />
<el-table-column prop="deptName" label="申请部门" align="center" width="120" />
<el-table-column prop="createByName" label="申请人" align="center" width="120" />
<el-table-column prop="createTime" label="申请日期" align="center" width="120" />
<el-table-column prop="closingDate" label="办结日期" align="center" width="120" />
<el-table-column prop="adjustWay" label="调整方式" align="center" width="120" />
</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>
<!-- 差异调整金额明细记录 -->
<varianceDetail v-show="viewState == 2" ref="divDetail" @doback="resetState" />
<!-- 差异调整申请新增 -->
<differenceManagementAdd v-show="viewState == 3 || viewState == 4" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- 差异调整申请详情 -->
<differenceManagementInfo v-show="viewState == 5" 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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import { getStorage } from '@/utils/auth'
import varianceDetail from '../differenceManagement/varianceDetail'
import differenceManagementAdd from './differenceManagementAdd'
import differenceManagementInfo from './differenceManagementInfo'
export default {
name: 'DifferenceManagement',
components: {
Pagination,
ButtonBar,
varianceDetail,
differenceManagementAdd,
differenceManagementInfo
},
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,
listQuery: {
params: {
useOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartDate: '',
createEndDate: '',
closeStartDate: '',
closeEndDate: '',
adjustWay: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
}
},
created() {
//
this.getList()
},
mounted() {
// vuewindowpostMessagehandleMessage
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)))
},
//
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
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
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: {
useOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartDate: '',
createEndDate: '',
closeStartDate: '',
closeEndDate: '',
adjustWay: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
handleClick() {
this.viewState = 2
this.$refs['divDetail'].getList()
},
toEdit(row) {
this.viewState = 4
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 5
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) => {
loading.close()
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.loadList()
}
}).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;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

436
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementAdd.vue

@ -0,0 +1,436 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</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>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>调整方式</div>
<el-form-item prop="adjustWayKey">
<el-select class="addinputInfo" v-model="formobj.adjustWayKey" placeholder="请选择" @change="changeAdjustWay" filterable clearable>
<el-option v-for="item in adjustWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售专员</div>
<el-form-item prop="staffSid">
<el-select class="addinputInfo" v-model="formobj.staffSid" placeholder="请选择" @change="changeStaff" filterable clearable>
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.name" :value="item.userSid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售经理</div>
<el-form-item prop="salesManageSid">
<el-select class="addinputInfo" v-model="formobj.salesManageSid" placeholder="请选择" @change="changeSalesManage" filterable clearable>
<el-option v-for="item in salesManager_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<div class="title titleOne">
<el-button size="mini" type="primary" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.nowAdjustmentMoney" @keyup.native="scope.row.nowAdjustmentMoney = getNumber(scope.row.nowAdjustmentMoney, 2)" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" min-width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" clearable placeholder="" />
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.filePath" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<chooseAdjustment v-show="viewState == 2" ref="divChoose" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import { getOrgSidByPath, fetchBySid, selectSysUserList, typeValues, selectStaffListByUseOrgSid } from '@/api/cheliang/dictcommons'
import uploadImg from '@/components/uploadFile/uploadImg'
import chooseAdjustment from './relation/chooseAdjustment'
export default {
name: 'DifferenceManagementAdd',
components: {
uploadImg,
chooseAdjustment
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 1,
index: 0,
adjustWay_list: [],
staff_list: [],
salesManager_list: [],
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {
adjustWayKey: [{ required: true, message: '调整方式不能为空', trigger: 'change' }],
staffSid: [{ required: true, message: '销售专员不能为空', trigger: 'change' }],
salesManageSid: [{ required: true, message: '销售经理不能为空', trigger: 'change' }]
}
}
},
methods: {
init() {
typeValues({ type: 'adjustingWay' }).then((res) => {
if (res.success) {
this.adjustWay_list = res.data
}
})
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.salesManager_list = resp.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
val = val.replace(/^00/, '0.') // 0
val = val.replace(/^\./g, '0.') // 0.
val = val.replace(/\.{2,}/g, '.') //
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
}
return val
},
showAdd() {
this.viewTitle = '【新增】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
this.formobj.createTime = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.formobj.useOrgSid = resp.data
selectStaffListByUseOrgSid({ useOrgSid: resp.data }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
fetchBySid(resp.data).then((respsone) => {
if (respsone.success) {
this.formobj.useOrgName = respsone.data.name
}
})
}
})
},
showEdit(row) {
this.viewTitle = '【编辑】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
selectStaffListByUseOrgSid({ useOrgSid: this.formobj.useOrgSid }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
}
})
},
changeAdjustWay(value) {
const choose = this.adjustWay_list.filter((item) => item.dictKey === value)
if (choose !== null) {
this.formobj.adjustWay = choose[0].dictValue
} else {
this.formobj.adjustWay = ''
}
},
changeStaff(value) {
const choose = this.staff_list.filter((item) => item.userSid === value)
if (choose !== null) {
this.formobj.staffName = choose[0].name
} else {
this.formobj.staffName = ''
}
},
changeSalesManage(value) {
const choose = this.salesManager_list.filter((item) => item.sid === value)
if (choose !== null) {
this.formobj.salesManage = choose[0].name
} else {
this.formobj.salesManage = ''
}
},
handleSelect() {
if (this.formobj.adjustWayKey === '001' && this.formobj.staffName === '') {
this.$message({ showClose: true, type: 'error', message: '因调整方式为客户交纳,请先选择销售专员' })
return
}
this.viewState = 2
this.$refs['divChoose'].showData(this.formobj.list, this.formobj.useOrgSid, this.formobj.staffSid)
},
backData(value) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
value.forEach((e) => {
this.formobj.list.push({
rebateSid: e.rebateSid,
purchaseSystemSid: e.purchaseSystemSid,
purchaseSystemName: e.purchaseSystemName,
brandSid: e.brandSid,
brandName: e.brandName,
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
customerSid: e.customerSid,
customerName: e.customerName,
contractNo: e.contractNo,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
adjustmentMoney: e.adjustmentMoney,
alreadyMoney: e.alreadyMoney,
nowDiffAmount: e.nowDiffAmount,
nowAdjustmentMoney: '',
remarks: ''
})
})
},
handleDelete(index) {
this.formobj.list.splice(index, 1)
},
resetState() {
this.viewState = 1
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
saveOrUpdate() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style>

203
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementInfo.vue

@ -0,0 +1,203 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
export default {
name: 'DifferenceManagementInfo',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {}
}
},
methods: {
showInfo(row) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
handleReturn() {
this.formobj = {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

227
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/relation/chooseAdjustment.vue

@ -0,0 +1,227 @@
<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="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-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</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="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="120" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="150" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="150" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="100" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'ChooseAdjustment',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toConfirm',
btnLabel: '确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
multipleSelection: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
staffSid: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
sids: []
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toConfirm':
this.toConfirm()
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) {
this.multipleSelection = row
},
showData(value, useOrgSid, staffSid) {
this.listQuery.params.useOrgSid = useOrgSid
this.listQuery.params.staffSid = staffSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.handleReset()
},
//
getList() {
this.listLoading = true
req.getAdjustVehList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.purchaseSystemName = ''
this.listQuery.params.brandName = ''
this.listQuery.params.vehModel = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.contractNo = ''
this.getList()
},
toConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条数据进行操作' })
}
},
doClose() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

266
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/varianceDetail.vue

@ -0,0 +1,266 @@
<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.nodeState" placeholder="请选择" filterable clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModelName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="审批编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="调整日期">
<el-date-picker v-model="listQuery.params.createStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="调整方式">
<el-input v-model="listQuery.params.adjustWay" placeholder="" clearable />
</el-form-item>
<el-form-item label="调整说明">
<el-input v-model="listQuery.params.remarks" placeholder="" clearable />
</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%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="nodeState" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" min-width="160" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="uploadMoney" label="上传贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整" align="center" width="100" />
<el-table-column prop="nowDiffAmount" label="本次调整后差额" align="center" width="140" />
<el-table-column prop="adjustTime" label="调整时间" align="center" width="100" />
<el-table-column prop="adjustWay" label="调整方式" align="center" width="100" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'VarianceDetail',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
dialogVisible: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
state_list: [
{
dictKey: '0',
dictValue: '待提交'
},
{
dictKey: '1',
dictValue: '申请中'
},
{
dictKey: '2',
dictValue: '已办结'
}
],
listLoading: false,
listQuery: {
params: {
orgPath: '',
menuUrl: '',
userSid: '',
nodeState: '',
purchaseSystemName: '',
brandName: '',
vehModelName: '',
vinNo: '',
customerName: '',
contractNo: '',
billNo: '',
createStartDate: '',
createEndDate: '',
adjustWay: '',
remarks: ''
},
current: 1,
size: 5,
total: 0
}
}
},
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 '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
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.adjustDetail(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
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: {
orgPath: '',
menuUrl: '',
userSid: '',
nodeState: '',
purchaseSystemName: '',
brandName: '',
vehModelName: '',
vinNo: '',
customerName: '',
contractNo: '',
billNo: '',
createStartDate: '',
createEndDate: '',
adjustWay: '',
remarks: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
handleClick() {
this.$parent.resetState()
this.$parent.handleReset()
},
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>

251
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue

@ -0,0 +1,251 @@
<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="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.state" placeholder="请选择" filterable clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</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%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="150" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="180" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="uploadMoney" label="差额" align="center" width="120" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="120" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
</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>
<!-- 新增返利 -->
<differenceManagementAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import differenceManagementAdd from '../differenceManagement/differenceManagementAdd'
export default {
name: 'DifferentialAdjustment',
components: {
Pagination,
pageye,
ButtonBar,
differenceManagementAdd
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '差异调整申请'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
state_list: [
{
dictKey: '0',
dictValue: '未调整'
},
{
dictKey: '1',
dictValue: '已调整'
},
{
dictKey: '2',
dictValue: '部分调整'
}
],
listQuery: {
params: {
state: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toAdd':
this.toAdd()
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
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.finAdjustList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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: {
state: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

463
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue

@ -0,0 +1,463 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<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>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" 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/financialDiscount/financialDiscount'
import { selectStaffListss } from '@/api/Common/dictcommons'
export default {
name: 'DifferenceManagementDaiBan',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()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.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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.countersignLink = 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()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' })
return
}
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
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>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass{
border-top: 1px solid #E0E3EB;
}
</style>

405
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue

@ -0,0 +1,405 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>调整方式</div>
<el-form-item prop="adjustWayKey">
<el-select class="addinputInfo" v-model="formobj.adjustWayKey" placeholder="请选择" @change="changeAdjustWay" filterable clearable>
<el-option v-for="item in adjustWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售专员</div>
<el-form-item prop="staffSid">
<el-select class="addinputInfo" v-model="formobj.staffSid" placeholder="请选择" @change="changeStaff" filterable clearable>
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.name" :value="item.userSid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售经理</div>
<el-form-item prop="salesManageSid">
<el-select class="addinputInfo" v-model="formobj.salesManageSid" placeholder="请选择" @change="changeSalesManage" filterable clearable>
<el-option v-for="item in salesManager_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<div class="title titleOne">
<el-button size="mini" type="primary" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.nowAdjustmentMoney" @keyup.native="scope.row.nowAdjustmentMoney = getNumber(scope.row.nowAdjustmentMoney, 2)" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" min-width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" clearable placeholder="" />
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.filePath" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<chooseAdjustment v-show="viewState == 2" ref="divChoose" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import { getOrgSidByPath, fetchBySid, selectSysUserList, typeValues, selectStaffListByUseOrgSid } from '@/api/cheliang/dictcommons'
import uploadImg from '@/components/uploadFile/uploadImg'
import chooseAdjustment from './relation/chooseAdjustment'
export default {
name: 'DifferenceManagementEdit',
components: {
uploadImg,
chooseAdjustment
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 1,
index: 0,
adjustWay_list: [],
staff_list: [],
salesManager_list: [],
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {
adjustWayKey: [{ required: true, message: '调整方式不能为空', trigger: 'change' }],
staffSid: [{ required: true, message: '销售专员不能为空', trigger: 'change' }],
salesManageSid: [{ required: true, message: '销售经理不能为空', trigger: 'change' }]
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
init() {
typeValues({ type: 'adjustingWay' }).then((res) => {
if (res.success) {
this.adjustWay_list = res.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
val = val.replace(/^00/, '0.') // 0
val = val.replace(/^\./g, '0.') // 0.
val = val.replace(/\.{2,}/g, '.') //
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
}
return val
},
showInfo(sid) {
this.viewTitle = '【编辑】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: this.formobj.orgPath }).then((resp) => {
if (resp.success) {
this.salesManager_list = resp.data
}
})
selectStaffListByUseOrgSid({ useOrgSid: this.formobj.useOrgSid }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
}
})
},
changeAdjustWay(value) {
const choose = this.adjustWay_list.filter((item) => item.dictKey === value)
if (choose !== null) {
this.formobj.adjustWay = choose[0].dictValue
} else {
this.formobj.adjustWay = ''
}
},
changeStaff(value) {
const choose = this.staff_list.filter((item) => item.userSid === value)
if (choose !== null) {
this.formobj.staffName = choose[0].name
} else {
this.formobj.staffName = ''
}
},
changeSalesManage(value) {
const choose = this.salesManager_list.filter((item) => item.sid === value)
if (choose !== null) {
this.formobj.salesManage = choose[0].name
} else {
this.formobj.salesManage = ''
}
},
handleSelect() {
if (this.formobj.adjustWayKey === '001' && this.formobj.staffName === '') {
this.$message({ showClose: true, type: 'error', message: '因调整方式为客户交纳,请先选择销售专员' })
return
}
this.viewState = 2
this.$refs['divChoose'].showData(this.formobj.list, this.formobj.useOrgSid, this.formobj.staffSid)
},
backData(value) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
value.forEach((e) => {
this.formobj.list.push({
rebateSid: e.rebateSid,
purchaseSystemSid: e.purchaseSystemSid,
purchaseSystemName: e.purchaseSystemName,
brandSid: e.brandSid,
brandName: e.brandName,
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
customerSid: e.customerSid,
customerName: e.customerName,
contractNo: e.contractNo,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
adjustmentMoney: e.adjustmentMoney,
alreadyMoney: e.alreadyMoney,
nowDiffAmount: e.nowDiffAmount,
nowAdjustmentMoney: '',
remarks: ''
})
})
},
handleDelete(index) {
this.formobj.list.splice(index, 1)
},
resetState() {
this.viewState = 1
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
saveOrUpdate() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style>

249
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue

@ -0,0 +1,249 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
export default {
name: 'DifferenceManagementYiBan',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {},
//
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) // urlunescape()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.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
/** 确认撤回任务 */
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
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

227
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/relation/chooseAdjustment.vue

@ -0,0 +1,227 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="金融贴息差异调整管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="">
<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-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</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="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="120" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="150" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="150" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="100" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'ChooseAdjustment',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toConfirm',
btnLabel: '确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
multipleSelection: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
staffSid: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
sids: []
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toConfirm':
this.toConfirm()
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) {
this.multipleSelection = row
},
showData(value, useOrgSid, staffSid) {
this.listQuery.params.useOrgSid = useOrgSid
this.listQuery.params.staffSid = staffSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.handleReset()
},
//
getList() {
this.listLoading = true
req.getAdjustVehList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.purchaseSystemName = ''
this.listQuery.params.brandName = ''
this.listQuery.params.vehModel = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.contractNo = ''
this.getList()
},
toConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条数据进行操作' })
}
},
doClose() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save