Commit 62371888 by 孙亚楠

d

parent f21e1819
......@@ -533,36 +533,35 @@ class OrderCtl extends CtlBase {
contact_mobile:"",
*/
async addSourceOrder(pobj, pobj2, req) {
if (!pobj.product_id) {
return system.getResult(null, `参数错误 产品ID不能为空`);
}
if (!pobj.contact_mobile) {
return system.getResult(null, `参数错误 联系电话不能为空`);
}
if (!pobj.customer_name) {
return system.getResult(null, `参数错误 客户名称不能为空`);
}
if(!pobj.saas_id){
return system.getResult(null,`参数错误 saasId不能为空`)
}
if(!pobj.chooseItems){
pobj.chooseItems = ["10020200","10020300","10020400","10020500","10020600","10020700"];
}
if(!pobj.chooseItems.includes("10020200")){
pobj.chooseItems.push("10020200");
}
pobj.service_items = pobj.chooseItems;
pobj.source_id = pobj.source_id || '1002';
pobj.notes = pobj.desc || "工商注册,刻章,银行卡户,税务报到,建账";
if(!pobj.deliverId){
return system.getResult(null,`请重新登录`);
}
pobj.deliver_id = pobj.deliverId;
pobj.deliver_name = pobj.deliverName || "";
pobj.delier_user_id = pobj.delier_user_id || "";
pobj.deliver_user_path = pobj.deliver_user_path || "";
try {
if (!pobj.product_id) {
return system.getResult(null, `参数错误 产品ID不能为空`);
}
if (!pobj.contact_mobile) {
return system.getResult(null, `参数错误 联系电话不能为空`);
}
if (!pobj.customer_name) {
return system.getResult(null, `参数错误 客户名称不能为空`);
}
if(!pobj.saas_id){
return system.getResult(null,`参数错误 saasId不能为空`)
}
if(!pobj.chooseItems){
pobj.chooseItems = ["10020200","10020300","10020400","10020500","10020600","10020700"];
}
if(!pobj.chooseItems.includes("10020200")){
pobj.chooseItems.push("10020200");
}
pobj.service_items = pobj.chooseItems;
pobj.source_id = pobj.source_id || '1002';
pobj.notes = pobj.desc || "工商注册,刻章,银行卡户,税务报到,建账";
if(!pobj.deliver_id){
return system.getResult(null,`请重新登录`);
}
pobj.deliver_id = pobj.deliver_id;
pobj.deliver_name = pobj.deliverName || "";
pobj.delier_user_id = pobj.delier_user_id || "";
pobj.deliver_user_path = pobj.deliver_user_path || "";
return await this.orderSve.addSourceOrder(pobj);
} catch (error) {
console.log(error);
......
......@@ -23,6 +23,7 @@ module.exports = function (app) {
req.url.indexOf("common/metaCtl/getApiDoc") > 0 ||
req.url.indexOf("common/captchaCtl/captcha") > 0 ||
req.url.indexOf("invoice/invoiceCtl/jizhang") > 0 ||
req.url.indexOf("order/orderCtl/addSourceOrder") > 0 ||
req.url.indexOf("getRsConfig") > 0) {
if (jsonUser) {
req.loginUser = jsonUser;
......
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