Commit 33ba2431 by 王昆

gsb

parent cb29a10e
...@@ -46,7 +46,7 @@ class OrderCtl extends CtlBase { ...@@ -46,7 +46,7 @@ class OrderCtl extends CtlBase {
currentPage: pobj.currentPage || 1, currentPage: pobj.currentPage || 1,
pageSize: pobj.pageSize || 10, pageSize: pobj.pageSize || 10,
id: this.trim(pobj.id), id: this.trim(pobj.id),
bd_path: req.loginUser.orgpath, operator_id: req.loginUser.id,
deliver_id: this.trim(pobj.deliver_id), deliver_id: this.trim(pobj.deliver_id),
status: pobj.status, status: pobj.status,
createdBegin: this.trim(pobj.createdBegin), createdBegin: this.trim(pobj.createdBegin),
......
...@@ -5,6 +5,7 @@ class OrderService extends ServiceBase { ...@@ -5,6 +5,7 @@ class OrderService extends ServiceBase {
constructor() { constructor() {
super(); super();
this.pushapiSve = system.getObject("service.push.pushapiSve"); this.pushapiSve = system.getObject("service.push.pushapiSve");
this.userSve = system.getObject("service.uc.userSve");
} }
async allProcess(params) { async allProcess(params) {
...@@ -16,8 +17,9 @@ class OrderService extends ServiceBase { ...@@ -16,8 +17,9 @@ class OrderService extends ServiceBase {
} }
async orders(params) { async orders(params) {
var rs = await this.callms("order", "orders", params); var rs = await this.callms("order", "orderDelivers", params);
await this.setUcUser(rs.data.rows); await this.setUcUser(rs.data.rows);
await this.transfields(rs.data.rows);
return rs; return rs;
} }
...@@ -32,7 +34,7 @@ class OrderService extends ServiceBase { ...@@ -32,7 +34,7 @@ class OrderService extends ServiceBase {
async orderInfoAll(params) { async orderInfoAll(params) {
var rs = await this.callms("order", "orderInfoAll", params); var rs = await this.callms("order", "orderInfoAll", params);
await this.setUcUser([rs.data.order]); // await this.setUcUser([rs.data.order]);
return rs; return rs;
} }
...@@ -40,6 +42,40 @@ class OrderService extends ServiceBase { ...@@ -40,6 +42,40 @@ class OrderService extends ServiceBase {
var rs = await this.callms("order", "productDics", params); var rs = await this.callms("order", "productDics", params);
return rs; return rs;
} }
async transfields(rows) {
if (!rows || rows.length == 0) {
return;
}
for (let row of rows) {
if(row.deliver_divide) {
row.deliver_divide = system.f2y(row.deliver_divide);
}
}
}
async setUcUser(rows) {
if (!rows || rows.length == 0) {
return;
}
let ids = [];
for (let row of rows) {
if (row.operator_id) {
ids.push(row.operator_id);
}
}
let userRs = await this.userSve.mapByIds({ ids: ids });
let userMap = userRs.data || {};
for (let row of rows) {
let user = userMap[row.operator_id] || {};
row.operator_name = user.realName || "";
}
}
} }
module.exports = OrderService; module.exports = OrderService;
// var task=new UserService(); // var task=new UserService();
......
const system = require("../../../system"); const system = require("../../../system");
const ServiceBase = require("../../svems.base") const ServiceBase = require("../../svems.base")
class UserService extends ServiceBase { class UserService extends ServiceBase {
constructor() { constructor() {
super(); super();
...@@ -16,8 +17,8 @@ class UserService extends ServiceBase { ...@@ -16,8 +17,8 @@ class UserService extends ServiceBase {
} }
/** /**
* 添加 * 添加
* @param {*} params * @param {*} params
*/ */
async addUser(params) { async addUser(params) {
try { try {
...@@ -47,7 +48,7 @@ class UserService extends ServiceBase { ...@@ -47,7 +48,7 @@ class UserService extends ServiceBase {
/** /**
* 更新 * 更新
* @param {*} params * @param {*} params
*/ */
async updUser(params) { async updUser(params) {
try { try {
...@@ -64,8 +65,9 @@ class UserService extends ServiceBase { ...@@ -64,8 +65,9 @@ class UserService extends ServiceBase {
return system.getResult(null, `系统错误 错误信息 ${error}`); return system.getResult(null, `系统错误 错误信息 ${error}`);
} }
} }
/** /**
* @param {*} params * @param {*} params
*/ */
async page(params) { async page(params) {
try { try {
...@@ -76,8 +78,8 @@ class UserService extends ServiceBase { ...@@ -76,8 +78,8 @@ class UserService extends ServiceBase {
} }
/** /**
* 删除 * 删除
* @param {*} params * @param {*} params
*/ */
async delUser(params) { async delUser(params) {
try { try {
...@@ -89,7 +91,7 @@ class UserService extends ServiceBase { ...@@ -89,7 +91,7 @@ class UserService extends ServiceBase {
/** /**
* 查询明细 * 查询明细
* @param {*} params * @param {*} params
*/ */
async queryById(params) { async queryById(params) {
try { try {
...@@ -101,7 +103,7 @@ class UserService extends ServiceBase { ...@@ -101,7 +103,7 @@ class UserService extends ServiceBase {
/** /**
* 修改密码 * 修改密码
* @param {*} params * @param {*} params
*/ */
async updPassword(params) { async updPassword(params) {
try { try {
...@@ -118,5 +120,24 @@ class UserService extends ServiceBase { ...@@ -118,5 +120,24 @@ class UserService extends ServiceBase {
} }
} }
async mapByIds(params) {
try {
return await this.callms("uc", "mapUserByIds", params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async findByDeliverId(params) {
try {
return await this.callms("uc", "findByUctype", {uctype: params.deliver_id});
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
} }
module.exports = UserService; module.exports = UserService;
\ No newline at end of file
...@@ -105,7 +105,7 @@ module.exports = function (app) { ...@@ -105,7 +105,7 @@ module.exports = function (app) {
if(req.loginUser) { if(req.loginUser) {
req.body.saas_id = req.loginUser.saas_id; req.body.saas_id = req.loginUser.saas_id;
req.body.deliverId = req.loginUser.uctypeId || ""; req.body.deliverId = req.loginUser.uctypeId || "";
req.body.delivererId = req.loginUser.uctypeId || ""; req.body.deliver_id = req.loginUser.uctypeId || "";
} }
params.push(methodName); params.push(methodName);
......
<a name="menu">目录</a> <a name="menu">目录</a>
1. [业务进度字典](#processList) 1. [业务进度字典](#processList)
1. [订单管理列表](#platformorders) 1. [订单管理列表](#allOrders)
1. [我的业务订单](#myorders) 1. [我的业务订单](#myorders)
1. [平台业务员查询](#salesmanList) 1. [平台业务员查询](#salesmanList)
1. [平台分配业务员](#orderAssign) 1. [平台分配业务员](#orderAssign)
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
``` ```
## **<a name="platformorders"> 订单管理列表 </a>** ## **<a name="allOrders"> 订单管理列表 </a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/order/orderCtl/platformOrders] [/web/order/orderCtl/allOrders]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
...@@ -63,11 +63,9 @@ ...@@ -63,11 +63,9 @@
按钮展示规则 按钮展示规则
status == 1000 业务分配 status == 1030 业务分配
status == 1020 交付商分配 status == 1130 提交审核
status == 1020 交付商分配 status == 1160 交付商分配
status == 1140 交付商审核
status == 1170 交付商验收
所有状态 查看详情 所有状态 查看详情
...@@ -79,41 +77,32 @@ ...@@ -79,41 +77,32 @@
"status": 0, "status": 0,
"msg": "操作成功", "msg": "操作成功",
"data": { "data": {
"count": 9, "count": 1,
"rows": [ "rows": [
{ {
"id": "1567430558002579", // 订单编号 "id": "1567514119003310", // 订单id
"status": 1000, // 订单状态 "created_at": "2020-01-10 07:14:20", // 创建时间
"statusName": "待分配", // 订单状态名称 "service_items": "10010200,10010300,10010400,10010500", // 服务项id
"assign_time": null, // 分配时间 "service_items_name": "工商注册,刻章办理,银行开户,税务报道" // 服务项名称
"assign_user_name": "郭德纲46" // 分配人 "status": 1200, // 订单状态
"product_id": 10010000, // 产品id "statusName": "订单完成", // 订单状态名称
"bd_name": "", // 业务员 "deliver_divide": 20, // 价格
"contact_mobile": "13777777777", // 联系电话 "operator_id": 0, // 业务员id
"created_at": "2020-01-09T07:42:23.000Z", // 创建时间 "operator_name": "赵本山", // 业务员姓名
"desc": "", // 订单描述 "completed_at": null, // 完成时间
"osource": { "service_remark": "no note", // 服务项详情
"id": 1000, "deliver_name": "赵本山交付商", // 交付商名称
"name": "企服通", // 渠道名称
},
"oproduct": { // 产品object
"name": "个体户注册一体化", // 产品名称
"desc": "工商注册,刻章,银行卡户,税务报到", // 产品描述
},
"odeliver": { // 交付商object
"deliver_name": "" // 交付商名称
},
"next_status": [ // 下一个进度 "next_status": [ // 下一个进度
{ {
"next_status": "1010", // 状态码 "next_status": "1010", // 状态码
"next_name": "待完善" // 状态名称 "next_name": "待完善" // 状态名称
} }
], ],
}, }
] ]
}, },
"bizmsg": "empty", "bizmsg": "empty",
"requestid": "3a71cc19808d4fd88bfac8c82fb4f24d" "requestid": "2749dcc10733440fbeacc8a49dd9758d"
} }
...@@ -139,10 +128,18 @@ ...@@ -139,10 +128,18 @@
"createdEnd": "" // 创建时间 结束 "createdEnd": "" // 创建时间 结束
} }
"1040" "工商注册中"
"1050" "工商注册完成"
"1060" "刻章办理中"
"1070" "刻章办理完成"
"1080" "银行开户中"
"1090" "银行开户完成"
"1100" "税务报道中"
"1110" "税务报道完成"
按钮展示规则 按钮展示规则
status == 1010 完善订单 status == 1040 || 1050 || 1060 || 1070 || 1080 || 1090 || 1100 || 1110 新建进度
status == 1180 客户交付 status == 1120 核定税种
status == 1190 订单完成
所有状态 查看详情 所有状态 查看详情
...@@ -154,41 +151,32 @@ ...@@ -154,41 +151,32 @@
"status": 0, "status": 0,
"msg": "操作成功", "msg": "操作成功",
"data": { "data": {
"count": 9, "count": 1,
"rows": [ "rows": [
{ {
"id": "1567430558002579", // 订单编号 "id": "1567514119003310", // 订单id
"status": 1000, // 订单状态 "created_at": "2020-01-10 07:14:20", // 创建时间
"statusName": "待分配", // 订单状态名称 "service_items": "10010200,10010300,10010400,10010500", // 服务项id
"assign_time": null, // 分配时间 "service_items_name": "工商注册,刻章办理,银行开户,税务报道" // 服务项名称
"assign_user_name": "郭德纲46" // 分配人 "status": 1200, // 订单状态
"product_id": 10010000, // 产品id "statusName": "订单完成", // 订单状态名称
"bd_name": "", // 业务员 "deliver_divide": 20, // 价格
"contact_mobile": "13777777777", // 联系电话 "operator_id": 0, // 业务员id
"created_at": "2020-01-09T07:42:23.000Z", // 创建时间 "operator_name": "赵本山", // 业务员姓名
"desc": "", // 订单描述 "completed_at": null, // 完成时间
"osource": { "service_remark": "no note", // 服务项详情
"id": 1000, "deliver_name": "赵本山交付商", // 交付商名称
"name": "企服通", // 渠道名称
},
"oproduct": { // 产品object
"name": "个体户注册一体化", // 产品名称
"desc": "工商注册,刻章,银行卡户,税务报到", // 产品描述
},
"odeliver": { // 交付商object
"deliver_name": "" // 交付商名称
},
"next_status": [ // 下一个进度 "next_status": [ // 下一个进度
{ {
"next_status": "1010", // 状态码 "next_status": "1010", // 状态码
"next_name": "待完善" // 状态名称 "next_name": "待完善" // 状态名称
} }
], ],
}, }
] ]
}, },
"bizmsg": "empty", "bizmsg": "empty",
"requestid": "3a71cc19808d4fd88bfac8c82fb4f24d" "requestid": "2749dcc10733440fbeacc8a49dd9758d"
} }
...@@ -274,7 +262,7 @@ ...@@ -274,7 +262,7 @@
"status": 0, "status": 0,
"msg": "success", "msg": "success",
"data": [ "data": [
{ {+
"id": 10010200, // id "id": 10010200, // id
"name": "工商注册", // 名称 "name": "工商注册", // 名称
}, },
......
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