Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
God 6 months ago
parent
commit
3dcea4ca6b
  1. 104
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml
  2. 19
      anrui-scm/anrui-scm-ui/src/api/manufacturerrebates/maintenanceAllocation.js
  3. 11
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  4. 3
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobecheckedByUpdate.vue
  5. 217
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/maintenanceAllocation/maintenanceAllocation.vue
  6. 3
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobecheckedByUpdate.vue

104
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailed/FinUncollectedReceivablesDetailedMapper.xml

@ -51,8 +51,8 @@
furd.customerName AS `customerName`,
furd.customerSid,
furd.useOrgSid,
COALESCE(SUM(df.dbalance), 0) AS realMoney,
cast((furd.`reveivableMoney` - COALESCE(SUM(df.dbalance), 0)) AS DECIMAL(10, 2)) AS currentReceivableMoney,
COALESCE (df.dbalance, 0 ) AS realMoney,
CAST((furd.`reveivableMoney` - COALESCE ( df.dbalance, 0 )) AS DECIMAL ( 10, 2 )) AS currentReceivableMoney,
furd.reveivableMoney,
furd.contractSid,
if(bv.linkNo is null or LENGTH(trim(bv.linkNo)) < 1,
@ -66,21 +66,27 @@
FROM fin_uncollected_receivables_detailed furd
left join anrui_buscenter.bus_sales_order_vehicle bv on bv.sid = furd.busVinSid
LEFT JOIN (
SELECT d.sid,
d.`receivablesSid`,
(
d.`subscriptionMoney` - COALESCE(SUM(f.`thisUseMoney`), 0)) AS dbalance
FROM fin_selected_receivables_detailed d
LEFT JOIN (
SELECT f.busSid,
f.thisUseMoney
FROM fin_funds_carried_forward_veh f
JOIN `fin_funds_carried_forward_apply` fa ON f.mainSid = fa.sid
WHERE fa.`nodeState` != '终止'
) f ON f.`busSid` = d.`sid`
WHERE d.`auditState` = 3
or d.auditState = 1
GROUP BY d.`sid`
SELECT
d.`receivablesSid`,
SUM(d.`subscriptionMoney` - COALESCE (f.`thisUseMoney`, 0 )) AS dbalance
FROM
fin_selected_receivables_detailed d
LEFT JOIN (
SELECT
f.busSid,
SUM(f.thisUseMoney) AS thisUseMoney
FROM
fin_funds_carried_forward_veh f
JOIN `fin_funds_carried_forward_apply` fa ON f.mainSid = fa.sid
WHERE
fa.`nodeState` != '终止'
GROUP BY f.`busSid`
) f ON f.`busSid` = d.`sid`
WHERE
(d.`auditState` = 3
OR d.auditState = 1)
GROUP BY
d.`receivablesSid`
) df ON df.receivablesSid = furd.`sid`
<where>
${ew.sqlSegment}
@ -97,8 +103,8 @@
furd.customerName AS `customerName`,
furd.customerSid,
furd.useOrgSid,
COALESCE(SUM(df.dbalance), 0) AS realMoney,
cast((furd.`reveivableMoney` - COALESCE(SUM(df.dbalance), 0)) AS DECIMAL(10, 2)) AS currentReceivableMoney,
COALESCE (df.dbalance, 0 ) AS realMoney,
CAST((furd.`reveivableMoney` - COALESCE ( df.dbalance, 0 )) AS DECIMAL ( 10, 2 )) AS currentReceivableMoney,
furd.reveivableMoney,
furd.contractSid,
if(bv.linkNo is null or LENGTH(trim(bv.linkNo)) &lt; 1,
@ -115,21 +121,27 @@
LEFT JOIN anrui_buscenter.bus_sales_order bo ON bo.sid = bv.salesOrderSid
LEFT JOIN anrui_riskcenter.loan_solutions lls ON lls.salesOrderSid = bo.sid
LEFT JOIN (
SELECT d.sid,
SELECT
d.`receivablesSid`,
(
d.`subscriptionMoney` - COALESCE(SUM(f.`thisUseMoney`), 0)) AS dbalance
FROM fin_selected_receivables_detailed d
SUM(d.`subscriptionMoney` - COALESCE (f.`thisUseMoney`, 0 )) AS dbalance
FROM
fin_selected_receivables_detailed d
LEFT JOIN (
SELECT f.busSid,
f.thisUseMoney
FROM fin_funds_carried_forward_veh f
SELECT
f.busSid,
SUM(f.thisUseMoney) AS thisUseMoney
FROM
fin_funds_carried_forward_veh f
JOIN `fin_funds_carried_forward_apply` fa ON f.mainSid = fa.sid
WHERE fa.`nodeState` != '终止'
WHERE
fa.`nodeState` != '终止'
GROUP BY f.`busSid`
) f ON f.`busSid` = d.`sid`
WHERE d.`auditState` = 3
or d.auditState = 1
GROUP BY d.`sid`
WHERE
(d.`auditState` = 3
OR d.auditState = 1)
GROUP BY
d.`receivablesSid`
) df ON df.receivablesSid = furd.`sid`
<where>
${ew.sqlSegment}
@ -148,8 +160,8 @@
furd.customerName AS `customerName`,
furd.customerSid,
furd.useOrgSid,
COALESCE(SUM(df.dbalance), 0) AS realMoney,
cast((furd.`reveivableMoney` - COALESCE(SUM(df.dbalance), 0)) AS DECIMAL(10, 2)) AS currentReceivableMoney,
COALESCE (df.dbalance, 0 ) AS realMoney,
CAST((furd.`reveivableMoney` - COALESCE ( df.dbalance, 0 )) AS DECIMAL ( 10, 2 )) AS currentReceivableMoney,
furd.reveivableMoney,
furd.contractSid,
if(bv.linkNo is null or LENGTH(trim(bv.linkNo)) &lt; 1,
@ -165,21 +177,27 @@
LEFT JOIN anrui_buscenter.bus_sales_order bo ON bo.sid = bv.salesOrderSid
LEFT JOIN anrui_riskcenter.loan_solutions lls ON lls.salesOrderSid = bo.sid
LEFT JOIN (
SELECT d.sid,
SELECT
d.`receivablesSid`,
(
d.`subscriptionMoney` - COALESCE(SUM(f.`thisUseMoney`), 0)) AS dbalance
FROM fin_selected_receivables_detailed d
SUM(d.`subscriptionMoney` - COALESCE (f.`thisUseMoney`, 0 )) AS dbalance
FROM
fin_selected_receivables_detailed d
LEFT JOIN (
SELECT f.busSid,
f.thisUseMoney
FROM fin_funds_carried_forward_veh f
SELECT
f.busSid,
SUM(f.thisUseMoney) AS thisUseMoney
FROM
fin_funds_carried_forward_veh f
JOIN `fin_funds_carried_forward_apply` fa ON f.mainSid = fa.sid
WHERE fa.`nodeState` != '终止'
WHERE
fa.`nodeState` != '终止'
GROUP BY f.`busSid`
) f ON f.`busSid` = d.`sid`
WHERE d.`auditState` = 3
or d.auditState = 1
GROUP BY d.`sid`
WHERE
(d.`auditState` = 3
OR d.auditState = 1)
GROUP BY
d.`receivablesSid`
) df ON df.receivablesSid = furd.`sid`
<where>
${ew.sqlSegment}

19
anrui-scm/anrui-scm-ui/src/api/manufacturerrebates/maintenanceAllocation.js

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 根据条件分页查询数据的列表 已改
export function pagerList(data) {
return request({
url: '/base/v1/basepurchasesystem/listPage',
data: data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 新增保存 已改
export function maintenance(data) {
return request({
url: '/base/v1/basepurchasesystem/maintenance',
method: 'post',
params: data
})
}

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

@ -710,7 +710,16 @@ const codemenu = [{
component: () => import('@/views/manufacturerrebates/huikuanfenpei/collectionrebateallot.vue'),
name: 'HuiKuanFanliFenPei',
meta: {
title: '厂家回款返利分配',
title: '厂家回款返利分摊',
noCache: true
}
},
{
path: '/maintenanceAllocation/maintenanceAllocation',
component: () => import('@/views/manufacturerrebates/maintenanceAllocation/maintenanceAllocation.vue'),
name: 'MaintenanceAllocation',
meta: {
title: '分摊比例设置',
noCache: true
}
}

3
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobecheckedByUpdate.vue

@ -360,5 +360,8 @@ export default {
.addinputInfo {
margin-left: 120px !important;
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
</style>

217
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/maintenanceAllocation/maintenanceAllocation.vue

@ -0,0 +1,217 @@
<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" clearable 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%;">
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="分公司" align="center" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" />
<el-table-column label="分摊比例(%)" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.shareProportion" @keyup.native="scope.row.shareProportion = getNumber(scope.row.shareProportion, 2)" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toSave(scope.row)">保存</el-button>
</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 { pagerList, maintenance } from '@/api/manufacturerrebates/maintenanceAllocation'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { getOrgSidByPath } from '@/api/cheliang/dictcommons'
export default {
name: 'MaintenanceAllocation',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
orgSidPath: '',
purchaseSystemName: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.listQuery.params.useOrgSid = resp.data
this.getList()
}
})
},
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
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
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.orgSidPath = window.sessionStorage.getItem('defaultOrgPath')
pagerList(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: {
useOrgSid: '',
orgSidPath: '',
purchaseSystemSid: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
toSave(row) {
if (row.shareProportion !== '') {
maintenance({ sid: row.sid, shareProportion: row.shareProportion }).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.getList()
}
})
} else {
this.$message({ showClose: true, type: 'error', message: '分摊比例不能为空' })
}
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

3
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobecheckedByUpdate.vue

@ -358,5 +358,8 @@ export default {
.addinputInfo {
margin-left: 120px !important;
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
</style>

Loading…
Cancel
Save