Commit 8bd8714e by 孙亚楠

ddg

parent b5220f75
......@@ -196,9 +196,10 @@ class OrderCtl extends CtlBase {
// return system.getResult(null, `参数错误 工商官方文件不能为空`);
// }
pobj.bd_id = req.loginUser.id;
pobj.bd_path = req.loginUser.orgpath;
if(!pobj.deliver_id){
return system.getResult(null,`请重新登录`);
}
pobj.deliver_id = pobj.deliver_id;
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
......@@ -542,6 +543,9 @@ class OrderCtl extends CtlBase {
}
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 {
return await this.orderSve.addSourceOrder(pobj);
} catch (error) {
......@@ -572,9 +576,117 @@ class OrderCtl extends CtlBase {
}
}
/**
* ali建账
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async accountCreation (pobj, pobj2, req){
if(!pobj.id){
return system.getResult(null,`订单【${pobj.id}】不存在`)
}
if(!pobj.status){
return system.getResult(null,`订单状态不能为空`)
}
if(!pobj.province){
return system.getResult(null,`省份不能为空`)
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* ali客户交付
* @param {*} params
*/
async orderComplete(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 订单状态不能为空`);
}
if (!pobj.guest_mail_no) {
return system.getResult(null, `参数错误 客户快递单号不能为空`);
}
if (!pobj.guest_mail_img) {
return system.getResult(null, `参数错误 交付商交付快递单号图片不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 阿里 全部订单
* @returns {Promise<void>}
*/
async aliOrderPageAll(pobj, pobj2, req){
var condition = {
currentPage: Number(pobj.currentPage || 1),
pageSize: Number(pobj.pageSize || 10),
deliver_id: pobj.deliver_id,
}
if(pobj.createdBegin){
condition.createdBegin = this.trim(pobj.createdBegin);
}
if(pobj.createdEnd){
condition.createdEnd = this.trim(pobj.createdEnd);
}
if(pobj.status){
condition.status = this.trim(pobj.status);
}
this.doTimeCondition(condition, ["createdBegin", "createdEnd"]);
return await this.orderSve.aliOrderPageAll(condition);
}
/**
* 阿里 我的业务订单
* @returns {Promise<void>}
*/
async aliOrderPage(pobj, pobj2, req){
//1.2010~2090状态
let statusMap = {
"1":"2010", //待完善
"2":"2020",//工商注册
"3":"2030",//刻章办理
"4":"2040",//银行开户
"5":"2050",//税务报道
"6":"2060",//核定税种
"7":"2070",//建帐
"8":"2080",//客户交付
"9":"2090"//订单完成
};
if(!statusMap[pobj.status]){
return system.getResult(null, `订单状态错误`);
}
var condition = {
currentPage: Number(pobj.currentPage || 1),
pageSize: Number(pobj.pageSize || 10),
deliver_id: pobj.deliver_id,
status:statusMap[pobj.status],
isMain:pobj.isMain,
isManager:pobj.isManager,
delier_user_id:pobj.delier_user_id,
deliver_user_path:pobj.deliver_user_path
}
if(pobj.createdBegin){
condition.createdBegin = this.trim(pobj.createdBegin);
}
if(pobj.createdEnd){
condition.createdEnd = this.trim(pobj.createdEnd);
}
this.doTimeCondition(condition, ["createdBegin", "createdEnd"]);
return await this.orderSve.aliOrderPage(condition);
}
}
module.exports = OrderCtl;
\ No newline at end of file
......@@ -137,5 +137,22 @@ class OrderService extends ServiceBase {
}
}
async aliOrderPageAll(params){
try {
return await this.callms("order", "aliOrderPageAll", params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async aliOrderPage(params){
try {
return await this.callms("order", "aliOrderPage", params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = OrderService;
\ No newline at end of file
......@@ -105,6 +105,10 @@ module.exports = function (app) {
req.body.deliverId = req.loginUser.deliver_id || "";
req.body.deliver_id = req.loginUser.deliver_id || "";
req.body.deliverName = req.loginUser.deliver.name ||"";
req.body.delier_user_id = req.loginUser.id || "";
req.body.deliver_user_path = req.loginUser.org_path || "";
req.body.isManager = req.loginUser.isManager;
req.body.isAdmin = req.loginUser.isAdmin;
}
params.push(methodName);
......
<a name="menu">目录</a>
1. [全部订单](#aliOrderPageAll)
1. [我的业务订单](#aliOrderPage)
1. [完善订单](#aliPerfectInformation)
## **<a name="handlePage"> 订单办理 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/handlePage]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"merchant_id": 110361384474, // 商户id
"orderNo": "", // 订单号
"channelOrderNo": "", // 渠道订单号
"createdBegin": "", //
"createdEnd": "",
"status": ""
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 18,
"rows": [
{
"id": "12115022197000259", // 订单办理id
"order_id": "13180527760002418", // 订单号
"status": "1030", // 业务状态
"statusName": "待处理", // 业务状态名称
"nextStatus": "1030", // 下一业务状态
"nextStatusName": "待处理", // 下一业务状态名称
"deliver_id": "13120681466000118", // 交付商id
"deliverName": "杨庆菊交付商222", // 交付商名称
"deliverDivide": 2220000, // 交付商分成金额
"breakReason": null,
"created_at": "2019-10-23 10:47:33",
"auditRemark": null, // 审核备注
"content": null, // 交付内容
"addressee": null, // 收件人
"mobile": null, // 联系电话
"addr": null, // 邮寄地址
"auditResult": "", // 审核状态
"order": {
"id": "13180527760002418",
"legalName": "杨庆菊",
"legalMobile": "杨庆菊手机号",
"price": 3000
}
},
]
},
"requestid": "8470ee30a2f14b01987828d2c614684c"
}
```
## **<a name="deliverInfo"> 查看详情 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/deliverInfo]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "13180527789003380", // 订单号
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "13180527789003380", // 订单号\订单号
"merchant_id": "11064622752480048", // 商户id
"channelOrderNo": "xxxxxxxxx111", // 渠道订单号
"price": 300000, // 订单价格(分)
"legalName": "杨庆菊", // 法人姓名
"legalMobile": "杨庆菊手机号", // 法人手机号
"legalImg": "法人照片", // 法人照片
"idcard": "123身份证", // 身份证号码
"idcardFront": "在正面", // 身份证正面图
"idcardBack": "反面", // 身份证反面图
"bankNo": "2222", // 银行卡号
"bank": "开户行", // 开户行
"bankImg": "这是银行卡照片", // 银行卡照片
"names": "名称1,名称2,名称3", // 2~3个注册名称,逗号分割
"domicile_id":"" // 注册地id
"domicileName":"" // 注册地名称
"businessScope_id": "12218127596000645", // 经营范围id
"businessType": "物流信息类", // 经营范围
"businessScope": "国内物流信息服务;装", // 经营范围详情
"capital": "到底是多少", // 注册资本
"statusName": "未付款", // 订单状态名称
"status": "1000", // 订单状态
"ostatusName": "待处理", // 业务进度状态名称
"ostatus": "1030", // 业务进度状态
"assignTime": null, // 分配时间
"assignUcname": "吴经理", // 分配人
"created_at": "2019-10-05 06:57:28", // 创建时间
"deliverType": "", // 交付类型 10交付商交付 20平台交付 30平台保存无需交付
"deliverTypeName": "", // 交付类型名称
"deliverNo": "", // 快递单号
"deliverImg": "", // 交接单
"deliver": { // 交付商
"statusName": "待处理" // 办理状态名称
"status": "1020", // 办理状态
"deliverName": "开封交付商", // 交付商名称
"deliverDivide": 3311, // 交付商分成比例
"auditRemark": null, // 审核备注
"content": null, // 交付内容
"addressee": null, // 收件人
"mobile": null, // 联系电话
"addr": null, // 邮寄地址
"auditResult": "", // 审核状态
},
"businessmen": {
"orderNo": "" // 订单号
"channelOrderNo": "" // 渠道订单号
"bstatus": "2020", // 业务状态
"bstatusName": "已完成", // 业务状态名称
"gstatus": "2020", // 客户看到的业务状态
"gstatusName": "已完成", // 客户看到的业务状态名号曾
"dstatus": "2020", // 交付商看到的状态
"dstatusName": "已完成" // 交付商看到的状态名称
"legalName": "" // 法人姓名
"legalMobile": "" // 法人电话
"name": "" // 个体工商户名称
"creditCode": "" // 统一社会信用代码
"businessPlace": "" // 经营场所
"businessScope": "" // 经营范围
"regDate": "" // 注册日期
"businessImg": "" // 执照照片
"gongzhang": "" // 公章
"caiwuzhang": "" // 财务章
"fapiaozhang": "" // 发票章
"hetongzhang": "" // 合同章
"farenzhang": "" // 法人章
"isBank": "" // 是否开户
"bankName": "" // 账户名称
"bankNo": "" // 账户号
"bank": "" // 开户行
"bankImg": "" // 账户信息
"caImg": "" // CA照片
"taxRegDay": "" // 税务登记日
"taxOrg": "" // 税务机构名称
"courierNo": "" // 快递单号
"courierImg": "" // 快递交接单图片
"addedValueRate": "" // 增值税率
"supertaxRate": "" // 附加税率
"commonTaxLadder": "" // 普票个税阶梯
"commonOtherLadder": "" // 普票增值税、附加税阶梯
"specialTaxLadder": "" // 专票个税阶梯
"specialOtherLadder": "" // 专票增值税、附加税阶梯
"contract": "" // 个体户合同
"contractStartData": "" // 合同开始时间
"contractEndData": "" // 合同结束时间
"notes": "" // 备注
"opNotes": "" // 操作备注
"created_at": "", // 创建时间
"taxUpType": "1", // 个税累计类型 1按月累计 2按年累计
"addValueUpType": "1", // 增值税累计类型 1按月 2按季度
"costRate": 11.22, // 核定成本费用率
"taxRate": 3.20, // 含税价百分比
"serviceRate": 1.25, // 服务费比例
"signNotes": null, // 签约备注
"signTime": null, // 签约时间
}
},
}
```
## **<a name="deliverEdit"> 编辑 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/deliverEdit]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
// 订单对象
"order": {
"id": "13180527789003380", // 订单id\订单号
"legalName": "杨庆菊", // 法人姓名
"idcard": "123身份证", // 身份证号码
"legalMobile": "杨庆菊手机号", // 法人手机号
"bankNo": "2222", // 银行卡号
"capital": "到底是多少", // 注册资本
"names": "山驴比1,山驴比2,山驴比3", // 2~3个个体工商户名称
"businessType": "太难了", // 经营范围
"businessScope": "太狠了", // 经营范围详情
"idcardFront": "在正面", // 身份证正面图
"idcardBack": "反面", // 身份证反面图
},
// 个体工商户信息
"businessmen": {
"id": "12795594625000138", // 个体户id
// 个体工商户执照信息
"name": "杨庆菊有限公司", // 个体户名称
"creditCode": "xxxxxx333333333", // 统一社会信用代码
"businessPlace": "来广营地铁站", // 经营场所
"legalName": "杨庆菊", // 法人姓名
"legalMobile": "杨庆菊手机号", // 法人手机号
"legalIdcard": "2222222222", // 法人身份证号
"regDate": "2019-01-22", // 注册日期
"businessScope": "1,2,3,4,5,", // 经营范围
"businessImg": "http:1.png", // 执照照片
// 个体工商户刻章信息
"gongzhang": "http://gongzhang.png", // 公章
"caiwuzhang": "http://caiwuzhang.png", // 财务章
"fapiaozhang": "http://fapiaozhang.png", // 发票章
"hetongzhang": "http://hetongzhang.png", // 合同章
"farenzhang": "http://farenzhang.png", // 法人章
// 个体户开户信息
"isBank": 1, // 是否开户 0否 1是
"bankName": "https://bankName", // 账户名称
"bankNo": "https://bankNo", // 帐号
"bank": "https://bank", // 开户行
"bankImg": "https://bankImg", // 账户图片
// 税务报道信息
"caImg": "12313212", // CA照片
"taxRegDay": "2019-01-01", // 税务登记日
"taxOrg": "12333", // 税务机构名称
// 邮寄信息
"courierNo": "111111111", // 快递单号
"courierImg": "快递交接图片", // 快递交接图片
}
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null
}
```
## **<a name="deliverClose"> 订单关闭 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/deliverClose]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "12115175152000322", // 订单办理id
"breakReason": "qiqibaba" // 关闭原因
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null
}
```
## **<a name="deliverHandle"> 创建进度 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/deliverHandle]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
// ※※※ 当status == 1120 || status == 1140时,显示为提交审核按钮, 接口还用这个,只传id和status:1030
{
// 公共变量,所有情况都需要传
"id": "1", // 订单办理id
"status": "1010", // 订单状态
// 出执照
"name": "杨庆菊有限公司", // 个体工商户名称
"creditCode": "xxxxxx333333333", // 社会统一信用代码
"businessPlace": "来广营地铁站", // 经营场所
"businessScope": "1,2,3,4,5,", // 经营范围
"regDate": "2019-01-22", // 注册时间
"businessImg": "http:1.png" // 执照照片
"gongshangFile": "http://farenzhang.png" // 新增字段 ------- 办理执照官方文件
// 刻章办理
"gongzhang": "http://gongzhang.png", // 公章
"caiwuzhang": "http://caiwuzhang.png", // 财务章
"fapiaozhang": "http://fapiaozhang.png", // 发票章
"hetongzhang": "http://hetongzhang.png", // 合同章
"farenzhang": "http://farenzhang.png" // 法人章
"kezhangFile": "http://farenzhang.png" // 新增字段 ------- 刻章官方文件
// 银行开户
"isBank":"1", // 是否开户 0否 1是
"bankName":"https://bankName", // 账户名称
"bankNo":"https://bankNo", // 账户号
"bank":"https://bank", // 开户行
"bankImg":"https://bankImg", // 账户信息
"kaihuFile": "http://farenzhang.png" // 新增字段------- 银行开户官方文件
// 税务报到
"caImg": "12313212", // CA认证图
"taxRegDay": "2019-01-01", // 税务登记日
"taxOrg": "12333" // 税务机构名称
"shuiwuFile": "http://farenzhang.png" // 新增字段------- 税务报到官方文件
// 已邮寄
"courierNo": "111111111" // 快递单号
"courierImg": "快递交接图片" // courierImg
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null
}
```
## **<a name="updateOBusinessmenProinvce"> 更新个体户 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/updateOBusinessmenProinvce]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "1", // 个体户id 必填
"name": "1", // 个体户名字
"credit_code": "1", // 个体户社会信用代码
"legal_name": "1", // 法人名字
"reg_date": "1", // 注册时间
"business_place": "1", // 个体户经营地址
"business_scope": "1", // 个体户经营范围 Array 例如:[{...},{...}]
"business_img": "1", // 个体户营业执照
"business_gov_file": "1", // 个体户官方文件
"gongzhang": "1", // 个体户公章
"caiwuzhang": "1", // 个体户财务章
"fapiaozhang": "1", // 个体户发票章
"hetongzhang": "1", // 个体户合同章
"farenzhang": "1", // 个体户法人章
"zhang_gov_file": "1", // 个体户章官方文件
"is_bank": "1", // 是否开户 BOOLEAN true:已经开户 false:未开户
"bank_name": "1", // 账户名称
"bank_no": "1", // 银行账户
"bank": "1", // 银行名称
"bank_gov_file": "1", // 银行官方文件
"tax_reg_day": "1", // 税务报道时间
"tax_org": "1", // 税务登记机构
"tax_gov_file": "1", // 官方文件
"ca_img": "1", // 电子钥匙
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null
}
```
\ No newline at end of file
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