Commit d216c529 by 孙亚楠

d

parent dcd10405
......@@ -9,6 +9,7 @@ class DeliverCtl extends CtlBase {
constructor() {
super();
this.deliverSve = system.getObject("service.common.deliverSve");
let TAX_TYPE = ['1', '2'];
}
async all(pobj, pobj2, req) {
......@@ -114,7 +115,6 @@ class DeliverCtl extends CtlBase {
}
}
async provinceList(pobj, pobj2, req) {
try {
return system.getResultSuccess([
......@@ -158,5 +158,96 @@ class DeliverCtl extends CtlBase {
}
}
/**
* fn:保存方案
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeSave(pobj, pobj2, req){
// if(pobj.deliver_id){
// return system.getResult(null, `登录失效,请重新登录`);
// }
// if(pobj.name){
// return system.getResult(null, `方案名称不能为空`);
// }
// if(pobj.common_tax_ladder){
// return system.getResult(null, `普票个税阶梯不能为空`);
// }
// if(pobj.common_other_ladder){
// return system.getResult(null, `普票增值税、附加税阶梯不能为空`);
// }
// if(pobj.special_tax_ladder){
// return system.getResult(null, `专票个税阶梯不能为空`);
// }
// if(pobj.special_other_ladder){
// return system.getResult(null, `专票增值税、附加税阶梯不能为空`);
// }
//
// if(!this.TAX_TYPE.includes(this.trim(pobj.add_value_up_type))){
// return system.getResult(null, `增值税累计类型错误`);
// }
// if(!this.TAX_TYPE.includes(this.trim(pobj.tax_up_type))){
// return system.getResult(null, `个税累计类型`);
// }
try{
return await this.deliverSve.deliverschemeSave(pobj);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
/**
* fn:方案详情
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeInfo(pobj, pobj2, req){
if(!pobj.id){
return system.getResult(null, `参数错误 ID不能为空`);
}
try{
return await this.deliverSve.deliverschemeInfo(pobj);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
/**
* fn:方案列表
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemePage(pobj, pobj2, req){
try{
return await this.deliverSve.deliverschemePage(pobj);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
/**
* fn:方案字典
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeDics(pobj, pobj2, req){
try{
return await this.deliverSve.deliverschemeDics(pobj);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
}
module.exports = DeliverCtl;
\ No newline at end of file
......@@ -137,5 +137,49 @@ class DeliverService extends ServiceBase {
row.businessmenDivide = system.f2y(row.businessmenDivide);
}
}
/**
* fn:保存方案
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeSave(pobj, pobj2, req){
return await this.callms("common", "deliverschemeSave", pobj);
}
/**
* fn:方案详情
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeInfo(pobj, pobj2, req){
return await this.callms("common", "deliverschemeInfo", pobj);
}
/**
* fn:方案列表
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemePage(pobj, pobj2, req){
return await this.callms("common", "deliverschemePage", pobj);
}
/**
* fn:方案字典
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async deliverschemeDics(pobj, pobj2, req){
return await this.callms("common", "deliverschemeDics", pobj);
}
}
module.exports = DeliverService;
\ No newline at end of file
......@@ -183,24 +183,26 @@ class System {
// var domain = "http://192.168.18.237";
var domain = "http://127.0.0.1";
var domain2 = "http://39.107.234.14";
var wangkun = "http://192.168.201.149"
return {
// 公共服务
common: domain + ":3102" + path,
// common: domain + ":3102" + path,
// common: "http://127.0.0.1:3102" + path,
common:wangkun+":3102"+ path,
// 商户服务
merchant: domain + ":3101" + path,
merchant: domain2 + ":3101" + path,
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
order: domain + ":3103" + path,
order: domain2 + ":3103" + path,
// order: domain2 + ":3103"+ path,
// 发票服务
invoice: domain2 + ":3105" + path,
// 发票服务
uc: domain + ":3106" + path,
uc: domain2 + ":3106" + path,
// uc: "http://127.0.0.1:3106" + path,
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment