Browse Source

查询明细表已存在编号接口修改

master
zmh 2 years ago
parent
commit
4b4412fe35
  1. 4
      api/app/lib/controllers/report/achievement.js
  2. 6
      api/app/lib/routes/report/index.js

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

@ -259,8 +259,10 @@ async function exportAchievementDetail(ctx, dataList) {
async function getReceivedNumbers(ctx) {
try {
const { tableModel } = ctx.query;
const models = ctx.fs.dc.models;
let list = await models.ReceivableDetail.findAll({//查编号
let model = tableModel || 'ReceivableDetail'
let list = await models[model].findAll({//查编号
attributes: ['number']
});
ctx.status = 200

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

@ -16,10 +16,7 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/detail/achievement'] = { content: '查询业绩明细表', visible: false };
router.get('/detail/achievement', achieve.getAchievementDetail);
app.fs.api.logAttr['GET/detail/received/numbers'] = { content: '查询业绩明细已有的编号集合', visible: false };
app.fs.api.logAttr['GET/detail/received/numbers'] = { content: '查询明细表已有的编号集合', visible: false };
router.get('/detail/received/numbers', achieve.getReceivedNumbers);
app.fs.api.logAttr['POST/add/received/back/bulk'] = { content: '导入回款明细', visible: true };
@ -38,4 +35,5 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/export/invoicing/detail'] = { content: '导出开票明细表', visible: false };
router.get('/export/invoicing/detail', achieve.exportInvoicingDetail);
};
Loading…
Cancel
Save