Commit 97e6303e by largezhou

Merge branch 'test' into 'master' (merge request !5)

流程优化
公司注册流程优化 
bug修复
parents cc106001 e94c6858
......@@ -29,6 +29,10 @@ class BizOptCtl extends CtlBase {
}
delete pobj.search.dateType
}
if (pobj.search && pobj.search.sourceName) {
pobj.search.source_name=pobj.search.sourceName
delete pobj.search.sourceName
}
const rs = await this.service.findAndCountAll(pobj);
let rarr = [];
let results = rs.results.rows;
......@@ -37,19 +41,19 @@ class BizOptCtl extends CtlBase {
robj.id = element.id;//数据的id
robj.demand_code = element.demand_code;//商机编号
robj.source = element.source_name;//商机来源
// robj.source_name = element.source_name;//商机来源-jiansuo
// robj.source_name = element.source_name;//商机来源-jiansuo
robj.business_type = element.business_type;//商机类型
robj.business_info_person = element.business_info.contactsName;//联系人
robj.v_coname = element.v_coname;//联系人-shousuo
robj.business_info_phone = system.decryptStr(element.business_info.contactsPhone);//联系电话
robj.v_cophone = system.decryptStr(element.v_cophone);//联系电话-shousuo
robj.business_status = element.business_status;//商机当前状态
if (element.business_info.serviceName && element.business_info.serviceName != 'undefined'){
if (element.business_info.serviceName && element.business_info.serviceName != 'undefined') {
robj.serviceName = element.business_info.serviceName;//服务地区
}
else{
robj.serviceName = "";
}
else {
robj.serviceName = "";
}
robj.updated_at = this.timeFormat(element.updated_at);//商机当前状态日期
robj.servicerName = element.facilitator_name;
......@@ -57,8 +61,8 @@ class BizOptCtl extends CtlBase {
robj.sourceName = element.source_name;//渠道来源
robj.source_name = element.source_name;//渠道来源--前端服务
robj.salesman_name=element.salesman_name;
robj.salesman_phone=system.decryptStr(element.salesman_phone);
robj.salesman_name = element.salesman_name;
robj.salesman_phone = system.decryptStr(element.salesman_phone);
rarr.push(robj);
});
......@@ -128,18 +132,25 @@ class BizOptCtl extends CtlBase {
}
}
/*更新业务员信息*/
async updateSalesmanInfoByDemandCode(mobj, qobj, req){
/*更新业务员信息*/
async updateSalesmanInfoByDemandCode(mobj, qobj, req) {
var pobj = mobj.d;
if (pobj.businessMode && pobj.businessMode != 'undefined'){
try{
if (pobj.businessMode && pobj.businessMode != 'undefined') {
const data = await this.service.findOne({
demand_code: pobj.businessMode,
facilitator_id: mobj.company_id
});
if (!data) {
return system.getResultError("没有权限");
}
try {
var res = await this.service.findInfoByDemandCode(pobj);
if (res){
if (res) {
var sInfo = {
"flowType": "BIZ",
"flowId": res.id,
"flowCode":pobj.businessMode,
"salesmanInfo":{
"flowCode": pobj.businessMode,
"salesmanInfo": {
"oldOpcode": res.salesman_opcode,
"oldClerkName": res.salesman_name,
"oldClerkId": res.salesman_id,
......@@ -158,16 +169,16 @@ class BizOptCtl extends CtlBase {
await this.service.updateSalesmanInfoByDemandCode(pobj);//更新业务员信息
return system.getResult("操作成功!");
}
else{
else {
return system.getResultError("未找到相关数据");
}
}
catch(error){
catch (error) {
return system.getResultError(error);
}
}
else{
else {
return system.getResultError("参数错误!");
}
}
......@@ -265,9 +276,9 @@ class BizOptCtl extends CtlBase {
}
timeFormat(date) {
let localTime = moment.utc(date).toDate();
localTime = moment(localTime).format("YYYY-MM-DD");
return localTime;
// let localTime = moment.utc(date).toDate();
// localTime = moment(localTime).format("YYYY-MM-DD HH:mm:ss");
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
}
module.exports = BizOptCtl;
......
......@@ -40,7 +40,7 @@ class DeliverybillDao extends Dao {
//不是来自平台前端查询
if (qobj.bizpath && qobj.bizpath.indexOf("pmx") < 0) {
qc.where.product_code = qc.where.product_code || {
[this.db.Op.notIn]: ["ICP", "EDI", "ICPANNUALREPORT", "EDIANNUALREPORT"]
[this.db.Op.notIn]: ["ICP", "EDI", "ICPANNUALREPORT", "EDIANNUALREPORT", "bookkeeping"]
}
if (qobj.bizpath && qobj.bizpath != "") {
if (qobj.bizpath.indexOf("myDeliver") > 0) {//说明是从商机列表过来的
......@@ -84,18 +84,31 @@ class DeliverybillDao extends Dao {
return await this.updateByWhere(setobj, whereobj, t);
}
/*更新交付人员信息*/
/*更新业务员/交付员信息*/
async updateSalesmanInfoByDeliverCode(qobj, t) {
var setobj = {};
if (qobj.salesmanId && qobj.salesmanId != 'undefined') {
setobj.delivery_man_id = qobj.salesmanId;
};
if (qobj.salesmanName && qobj.salesmanName != 'undefined') {
setobj.delivery_man_name = qobj.salesmanName;
};
if (qobj.salesmanOpcode && qobj.salesmanOpcode != 'undefined') {
setobj.delivery_man_opcode = qobj.salesmanOpcode;
};
if (qobj.type == "salesman") {
if (qobj.salesmanId && qobj.salesmanId != 'undefined') {
setobj.salesman_id = qobj.salesmanId;
};
if (qobj.salesmanName && qobj.salesmanName != 'undefined') {
setobj.salesman_name = qobj.salesmanName;
};
if (qobj.salesmanOpcode && qobj.salesmanOpcode != 'undefined') {
setobj.salesman_opcode = qobj.salesmanOpcode;
};
}
if (qobj.type == "deliverman") {
if (qobj.deliverymanId && qobj.deliverymanId != 'undefined') {
setobj.delivery_man_id = qobj.deliverymanId;
};
if (qobj.deliverymanName && qobj.deliverymanName != 'undefined') {
setobj.delivery_man_name = qobj.deliverymanName;
};
if (qobj.deliverymanOpcode && qobj.deliverymanOpcode != 'undefined') {
setobj.delivery_man_opcode = qobj.deliverymanOpcode;
};
}
// if (qobj.salesmanPhone && qobj.salesmanPhone != 'undefined') {
// setobj.salesman_phone = qobj.salesmanPhone;
// };
......@@ -169,7 +182,7 @@ class DeliverybillDao extends Dao {
if (qobj.clerkName && qobj.clerkName != 'undefined') {
obj.delivery_man_name = qobj.clerkName;
}
if (qobj.salesmanName && qobj.salesmanName != undefined){
if (qobj.salesmanName && qobj.salesmanName != undefined) {
obj.salesman_name = qobj.salesmanName;
}
if (qobj.salesmanPhone && qobj.salesmanPhone != 'undefined') {
......
......@@ -327,8 +327,8 @@ module.exports = {
"/qcfw/edi/":"EDI",
"/qcfw/icpannals/":"ICPANNUALREPORT",
"/qcfw/ediannals/":"EDIANNUALREPORT",
"ic/cpdljz/":"psAgentCase",
"ic/cpkzfw/":"psSealSevCase"
"/ic/cpdljz/":"psAgentCase",
"/ic/cpkzfw/":"psSealSevCase"
},
"fdyDict": {//产品反对应关系
"companyCase": "/ic/gsreg/",
......@@ -346,8 +346,8 @@ module.exports = {
"EDI":"/qcfw/edi/",
"ICPANNUALREPORT":"/qcfw/icpannals/",
"EDIANNUALREPORT":"/qcfw/ediannals/",
"psAgentCase":"ic/cpdljz/",
"psSealSevCase":"ic/cpkzfw/"
"psAgentCase":"/ic/cpdljz/",
"psSealSevCase":"/ic/cpkzfw/"
},
"ddyDict": {//和庄冰的交付单对应关系
"paid": 1,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
h3[data-v-197e0440]{margin:10px .25em 2ex 1px}.cell-edit-color[data-v-197e0440]{color:#2db7f5;font-weight:700}#bottom[data-v-197e0440]{position:absolute;right:0;left:0;bottom:0;border-top:1px solid #e8e8e8;padding:14px 14px;color:#f0f8ff;background:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}#turnright[data-v-197e0440]{margin-right:0}
\ No newline at end of file
h3[data-v-150bc206]{margin:10px .25em 2ex 1px}.cell-edit-color[data-v-150bc206]{color:#2db7f5;font-weight:700}#bottom[data-v-150bc206]{position:absolute;right:0;left:0;bottom:0;border-top:1px solid #e8e8e8;padding:14px 14px;color:#f0f8ff;background:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}#turnright[data-v-150bc206]{margin-right:0}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-0ecc464f.e8a7e262.css rel=prefetch><link href=/css/chunk-103658d6.9a1475cf.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-168103e5.3623703d.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3bb01b7e.a1ef4ffa.css rel=prefetch><link href=/css/chunk-599a3504.1e75f0e2.css rel=prefetch><link href=/css/chunk-69fcc7bb.03f445a2.css rel=prefetch><link href=/css/chunk-6f711436.09462324.css rel=prefetch><link href=/css/chunk-7dc6d142.86cde795.css rel=prefetch><link href=/css/chunk-b07d3c52.5ca8040e.css rel=prefetch><link href=/css/chunk-c1a112d6.f7e9e5eb.css rel=prefetch><link href=/css/chunk-dba5f5e4.c216ed15.css rel=prefetch><link href=/js/chunk-0ecc464f.4c28cc51.js rel=prefetch><link href=/js/chunk-103658d6.b2244c62.js rel=prefetch><link href=/js/chunk-14b9857b.f43c31a1.js rel=prefetch><link href=/js/chunk-168103e5.36761154.js rel=prefetch><link href=/js/chunk-2c359864.463fa80e.js rel=prefetch><link href=/js/chunk-2d0be336.3ce23c4b.js rel=prefetch><link href=/js/chunk-3385141a.7777148b.js rel=prefetch><link href=/js/chunk-3bb01b7e.ab82026f.js rel=prefetch><link href=/js/chunk-50ac3ef2.ed105fa8.js rel=prefetch><link href=/js/chunk-581ae672.a14aa66e.js rel=prefetch><link href=/js/chunk-599a3504.f9fc6f3a.js rel=prefetch><link href=/js/chunk-69fcc7bb.232a45b2.js rel=prefetch><link href=/js/chunk-6f711436.aa5fc7cc.js rel=prefetch><link href=/js/chunk-7dc6d142.5a670f53.js rel=prefetch><link href=/js/chunk-9ebfd05c.a16455cd.js rel=prefetch><link href=/js/chunk-b07d3c52.6f962df9.js rel=prefetch><link href=/js/chunk-c1a112d6.947b33c9.js rel=prefetch><link href=/js/chunk-dba5f5e4.08683d1a.js rel=prefetch><link href=/js/chunk-f116a998.b9b2f1ed.js rel=prefetch><link href=/js/chunk-f285db4a.9c446159.js rel=prefetch><link href=/css/app.04d31a64.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.731858bd.js rel=preload as=script><link href=/js/chunk-vendors.3d21815e.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.04d31a64.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.3d21815e.js></script><script src=/js/app.731858bd.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-0ecc464f.e8a7e262.css rel=prefetch><link href=/css/chunk-103658d6.9a1475cf.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-168103e5.3623703d.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3bb01b7e.a1ef4ffa.css rel=prefetch><link href=/css/chunk-599a3504.1e75f0e2.css rel=prefetch><link href=/css/chunk-69fcc7bb.03f445a2.css rel=prefetch><link href=/css/chunk-6f711436.09462324.css rel=prefetch><link href=/css/chunk-b07d3c52.5ca8040e.css rel=prefetch><link href=/css/chunk-c1a112d6.f7e9e5eb.css rel=prefetch><link href=/css/chunk-dba5f5e4.c216ed15.css rel=prefetch><link href=/css/chunk-e9f5b4dc.001ee586.css rel=prefetch><link href=/js/chunk-0ecc464f.4c28cc51.js rel=prefetch><link href=/js/chunk-103658d6.b2244c62.js rel=prefetch><link href=/js/chunk-14b9857b.f43c31a1.js rel=prefetch><link href=/js/chunk-168103e5.36761154.js rel=prefetch><link href=/js/chunk-2c359864.463fa80e.js rel=prefetch><link href=/js/chunk-2d0be336.3ce23c4b.js rel=prefetch><link href=/js/chunk-3385141a.7777148b.js rel=prefetch><link href=/js/chunk-3bb01b7e.ab82026f.js rel=prefetch><link href=/js/chunk-50ac3ef2.ed105fa8.js rel=prefetch><link href=/js/chunk-581ae672.a14aa66e.js rel=prefetch><link href=/js/chunk-599a3504.f9fc6f3a.js rel=prefetch><link href=/js/chunk-69fcc7bb.232a45b2.js rel=prefetch><link href=/js/chunk-6f711436.4938051f.js rel=prefetch><link href=/js/chunk-9ebfd05c.a16455cd.js rel=prefetch><link href=/js/chunk-b07d3c52.6f962df9.js rel=prefetch><link href=/js/chunk-c1a112d6.947b33c9.js rel=prefetch><link href=/js/chunk-dba5f5e4.08683d1a.js rel=prefetch><link href=/js/chunk-e9f5b4dc.0a91bfd9.js rel=prefetch><link href=/js/chunk-f116a998.b9b2f1ed.js rel=prefetch><link href=/js/chunk-f285db4a.9c446159.js rel=prefetch><link href=/css/app.cedbaf97.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.d6c04d34.js rel=preload as=script><link href=/js/chunk-vendors.3d21815e.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.cedbaf97.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.3d21815e.js></script><script src=/js/app.d6c04d34.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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