ttk-app-core
Version:
enterprise develop framework
57 lines (56 loc) • 2.56 kB
JavaScript
/**
* webapi.js 封装app所需的所有web请求
* 供app测试使用,app加入网站后webpai应该由网站通过config,提供给每个app
*/
import { fetch } from 'edf-utils'
export default {
tranreport: {
getOauthUrl: (option) => fetch.post('/v1/reportconverter/getOauthUrl', option),//国税进入第一步没有code接口
oauthAuthentication: (option) => fetch.post('/v1/reportconverter/oauthAuthentication', option),//国税进入第一步有code接口
getOrgAndToken: (option) => fetch.post('/v1/reportconverter/getOrgAndToken', option),//测试
getReportJson: (option) => fetch.post('/v1/reportconverter/getReportJson', option),//初始化
//页面初始化接口
getOrgDtoForReportConvert: (option) => fetch.post('/v1/edf/org/getOrgDtoForReportConvert', option),
//转为局端格式调用接口
importDataSource: (option) => fetch.post('/v1/reportconverter/importDataSource', option),
//保存报表
saveReport: (option) => fetch.post('/v1/reportconverter/saveReport', option),
/*
接口说明:报表生成校验
参数:{
"nsrsbh": "123456789012345", --纳税人识别号
"startPeriod": "2017-12-01", --申报起始日期
"endPeriod": "2017-12-31", --申报终止日期
"accountingStandardsId": 2000020001 --会计准则ID(企业会计准则: 2000020001 小企业会计准则: 2000020002)
}
返回: {
"checkPass": false,
"msgList": ["资产负债表不平衡"]
}
*/
checkReport: (option) => fetch.post('v1/reportconverter/checkReport', option),
//删除上传文件
deleteDataSource: (option) => fetch.post('/v1/reportconverter/deleteDataSource', option),
/*
接口说明:拼接跳转电局报表页url接口
参数:
{
"nsrsbh":"11111", -- 纳税人识别号
"gdslxDm":"11111", -- 国地税类型代码(必需)
"kjzdzzDm":"11111", -- 会计制度准则代码
"zlbsxlDm":"11111", -- 资料报送小类代码
"bbbsqDm":"01", -- 报表报送期代码
"sssqQ":"2018-03-01", -- 报送所属期起(必需)
"sssqZ":"2018-03-31", -- 报送所属期止(必需)
"nsrmc":"xxxx", -- 纳税人名称
"zgswskfjDm":"xxxx", -- 主管税务所科分局代码(必需)
}
返回值:
{
"result":true,
"value":"http://....."
}
*/
getTaxReportUrl: (option) => fetch.post('v1/reportconverter/getTaxReportUrl', option)
}
}