Browse Source

(*)回款和业绩明细表 数据查询

master
wuqun 2 years ago
parent
commit
76d564c9f4
  1. 2
      api/app/lib/controllers/report/achievement.js
  2. 8
      api/app/lib/routes/report/index.js
  3. 29
      web/client/src/sections/business/actions/achievement-report.js
  4. 4
      web/client/src/sections/business/actions/index.js
  5. 107
      web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx
  6. 75
      web/client/src/sections/business/containers/performanceReport/backMoneyDetails.jsx
  7. 5
      web/client/src/utils/webapi.js

2
api/app/lib/controllers/report/achievement.js

@ -42,7 +42,7 @@ async function getAchievementDetail(ctx) {
if (keywordTarget == 'dep' && keyword) {
where.department = { $like: `%${keyword}%` }
}
let res = await models.ReceivableDetail.findAndCountAll({
let res = await models.PerformanceDetail.findAndCountAll({
where: where,
offset: Number(page) * Number(limit),
limit: Number(limit),

8
api/app/lib/routes/report/index.js

@ -10,9 +10,9 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/sales/member/list'] = { content: '查询销售人员分布明细表', visible: false };
router.get('/sales/member/list', report.getSalersReport);
app.fs.api.logAttr['GET/received/detail'] = { content: '查询回款明细表', visible: false };
router.get('/received/detail', achieve.getReceivedDetail);
app.fs.api.logAttr['GET/detail/received/back'] = { content: '查询回款明细表', visible: false };
router.get('/detail/received/back', achieve.getReceivedDetail);
app.fs.api.logAttr['GET/achievement/detail'] = { content: '查询业绩明细表', visible: false };
router.get('/achievement/detail', achieve.getAchievementDetail);
app.fs.api.logAttr['GET/detail/achievement'] = { content: '查询业绩明细表', visible: false };
router.get('/detail/achievement', achieve.getAchievementDetail);
};

29
web/client/src/sections/business/actions/achievement-report.js

@ -0,0 +1,29 @@
'use strict';
import { ApiTable, basicAction } from '$utils'
//回款明细表
export function getReceivedDetail(query) {
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_RECEIVED_DETAIL",
query: query,
url: `${ApiTable.getReceivedDetail}`,
msg: { option: "查询回款明细表" },
reducer: { name: "ReceivedDetail", params: { noClear: true } },
});
}
//业绩明细表
export function getAchievementDetail(query) {
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_ACHIEVEMENT_DETAIL",
query: query,
url: `${ApiTable.getAchievementDetail}`,
msg: { option: "查询业绩明细表" },
reducer: { name: "AchievementDetail", params: { noClear: true } },
});
}

4
web/client/src/sections/business/actions/index.js

@ -1,7 +1,9 @@
'use strict';
import * as reserveItem from './reserve-item';
import * as salersReport from './salers-report';
import * as achievementReport from './achievement-report';
export default {
...reserveItem,
...salersReport
...salersReport,
...achievementReport
}

107
web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx

@ -7,6 +7,7 @@ import '../../style.less';
const AchievementDetails = (props) => {
const { dispatch, actions } = props
const { businessManagement } = actions
const [keywordTarget, setKeywordTarget] = useState('saler');
const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()//
@ -16,15 +17,29 @@ const AchievementDetails = (props) => {
function seachValueChange(value) {
setKeyword(value)
}
useEffect(() => {
getAchievementDetails()
}, []);
function getAchievementDetails() {
dispatch(businessManagement.getAchievementDetail({ keywordTarget, keyword, ...query })).then(r => {
if (r.success) {
setTableData(r.payload?.data?.rows);
setLimits(r.payload?.data?.count)
}
})
}
const columns = [{
title: '收到合同日期',
dataIndex: 'year',
key: 'year',
dataIndex: 'recConDate',
key: 'recConDate',
width: 120,
}, {
title: '月份',
dataIndex: 'id',
key: 'id',
dataIndex: 'month',
key: 'month',
width: 120,
}, {
title: '部门',
@ -33,108 +48,108 @@ const AchievementDetails = (props) => {
width: 140,
}, {
title: '销售人员',
dataIndex: 'salers',
key: 'salers',
dataIndex: 'sale',
key: 'sale',
width: 140,
}, {
title: '客户名称',
dataIndex: 'name',
key: 'name',
dataIndex: 'customer',
key: 'customer',
width: 140,
}, {
title: '项目名称',
dataIndex: 'projectName',
key: 'projectName',
dataIndex: 'item',
key: 'item',
width: 140,
}, {
title: '合同金额',
dataIndex: 'money',
key: 'money',
dataIndex: 'amount',
key: 'amount',
width: 140,
}, {
title: '实际业绩',
dataIndex: 'moneyAfterChange',
key: 'moneyAfterChange',
dataIndex: 'realPerformance',
key: 'realPerformance',
width: 140,
}, {
title: '考核业绩',
dataIndex: 'backYear',
key: 'backYear',
dataIndex: 'assessmentPerformance',
key: 'assessmentPerformance',
width: 120,
}, {
title: '价格是否特批',
dataIndex: 'backDate',
key: 'backDate',
dataIndex: 'isApproval',
key: 'isApproval',
width: 120,
}, {
title: '特批折算比例',
dataIndex: 'backMoney',
key: 'backMoney',
dataIndex: 'approvalProp',
key: 'approvalProp',
width: 120,
}, {
title: '预支提成及委外费用',
dataIndex: 'invoiceBack',
key: 'invoiceBack',
dataIndex: 'cost',
key: 'cost',
width: 140,
}, {
title: '业务线',
dataIndex: 'leaveMoney',
key: 'leaveMoney',
dataIndex: 'serviceLine',
key: 'serviceLine',
width: 120,
}, {
title: '客户类型',
dataIndex: 'payConfirmTime',
key: 'payConfirmTime',
dataIndex: 'cusType',
key: 'cusType',
width: 140,
}, {
title: '行业',
dataIndex: 'thirdPayer',
key: 'thirdPayer',
dataIndex: 'industry',
key: 'industry',
width: 140,
}, {
title: '信息来源',
dataIndex: 'desc',
key: 'desc',
dataIndex: 'source',
key: 'source',
width: 120,
}, {
title: '项目类型',
dataIndex: 'leaveMoney',
key: 'leaveMoney',
dataIndex: 'itemType',
key: 'itemType',
width: 120,
}, {
title: '客户省份',
dataIndex: 'payConfirmTime',
key: 'payConfirmTime',
dataIndex: 'cusProvince',
key: 'cusProvince',
width: 140,
}, {
title: '客户属性',
dataIndex: 'thirdPayer',
key: 'thirdPayer',
dataIndex: 'cusAttribute',
key: 'cusAttribute',
width: 140,
}, {
title: '复购次数',
dataIndex: 'desc',
key: 'desc',
dataIndex: 'repurchaseCount',
key: 'repurchaseCount',
width: 120,
}, {
title: '是否可复制的业务路径',
dataIndex: 'leaveMoney',
key: 'leaveMoney',
dataIndex: 'reproducible',
key: 'reproducible',
width: 120,
}, {
title: '省外业务1.1',
dataIndex: 'payConfirmTime',
key: 'payConfirmTime',
dataIndex: 'outProvince',
key: 'outProvince',
width: 140,
}, {
title: '复购业务1.05',
dataIndex: 'thirdPayer',
key: 'thirdPayer',
dataIndex: 'repurchase',
key: 'repurchase',
width: 140,
}, {
title: '可复制的业务路径1.1',
dataIndex: 'desc',
key: 'desc',
dataIndex: 'isreproduce',
key: 'isreproduce',
width: 120,
}]
function handleRow(record, index) {//

75
web/client/src/sections/business/containers/performanceReport/backMoneyDetails.jsx

@ -7,6 +7,7 @@ import '../../style.less';
const BackMoneyDetails = (props) => {
const { dispatch, actions } = props
const { businessManagement } = actions
const [keywordTarget, setKeywordTarget] = useState('contract');
const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()//
@ -16,6 +17,20 @@ const BackMoneyDetails = (props) => {
function seachValueChange(value) {
setKeyword(value)
}
useEffect(() => {
getBackMoneyDetails()
}, []);
function getBackMoneyDetails() {
dispatch(businessManagement.getReceivedDetail({ keywordTarget, keyword, ...query })).then(r => {
if (r.success) {
setTableData(r.payload?.data?.rows);
setLimits(r.payload?.data?.count)
}
})
}
const columns = [{
title: '年度',
dataIndex: 'year',
@ -23,8 +38,8 @@ const BackMoneyDetails = (props) => {
width: 120,
}, {
title: '序号',
dataIndex: 'id',
key: 'id',
dataIndex: 'serialNo',
key: 'serialNo',
width: 120,
}, {
title: '编号',
@ -38,73 +53,73 @@ const BackMoneyDetails = (props) => {
width: 140,
}, {
title: '销售人员',
dataIndex: 'salers',
key: 'salers',
dataIndex: 'sale',
key: 'sale',
width: 140,
}, {
title: '合同编号',
dataIndex: 'contractNumber',
key: 'contractNumber',
dataIndex: 'contractNo',
key: 'contractNo',
width: 140,
}, {
title: '客户名称',
dataIndex: 'name',
key: 'name',
dataIndex: 'customer',
key: 'customer',
width: 140,
}, {
title: '项目名称',
dataIndex: 'projectName',
key: 'projectName',
dataIndex: 'item',
key: 'item',
width: 140,
}, {
title: '合同金额',
dataIndex: 'money',
key: 'money',
dataIndex: 'amount',
key: 'amount',
width: 140,
}, {
title: '变更后合同金额',
dataIndex: 'moneyAfterChange',
key: 'moneyAfterChange',
dataIndex: 'changeAmount',
key: 'changeAmount',
width: 140,
}, {
title: '回款年份',
dataIndex: 'backYear',
key: 'backYear',
dataIndex: 'receivableYear',
key: 'receivableYear',
width: 120,
}, {
title: '回款日期',
dataIndex: 'backDate',
key: 'backDate',
dataIndex: 'receivableDate',
key: 'receivableDate',
width: 120,
}, {
title: '回款金额',
dataIndex: 'backMoney',
key: 'backMoney',
dataIndex: 'receivableAmount',
key: 'receivableAmount',
width: 120,
}, {
title: '开票-回款',
dataIndex: 'invoiceBack',
key: 'invoiceBack',
dataIndex: 'invoicedBack',
key: 'invoicedBack',
width: 140,
}, {
title: '剩余合同金额',
dataIndex: 'leaveMoney',
key: 'leaveMoney',
dataIndex: 'remainConAmount',
key: 'remainConAmount',
width: 120,
}, {
title: '收入确认时间',
dataIndex: 'payConfirmTime',
key: 'payConfirmTime',
dataIndex: 'incomeConfirmdate',
key: 'incomeConfirmdate',
width: 140,
}, {
title: '第三方付款单位',
dataIndex: 'thirdPayer',
key: 'thirdPayer',
dataIndex: 'thirdPayment',
key: 'thirdPayment',
width: 140,
}, {
title: '备注',
dataIndex: 'desc',
key: 'desc',
dataIndex: 'remark',
key: 'remark',
width: 120,
}]
function handleRow(record, index) {//

5
web/client/src/utils/webapi.js

@ -18,8 +18,11 @@ export const ApiTable = {
//项目报表
getReserveItemReport: "reserveItem/report/{type}",
//销售人员分布明细表
getSalesList: 'sales/member/list',
//业绩报表
getReceivedDetail: 'detail/received/back',
getAchievementDetail: 'detail/achievement',
};
export const RouteTable = {
apiRoot: "/api/root",

Loading…
Cancel
Save