Commit f3a236d5 by 孙亚楠

dd

parent 4ec244fa
......@@ -343,6 +343,41 @@ class OrderCtl extends CtlBase {
}
}
/**
* 新增渠道订单
* @returns {Promise<void>}
* @params product_id 产品ID
* @params source_id 来源ID
* @params source_no 来源订单号
* @params desc 订单信息
* @params contact_mobile 联系电话
* @params customer_name 客户名称
*/
async addSourceOrder(pobj, pobj2, req) {
if (!pobj.product_id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.source_id) {
return system.getResult(null, `参数错误 来源ID不能为空`);
}
if (!pobj.source_no) {
return system.getResult(null, `参数错误 来源订单号不能为空`);
}
if (!pobj.contact_mobile) {
return system.getResult(null, `参数错误 联系电话不能为空`);
}
if (!pobj.customer_name) {
return system.getResult(null, `参数错误 客户名称不能为空`);
}
pobj.notes = pobj.desc || "工商注册,刻章,银行卡户,税务报到";
try {
return await this.orderSve.addSourceOrder(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
......
......@@ -182,8 +182,8 @@ class System {
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
order: domain + ":3103" + path,
// order: "http://127.0.0.1:3103" + path,
// order: domain + ":3103" + path,
order: "http://127.0.0.1:3103" + path,
// 发票服务
invoice: domain2 + ":3105" + path,
......
......@@ -12,6 +12,8 @@
1. [交付商验收](#platformAuditDetermine)
1. [客户交付](#deliverCustomer)
1. [订单完成](#orderComplete)
1. [添加订单](#addSourceOrder)
## **<a name="processList"> 业务进度字典 </a>**
[返回到目录](#menu)
##### URL
......@@ -635,3 +637,34 @@
}
```
## **<a name="addSourceOrder"> 添加订单 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/addSourceOrder]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"product_id":"10010000", //产品ID 必填 工商注册一体化请传"10010000"
"source_id":"1001", //来源ID 必填 单页面录入 "1001"
"source_no":"1567514119003310" //来源订单号 必填 单页面录入 当前时间戳
"contact_mobile":"133836395", //联系电话 必填
"customer_name":"1200", //客户名称 必填
"desc":"1567514119003310" //产品信息 非必填 默认 "工商注册,刻章,银行卡户,税务报到"
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "efb46fd211be4ca6845acc53684fb61d"
}
```
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